diff --git a/azure-mgmt-web/azure/mgmt/web/models/__init__.py b/azure-mgmt-web/azure/mgmt/web/models/__init__.py index 06759925efc3..bd1762cc5238 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/__init__.py +++ b/azure-mgmt-web/azure/mgmt/web/models/__init__.py @@ -56,6 +56,7 @@ from .handler_mapping_py3 import HandlerMapping from .site_machine_key_py3 import SiteMachineKey from .conn_string_info_py3 import ConnStringInfo + from .azure_storage_info_value_py3 import AzureStorageInfoValue from .name_value_pair_py3 import NameValuePair from .site_config_py3 import SiteConfig from .host_name_ssl_state_py3 import HostNameSslState @@ -154,6 +155,7 @@ from .azure_blob_storage_application_logs_config_py3 import AzureBlobStorageApplicationLogsConfig from .application_logs_config_py3 import ApplicationLogsConfig from .azure_blob_storage_http_logs_config_py3 import AzureBlobStorageHttpLogsConfig + from .azure_storage_property_dictionary_resource_py3 import AzureStoragePropertyDictionaryResource from .database_backup_setting_py3 import DatabaseBackupSetting from .backup_item_py3 import BackupItem from .backup_schedule_py3 import BackupSchedule @@ -274,6 +276,7 @@ from .handler_mapping import HandlerMapping from .site_machine_key import SiteMachineKey from .conn_string_info import ConnStringInfo + from .azure_storage_info_value import AzureStorageInfoValue from .name_value_pair import NameValuePair from .site_config import SiteConfig from .host_name_ssl_state import HostNameSslState @@ -372,6 +375,7 @@ from .azure_blob_storage_application_logs_config import AzureBlobStorageApplicationLogsConfig from .application_logs_config import ApplicationLogsConfig from .azure_blob_storage_http_logs_config import AzureBlobStorageHttpLogsConfig + from .azure_storage_property_dictionary_resource import AzureStoragePropertyDictionaryResource from .database_backup_setting import DatabaseBackupSetting from .backup_item import BackupItem from .backup_schedule import BackupSchedule @@ -508,6 +512,8 @@ IpFilterTag, AutoHealActionType, ConnectionStringType, + AzureStorageType, + AzureStorageState, ScmType, ManagedPipelineMode, SiteLoadBalancing, @@ -608,6 +614,7 @@ 'HandlerMapping', 'SiteMachineKey', 'ConnStringInfo', + 'AzureStorageInfoValue', 'NameValuePair', 'SiteConfig', 'HostNameSslState', @@ -706,6 +713,7 @@ 'AzureBlobStorageApplicationLogsConfig', 'ApplicationLogsConfig', 'AzureBlobStorageHttpLogsConfig', + 'AzureStoragePropertyDictionaryResource', 'DatabaseBackupSetting', 'BackupItem', 'BackupSchedule', @@ -841,6 +849,8 @@ 'IpFilterTag', 'AutoHealActionType', 'ConnectionStringType', + 'AzureStorageType', + 'AzureStorageState', 'ScmType', 'ManagedPipelineMode', 'SiteLoadBalancing', diff --git a/azure-mgmt-web/azure/mgmt/web/models/azure_storage_info_value.py b/azure-mgmt-web/azure/mgmt/web/models/azure_storage_info_value.py new file mode 100644 index 000000000000..303ae406f8da --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/azure_storage_info_value.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureStorageInfoValue(Model): + """Azure Files or Blob Storage access information value for dictionary + storage. + + :param type: Type of storage. Possible values include: 'AzureFiles', + 'AzureBlob' + :type type: str or ~azure.mgmt.web.models.AzureStorageType + :param account_name: Name of the storage account. + :type account_name: str + :param share_name: Name of the file share (container name, for Blob + storage). + :type share_name: str + :param access_key: Access key for the storage account. + :type access_key: str + :param mount_path: Path to mount the storage within the site's runtime + environment. + :type mount_path: str + :param state: State of the storage account. Possible values include: 'Ok', + 'InvalidCredentials', 'InvalidShare' + :type state: str or ~azure.mgmt.web.models.AzureStorageState + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'AzureStorageType'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'share_name': {'key': 'shareName', 'type': 'str'}, + 'access_key': {'key': 'accessKey', 'type': 'str'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'AzureStorageState'}, + } + + def __init__(self, **kwargs): + super(AzureStorageInfoValue, self).__init__(**kwargs) + self.type = kwargs.get('type', None) + self.account_name = kwargs.get('account_name', None) + self.share_name = kwargs.get('share_name', None) + self.access_key = kwargs.get('access_key', None) + self.mount_path = kwargs.get('mount_path', None) + self.state = kwargs.get('state', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/azure_storage_info_value_py3.py b/azure-mgmt-web/azure/mgmt/web/models/azure_storage_info_value_py3.py new file mode 100644 index 000000000000..7652af5aee99 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/azure_storage_info_value_py3.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AzureStorageInfoValue(Model): + """Azure Files or Blob Storage access information value for dictionary + storage. + + :param type: Type of storage. Possible values include: 'AzureFiles', + 'AzureBlob' + :type type: str or ~azure.mgmt.web.models.AzureStorageType + :param account_name: Name of the storage account. + :type account_name: str + :param share_name: Name of the file share (container name, for Blob + storage). + :type share_name: str + :param access_key: Access key for the storage account. + :type access_key: str + :param mount_path: Path to mount the storage within the site's runtime + environment. + :type mount_path: str + :param state: State of the storage account. Possible values include: 'Ok', + 'InvalidCredentials', 'InvalidShare' + :type state: str or ~azure.mgmt.web.models.AzureStorageState + """ + + _attribute_map = { + 'type': {'key': 'type', 'type': 'AzureStorageType'}, + 'account_name': {'key': 'accountName', 'type': 'str'}, + 'share_name': {'key': 'shareName', 'type': 'str'}, + 'access_key': {'key': 'accessKey', 'type': 'str'}, + 'mount_path': {'key': 'mountPath', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'AzureStorageState'}, + } + + def __init__(self, *, type=None, account_name: str=None, share_name: str=None, access_key: str=None, mount_path: str=None, state=None, **kwargs) -> None: + super(AzureStorageInfoValue, self).__init__(**kwargs) + self.type = type + self.account_name = account_name + self.share_name = share_name + self.access_key = access_key + self.mount_path = mount_path + self.state = state diff --git a/azure-mgmt-web/azure/mgmt/web/models/azure_storage_property_dictionary_resource.py b/azure-mgmt-web/azure/mgmt/web/models/azure_storage_property_dictionary_resource.py new file mode 100644 index 000000000000..c3b0153b8d54 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/azure_storage_property_dictionary_resource.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource import ProxyOnlyResource + + +class AzureStoragePropertyDictionaryResource(ProxyOnlyResource): + """AzureStorageInfo dictionary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param properties: Azure storage accounts. + :type properties: dict[str, ~azure.mgmt.web.models.AzureStorageInfoValue] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{AzureStorageInfoValue}'}, + } + + def __init__(self, **kwargs): + super(AzureStoragePropertyDictionaryResource, self).__init__(**kwargs) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/azure_storage_property_dictionary_resource_py3.py b/azure-mgmt-web/azure/mgmt/web/models/azure_storage_property_dictionary_resource_py3.py new file mode 100644 index 000000000000..d00f95cb753f --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/azure_storage_property_dictionary_resource_py3.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource_py3 import ProxyOnlyResource + + +class AzureStoragePropertyDictionaryResource(ProxyOnlyResource): + """AzureStorageInfo dictionary resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param properties: Azure storage accounts. + :type properties: dict[str, ~azure.mgmt.web.models.AzureStorageInfoValue] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': '{AzureStorageInfoValue}'}, + } + + def __init__(self, *, kind: str=None, properties=None, **kwargs) -> None: + super(AzureStoragePropertyDictionaryResource, self).__init__(kind=kind, **kwargs) + self.properties = properties diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_config.py b/azure-mgmt-web/azure/mgmt/web/models/site_config.py index 34156a60e078..759ff0876aaa 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config.py @@ -57,6 +57,9 @@ class SiteConfig(Model): :type publishing_username: str :param app_settings: Application settings. :type app_settings: list[~azure.mgmt.web.models.NameValuePair] + :param azure_storage_accounts: User-provided Azure storage accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.models.AzureStorageInfoValue] :param connection_strings: Connection strings. :type connection_strings: list[~azure.mgmt.web.models.ConnStringInfo] :ivar machine_key: Site MachineKey. @@ -167,6 +170,7 @@ class SiteConfig(Model): 'detailed_error_logging_enabled': {'key': 'detailedErrorLoggingEnabled', 'type': 'bool'}, 'publishing_username': {'key': 'publishingUsername', 'type': 'str'}, 'app_settings': {'key': 'appSettings', 'type': '[NameValuePair]'}, + 'azure_storage_accounts': {'key': 'azureStorageAccounts', 'type': '{AzureStorageInfoValue}'}, 'connection_strings': {'key': 'connectionStrings', 'type': '[ConnStringInfo]'}, 'machine_key': {'key': 'machineKey', 'type': 'SiteMachineKey'}, 'handler_mappings': {'key': 'handlerMappings', 'type': '[HandlerMapping]'}, @@ -221,6 +225,7 @@ def __init__(self, **kwargs): self.detailed_error_logging_enabled = kwargs.get('detailed_error_logging_enabled', None) self.publishing_username = kwargs.get('publishing_username', None) self.app_settings = kwargs.get('app_settings', None) + self.azure_storage_accounts = kwargs.get('azure_storage_accounts', None) self.connection_strings = kwargs.get('connection_strings', None) self.machine_key = None self.handler_mappings = kwargs.get('handler_mappings', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_config_py3.py b/azure-mgmt-web/azure/mgmt/web/models/site_config_py3.py index 85f59f15a970..a8534e4686b4 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_config_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config_py3.py @@ -57,6 +57,9 @@ class SiteConfig(Model): :type publishing_username: str :param app_settings: Application settings. :type app_settings: list[~azure.mgmt.web.models.NameValuePair] + :param azure_storage_accounts: User-provided Azure storage accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.models.AzureStorageInfoValue] :param connection_strings: Connection strings. :type connection_strings: list[~azure.mgmt.web.models.ConnStringInfo] :ivar machine_key: Site MachineKey. @@ -167,6 +170,7 @@ class SiteConfig(Model): 'detailed_error_logging_enabled': {'key': 'detailedErrorLoggingEnabled', 'type': 'bool'}, 'publishing_username': {'key': 'publishingUsername', 'type': 'str'}, 'app_settings': {'key': 'appSettings', 'type': '[NameValuePair]'}, + 'azure_storage_accounts': {'key': 'azureStorageAccounts', 'type': '{AzureStorageInfoValue}'}, 'connection_strings': {'key': 'connectionStrings', 'type': '[ConnStringInfo]'}, 'machine_key': {'key': 'machineKey', 'type': 'SiteMachineKey'}, 'handler_mappings': {'key': 'handlerMappings', 'type': '[HandlerMapping]'}, @@ -202,7 +206,7 @@ class SiteConfig(Model): 'reserved_instance_count': {'key': 'reservedInstanceCount', 'type': 'int'}, } - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: super(SiteConfig, self).__init__(**kwargs) self.number_of_workers = number_of_workers self.default_documents = default_documents @@ -221,6 +225,7 @@ def __init__(self, *, number_of_workers: int=None, default_documents=None, net_f self.detailed_error_logging_enabled = detailed_error_logging_enabled self.publishing_username = publishing_username self.app_settings = app_settings + self.azure_storage_accounts = azure_storage_accounts self.connection_strings = connection_strings self.machine_key = None self.handler_mappings = handler_mappings diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_config_resource.py b/azure-mgmt-web/azure/mgmt/web/models/site_config_resource.py index bf1b5fd08b4e..1c4b3bc66086 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_config_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config_resource.py @@ -65,6 +65,9 @@ class SiteConfigResource(ProxyOnlyResource): :type publishing_username: str :param app_settings: Application settings. :type app_settings: list[~azure.mgmt.web.models.NameValuePair] + :param azure_storage_accounts: User-provided Azure storage accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.models.AzureStorageInfoValue] :param connection_strings: Connection strings. :type connection_strings: list[~azure.mgmt.web.models.ConnStringInfo] :ivar machine_key: Site MachineKey. @@ -182,6 +185,7 @@ class SiteConfigResource(ProxyOnlyResource): 'detailed_error_logging_enabled': {'key': 'properties.detailedErrorLoggingEnabled', 'type': 'bool'}, 'publishing_username': {'key': 'properties.publishingUsername', 'type': 'str'}, 'app_settings': {'key': 'properties.appSettings', 'type': '[NameValuePair]'}, + 'azure_storage_accounts': {'key': 'properties.azureStorageAccounts', 'type': '{AzureStorageInfoValue}'}, 'connection_strings': {'key': 'properties.connectionStrings', 'type': '[ConnStringInfo]'}, 'machine_key': {'key': 'properties.machineKey', 'type': 'SiteMachineKey'}, 'handler_mappings': {'key': 'properties.handlerMappings', 'type': '[HandlerMapping]'}, @@ -236,6 +240,7 @@ def __init__(self, **kwargs): self.detailed_error_logging_enabled = kwargs.get('detailed_error_logging_enabled', None) self.publishing_username = kwargs.get('publishing_username', None) self.app_settings = kwargs.get('app_settings', None) + self.azure_storage_accounts = kwargs.get('azure_storage_accounts', None) self.connection_strings = kwargs.get('connection_strings', None) self.machine_key = None self.handler_mappings = kwargs.get('handler_mappings', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_config_resource_py3.py b/azure-mgmt-web/azure/mgmt/web/models/site_config_resource_py3.py index 6d9e30ad6f7c..e766a1a891b2 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_config_resource_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config_resource_py3.py @@ -65,6 +65,9 @@ class SiteConfigResource(ProxyOnlyResource): :type publishing_username: str :param app_settings: Application settings. :type app_settings: list[~azure.mgmt.web.models.NameValuePair] + :param azure_storage_accounts: User-provided Azure storage accounts. + :type azure_storage_accounts: dict[str, + ~azure.mgmt.web.models.AzureStorageInfoValue] :param connection_strings: Connection strings. :type connection_strings: list[~azure.mgmt.web.models.ConnStringInfo] :ivar machine_key: Site MachineKey. @@ -182,6 +185,7 @@ class SiteConfigResource(ProxyOnlyResource): 'detailed_error_logging_enabled': {'key': 'properties.detailedErrorLoggingEnabled', 'type': 'bool'}, 'publishing_username': {'key': 'properties.publishingUsername', 'type': 'str'}, 'app_settings': {'key': 'properties.appSettings', 'type': '[NameValuePair]'}, + 'azure_storage_accounts': {'key': 'properties.azureStorageAccounts', 'type': '{AzureStorageInfoValue}'}, 'connection_strings': {'key': 'properties.connectionStrings', 'type': '[ConnStringInfo]'}, 'machine_key': {'key': 'properties.machineKey', 'type': 'SiteMachineKey'}, 'handler_mappings': {'key': 'properties.handlerMappings', 'type': '[HandlerMapping]'}, @@ -217,7 +221,7 @@ class SiteConfigResource(ProxyOnlyResource): 'reserved_instance_count': {'key': 'properties.reservedInstanceCount', 'type': 'int'}, } - def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: super(SiteConfigResource, self).__init__(kind=kind, **kwargs) self.number_of_workers = number_of_workers self.default_documents = default_documents @@ -236,6 +240,7 @@ def __init__(self, *, kind: str=None, number_of_workers: int=None, default_docum self.detailed_error_logging_enabled = detailed_error_logging_enabled self.publishing_username = publishing_username self.app_settings = app_settings + self.azure_storage_accounts = azure_storage_accounts self.connection_strings = connection_strings self.machine_key = None self.handler_mappings = handler_mappings diff --git a/azure-mgmt-web/azure/mgmt/web/models/slot_config_names_resource.py b/azure-mgmt-web/azure/mgmt/web/models/slot_config_names_resource.py index 6c21dc922423..072c2237aa45 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/slot_config_names_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/slot_config_names_resource.py @@ -30,6 +30,9 @@ class SlotConfigNamesResource(ProxyOnlyResource): :type connection_string_names: list[str] :param app_setting_names: List of application settings names. :type app_setting_names: list[str] + :param azure_storage_config_names: List of external Azure storage account + identifiers. + :type azure_storage_config_names: list[str] """ _validation = { @@ -45,9 +48,11 @@ class SlotConfigNamesResource(ProxyOnlyResource): 'type': {'key': 'type', 'type': 'str'}, 'connection_string_names': {'key': 'properties.connectionStringNames', 'type': '[str]'}, 'app_setting_names': {'key': 'properties.appSettingNames', 'type': '[str]'}, + 'azure_storage_config_names': {'key': 'properties.azureStorageConfigNames', 'type': '[str]'}, } def __init__(self, **kwargs): super(SlotConfigNamesResource, self).__init__(**kwargs) self.connection_string_names = kwargs.get('connection_string_names', None) self.app_setting_names = kwargs.get('app_setting_names', None) + self.azure_storage_config_names = kwargs.get('azure_storage_config_names', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/slot_config_names_resource_py3.py b/azure-mgmt-web/azure/mgmt/web/models/slot_config_names_resource_py3.py index adfc50723e23..44e1587a66f7 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/slot_config_names_resource_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/slot_config_names_resource_py3.py @@ -30,6 +30,9 @@ class SlotConfigNamesResource(ProxyOnlyResource): :type connection_string_names: list[str] :param app_setting_names: List of application settings names. :type app_setting_names: list[str] + :param azure_storage_config_names: List of external Azure storage account + identifiers. + :type azure_storage_config_names: list[str] """ _validation = { @@ -45,9 +48,11 @@ class SlotConfigNamesResource(ProxyOnlyResource): 'type': {'key': 'type', 'type': 'str'}, 'connection_string_names': {'key': 'properties.connectionStringNames', 'type': '[str]'}, 'app_setting_names': {'key': 'properties.appSettingNames', 'type': '[str]'}, + 'azure_storage_config_names': {'key': 'properties.azureStorageConfigNames', 'type': '[str]'}, } - def __init__(self, *, kind: str=None, connection_string_names=None, app_setting_names=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, connection_string_names=None, app_setting_names=None, azure_storage_config_names=None, **kwargs) -> None: super(SlotConfigNamesResource, self).__init__(kind=kind, **kwargs) self.connection_string_names = connection_string_names self.app_setting_names = app_setting_names + self.azure_storage_config_names = azure_storage_config_names diff --git a/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py b/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py index 087cf3dfcdd2..ab38e3030187 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py +++ b/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py @@ -115,6 +115,19 @@ class ConnectionStringType(str, Enum): postgre_sql = "PostgreSQL" +class AzureStorageType(str, Enum): + + azure_files = "AzureFiles" + azure_blob = "AzureBlob" + + +class AzureStorageState(str, Enum): + + ok = "Ok" + invalid_credentials = "InvalidCredentials" + invalid_share = "InvalidShare" + + class ScmType(str, Enum): none = "None" diff --git a/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py index ca889dacddb1..6a6716bb0221 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py @@ -1426,6 +1426,147 @@ def get_auth_settings( return deserialized get_auth_settings.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list'} + def update_azure_storage_accounts( + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Updates the Azure storage account configurations of an app. + + Updates the Azure storage account configurations of an app. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param kind: Kind of resource. + :type kind: str + :param properties: Azure storage accounts. + :type properties: dict[str, + ~azure.mgmt.web.models.AzureStorageInfoValue] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: ~azure.mgmt.web.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) + + # Construct URL + url = self.update_azure_storage_accounts.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts'} + + def list_azure_storage_accounts( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the Azure storage account configurations of an app. + + Gets the Azure storage account configurations of an app. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: ~azure.mgmt.web.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_azure_storage_accounts.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_azure_storage_accounts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/azurestorageaccounts/list'} + def update_backup_configuration( self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): """Updates the backup configuration of an app. @@ -11479,6 +11620,157 @@ def get_auth_settings_slot( return deserialized get_auth_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list'} + def update_azure_storage_accounts_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Updates the Azure storage account configurations of an app. + + Updates the Azure storage account configurations of an app. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API will update the Azure storage account configurations for the + production slot. + :type slot: str + :param kind: Kind of resource. + :type kind: str + :param properties: Azure storage accounts. + :type properties: dict[str, + ~azure.mgmt.web.models.AzureStorageInfoValue] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: ~azure.mgmt.web.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + azure_storage_accounts = models.AzureStoragePropertyDictionaryResource(kind=kind, properties=properties) + + # Construct URL + url = self.update_azure_storage_accounts_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(azure_storage_accounts, 'AzureStoragePropertyDictionaryResource') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts'} + + def list_azure_storage_accounts_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the Azure storage account configurations of an app. + + Gets the Azure storage account configurations of an app. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API will update the Azure storage account configurations for the + production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: AzureStoragePropertyDictionaryResource or ClientRawResponse + if raw=true + :rtype: ~azure.mgmt.web.models.AzureStoragePropertyDictionaryResource + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_azure_storage_accounts_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AzureStoragePropertyDictionaryResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_azure_storage_accounts_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/azurestorageaccounts/list'} + def update_backup_configuration_slot( self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): """Updates the backup configuration of an app.