Site Class

A web app, a mobile app backend, or an API app.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Inheritance
azure.mgmt.web.v2020_12_01.models._models_py3.Resource
Site

Constructor

Site(*, location: str, kind: typing.Union[str, NoneType] = None, tags: typing.Union[typing.Dict[str, str], NoneType] = None, identity: typing.Union[_ForwardRef('ManagedServiceIdentity'), NoneType] = None, enabled: typing.Union[bool, NoneType] = None, host_name_ssl_states: typing.Union[typing.List[_ForwardRef('HostNameSslState')], NoneType] = None, server_farm_id: typing.Union[str, NoneType] = None, reserved: typing.Union[bool, NoneType] = False, is_xenon: typing.Union[bool, NoneType] = False, hyper_v: typing.Union[bool, NoneType] = False, site_config: typing.Union[_ForwardRef('SiteConfig'), NoneType] = None, scm_site_also_stopped: typing.Union[bool, NoneType] = False, hosting_environment_profile: typing.Union[_ForwardRef('HostingEnvironmentProfile'), NoneType] = None, client_affinity_enabled: typing.Union[bool, NoneType] = None, client_cert_enabled: typing.Union[bool, NoneType] = None, client_cert_mode: typing.Union[str, _ForwardRef('ClientCertMode'), NoneType] = None, client_cert_exclusion_paths: typing.Union[str, NoneType] = None, host_names_disabled: typing.Union[bool, NoneType] = None, custom_domain_verification_id: typing.Union[str, NoneType] = None, container_size: typing.Union[int, NoneType] = None, daily_memory_time_quota: typing.Union[int, NoneType] = None, cloning_info: typing.Union[_ForwardRef('CloningInfo'), NoneType] = None, https_only: typing.Union[bool, NoneType] = None, redundancy_mode: typing.Union[str, _ForwardRef('RedundancyMode'), NoneType] = None, storage_account_required: typing.Union[bool, NoneType] = None, key_vault_reference_identity: typing.Union[str, NoneType] = None, virtual_network_subnet_id: typing.Union[str, NoneType] = None, **kwargs)

Parameters

kind
str
Required

Kind of resource.

location
str
Required

Required. Resource Location.

tags
dict[str, str]
Required

A set of tags. Resource tags.

identity
ManagedServiceIdentity
Required

Managed service identity.

enabled
bool
Required

<code>true</code> if the app is enabled; otherwise, <code>false</code>. Setting this value to false disables the app (takes the app offline).

host_name_ssl_states
list[HostNameSslState]
Required

Hostname SSL states are used to manage the SSL bindings for app's hostnames.

server_farm_id
str
Required

Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}".

reserved
bool
Required

<code>true</code> if reserved; otherwise, <code>false</code>.

is_xenon
bool
Required

Obsolete: Hyper-V sandbox.

hyper_v
bool
Required

Hyper-V sandbox.

site_config
SiteConfig
Required

Configuration of the app.

scm_site_also_stopped
bool
Required

<code>true</code> to stop SCM (KUDU) site when the app is stopped; otherwise, <code>false</code>. The default is <code>false</code>.

hosting_environment_profile
HostingEnvironmentProfile
Required

App Service Environment to use for the app.

client_affinity_enabled
bool
Required

<code>true</code> to enable client affinity; <code>false</code> to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is <code>true</code>.

client_cert_enabled
bool
Required

<code>true</code> to enable client certificate authentication (TLS mutual authentication); otherwise, <code>false</code>. Default is <code>false</code>.

client_cert_mode
str or ClientCertMode
Required

This composes with ClientCertEnabled setting.

  • ClientCertEnabled: false means ClientCert is ignored.

  • ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required.

  • ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or

accepted. Possible values include: "Required", "Optional", "OptionalInteractiveUser".

client_cert_exclusion_paths
str
Required

client certificate authentication comma-separated exclusion paths.

host_names_disabled
bool
Required

<code>true</code> to disable the public hostnames of the app; otherwise, <code>false</code>.

If <code>true</code>, the app is only accessible via API management process.

custom_domain_verification_id
str
Required

Unique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification.

container_size
int
Required

Size of the function container.

daily_memory_time_quota
int
Required

Maximum allowed daily memory-time quota (applicable on dynamic apps only).

cloning_info
CloningInfo
Required

If specified during app creation, the app is cloned from a source app.

https_only
bool
Required

HttpsOnly: configures a web site to accept only https requests. Issues redirect for http requests.

redundancy_mode
str or RedundancyMode
Required

Site redundancy mode. Possible values include: "None", "Manual", "Failover", "ActiveActive", "GeoRedundant".

storage_account_required
bool
Required

Checks if Customer provided storage account is required.

key_vault_reference_identity
str
Required

Identity to use for Key Vault Reference authentication.

virtual_network_subnet_id
str
Required

Azure Resource Manager ID of the Virtual network and subnet to be joined by Regional VNET Integration. This must be of the form /subscriptions/{subscriptionName}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{vnetName}/subnets/{subnetName}.

Variables

id
str

Resource Id.

name
str

Resource Name.

type
str

Resource type.

state
str

Current state of the app.

host_names
list[str]

Hostnames associated with the app.

repository_site_name
str

Name of the repository site.

usage_state
str or UsageState

State indicating whether the app has exceeded its quota usage. Read-only. Possible values include: "Normal", "Exceeded".

enabled_host_names
list[str]

Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, the app is not served on those hostnames.

availability_state
str or SiteAvailabilityState

Management information availability state for the app. Possible values include: "Normal", "Limited", "DisasterRecoveryMode".

last_modified_time_utc
datetime

Last time the app was modified, in UTC. Read-only.

traffic_manager_host_names
list[str]

Azure Traffic Manager hostnames associated with the app. Read-only.

target_swap_slot
str

Specifies which deployment slot this app will swap into. Read-only.

outbound_ip_addresses
str

List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from tenants that site can be hosted with current settings. Read-only.

possible_outbound_ip_addresses
str

List of IP addresses that the app uses for outbound connections (e.g. database access). Includes VIPs from all tenants except dataComponent. Read-only.

suspended_till
datetime

App suspended till in case memory-time quota is exceeded.

max_number_of_workers
int

Maximum number of workers. This only applies to Functions container.

resource_group
str

Name of the resource group the app belongs to. Read-only.

is_default_container
bool

<code>true</code> if the app is a default container; otherwise, <code>false</code>.

default_host_name
str

Default hostname of the app. Read-only.

slot_swap_status
SlotSwapStatus

Status of the last deployment slot swap operation.

in_progress_operation_id
str

Specifies an operation id if this site has a pending operation.