SiteConfig Class

Configuration of an App Service app.

Constructor

SiteConfig()

Variables

Name Description
number_of_workers
int

Number of workers.

default_documents

Default documents.

net_framework_version
str

.NET Framework version.

php_version
str

Version of PHP.

python_version
str

Version of Python.

node_version
str

Version of Node.js.

power_shell_version
str

Version of PowerShell.

linux_fx_version
str

Linux App Framework and version.

windows_fx_version
str

Xenon App Framework and version.

request_tracing_enabled

true if request tracing is enabled; otherwise, false.

request_tracing_expiration_time
str

Request tracing expiration time.

remote_debugging_enabled

true if remote debugging is enabled; otherwise, false.

remote_debugging_version
str

Remote debugging version.

http_logging_enabled

true if HTTP logging is enabled; otherwise, false.

acr_use_managed_identity_creds

Flag to use Managed Identity Creds for ACR pull.

acr_user_managed_identity_id
str

If using user managed identity, the user managed identity ClientId.

logs_directory_size_limit
int

HTTP logs directory size limit.

detailed_error_logging_enabled

true if detailed error logging is enabled; otherwise, false.

publishing_username
str

Publishing user name.

app_settings
list[<xref:"NameValuePair">]

Application settings. This property is not returned in response to normal create and read requests since it may contain sensitive information.

metadata
list[<xref:"NameValuePair">]

Application metadata. This property cannot be retrieved, since it may contain secrets.

connection_strings
list[<xref:"ConnStringInfo">]

Connection strings. This property is not returned in response to normal create and read requests since it may contain sensitive information.

machine_key
<xref:<xref:"SiteMachineKey">>

Site MachineKey.

handler_mappings
list[<xref:"HandlerMapping">]

Handler mappings.

document_root
str

Document root.

scm_type
Union[str, <xref:"ScmType">]

SCM type. Known values are: "None", "Dropbox", "Tfs", "LocalGit", "GitHub", "CodePlexGit", "CodePlexHg", "BitbucketGit", "BitbucketHg", "ExternalGit", "ExternalHg", "OneDrive", "VSO", and "VSTSRM".

use32_bit_worker_process

true to use 32-bit worker process; otherwise, false.

web_sockets_enabled

true if WebSocket is enabled; otherwise, false.

always_on

true if Always On is enabled; otherwise, false.

java_version
str

Java version.

java_container
str

Java container.

java_container_version
str

Java container version.

app_command_line
str

App command line to launch.

managed_pipeline_mode
Union[str, <xref:"ManagedPipelineMode">]

Managed pipeline mode. Known values are: "Integrated" and "Classic".

virtual_applications
list[<xref:"VirtualApplication">]

Virtual applications.

load_balancing
Union[str, <xref:"SiteLoadBalancing">]

Site load balancing. Known values are: "WeightedRoundRobin", "LeastRequests", "LeastResponseTime", "WeightedTotalTraffic", "RequestHash", "PerSiteRoundRobin", and "LeastRequestsWithTieBreaker".

experiments
<xref:<xref:"Experiments">>

This is work around for polymorphic types.

limits
<xref:<xref:"SiteLimits">>

Site limits.

auto_heal_enabled

true if Auto Heal is enabled; otherwise, false.

auto_heal_rules
<xref:<xref:"AutoHealRules">>

Auto Heal rules.

tracing_options
str

Tracing options.

vnet_name
str

Virtual Network name.

vnet_route_all_enabled

Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied.

vnet_private_ports_count
int

The number of private ports assigned to this app. These will be assigned dynamically on runtime.

cors
<xref:<xref:"CorsSettings">>

Cross-Origin Resource Sharing (CORS) settings.

push
<xref:<xref:"PushSettings">>

Push endpoint settings.

api_definition
<xref:<xref:"ApiDefinitionInfo">>

Information about the formal API definition for the app.

api_management_config
<xref:<xref:"ApiManagementConfig">>

Azure API management settings linked to the app.

auto_swap_slot_name
str

Auto-swap slot name.

local_my_sql_enabled

true to enable local MySQL; otherwise, false.

managed_service_identity_id
int

Managed Service Identity Id.

x_managed_service_identity_id
int

Explicit Managed Service Identity Id.

key_vault_reference_identity
str

Identity to use for Key Vault Reference authentication.

ip_security_restrictions
list[<xref:"IpSecurityRestriction">]

IP security restrictions for main.

ip_security_restrictions_default_action
Union[str, <xref:"DefaultAction">]

Default action for main access restriction if no rules are matched. Known values are: "Allow" and "Deny".

scm_ip_security_restrictions
list[<xref:"IpSecurityRestriction">]

IP security restrictions for scm.

scm_ip_security_restrictions_default_action
Union[str, <xref:"DefaultAction">]

Default action for scm access restriction if no rules are matched. Known values are: "Allow" and "Deny".

scm_ip_security_restrictions_use_main

IP security restrictions for scm to use main.

http20_enabled

Http20Enabled: configures a web site to allow clients to connect over http2.0.

http20_proxy_flag
int

Http20ProxyFlag: Configures a website to allow http2.0 to pass be proxied all the way to the app. 0 = disabled, 1 = pass through all http2 traffic, 2 = pass through gRPC only.

min_tls_version
Union[str, <xref:"SupportedTlsVersions">]

MinTlsVersion: configures the minimum version of TLS required for SSL requests. Known values are: "1.0", "1.1", "1.2", and "1.3".

min_tls_cipher_suite
Union[str, <xref:"TlsCipherSuites">]

The minimum strength TLS cipher suite allowed for an application. Known values are: "TLS_AES_256_GCM_SHA384", "TLS_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_GCM_SHA384", "TLS_RSA_WITH_AES_128_GCM_SHA256", "TLS_RSA_WITH_AES_256_CBC_SHA256", "TLS_RSA_WITH_AES_128_CBC_SHA256", "TLS_RSA_WITH_AES_256_CBC_SHA", and "TLS_RSA_WITH_AES_128_CBC_SHA".

scm_min_tls_version
Union[str, <xref:"SupportedTlsVersions">]

ScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. Known values are: "1.0", "1.1", "1.2", and "1.3".

ftps_state
Union[str, <xref:"FtpsState">]

State of FTP / FTPS service. Known values are: "AllAllowed", "FtpsOnly", and "Disabled".

pre_warmed_instance_count
int

Number of preWarmed instances. This setting only applies to the Consumption and Elastic Plans.

function_app_scale_limit
int

Maximum number of workers that a site can scale out to. This setting only applies to the Consumption and Elastic Premium Plans.

elastic_web_app_scale_limit
int

Maximum number of workers that a site can scale out to. This setting only applies to apps in plans where ElasticScaleEnabled is true.

health_check_path
str

Health check path.

functions_runtime_scale_monitoring_enabled

Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, the ScaleController will not monitor event sources directly, but will instead call to the runtime to get scale status.

website_time_zone
str

Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionTime Zones.

minimum_elastic_instance_count
int

Number of minimum instance count for a site This setting only applies to the Elastic Plans.

azure_storage_accounts
dict[str, <xref:"AzureStorageInfoValue">]

List of Azure Storage Accounts.

public_network_access
str

Property to allow or block all public traffic.

Attributes

acrUseManagedIdentityCreds

Flag to use Managed Identity Creds for ACR pull.

acrUseManagedIdentityCreds: bool

acrUserManagedIdentityID

If using user managed identity, the user managed identity ClientId.

acrUserManagedIdentityID: str

alwaysOn

true if Always On is enabled; otherwise, false.

alwaysOn: bool

apiDefinition

Information about the formal API definition for the app.

apiDefinition: ApiDefinitionInfo

apiManagementConfig

Azure API management settings linked to the app.

apiManagementConfig: ApiManagementConfig

appCommandLine

App command line to launch.

appCommandLine: str

appSettings

Application settings. This property is not returned in response to normal create and read requests since it may contain sensitive information.

appSettings: list['NameValuePair']

autoHealEnabled

true if Auto Heal is enabled; otherwise, false.

autoHealEnabled: bool

autoHealRules

Auto Heal rules.

autoHealRules: AutoHealRules

autoSwapSlotName

Auto-swap slot name.

autoSwapSlotName: str

azureStorageAccounts

List of Azure Storage Accounts.

azureStorageAccounts: dict[str, 'AzureStorageInfoValue']

connectionStrings

Connection strings. This property is not returned in response to normal create and read requests since it may contain sensitive information.

connectionStrings: list['ConnStringInfo']

cors

Cross-Origin Resource Sharing (CORS) settings.

cors: CorsSettings

defaultDocuments

Default documents.

defaultDocuments: list[str]

detailedErrorLoggingEnabled

true if detailed error logging is enabled; otherwise, false.

detailedErrorLoggingEnabled: bool

documentRoot

Document root.

documentRoot: str

elasticWebAppScaleLimit

Maximum number of workers that a site can scale out to. This setting only applies to apps in plans where ElasticScaleEnabled is true.

elasticWebAppScaleLimit: int

experiments

This is work around for polymorphic types.

experiments: Experiments

ftpsState

"AllAllowed", "FtpsOnly", and "Disabled".

ftpsState: str | FtpsState

functionAppScaleLimit

Maximum number of workers that a site can scale out to. This setting only applies to the Consumption and Elastic Premium Plans.

functionAppScaleLimit: int

functionsRuntimeScaleMonitoringEnabled

Gets or sets a value indicating whether functions runtime scale monitoring is enabled. When enabled, the ScaleController will not monitor event sources directly, but will instead call to the runtime to get scale status.

functionsRuntimeScaleMonitoringEnabled: bool

handlerMappings

Handler mappings.

handlerMappings: list['HandlerMapping']

healthCheckPath

Health check path.

healthCheckPath: str

http20Enabled

configures a web site to allow clients to connect over http2.0.

http20Enabled: bool

http20ProxyFlag

Configures a website to allow http2.0 to pass be proxied all the way to the app. 0 = disabled, 1 = pass through all http2 traffic, 2 = pass through gRPC only.

http20ProxyFlag: int

httpLoggingEnabled

true if HTTP logging is enabled; otherwise, false.

httpLoggingEnabled: bool

ipSecurityRestrictions

IP security restrictions for main.

ipSecurityRestrictions: list['IpSecurityRestriction']

ipSecurityRestrictionsDefaultAction

"Allow" and "Deny".

ipSecurityRestrictionsDefaultAction: str | DefaultAction

javaContainer

Java container.

javaContainer: str

javaContainerVersion

Java container version.

javaContainerVersion: str

javaVersion

Java version.

javaVersion: str

keyVaultReferenceIdentity

Identity to use for Key Vault Reference authentication.

keyVaultReferenceIdentity: str

limits

Site limits.

limits: SiteLimits

linuxFxVersion

Linux App Framework and version.

linuxFxVersion: str

loadBalancing

"WeightedRoundRobin", "LeastRequests", "LeastResponseTime", "WeightedTotalTraffic", "RequestHash", "PerSiteRoundRobin", and "LeastRequestsWithTieBreaker".

loadBalancing: str | SiteLoadBalancing

localMySqlEnabled

true to enable local MySQL; otherwise, false.

localMySqlEnabled: bool

logsDirectorySizeLimit

HTTP logs directory size limit.

logsDirectorySizeLimit: int

machineKey

Site MachineKey.

machineKey: SiteMachineKey

managedPipelineMode

"Integrated" and "Classic".

managedPipelineMode: str | ManagedPipelineMode

managedServiceIdentityId

Managed Service Identity Id.

managedServiceIdentityId: int

metadata

Application metadata. This property cannot be retrieved, since it may contain secrets.

metadata: list['NameValuePair']

minTlsCipherSuite

The minimum strength TLS cipher suite allowed for an application. Known values are: "TLS_AES_256_GCM_SHA384", "TLS_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384", "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256", "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA", "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA", "TLS_RSA_WITH_AES_256_GCM_SHA384", "TLS_RSA_WITH_AES_128_GCM_SHA256", "TLS_RSA_WITH_AES_256_CBC_SHA256", "TLS_RSA_WITH_AES_128_CBC_SHA256", "TLS_RSA_WITH_AES_256_CBC_SHA", and "TLS_RSA_WITH_AES_128_CBC_SHA".

minTlsCipherSuite: str | TlsCipherSuites

minTlsVersion

configures the minimum version of TLS required for SSL requests. Known values are: "1.0", "1.1", "1.2", and "1.3".

minTlsVersion: str | SupportedTlsVersions

minimumElasticInstanceCount

Number of minimum instance count for a site This setting only applies to the Elastic Plans.

minimumElasticInstanceCount: int

netFrameworkVersion

.NET Framework version.

netFrameworkVersion: str

nodeVersion

Version of Node.js.

nodeVersion: str

numberOfWorkers

Number of workers.

numberOfWorkers: int

phpVersion

Version of PHP.

phpVersion: str

powerShellVersion

Version of PowerShell.

powerShellVersion: str

preWarmedInstanceCount

Number of preWarmed instances. This setting only applies to the Consumption and Elastic Plans.

preWarmedInstanceCount: int

publicNetworkAccess

Property to allow or block all public traffic.

publicNetworkAccess: str

publishingUsername

Publishing user name.

publishingUsername: str

push

Push endpoint settings.

push: PushSettings

pythonVersion

Version of Python.

pythonVersion: str

remoteDebuggingEnabled

true if remote debugging is enabled; otherwise, false.

remoteDebuggingEnabled: bool

remoteDebuggingVersion

Remote debugging version.

remoteDebuggingVersion: str

requestTracingEnabled

true if request tracing is enabled; otherwise, false.

requestTracingEnabled: bool

requestTracingExpirationTime

Request tracing expiration time.

requestTracingExpirationTime: str

scmIpSecurityRestrictions

IP security restrictions for scm.

scmIpSecurityRestrictions: list['IpSecurityRestriction']

scmIpSecurityRestrictionsDefaultAction

"Allow" and "Deny".

scmIpSecurityRestrictionsDefaultAction: str | DefaultAction

scmIpSecurityRestrictionsUseMain

IP security restrictions for scm to use main.

scmIpSecurityRestrictionsUseMain: bool

scmMinTlsVersion

configures the minimum version of TLS required for SSL requests for SCM site. Known values are: "1.0", "1.1", "1.2", and "1.3".

scmMinTlsVersion: str | SupportedTlsVersions

scmType

"None", "Dropbox", "Tfs", "LocalGit", "GitHub", "CodePlexGit", "CodePlexHg", "BitbucketGit", "BitbucketHg", "ExternalGit", "ExternalHg", "OneDrive", "VSO", and "VSTSRM".

scmType: str | ScmType

tracingOptions

Tracing options.

tracingOptions: str

use32BitWorkerProcess

true to use 32-bit worker process; otherwise, false.

use32BitWorkerProcess: bool

virtualApplications

Virtual applications.

virtualApplications: list['VirtualApplication']

vnetName

Virtual Network name.

vnetName: str

vnetPrivatePortsCount

The number of private ports assigned to this app. These will be assigned dynamically on runtime.

vnetPrivatePortsCount: int

vnetRouteAllEnabled

Virtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied.

vnetRouteAllEnabled: bool

webSocketsEnabled

true if WebSocket is enabled; otherwise, false.

webSocketsEnabled: bool

websiteTimeZone

Sets the time zone a site uses for generating timestamps. Compatible with Linux and Windows App Service. Setting the WEBSITE_TIME_ZONE app setting takes precedence over this config. For Linux, expects tz database values https://www.iana.org/time-zones (for a quick reference see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For Windows, expects one of the time zones listed under HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionTime Zones.

websiteTimeZone: str

windowsFxVersion

Xenon App Framework and version.

windowsFxVersion: str

xManagedServiceIdentityId

Explicit Managed Service Identity Id.

xManagedServiceIdentityId: int