diff --git a/azure-mgmt-web/azure/mgmt/web/models/address.py b/azure-mgmt-web/azure/mgmt/web/models/address.py index 4161661ad337..82bf0d5559e8 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/address.py +++ b/azure-mgmt-web/azure/mgmt/web/models/address.py @@ -47,6 +47,7 @@ class Address(Model): } def __init__(self, address1, city, country, postal_code, state, address2=None): + super(Address, self).__init__() self.address1 = address1 self.address2 = address2 self.city = city diff --git a/azure-mgmt-web/azure/mgmt/web/models/address_response.py b/azure-mgmt-web/azure/mgmt/web/models/address_response.py index edb29f6f93b3..7bb9c356952b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/address_response.py +++ b/azure-mgmt-web/azure/mgmt/web/models/address_response.py @@ -22,10 +22,9 @@ class AddressResponse(Model): :type internal_ip_address: str :param outbound_ip_addresses: IP addresses appearing on outbound connections. - :type outbound_ip_addresses: list of str + :type outbound_ip_addresses: list[str] :param vip_mappings: Additional virtual IPs. - :type vip_mappings: list of :class:`VirtualIPMapping - ` + :type vip_mappings: list[~azure.mgmt.web.models.VirtualIPMapping] """ _attribute_map = { @@ -36,6 +35,7 @@ class AddressResponse(Model): } def __init__(self, service_ip_address=None, internal_ip_address=None, outbound_ip_addresses=None, vip_mappings=None): + super(AddressResponse, self).__init__() self.service_ip_address = service_ip_address self.internal_ip_address = internal_ip_address self.outbound_ip_addresses = outbound_ip_addresses diff --git a/azure-mgmt-web/azure/mgmt/web/models/api_definition_info.py b/azure-mgmt-web/azure/mgmt/web/models/api_definition_info.py index 7458f4835883..63d8e2be4c4e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/api_definition_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/api_definition_info.py @@ -24,4 +24,5 @@ class ApiDefinitionInfo(Model): } def __init__(self, url=None): + super(ApiDefinitionInfo, self).__init__() self.url = url diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate.py index 29bae8bd6136..ddeb88a33f07 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate.py @@ -28,8 +28,8 @@ class AppServiceCertificate(Model): 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown' - :vartype provisioning_state: str or :class:`KeyVaultSecretStatus - ` + :vartype provisioning_state: str or + ~azure.mgmt.web.models.KeyVaultSecretStatus """ _validation = { @@ -43,6 +43,7 @@ class AppServiceCertificate(Model): } def __init__(self, key_vault_id=None, key_vault_secret_name=None): + super(AppServiceCertificate, self).__init__() self.key_vault_id = key_vault_id self.key_vault_secret_name = key_vault_secret_name self.provisioning_state = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_order.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_order.py index a1152b6b8a4d..bf72656661c5 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_order.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_order.py @@ -29,9 +29,10 @@ class AppServiceCertificateOrder(Resource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param certificates: State of the Key Vault secret. - :type certificates: dict + :type certificates: dict[str, + ~azure.mgmt.web.models.AppServiceCertificate] :param distinguished_name: Certificate distinguished name. :type distinguished_name: str :ivar domain_verification_token: Domain verification token. @@ -43,32 +44,27 @@ class AppServiceCertificateOrder(Resource): :type key_size: int :param product_type: Certificate product type. Possible values include: 'StandardDomainValidatedSsl', 'StandardDomainValidatedWildCardSsl' - :type product_type: str or :class:`CertificateProductType - ` + :type product_type: str or ~azure.mgmt.web.models.CertificateProductType :param auto_renew: true if the certificate should be automatically renewed when it expires; otherwise, false. Default value: True . :type auto_renew: bool :ivar provisioning_state: Status of certificate order. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' - :vartype provisioning_state: str or :class:`ProvisioningState - ` + :vartype provisioning_state: str or + ~azure.mgmt.web.models.ProvisioningState :ivar status: Current order status. Possible values include: 'Pendingissuance', 'Issued', 'Revoked', 'Canceled', 'Denied', 'Pendingrevocation', 'PendingRekey', 'Unused', 'Expired', 'NotSubmitted' - :vartype status: str or :class:`CertificateOrderStatus - ` + :vartype status: str or ~azure.mgmt.web.models.CertificateOrderStatus :ivar signed_certificate: Signed certificate. - :vartype signed_certificate: :class:`CertificateDetails - ` + :vartype signed_certificate: ~azure.mgmt.web.models.CertificateDetails :param csr: Last CSR that was created for this order. :type csr: str :ivar intermediate: Intermediate certificate. - :vartype intermediate: :class:`CertificateDetails - ` + :vartype intermediate: ~azure.mgmt.web.models.CertificateDetails :ivar root: Root certificate. - :vartype root: :class:`CertificateDetails - ` + :vartype root: ~azure.mgmt.web.models.CertificateDetails :ivar serial_number: Current serial number of the certificate. :vartype serial_number: str :ivar last_certificate_issuance_time: Certificate last issuance time. @@ -80,7 +76,7 @@ class AppServiceCertificateOrder(Resource): :vartype is_private_key_external: bool :ivar app_service_certificate_not_renewable_reasons: Reasons why App Service Certificate is not renewable at the current moment. - :vartype app_service_certificate_not_renewable_reasons: list of str + :vartype app_service_certificate_not_renewable_reasons: list[str] :ivar next_auto_renewal_time_stamp: Time stamp when the certificate would be auto renewed next :vartype next_auto_renewal_time_stamp: datetime @@ -93,6 +89,7 @@ class AppServiceCertificateOrder(Resource): 'type': {'readonly': True}, 'domain_verification_token': {'readonly': True}, 'validity_in_years': {'maximum': 3, 'minimum': 1}, + 'product_type': {'required': True}, 'provisioning_state': {'readonly': True}, 'status': {'readonly': True}, 'signed_certificate': {'readonly': True}, @@ -134,7 +131,7 @@ class AppServiceCertificateOrder(Resource): 'next_auto_renewal_time_stamp': {'key': 'properties.nextAutoRenewalTimeStamp', 'type': 'iso-8601'}, } - def __init__(self, location, kind=None, tags=None, certificates=None, distinguished_name=None, validity_in_years=1, key_size=2048, product_type=None, auto_renew=True, csr=None): + def __init__(self, location, product_type, kind=None, tags=None, certificates=None, distinguished_name=None, validity_in_years=1, key_size=2048, auto_renew=True, csr=None): super(AppServiceCertificateOrder, self).__init__(kind=kind, location=location, tags=tags) self.certificates = certificates self.distinguished_name = distinguished_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_resource.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_resource.py index 5c45ff9c761b..b326f42f3a47 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_resource.py @@ -30,7 +30,7 @@ class AppServiceCertificateResource(Resource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param key_vault_id: Key Vault resource Id. :type key_vault_id: str :param key_vault_secret_name: Key Vault secret name. @@ -41,8 +41,8 @@ class AppServiceCertificateResource(Resource): 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown' - :vartype provisioning_state: str or :class:`KeyVaultSecretStatus - ` + :vartype provisioning_state: str or + ~azure.mgmt.web.models.KeyVaultSecretStatus """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment.py index 5ccc8c790469..0a89e7234a6b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment.py @@ -25,12 +25,11 @@ class AppServiceEnvironment(Model): :ivar provisioning_state: Provisioning state of the App Service Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' - :vartype provisioning_state: str or :class:`ProvisioningState - ` + :vartype provisioning_state: str or + ~azure.mgmt.web.models.ProvisioningState :ivar status: Current status of the App Service Environment. Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting' - :vartype status: str or :class:`HostingEnvironmentStatus - ` + :vartype status: str or ~azure.mgmt.web.models.HostingEnvironmentStatus :param vnet_name: Name of the Virtual Network for the App Service Environment. :type vnet_name: str @@ -39,22 +38,19 @@ class AppServiceEnvironment(Model): :param vnet_subnet_name: Subnet of the Virtual Network. :type vnet_subnet_name: str :param virtual_network: Description of the Virtual Network. - :type virtual_network: :class:`VirtualNetworkProfile - ` + :type virtual_network: ~azure.mgmt.web.models.VirtualNetworkProfile :param internal_load_balancing_mode: Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'None', 'Web', 'Publishing' :type internal_load_balancing_mode: str or - :class:`InternalLoadBalancingMode - ` + ~azure.mgmt.web.models.InternalLoadBalancingMode :param multi_size: Front-end VM size, e.g. "Medium", "Large". :type multi_size: str :param multi_role_count: Number of front-end instances. :type multi_role_count: int :param worker_pools: Description of worker pools with worker size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list of :class:`WorkerPool - ` + :type worker_pools: list[~azure.mgmt.web.models.WorkerPool] :param ipssl_address_count: Number of IP SSL addresses reserved for the App Service Environment. :type ipssl_address_count: int @@ -87,17 +83,15 @@ class AppServiceEnvironment(Model): :vartype maximum_number_of_machines: int :ivar vip_mappings: Description of IP SSL mapping for the App Service Environment. - :vartype vip_mappings: list of :class:`VirtualIPMapping - ` + :vartype vip_mappings: list[~azure.mgmt.web.models.VirtualIPMapping] :ivar environment_capacities: Current total, used, and available worker capacities. - :vartype environment_capacities: list of :class:`StampCapacity - ` + :vartype environment_capacities: + list[~azure.mgmt.web.models.StampCapacity] :param network_access_control_list: Access control list for controlling traffic to the App Service Environment. - :type network_access_control_list: list of - :class:`NetworkAccessControlEntry - ` + :type network_access_control_list: + list[~azure.mgmt.web.models.NetworkAccessControlEntry] :ivar environment_is_healthy: True/false indicating whether the App Service Environment is healthy. :vartype environment_is_healthy: bool @@ -125,8 +119,7 @@ class AppServiceEnvironment(Model): :type dynamic_cache_enabled: bool :param cluster_settings: Custom settings for changing the behavior of the App Service Environment. - :type cluster_settings: list of :class:`NameValuePair - ` + :type cluster_settings: list[~azure.mgmt.web.models.NameValuePair] """ _validation = { @@ -192,6 +185,7 @@ class AppServiceEnvironment(Model): } def __init__(self, name, location, virtual_network, worker_pools, vnet_name=None, vnet_resource_group_name=None, vnet_subnet_name=None, internal_load_balancing_mode=None, multi_size=None, multi_role_count=None, ipssl_address_count=None, dns_suffix=None, network_access_control_list=None, front_end_scale_factor=None, api_management_account_id=None, suspended=None, dynamic_cache_enabled=None, cluster_settings=None): + super(AppServiceEnvironment, self).__init__() self.name = name self.location = location self.provisioning_state = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource.py index df9a13d8967b..4cf288ebaef4 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource.py @@ -29,7 +29,7 @@ class AppServiceEnvironmentResource(Resource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param app_service_environment_resource_name: Name of the App Service Environment. :type app_service_environment_resource_name: str @@ -39,12 +39,11 @@ class AppServiceEnvironmentResource(Resource): :ivar provisioning_state: Provisioning state of the App Service Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' - :vartype provisioning_state: str or :class:`ProvisioningState - ` + :vartype provisioning_state: str or + ~azure.mgmt.web.models.ProvisioningState :ivar status: Current status of the App Service Environment. Possible values include: 'Preparing', 'Ready', 'Scaling', 'Deleting' - :vartype status: str or :class:`HostingEnvironmentStatus - ` + :vartype status: str or ~azure.mgmt.web.models.HostingEnvironmentStatus :param vnet_name: Name of the Virtual Network for the App Service Environment. :type vnet_name: str @@ -53,22 +52,19 @@ class AppServiceEnvironmentResource(Resource): :param vnet_subnet_name: Subnet of the Virtual Network. :type vnet_subnet_name: str :param virtual_network: Description of the Virtual Network. - :type virtual_network: :class:`VirtualNetworkProfile - ` + :type virtual_network: ~azure.mgmt.web.models.VirtualNetworkProfile :param internal_load_balancing_mode: Specifies which endpoints to serve internally in the Virtual Network for the App Service Environment. Possible values include: 'None', 'Web', 'Publishing' :type internal_load_balancing_mode: str or - :class:`InternalLoadBalancingMode - ` + ~azure.mgmt.web.models.InternalLoadBalancingMode :param multi_size: Front-end VM size, e.g. "Medium", "Large". :type multi_size: str :param multi_role_count: Number of front-end instances. :type multi_role_count: int :param worker_pools: Description of worker pools with worker size IDs, VM sizes, and number of workers in each pool. - :type worker_pools: list of :class:`WorkerPool - ` + :type worker_pools: list[~azure.mgmt.web.models.WorkerPool] :param ipssl_address_count: Number of IP SSL addresses reserved for the App Service Environment. :type ipssl_address_count: int @@ -101,17 +97,15 @@ class AppServiceEnvironmentResource(Resource): :vartype maximum_number_of_machines: int :ivar vip_mappings: Description of IP SSL mapping for the App Service Environment. - :vartype vip_mappings: list of :class:`VirtualIPMapping - ` + :vartype vip_mappings: list[~azure.mgmt.web.models.VirtualIPMapping] :ivar environment_capacities: Current total, used, and available worker capacities. - :vartype environment_capacities: list of :class:`StampCapacity - ` + :vartype environment_capacities: + list[~azure.mgmt.web.models.StampCapacity] :param network_access_control_list: Access control list for controlling traffic to the App Service Environment. - :type network_access_control_list: list of - :class:`NetworkAccessControlEntry - ` + :type network_access_control_list: + list[~azure.mgmt.web.models.NetworkAccessControlEntry] :ivar environment_is_healthy: True/false indicating whether the App Service Environment is healthy. :vartype environment_is_healthy: bool @@ -139,8 +133,7 @@ class AppServiceEnvironmentResource(Resource): :type dynamic_cache_enabled: bool :param cluster_settings: Custom settings for changing the behavior of the App Service Environment. - :type cluster_settings: list of :class:`NameValuePair - ` + :type cluster_settings: list[~azure.mgmt.web.models.NameValuePair] """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan.py index 446e65859772..35f2a7eb2a02 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan.py @@ -29,7 +29,7 @@ class AppServicePlan(Resource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param app_service_plan_name: Name for the App Service plan. :type app_service_plan_name: str :param worker_tier_name: Target worker tier assigned to the App Service @@ -37,16 +37,15 @@ class AppServicePlan(Resource): :type worker_tier_name: str :ivar status: App Service plan status. Possible values include: 'Ready', 'Pending' - :vartype status: str or :class:`StatusOptions - ` + :vartype status: str or ~azure.mgmt.web.models.StatusOptions :ivar subscription: App Service plan subscription. :vartype subscription: str :param admin_site_name: App Service plan administration site. :type admin_site_name: str :param hosting_environment_profile: Specification for the App Service Environment to use for the App Service plan. - :type hosting_environment_profile: :class:`HostingEnvironmentProfile - ` + :type hosting_environment_profile: + ~azure.mgmt.web.models.HostingEnvironmentProfile :ivar maximum_number_of_workers: Maximum number of instances that can be assigned to this App Service plan. :vartype maximum_number_of_workers: int @@ -70,10 +69,10 @@ class AppServicePlan(Resource): :ivar provisioning_state: Provisioning state of the App Service Environment. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' - :vartype provisioning_state: str or :class:`ProvisioningState - ` + :vartype provisioning_state: str or + ~azure.mgmt.web.models.ProvisioningState :param sku: - :type sku: :class:`SkuDescription ` + :type sku: ~azure.mgmt.web.models.SkuDescription """ _validation = { @@ -81,6 +80,7 @@ class AppServicePlan(Resource): 'name': {'readonly': True}, 'location': {'required': True}, 'type': {'readonly': True}, + 'app_service_plan_name': {'required': True}, 'status': {'readonly': True}, 'subscription': {'readonly': True}, 'maximum_number_of_workers': {'readonly': True}, @@ -115,7 +115,7 @@ class AppServicePlan(Resource): 'sku': {'key': 'sku', 'type': 'SkuDescription'}, } - def __init__(self, location, kind=None, tags=None, app_service_plan_name=None, worker_tier_name=None, admin_site_name=None, hosting_environment_profile=None, per_site_scaling=False, reserved=False, target_worker_count=None, target_worker_size_id=None, sku=None): + def __init__(self, location, app_service_plan_name, kind=None, tags=None, worker_tier_name=None, admin_site_name=None, hosting_environment_profile=None, per_site_scaling=False, reserved=False, target_worker_count=None, target_worker_size_id=None, sku=None): super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags) self.app_service_plan_name = app_service_plan_name self.worker_tier_name = worker_tier_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/application_logs_config.py b/azure-mgmt-web/azure/mgmt/web/models/application_logs_config.py index eebb2e4b51d8..b9a7bb1ebb58 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/application_logs_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/application_logs_config.py @@ -16,15 +16,14 @@ class ApplicationLogsConfig(Model): """Application logs configuration. :param file_system: Application logs to file system configuration. - :type file_system: :class:`FileSystemApplicationLogsConfig - ` + :type file_system: ~azure.mgmt.web.models.FileSystemApplicationLogsConfig :param azure_table_storage: Application logs to azure table storage configuration. - :type azure_table_storage: :class:`AzureTableStorageApplicationLogsConfig - ` + :type azure_table_storage: + ~azure.mgmt.web.models.AzureTableStorageApplicationLogsConfig :param azure_blob_storage: Application logs to blob storage configuration. - :type azure_blob_storage: :class:`AzureBlobStorageApplicationLogsConfig - ` + :type azure_blob_storage: + ~azure.mgmt.web.models.AzureBlobStorageApplicationLogsConfig """ _attribute_map = { @@ -34,6 +33,7 @@ class ApplicationLogsConfig(Model): } def __init__(self, file_system=None, azure_table_storage=None, azure_blob_storage=None): + super(ApplicationLogsConfig, self).__init__() self.file_system = file_system self.azure_table_storage = azure_table_storage self.azure_blob_storage = azure_blob_storage diff --git a/azure-mgmt-web/azure/mgmt/web/models/auto_heal_actions.py b/azure-mgmt-web/azure/mgmt/web/models/auto_heal_actions.py index 76d6c124f2d8..f1595e9be056 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/auto_heal_actions.py +++ b/azure-mgmt-web/azure/mgmt/web/models/auto_heal_actions.py @@ -17,11 +17,9 @@ class AutoHealActions(Model): :param action_type: Predefined action to be taken. Possible values include: 'Recycle', 'LogEvent', 'CustomAction' - :type action_type: str or :class:`AutoHealActionType - ` + :type action_type: str or ~azure.mgmt.web.models.AutoHealActionType :param custom_action: Custom action to be taken. - :type custom_action: :class:`AutoHealCustomAction - ` + :type custom_action: ~azure.mgmt.web.models.AutoHealCustomAction :param min_process_execution_time: Minimum time the process must execute before taking the action :type min_process_execution_time: str @@ -34,6 +32,7 @@ class AutoHealActions(Model): } def __init__(self, action_type=None, custom_action=None, min_process_execution_time=None): + super(AutoHealActions, self).__init__() self.action_type = action_type self.custom_action = custom_action self.min_process_execution_time = min_process_execution_time diff --git a/azure-mgmt-web/azure/mgmt/web/models/auto_heal_custom_action.py b/azure-mgmt-web/azure/mgmt/web/models/auto_heal_custom_action.py index 4d800b3b473a..e015fce2b903 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/auto_heal_custom_action.py +++ b/azure-mgmt-web/azure/mgmt/web/models/auto_heal_custom_action.py @@ -28,5 +28,6 @@ class AutoHealCustomAction(Model): } def __init__(self, exe=None, parameters=None): + super(AutoHealCustomAction, self).__init__() self.exe = exe self.parameters = parameters diff --git a/azure-mgmt-web/azure/mgmt/web/models/auto_heal_rules.py b/azure-mgmt-web/azure/mgmt/web/models/auto_heal_rules.py index 977e2c3b4269..2cdc14a5fead 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/auto_heal_rules.py +++ b/azure-mgmt-web/azure/mgmt/web/models/auto_heal_rules.py @@ -17,11 +17,9 @@ class AutoHealRules(Model): :param triggers: Conditions that describe when to execute the auto-heal actions. - :type triggers: :class:`AutoHealTriggers - ` + :type triggers: ~azure.mgmt.web.models.AutoHealTriggers :param actions: Actions to be executed when a rule is triggered. - :type actions: :class:`AutoHealActions - ` + :type actions: ~azure.mgmt.web.models.AutoHealActions """ _attribute_map = { @@ -30,5 +28,6 @@ class AutoHealRules(Model): } def __init__(self, triggers=None, actions=None): + super(AutoHealRules, self).__init__() self.triggers = triggers self.actions = actions diff --git a/azure-mgmt-web/azure/mgmt/web/models/auto_heal_triggers.py b/azure-mgmt-web/azure/mgmt/web/models/auto_heal_triggers.py index a2b3da826d66..4d41496e95f1 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/auto_heal_triggers.py +++ b/azure-mgmt-web/azure/mgmt/web/models/auto_heal_triggers.py @@ -16,16 +16,13 @@ class AutoHealTriggers(Model): """Triggers for auto-heal. :param requests: A rule based on total requests. - :type requests: :class:`RequestsBasedTrigger - ` + :type requests: ~azure.mgmt.web.models.RequestsBasedTrigger :param private_bytes_in_kb: A rule based on private bytes. :type private_bytes_in_kb: int :param status_codes: A rule based on status codes. - :type status_codes: list of :class:`StatusCodesBasedTrigger - ` + :type status_codes: list[~azure.mgmt.web.models.StatusCodesBasedTrigger] :param slow_requests: A rule based on request execution time. - :type slow_requests: :class:`SlowRequestsBasedTrigger - ` + :type slow_requests: ~azure.mgmt.web.models.SlowRequestsBasedTrigger """ _attribute_map = { @@ -36,6 +33,7 @@ class AutoHealTriggers(Model): } def __init__(self, requests=None, private_bytes_in_kb=None, status_codes=None, slow_requests=None): + super(AutoHealTriggers, self).__init__() self.requests = requests self.private_bytes_in_kb = private_bytes_in_kb self.status_codes = status_codes diff --git a/azure-mgmt-web/azure/mgmt/web/models/azure_blob_storage_application_logs_config.py b/azure-mgmt-web/azure/mgmt/web/models/azure_blob_storage_application_logs_config.py index 2feef3399c63..0038c7d09545 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/azure_blob_storage_application_logs_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/azure_blob_storage_application_logs_config.py @@ -17,7 +17,7 @@ class AzureBlobStorageApplicationLogsConfig(Model): :param level: Log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error' - :type level: str or :class:`LogLevel ` + :type level: str or ~azure.mgmt.web.models.LogLevel :param sas_url: SAS url to a azure blob container with read/write/list/delete permissions. :type sas_url: str @@ -34,6 +34,7 @@ class AzureBlobStorageApplicationLogsConfig(Model): } def __init__(self, level=None, sas_url=None, retention_in_days=None): + super(AzureBlobStorageApplicationLogsConfig, self).__init__() self.level = level self.sas_url = sas_url self.retention_in_days = retention_in_days diff --git a/azure-mgmt-web/azure/mgmt/web/models/azure_blob_storage_http_logs_config.py b/azure-mgmt-web/azure/mgmt/web/models/azure_blob_storage_http_logs_config.py index d3e9babb915b..44f0f1fe8cfe 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/azure_blob_storage_http_logs_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/azure_blob_storage_http_logs_config.py @@ -34,6 +34,7 @@ class AzureBlobStorageHttpLogsConfig(Model): } def __init__(self, sas_url=None, retention_in_days=None, enabled=None): + super(AzureBlobStorageHttpLogsConfig, self).__init__() self.sas_url = sas_url self.retention_in_days = retention_in_days self.enabled = enabled diff --git a/azure-mgmt-web/azure/mgmt/web/models/azure_table_storage_application_logs_config.py b/azure-mgmt-web/azure/mgmt/web/models/azure_table_storage_application_logs_config.py index 3e870bfd587a..67326ab3ed8e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/azure_table_storage_application_logs_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/azure_table_storage_application_logs_config.py @@ -17,7 +17,7 @@ class AzureTableStorageApplicationLogsConfig(Model): :param level: Log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error' - :type level: str or :class:`LogLevel ` + :type level: str or ~azure.mgmt.web.models.LogLevel :param sas_url: SAS URL to an Azure table with add/query/delete permissions. :type sas_url: str @@ -33,5 +33,6 @@ class AzureTableStorageApplicationLogsConfig(Model): } def __init__(self, sas_url, level=None): + super(AzureTableStorageApplicationLogsConfig, self).__init__() self.level = level self.sas_url = sas_url diff --git a/azure-mgmt-web/azure/mgmt/web/models/backup_item.py b/azure-mgmt-web/azure/mgmt/web/models/backup_item.py index 60bb4603cc55..c51f778fb347 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/backup_item.py +++ b/azure-mgmt-web/azure/mgmt/web/models/backup_item.py @@ -38,8 +38,7 @@ class BackupItem(ProxyOnlyResource): :ivar status: Backup status. Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created', 'Skipped', 'PartiallySucceeded', 'DeleteInProgress', 'DeleteFailed', 'Deleted' - :vartype status: str or :class:`BackupItemStatus - ` + :vartype status: str or ~azure.mgmt.web.models.BackupItemStatus :ivar size_in_bytes: Size of the backup in bytes. :vartype size_in_bytes: long :ivar created: Timestamp of the backup creation. @@ -47,8 +46,7 @@ class BackupItem(ProxyOnlyResource): :ivar log: Details regarding this backup. Might contain an error message. :vartype log: str :ivar databases: List of databases included in the backup. - :vartype databases: list of :class:`DatabaseBackupSetting - ` + :vartype databases: list[~azure.mgmt.web.models.DatabaseBackupSetting] :ivar scheduled: True if this backup has been created due to a schedule being triggered. :vartype scheduled: bool diff --git a/azure-mgmt-web/azure/mgmt/web/models/backup_request.py b/azure-mgmt-web/azure/mgmt/web/models/backup_request.py index e2da65d556f6..d3e9df59b00d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/backup_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/backup_request.py @@ -35,21 +35,21 @@ class BackupRequest(ProxyOnlyResource): :type storage_account_url: str :param backup_schedule: Schedule for the backup if it is executed periodically. - :type backup_schedule: :class:`BackupSchedule - ` + :type backup_schedule: ~azure.mgmt.web.models.BackupSchedule :param databases: Databases included in the backup. - :type databases: list of :class:`DatabaseBackupSetting - ` + :type databases: list[~azure.mgmt.web.models.DatabaseBackupSetting] :param backup_request_type: Type of the backup. Possible values include: 'Default', 'Clone', 'Relocation', 'Snapshot' - :type backup_request_type: str or :class:`BackupRestoreOperationType - ` + :type backup_request_type: str or + ~azure.mgmt.web.models.BackupRestoreOperationType """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'backup_request_name': {'required': True}, + 'storage_account_url': {'required': True}, } _attribute_map = { @@ -65,7 +65,7 @@ class BackupRequest(ProxyOnlyResource): 'backup_request_type': {'key': 'properties.type', 'type': 'BackupRestoreOperationType'}, } - def __init__(self, kind=None, backup_request_name=None, enabled=None, storage_account_url=None, backup_schedule=None, databases=None, backup_request_type=None): + def __init__(self, backup_request_name, storage_account_url, kind=None, enabled=None, backup_schedule=None, databases=None, backup_request_type=None): super(BackupRequest, self).__init__(kind=kind) self.backup_request_name = backup_request_name self.enabled = enabled diff --git a/azure-mgmt-web/azure/mgmt/web/models/backup_schedule.py b/azure-mgmt-web/azure/mgmt/web/models/backup_schedule.py index 9af669472433..c1267a13c4f0 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/backup_schedule.py +++ b/azure-mgmt-web/azure/mgmt/web/models/backup_schedule.py @@ -27,8 +27,7 @@ class BackupSchedule(Model): executed (e.g. for weekly backup, this should be set to Day and FrequencyInterval should be set to 7). Possible values include: 'Day', 'Hour'. Default value: "Day" . - :type frequency_unit: str or :class:`FrequencyUnit - ` + :type frequency_unit: str or ~azure.mgmt.web.models.FrequencyUnit :param keep_at_least_one_backup: True if the retention policy should always keep at least one backup in the storage account, regardless how old it is; false otherwise. Default value: True . @@ -60,6 +59,7 @@ class BackupSchedule(Model): } def __init__(self, frequency_interval=7, frequency_unit="Day", keep_at_least_one_backup=True, retention_period_in_days=30, start_time=None): + super(BackupSchedule, self).__init__() self.frequency_interval = frequency_interval self.frequency_unit = frequency_unit self.keep_at_least_one_backup = keep_at_least_one_backup diff --git a/azure-mgmt-web/azure/mgmt/web/models/capability.py b/azure-mgmt-web/azure/mgmt/web/models/capability.py index 6dba23824d36..d69bc114238c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/capability.py +++ b/azure-mgmt-web/azure/mgmt/web/models/capability.py @@ -30,6 +30,7 @@ class Capability(Model): } def __init__(self, name=None, value=None, reason=None): + super(Capability, self).__init__() self.name = name self.value = value self.reason = reason diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate.py b/azure-mgmt-web/azure/mgmt/web/models/certificate.py index fc218e6f4621..c58de72bbf07 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate.py @@ -29,13 +29,13 @@ class Certificate(Resource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :ivar friendly_name: Friendly name of the certificate. :vartype friendly_name: str :ivar subject_name: Subject name of the certificate. :vartype subject_name: str :param host_names: Host names the certificate applies to. - :type host_names: list of str + :type host_names: list[str] :param pfx_blob: Pfx blob. :type pfx_blob: bytearray :ivar site_name: App name. @@ -60,8 +60,8 @@ class Certificate(Resource): :vartype public_key_hash: str :ivar hosting_environment_profile: Specification for the App Service Environment to use for the certificate. - :vartype hosting_environment_profile: :class:`HostingEnvironmentProfile - ` + :vartype hosting_environment_profile: + ~azure.mgmt.web.models.HostingEnvironmentProfile :param key_vault_id: Key Vault Csm resource Id. :type key_vault_id: str :param key_vault_secret_name: Key Vault secret name. @@ -72,8 +72,8 @@ class Certificate(Resource): 'AzureServiceUnauthorizedToAccessKeyVault', 'KeyVaultDoesNotExist', 'KeyVaultSecretDoesNotExist', 'UnknownError', 'ExternalPrivateKey', 'Unknown' - :vartype key_vault_secret_status: str or :class:`KeyVaultSecretStatus - ` + :vartype key_vault_secret_status: str or + ~azure.mgmt.web.models.KeyVaultSecretStatus :ivar geo_region: Region of the certificate. :vartype geo_region: str :ivar certificate_name: Resource name of the certificate. @@ -96,6 +96,7 @@ class Certificate(Resource): 'issuer': {'readonly': True}, 'issue_date': {'readonly': True}, 'expiration_date': {'readonly': True}, + 'password': {'required': True}, 'thumbprint': {'readonly': True}, 'valid': {'readonly': True}, 'cer_blob': {'readonly': True}, @@ -136,7 +137,7 @@ class Certificate(Resource): 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, } - def __init__(self, location, kind=None, tags=None, host_names=None, pfx_blob=None, password=None, key_vault_id=None, key_vault_secret_name=None, server_farm_id=None): + def __init__(self, location, password, kind=None, tags=None, host_names=None, pfx_blob=None, key_vault_id=None, key_vault_secret_name=None, server_farm_id=None): super(Certificate, self).__init__(kind=kind, location=location, tags=tags) self.friendly_name = None self.subject_name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate_details.py b/azure-mgmt-web/azure/mgmt/web/models/certificate_details.py index dcaa0286a4d4..ab92dba7a0df 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate_details.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate_details.py @@ -63,6 +63,7 @@ class CertificateDetails(Model): } def __init__(self): + super(CertificateDetails, self).__init__() self.version = None self.serial_number = None self.thumbprint = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action.py b/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action.py index 930c876182bd..aad5ce3401e4 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action.py @@ -29,7 +29,7 @@ class CertificateOrderAction(Resource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param certificate_order_action_type: Action type. Possible values include: 'CertificateIssued', 'CertificateOrderCanceled', 'CertificateOrderCreated', 'CertificateRevoked', @@ -37,8 +37,7 @@ class CertificateOrderAction(Resource): 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired', 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown' :type certificate_order_action_type: str or - :class:`CertificateOrderActionType - ` + ~azure.mgmt.web.models.CertificateOrderActionType :param created_at: Time at which the certificate action was performed. :type created_at: datetime """ diff --git a/azure-mgmt-web/azure/mgmt/web/models/cloning_info.py b/azure-mgmt-web/azure/mgmt/web/models/cloning_info.py index bec0eec5dbac..193c1610ef4d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/cloning_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/cloning_info.py @@ -41,7 +41,7 @@ class CloningInfo(Model): app. If specified, these settings override the settings cloned from source app. Otherwise, application settings from source app are retained. - :type app_settings_overrides: dict + :type app_settings_overrides: dict[str, str] :param configure_load_balancing: true to configure load balancing for source and destination app. :type configure_load_balancing: bool @@ -77,6 +77,7 @@ class CloningInfo(Model): } def __init__(self, source_web_app_id, correlation_id=None, overwrite=None, clone_custom_host_names=None, clone_source_control=None, hosting_environment=None, app_settings_overrides=None, configure_load_balancing=None, traffic_manager_profile_id=None, traffic_manager_profile_name=None, ignore_quotas=None): + super(CloningInfo, self).__init__() self.correlation_id = correlation_id self.overwrite = overwrite self.clone_custom_host_names = clone_custom_host_names diff --git a/azure-mgmt-web/azure/mgmt/web/models/conn_string_info.py b/azure-mgmt-web/azure/mgmt/web/models/conn_string_info.py index ea85fcddb766..85f5c197d14e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/conn_string_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/conn_string_info.py @@ -22,8 +22,7 @@ class ConnStringInfo(Model): :param type: Type of database. Possible values include: 'MySql', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL' - :type type: str or :class:`ConnectionStringType - ` + :type type: str or ~azure.mgmt.web.models.ConnectionStringType """ _attribute_map = { @@ -33,6 +32,7 @@ class ConnStringInfo(Model): } def __init__(self, name=None, connection_string=None, type=None): + super(ConnStringInfo, self).__init__() self.name = name self.connection_string = connection_string self.type = type diff --git a/azure-mgmt-web/azure/mgmt/web/models/conn_string_value_type_pair.py b/azure-mgmt-web/azure/mgmt/web/models/conn_string_value_type_pair.py index 1197780d4d39..a06aab9a003c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/conn_string_value_type_pair.py +++ b/azure-mgmt-web/azure/mgmt/web/models/conn_string_value_type_pair.py @@ -20,8 +20,7 @@ class ConnStringValueTypePair(Model): :param type: Type of database. Possible values include: 'MySql', 'SQLServer', 'SQLAzure', 'Custom', 'NotificationHub', 'ServiceBus', 'EventHub', 'ApiHub', 'DocDb', 'RedisCache', 'PostgreSQL' - :type type: str or :class:`ConnectionStringType - ` + :type type: str or ~azure.mgmt.web.models.ConnectionStringType """ _validation = { @@ -35,5 +34,6 @@ class ConnStringValueTypePair(Model): } def __init__(self, value, type): + super(ConnStringValueTypePair, self).__init__() self.value = value self.type = type diff --git a/azure-mgmt-web/azure/mgmt/web/models/connection_string_dictionary.py b/azure-mgmt-web/azure/mgmt/web/models/connection_string_dictionary.py index d3e88bcdbb86..600fb4f02001 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/connection_string_dictionary.py +++ b/azure-mgmt-web/azure/mgmt/web/models/connection_string_dictionary.py @@ -27,7 +27,8 @@ class ConnectionStringDictionary(ProxyOnlyResource): :ivar type: Resource type. :vartype type: str :param properties: Connection strings. - :type properties: dict + :type properties: dict[str, + ~azure.mgmt.web.models.ConnStringValueTypePair] """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/contact.py b/azure-mgmt-web/azure/mgmt/web/models/contact.py index 6e53c02ea0a4..cb3e58aae897 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/contact.py +++ b/azure-mgmt-web/azure/mgmt/web/models/contact.py @@ -19,7 +19,7 @@ class Contact(Model): directories as per ICANN requirements. :param address_mailing: Mailing address. - :type address_mailing: :class:`Address ` + :type address_mailing: ~azure.mgmt.web.models.Address :param email: Email address. :type email: str :param fax: Fax number. @@ -58,6 +58,7 @@ class Contact(Model): } def __init__(self, email, name_first, name_last, phone, address_mailing=None, fax=None, job_title=None, name_middle=None, organization=None): + super(Contact, self).__init__() self.address_mailing = address_mailing self.email = email self.fax = fax diff --git a/azure-mgmt-web/azure/mgmt/web/models/continuous_web_job.py b/azure-mgmt-web/azure/mgmt/web/models/continuous_web_job.py index b3f45e15ad4f..d1bb3f1ab21a 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/continuous_web_job.py +++ b/azure-mgmt-web/azure/mgmt/web/models/continuous_web_job.py @@ -28,8 +28,7 @@ class ContinuousWebJob(ProxyOnlyResource): :vartype type: str :param status: Job status. Possible values include: 'Initializing', 'Starting', 'Running', 'PendingRestart', 'Stopped' - :type status: str or :class:`ContinuousWebJobStatus - ` + :type status: str or ~azure.mgmt.web.models.ContinuousWebJobStatus :param detailed_status: Detailed status. :type detailed_status: str :param log_url: Log URL. @@ -45,8 +44,7 @@ class ContinuousWebJob(ProxyOnlyResource): :type extra_info_url: str :param job_type: Job type. Possible values include: 'Continuous', 'Triggered' - :type job_type: str or :class:`WebJobType - ` + :type job_type: str or ~azure.mgmt.web.models.WebJobType :param error: Error information. :type error: str :param using_sdk: Using SDK? diff --git a/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py b/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py index 17ab94d7843d..8b4de3fca608 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py +++ b/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py @@ -18,7 +18,7 @@ class CorsSettings(Model): :param allowed_origins: Gets or sets the list of origins that should be allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. - :type allowed_origins: list of str + :type allowed_origins: list[str] """ _attribute_map = { @@ -26,4 +26,5 @@ class CorsSettings(Model): } def __init__(self, allowed_origins=None): + super(CorsSettings, self).__init__() self.allowed_origins = allowed_origins diff --git a/azure-mgmt-web/azure/mgmt/web/models/csm_move_resource_envelope.py b/azure-mgmt-web/azure/mgmt/web/models/csm_move_resource_envelope.py index 64bcf3e1cb2b..8c3093e3fba0 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/csm_move_resource_envelope.py +++ b/azure-mgmt-web/azure/mgmt/web/models/csm_move_resource_envelope.py @@ -19,7 +19,7 @@ class CsmMoveResourceEnvelope(Model): :param target_resource_group: :type target_resource_group: str :param resources: - :type resources: list of str + :type resources: list[str] """ _validation = { @@ -32,5 +32,6 @@ class CsmMoveResourceEnvelope(Model): } def __init__(self, target_resource_group=None, resources=None): + super(CsmMoveResourceEnvelope, self).__init__() self.target_resource_group = target_resource_group self.resources = resources diff --git a/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description.py b/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description.py index c38991e8cb89..e7a1eb360bec 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description.py +++ b/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description.py @@ -18,13 +18,11 @@ class CsmOperationDescription(Model): :param name: :type name: str :param display: - :type display: :class:`CsmOperationDisplay - ` + :type display: ~azure.mgmt.web.models.CsmOperationDisplay :param origin: :type origin: str :param properties: - :type properties: :class:`CsmOperationDescriptionProperties - ` + :type properties: ~azure.mgmt.web.models.CsmOperationDescriptionProperties """ _attribute_map = { @@ -35,6 +33,7 @@ class CsmOperationDescription(Model): } def __init__(self, name=None, display=None, origin=None, properties=None): + super(CsmOperationDescription, self).__init__() self.name = name self.display = display self.origin = origin diff --git a/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description_properties.py b/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description_properties.py index 4b7ec63febc7..9222641111e0 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description_properties.py +++ b/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description_properties.py @@ -16,8 +16,7 @@ class CsmOperationDescriptionProperties(Model): """CsmOperationDescriptionProperties. :param service_specification: - :type service_specification: :class:`ServiceSpecification - ` + :type service_specification: ~azure.mgmt.web.models.ServiceSpecification """ _attribute_map = { @@ -25,4 +24,5 @@ class CsmOperationDescriptionProperties(Model): } def __init__(self, service_specification=None): + super(CsmOperationDescriptionProperties, self).__init__() self.service_specification = service_specification diff --git a/azure-mgmt-web/azure/mgmt/web/models/csm_operation_display.py b/azure-mgmt-web/azure/mgmt/web/models/csm_operation_display.py index 95e6923af121..e4dbd9b477ec 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/csm_operation_display.py +++ b/azure-mgmt-web/azure/mgmt/web/models/csm_operation_display.py @@ -33,6 +33,7 @@ class CsmOperationDisplay(Model): } def __init__(self, provider=None, resource=None, operation=None, description=None): + super(CsmOperationDisplay, self).__init__() self.provider = provider self.resource = resource self.operation = operation diff --git a/azure-mgmt-web/azure/mgmt/web/models/csm_publishing_profile_options.py b/azure-mgmt-web/azure/mgmt/web/models/csm_publishing_profile_options.py index 4f698cb00f3d..67897e676cf3 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/csm_publishing_profile_options.py +++ b/azure-mgmt-web/azure/mgmt/web/models/csm_publishing_profile_options.py @@ -19,8 +19,7 @@ class CsmPublishingProfileOptions(Model): FileZilla3 WebDeploy -- default Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' - :type format: str or :class:`PublishingProfileFormat - ` + :type format: str or ~azure.mgmt.web.models.PublishingProfileFormat """ _attribute_map = { @@ -28,4 +27,5 @@ class CsmPublishingProfileOptions(Model): } def __init__(self, format=None): + super(CsmPublishingProfileOptions, self).__init__() self.format = format diff --git a/azure-mgmt-web/azure/mgmt/web/models/csm_slot_entity.py b/azure-mgmt-web/azure/mgmt/web/models/csm_slot_entity.py index e5c17b0c6c26..06446508086b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/csm_slot_entity.py +++ b/azure-mgmt-web/azure/mgmt/web/models/csm_slot_entity.py @@ -33,5 +33,6 @@ class CsmSlotEntity(Model): } def __init__(self, target_slot, preserve_vnet): + super(CsmSlotEntity, self).__init__() self.target_slot = target_slot self.preserve_vnet = preserve_vnet diff --git a/azure-mgmt-web/azure/mgmt/web/models/csm_usage_quota.py b/azure-mgmt-web/azure/mgmt/web/models/csm_usage_quota.py index e3e876b4c3f3..ce6e4773da6c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/csm_usage_quota.py +++ b/azure-mgmt-web/azure/mgmt/web/models/csm_usage_quota.py @@ -24,8 +24,7 @@ class CsmUsageQuota(Model): :param limit: The resource limit. :type limit: long :param name: Quota name. - :type name: :class:`LocalizableString - ` + :type name: ~azure.mgmt.web.models.LocalizableString """ _attribute_map = { @@ -37,6 +36,7 @@ class CsmUsageQuota(Model): } def __init__(self, unit=None, next_reset_time=None, current_value=None, limit=None, name=None): + super(CsmUsageQuota, self).__init__() self.unit = unit self.next_reset_time = next_reset_time self.current_value = current_value diff --git a/azure-mgmt-web/azure/mgmt/web/models/custom_hostname_analysis_result.py b/azure-mgmt-web/azure/mgmt/web/models/custom_hostname_analysis_result.py index a4097d641828..6b29a631fb1e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/custom_hostname_analysis_result.py +++ b/azure-mgmt-web/azure/mgmt/web/models/custom_hostname_analysis_result.py @@ -32,12 +32,11 @@ class CustomHostnameAnalysisResult(ProxyOnlyResource): :ivar custom_domain_verification_test: DNS verification test result. Possible values include: 'Passed', 'Failed', 'Skipped' :vartype custom_domain_verification_test: str or - :class:`DnsVerificationTestResult - ` + ~azure.mgmt.web.models.DnsVerificationTestResult :ivar custom_domain_verification_failure_info: Raw failure information if DNS verification fails. - :vartype custom_domain_verification_failure_info: :class:`ErrorEntity - ` + :vartype custom_domain_verification_failure_info: + ~azure.mgmt.web.models.ErrorEntity :ivar has_conflict_on_scale_unit: true if there is a conflict on a scale unit; otherwise, false. :vartype has_conflict_on_scale_unit: bool @@ -48,17 +47,17 @@ class CustomHostnameAnalysisResult(ProxyOnlyResource): unit if it's within the same subscription. :vartype conflicting_app_resource_id: str :param c_name_records: CName records controller can see for this hostname. - :type c_name_records: list of str + :type c_name_records: list[str] :param txt_records: TXT records controller can see for this hostname. - :type txt_records: list of str + :type txt_records: list[str] :param a_records: A records controller can see for this hostname. - :type a_records: list of str + :type a_records: list[str] :param alternate_cname_records: Alternate CName records controller can see for this hostname. - :type alternate_cname_records: list of str + :type alternate_cname_records: list[str] :param alternate_txt_records: Alternate TXT records controller can see for this hostname. - :type alternate_txt_records: list of str + :type alternate_txt_records: list[str] """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/database_backup_setting.py b/azure-mgmt-web/azure/mgmt/web/models/database_backup_setting.py index 327f2d6f3f01..bd54f5fde4a4 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/database_backup_setting.py +++ b/azure-mgmt-web/azure/mgmt/web/models/database_backup_setting.py @@ -17,8 +17,7 @@ class DatabaseBackupSetting(Model): :param database_type: Database type (e.g. SqlAzure / MySql). Possible values include: 'SqlAzure', 'MySql', 'LocalMySql', 'PostgreSql' - :type database_type: str or :class:`DatabaseType - ` + :type database_type: str or ~azure.mgmt.web.models.DatabaseType :param name: :type name: str :param connection_string_name: Contains a connection string name that is @@ -43,6 +42,7 @@ class DatabaseBackupSetting(Model): } def __init__(self, database_type, name=None, connection_string_name=None, connection_string=None): + super(DatabaseBackupSetting, self).__init__() self.database_type = database_type self.name = name self.connection_string_name = connection_string_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py b/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py index 6859ec5c1895..396dda704f43 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py @@ -46,6 +46,7 @@ class DeletedSite(Model): } def __init__(self, id=None): + super(DeletedSite, self).__init__() self.id = id self.deleted_timestamp = None self.subscription = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/dimension.py b/azure-mgmt-web/azure/mgmt/web/models/dimension.py index 8294d2b456ce..cb93c9f8b111 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/dimension.py +++ b/azure-mgmt-web/azure/mgmt/web/models/dimension.py @@ -33,6 +33,7 @@ class Dimension(Model): } def __init__(self, name=None, display_name=None, internal_name=None, to_be_exported_for_shoebox=None): + super(Dimension, self).__init__() self.name = name self.display_name = display_name self.internal_name = internal_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/domain.py b/azure-mgmt-web/azure/mgmt/web/models/domain.py index a70681b19d51..07406954a39f 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/domain.py +++ b/azure-mgmt-web/azure/mgmt/web/models/domain.py @@ -29,28 +29,27 @@ class Domain(Resource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param contact_admin: Administrative contact. - :type contact_admin: :class:`Contact ` + :type contact_admin: ~azure.mgmt.web.models.Contact :param contact_billing: Billing contact. - :type contact_billing: :class:`Contact ` + :type contact_billing: ~azure.mgmt.web.models.Contact :param contact_registrant: Registrant contact. - :type contact_registrant: :class:`Contact ` + :type contact_registrant: ~azure.mgmt.web.models.Contact :param contact_tech: Technical contact. - :type contact_tech: :class:`Contact ` + :type contact_tech: ~azure.mgmt.web.models.Contact :ivar registration_status: Domain registration status. Possible values include: 'Active', 'Awaiting', 'Cancelled', 'Confiscated', 'Disabled', 'Excluded', 'Expired', 'Failed', 'Held', 'Locked', 'Parked', 'Pending', 'Reserved', 'Reverted', 'Suspended', 'Transferred', 'Unknown', 'Unlocked', 'Unparked', 'Updated', 'JsonConverterFailed' - :vartype registration_status: str or :class:`DomainStatus - ` + :vartype registration_status: str or ~azure.mgmt.web.models.DomainStatus :ivar provisioning_state: Domain provisioning state. Possible values include: 'Succeeded', 'Failed', 'Canceled', 'InProgress', 'Deleting' - :vartype provisioning_state: str or :class:`ProvisioningState - ` + :vartype provisioning_state: str or + ~azure.mgmt.web.models.ProvisioningState :ivar name_servers: Name servers. - :vartype name_servers: list of str + :vartype name_servers: list[str] :param privacy: true if domain privacy is enabled for this domain; otherwise, false. :type privacy: bool @@ -71,22 +70,19 @@ class Domain(Resource): :vartype ready_for_dns_record_management: bool :ivar managed_host_names: All hostnames derived from the domain and assigned to Azure resources. - :vartype managed_host_names: list of :class:`HostName - ` + :vartype managed_host_names: list[~azure.mgmt.web.models.HostName] :param consent: Legal agreement consent. - :type consent: :class:`DomainPurchaseConsent - ` + :type consent: ~azure.mgmt.web.models.DomainPurchaseConsent :ivar domain_not_renewable_reasons: Reasons why domain is not renewable. - :vartype domain_not_renewable_reasons: list of str + :vartype domain_not_renewable_reasons: list[str] :param dns_type: Current DNS type. Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns' - :type dns_type: str or :class:`DnsType ` + :type dns_type: str or ~azure.mgmt.web.models.DnsType :param dns_zone_id: Azure DNS Zone to use :type dns_zone_id: str :param target_dns_type: Target DNS type (would be used for migration). Possible values include: 'AzureDns', 'DefaultDomainRegistrarDns' - :type target_dns_type: str or :class:`DnsType - ` + :type target_dns_type: str or ~azure.mgmt.web.models.DnsType :ivar auth_code: :vartype auth_code: str """ @@ -96,6 +92,10 @@ class Domain(Resource): 'name': {'readonly': True}, 'location': {'required': True}, 'type': {'readonly': True}, + 'contact_admin': {'required': True}, + 'contact_billing': {'required': True}, + 'contact_registrant': {'required': True}, + 'contact_tech': {'required': True}, 'registration_status': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'name_servers': {'readonly': True}, @@ -104,6 +104,7 @@ class Domain(Resource): 'last_renewed_time': {'readonly': True}, 'ready_for_dns_record_management': {'readonly': True}, 'managed_host_names': {'readonly': True}, + 'consent': {'required': True}, 'domain_not_renewable_reasons': {'readonly': True}, 'auth_code': {'readonly': True}, } @@ -137,7 +138,7 @@ class Domain(Resource): 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, } - def __init__(self, location, kind=None, tags=None, contact_admin=None, contact_billing=None, contact_registrant=None, contact_tech=None, privacy=None, auto_renew=True, consent=None, dns_type=None, dns_zone_id=None, target_dns_type=None): + def __init__(self, location, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind=None, tags=None, privacy=None, auto_renew=True, dns_type=None, dns_zone_id=None, target_dns_type=None): super(Domain, self).__init__(kind=kind, location=location, tags=tags) self.contact_admin = contact_admin self.contact_billing = contact_billing diff --git a/azure-mgmt-web/azure/mgmt/web/models/domain_availablility_check_result.py b/azure-mgmt-web/azure/mgmt/web/models/domain_availablility_check_result.py index b16c9f99327b..19132caf64e5 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/domain_availablility_check_result.py +++ b/azure-mgmt-web/azure/mgmt/web/models/domain_availablility_check_result.py @@ -24,8 +24,7 @@ class DomainAvailablilityCheckResult(Model): full price of domain registration, SoftDeleted: Purchasing this domain will simply restore it and this operation will not cost anything. Possible values include: 'Regular', 'SoftDeleted' - :type domain_type: str or :class:`DomainType - ` + :type domain_type: str or ~azure.mgmt.web.models.DomainType """ _attribute_map = { @@ -35,6 +34,7 @@ class DomainAvailablilityCheckResult(Model): } def __init__(self, name=None, available=None, domain_type=None): + super(DomainAvailablilityCheckResult, self).__init__() self.name = name self.available = available self.domain_type = domain_type diff --git a/azure-mgmt-web/azure/mgmt/web/models/domain_control_center_sso_request.py b/azure-mgmt-web/azure/mgmt/web/models/domain_control_center_sso_request.py index 32dfd0995708..056e5420c991 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/domain_control_center_sso_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/domain_control_center_sso_request.py @@ -40,6 +40,7 @@ class DomainControlCenterSsoRequest(Model): } def __init__(self): + super(DomainControlCenterSsoRequest, self).__init__() self.url = None self.post_parameter_key = None self.post_parameter_value = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/domain_ownership_identifier.py b/azure-mgmt-web/azure/mgmt/web/models/domain_ownership_identifier.py index c7ae2551dd52..bb6b4bbb6255 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/domain_ownership_identifier.py +++ b/azure-mgmt-web/azure/mgmt/web/models/domain_ownership_identifier.py @@ -29,7 +29,7 @@ class DomainOwnershipIdentifier(Resource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param ownership_id: Ownership Id. :type ownership_id: str """ diff --git a/azure-mgmt-web/azure/mgmt/web/models/domain_purchase_consent.py b/azure-mgmt-web/azure/mgmt/web/models/domain_purchase_consent.py index c780308c4ddf..856204af4921 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/domain_purchase_consent.py +++ b/azure-mgmt-web/azure/mgmt/web/models/domain_purchase_consent.py @@ -19,7 +19,7 @@ class DomainPurchaseConsent(Model): :param agreement_keys: List of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements API under TopLevelDomain resource. - :type agreement_keys: list of str + :type agreement_keys: list[str] :param agreed_by: Client IP address. :type agreed_by: str :param agreed_at: Timestamp when the agreements were accepted. @@ -33,6 +33,7 @@ class DomainPurchaseConsent(Model): } def __init__(self, agreement_keys=None, agreed_by=None, agreed_at=None): + super(DomainPurchaseConsent, self).__init__() self.agreement_keys = agreement_keys self.agreed_by = agreed_by self.agreed_at = agreed_at diff --git a/azure-mgmt-web/azure/mgmt/web/models/domain_recommendation_search_parameters.py b/azure-mgmt-web/azure/mgmt/web/models/domain_recommendation_search_parameters.py index 88ca8d6d00ac..98a31de25204 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/domain_recommendation_search_parameters.py +++ b/azure-mgmt-web/azure/mgmt/web/models/domain_recommendation_search_parameters.py @@ -28,5 +28,6 @@ class DomainRecommendationSearchParameters(Model): } def __init__(self, keywords=None, max_domain_recommendations=None): + super(DomainRecommendationSearchParameters, self).__init__() self.keywords = keywords self.max_domain_recommendations = max_domain_recommendations diff --git a/azure-mgmt-web/azure/mgmt/web/models/enabled_config.py b/azure-mgmt-web/azure/mgmt/web/models/enabled_config.py index 7d20bdd48168..5d44efc6b8ad 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/enabled_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/enabled_config.py @@ -25,4 +25,5 @@ class EnabledConfig(Model): } def __init__(self, enabled=None): + super(EnabledConfig, self).__init__() self.enabled = enabled diff --git a/azure-mgmt-web/azure/mgmt/web/models/error_entity.py b/azure-mgmt-web/azure/mgmt/web/models/error_entity.py index e559412a967f..26bda8c48118 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/error_entity.py +++ b/azure-mgmt-web/azure/mgmt/web/models/error_entity.py @@ -24,10 +24,9 @@ class ErrorEntity(Model): :param message_template: Message template. :type message_template: str :param parameters: Parameters for the template. - :type parameters: list of str + :type parameters: list[str] :param inner_errors: Inner errors. - :type inner_errors: list of :class:`ErrorEntity - ` + :type inner_errors: list[~azure.mgmt.web.models.ErrorEntity] """ _attribute_map = { @@ -40,6 +39,7 @@ class ErrorEntity(Model): } def __init__(self, code=None, message=None, extended_code=None, message_template=None, parameters=None, inner_errors=None): + super(ErrorEntity, self).__init__() self.code = code self.message = message self.extended_code = extended_code diff --git a/azure-mgmt-web/azure/mgmt/web/models/experiments.py b/azure-mgmt-web/azure/mgmt/web/models/experiments.py index 77b169de661d..231d82f98a5d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/experiments.py +++ b/azure-mgmt-web/azure/mgmt/web/models/experiments.py @@ -16,8 +16,7 @@ class Experiments(Model): """Routing rules in production experiments. :param ramp_up_rules: List of ramp-up rules. - :type ramp_up_rules: list of :class:`RampUpRule - ` + :type ramp_up_rules: list[~azure.mgmt.web.models.RampUpRule] """ _attribute_map = { @@ -25,4 +24,5 @@ class Experiments(Model): } def __init__(self, ramp_up_rules=None): + super(Experiments, self).__init__() self.ramp_up_rules = ramp_up_rules diff --git a/azure-mgmt-web/azure/mgmt/web/models/file_system_application_logs_config.py b/azure-mgmt-web/azure/mgmt/web/models/file_system_application_logs_config.py index f01ece18280f..b8ecc8372cc5 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/file_system_application_logs_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/file_system_application_logs_config.py @@ -17,7 +17,7 @@ class FileSystemApplicationLogsConfig(Model): :param level: Log level. Possible values include: 'Off', 'Verbose', 'Information', 'Warning', 'Error'. Default value: "Off" . - :type level: str or :class:`LogLevel ` + :type level: str or ~azure.mgmt.web.models.LogLevel """ _attribute_map = { @@ -25,4 +25,5 @@ class FileSystemApplicationLogsConfig(Model): } def __init__(self, level="Off"): + super(FileSystemApplicationLogsConfig, self).__init__() self.level = level diff --git a/azure-mgmt-web/azure/mgmt/web/models/file_system_http_logs_config.py b/azure-mgmt-web/azure/mgmt/web/models/file_system_http_logs_config.py index 5f52d2892ba5..0c38657cac46 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/file_system_http_logs_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/file_system_http_logs_config.py @@ -40,6 +40,7 @@ class FileSystemHttpLogsConfig(Model): } def __init__(self, retention_in_mb=None, retention_in_days=None, enabled=None): + super(FileSystemHttpLogsConfig, self).__init__() self.retention_in_mb = retention_in_mb self.retention_in_days = retention_in_days self.enabled = enabled diff --git a/azure-mgmt-web/azure/mgmt/web/models/function_envelope.py b/azure-mgmt-web/azure/mgmt/web/models/function_envelope.py index 43a11a33486b..e68f283aefb7 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/function_envelope.py +++ b/azure-mgmt-web/azure/mgmt/web/models/function_envelope.py @@ -43,7 +43,7 @@ class FunctionEnvelope(ProxyOnlyResource): :param config: Config information. :type config: object :param files: File list. - :type files: dict + :type files: dict[str, str] :param test_data: Test data used when testing via the Azure Portal. :type test_data: str """ diff --git a/azure-mgmt-web/azure/mgmt/web/models/global_csm_sku_description.py b/azure-mgmt-web/azure/mgmt/web/models/global_csm_sku_description.py index 940dbe73892b..6eda1c50aed7 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/global_csm_sku_description.py +++ b/azure-mgmt-web/azure/mgmt/web/models/global_csm_sku_description.py @@ -20,13 +20,12 @@ class GlobalCsmSkuDescription(Model): :param tier: Service Tier of the resource SKU. :type tier: str :param capacity: Min, max, and default scale values of the SKU. - :type capacity: :class:`SkuCapacity ` + :type capacity: ~azure.mgmt.web.models.SkuCapacity :param locations: Locations of the SKU. - :type locations: list of str + :type locations: list[str] :param capabilities: Capabilities of the SKU, e.g., is traffic manager enabled? - :type capabilities: list of :class:`Capability - ` + :type capabilities: list[~azure.mgmt.web.models.Capability] """ _attribute_map = { @@ -38,6 +37,7 @@ class GlobalCsmSkuDescription(Model): } def __init__(self, name=None, tier=None, capacity=None, locations=None, capabilities=None): + super(GlobalCsmSkuDescription, self).__init__() self.name = name self.tier = tier self.capacity = capacity diff --git a/azure-mgmt-web/azure/mgmt/web/models/handler_mapping.py b/azure-mgmt-web/azure/mgmt/web/models/handler_mapping.py index 830b954cd931..fd3819684997 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/handler_mapping.py +++ b/azure-mgmt-web/azure/mgmt/web/models/handler_mapping.py @@ -35,6 +35,7 @@ class HandlerMapping(Model): } def __init__(self, extension=None, script_processor=None, arguments=None): + super(HandlerMapping, self).__init__() self.extension = extension self.script_processor = script_processor self.arguments = arguments diff --git a/azure-mgmt-web/azure/mgmt/web/models/host_name.py b/azure-mgmt-web/azure/mgmt/web/models/host_name.py index b8612a52b48a..3df8649876dd 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/host_name.py +++ b/azure-mgmt-web/azure/mgmt/web/models/host_name.py @@ -20,24 +20,21 @@ class HostName(Model): :param site_names: List of apps the hostname is assigned to. This list will have more than one app only if the hostname is pointing to a Traffic Manager. - :type site_names: list of str + :type site_names: list[str] :param azure_resource_name: Name of the Azure resource the hostname is assigned to. If it is assigned to a Traffic Manager then it will be the Traffic Manager name otherwise it will be the app name. :type azure_resource_name: str :param azure_resource_type: Type of the Azure resource the hostname is assigned to. Possible values include: 'Website', 'TrafficManager' - :type azure_resource_type: str or :class:`AzureResourceType - ` + :type azure_resource_type: str or ~azure.mgmt.web.models.AzureResourceType :param custom_host_name_dns_record_type: Type of the DNS record. Possible values include: 'CName', 'A' :type custom_host_name_dns_record_type: str or - :class:`CustomHostNameDnsRecordType - ` + ~azure.mgmt.web.models.CustomHostNameDnsRecordType :param host_name_type: Type of the hostname. Possible values include: 'Verified', 'Managed' - :type host_name_type: str or :class:`HostNameType - ` + :type host_name_type: str or ~azure.mgmt.web.models.HostNameType """ _attribute_map = { @@ -50,6 +47,7 @@ class HostName(Model): } def __init__(self, name=None, site_names=None, azure_resource_name=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None): + super(HostName, self).__init__() self.name = name self.site_names = site_names self.azure_resource_name = azure_resource_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/host_name_binding.py b/azure-mgmt-web/azure/mgmt/web/models/host_name_binding.py index 49273f90910d..c08ca78c7b3d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/host_name_binding.py +++ b/azure-mgmt-web/azure/mgmt/web/models/host_name_binding.py @@ -36,20 +36,17 @@ class HostNameBinding(ProxyOnlyResource): :type azure_resource_name: str :param azure_resource_type: Azure resource type. Possible values include: 'Website', 'TrafficManager' - :type azure_resource_type: str or :class:`AzureResourceType - ` + :type azure_resource_type: str or ~azure.mgmt.web.models.AzureResourceType :param custom_host_name_dns_record_type: Custom DNS record type. Possible values include: 'CName', 'A' :type custom_host_name_dns_record_type: str or - :class:`CustomHostNameDnsRecordType - ` + ~azure.mgmt.web.models.CustomHostNameDnsRecordType :param host_name_type: Hostname type. Possible values include: 'Verified', 'Managed' - :type host_name_type: str or :class:`HostNameType - ` + :type host_name_type: str or ~azure.mgmt.web.models.HostNameType :param ssl_state: SSL type. Possible values include: 'Disabled', 'SniEnabled', 'IpBasedEnabled' - :type ssl_state: str or :class:`SslState ` + :type ssl_state: str or ~azure.mgmt.web.models.SslState :param thumbprint: SSL certificate thumbprint :type thumbprint: str :ivar virtual_ip: Virtual IP address assigned to the hostname if IP based @@ -61,6 +58,7 @@ class HostNameBinding(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'host_name_binding_name': {'required': True}, 'virtual_ip': {'readonly': True}, } @@ -81,7 +79,7 @@ class HostNameBinding(ProxyOnlyResource): 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, } - def __init__(self, kind=None, host_name_binding_name=None, site_name=None, domain_id=None, azure_resource_name=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint=None): + def __init__(self, host_name_binding_name, kind=None, site_name=None, domain_id=None, azure_resource_name=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint=None): super(HostNameBinding, self).__init__(kind=kind) self.host_name_binding_name = host_name_binding_name self.site_name = site_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/host_name_ssl_state.py b/azure-mgmt-web/azure/mgmt/web/models/host_name_ssl_state.py index af85a53f2f8f..1a95322cf81e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/host_name_ssl_state.py +++ b/azure-mgmt-web/azure/mgmt/web/models/host_name_ssl_state.py @@ -19,7 +19,7 @@ class HostNameSslState(Model): :type name: str :param ssl_state: SSL type. Possible values include: 'Disabled', 'SniEnabled', 'IpBasedEnabled' - :type ssl_state: str or :class:`SslState ` + :type ssl_state: str or ~azure.mgmt.web.models.SslState :param virtual_ip: Virtual IP address assigned to the hostname if IP based SSL is enabled. :type virtual_ip: str @@ -29,7 +29,7 @@ class HostNameSslState(Model): :type to_update: bool :param host_type: Indicates whether the hostname is a standard or repository hostname. Possible values include: 'Standard', 'Repository' - :type host_type: str or :class:`HostType ` + :type host_type: str or ~azure.mgmt.web.models.HostType """ _attribute_map = { @@ -42,6 +42,7 @@ class HostNameSslState(Model): } def __init__(self, name=None, ssl_state=None, virtual_ip=None, thumbprint=None, to_update=None, host_type=None): + super(HostNameSslState, self).__init__() self.name = name self.ssl_state = ssl_state self.virtual_ip = virtual_ip diff --git a/azure-mgmt-web/azure/mgmt/web/models/hosting_environment_diagnostics.py b/azure-mgmt-web/azure/mgmt/web/models/hosting_environment_diagnostics.py index 33c985233611..648e8704252a 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/hosting_environment_diagnostics.py +++ b/azure-mgmt-web/azure/mgmt/web/models/hosting_environment_diagnostics.py @@ -27,5 +27,6 @@ class HostingEnvironmentDiagnostics(Model): } def __init__(self, name=None, diagnosics_output=None): + super(HostingEnvironmentDiagnostics, self).__init__() self.name = name self.diagnosics_output = diagnosics_output diff --git a/azure-mgmt-web/azure/mgmt/web/models/hosting_environment_profile.py b/azure-mgmt-web/azure/mgmt/web/models/hosting_environment_profile.py index 589efb8dfca8..f40f022aba2b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/hosting_environment_profile.py +++ b/azure-mgmt-web/azure/mgmt/web/models/hosting_environment_profile.py @@ -38,6 +38,7 @@ class HostingEnvironmentProfile(Model): } def __init__(self, id=None): + super(HostingEnvironmentProfile, self).__init__() self.id = id self.name = None self.type = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/http_logs_config.py b/azure-mgmt-web/azure/mgmt/web/models/http_logs_config.py index 6cfe6d898a4b..95cb408652f5 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/http_logs_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/http_logs_config.py @@ -16,11 +16,10 @@ class HttpLogsConfig(Model): """Http logs configuration. :param file_system: Http logs to file system configuration. - :type file_system: :class:`FileSystemHttpLogsConfig - ` + :type file_system: ~azure.mgmt.web.models.FileSystemHttpLogsConfig :param azure_blob_storage: Http logs to azure blob storage configuration. - :type azure_blob_storage: :class:`AzureBlobStorageHttpLogsConfig - ` + :type azure_blob_storage: + ~azure.mgmt.web.models.AzureBlobStorageHttpLogsConfig """ _attribute_map = { @@ -29,5 +28,6 @@ class HttpLogsConfig(Model): } def __init__(self, file_system=None, azure_blob_storage=None): + super(HttpLogsConfig, self).__init__() self.file_system = file_system self.azure_blob_storage = azure_blob_storage diff --git a/azure-mgmt-web/azure/mgmt/web/models/ip_security_restriction.py b/azure-mgmt-web/azure/mgmt/web/models/ip_security_restriction.py index 501a69836668..de6ad1d3c6ab 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/ip_security_restriction.py +++ b/azure-mgmt-web/azure/mgmt/web/models/ip_security_restriction.py @@ -32,5 +32,6 @@ class IpSecurityRestriction(Model): } def __init__(self, ip_address, subnet_mask=None): + super(IpSecurityRestriction, self).__init__() self.ip_address = ip_address self.subnet_mask = subnet_mask diff --git a/azure-mgmt-web/azure/mgmt/web/models/localizable_string.py b/azure-mgmt-web/azure/mgmt/web/models/localizable_string.py index 28f549d13183..05f0ad489a22 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/localizable_string.py +++ b/azure-mgmt-web/azure/mgmt/web/models/localizable_string.py @@ -27,5 +27,6 @@ class LocalizableString(Model): } def __init__(self, value=None, localized_value=None): + super(LocalizableString, self).__init__() self.value = value self.localized_value = localized_value diff --git a/azure-mgmt-web/azure/mgmt/web/models/metric_availabilily.py b/azure-mgmt-web/azure/mgmt/web/models/metric_availabilily.py index 43b85599e81f..7524fb413748 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/metric_availabilily.py +++ b/azure-mgmt-web/azure/mgmt/web/models/metric_availabilily.py @@ -27,5 +27,6 @@ class MetricAvailabilily(Model): } def __init__(self, time_grain=None, retention=None): + super(MetricAvailabilily, self).__init__() self.time_grain = time_grain self.retention = retention diff --git a/azure-mgmt-web/azure/mgmt/web/models/metric_availability.py b/azure-mgmt-web/azure/mgmt/web/models/metric_availability.py index 0141039bc1c6..0b786bca17db 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/metric_availability.py +++ b/azure-mgmt-web/azure/mgmt/web/models/metric_availability.py @@ -27,5 +27,6 @@ class MetricAvailability(Model): } def __init__(self, time_grain=None, blob_duration=None): + super(MetricAvailability, self).__init__() self.time_grain = time_grain self.blob_duration = blob_duration diff --git a/azure-mgmt-web/azure/mgmt/web/models/metric_definition.py b/azure-mgmt-web/azure/mgmt/web/models/metric_definition.py index 4732643e4f99..2b1ca6a6fcd9 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/metric_definition.py +++ b/azure-mgmt-web/azure/mgmt/web/models/metric_definition.py @@ -34,8 +34,8 @@ class MetricDefinition(ProxyOnlyResource): :vartype primary_aggregation_type: str :ivar metric_availabilities: List of time grains supported for the metric together with retention period. - :vartype metric_availabilities: list of :class:`MetricAvailabilily - ` + :vartype metric_availabilities: + list[~azure.mgmt.web.models.MetricAvailabilily] :ivar display_name: Friendly name shown in the UI. :vartype display_name: str """ diff --git a/azure-mgmt-web/azure/mgmt/web/models/metric_specification.py b/azure-mgmt-web/azure/mgmt/web/models/metric_specification.py index e3f4ce163bf7..a67fb44203e5 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/metric_specification.py +++ b/azure-mgmt-web/azure/mgmt/web/models/metric_specification.py @@ -40,13 +40,11 @@ class MetricSpecification(Model): :param is_internal: :type is_internal: bool :param dimensions: - :type dimensions: list of :class:`Dimension - ` + :type dimensions: list[~azure.mgmt.web.models.Dimension] :param category: :type category: str :param availabilities: - :type availabilities: list of :class:`MetricAvailability - ` + :type availabilities: list[~azure.mgmt.web.models.MetricAvailability] """ _attribute_map = { @@ -68,6 +66,7 @@ class MetricSpecification(Model): } def __init__(self, name=None, display_name=None, display_description=None, unit=None, aggregation_type=None, supports_instance_level_aggregation=None, enable_regional_mdm_account=None, source_mdm_account=None, source_mdm_namespace=None, metric_filter_pattern=None, fill_gap_with_zero=None, is_internal=None, dimensions=None, category=None, availabilities=None): + super(MetricSpecification, self).__init__() self.name = name self.display_name = display_name self.display_description = display_description diff --git a/azure-mgmt-web/azure/mgmt/web/models/migrate_my_sql_request.py b/azure-mgmt-web/azure/mgmt/web/models/migrate_my_sql_request.py index 6e0cbb8e84a4..b9a98043e997 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/migrate_my_sql_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/migrate_my_sql_request.py @@ -30,14 +30,15 @@ class MigrateMySqlRequest(ProxyOnlyResource): :type connection_string: str :param migration_type: The type of migration operation to be done. Possible values include: 'LocalToRemote', 'RemoteToLocal' - :type migration_type: str or :class:`MySqlMigrationType - ` + :type migration_type: str or ~azure.mgmt.web.models.MySqlMigrationType """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'connection_string': {'required': True}, + 'migration_type': {'required': True}, } _attribute_map = { @@ -49,7 +50,7 @@ class MigrateMySqlRequest(ProxyOnlyResource): 'migration_type': {'key': 'properties.migrationType', 'type': 'MySqlMigrationType'}, } - def __init__(self, kind=None, connection_string=None, migration_type=None): + def __init__(self, connection_string, migration_type, kind=None): super(MigrateMySqlRequest, self).__init__(kind=kind) self.connection_string = connection_string self.migration_type = migration_type diff --git a/azure-mgmt-web/azure/mgmt/web/models/migrate_my_sql_status.py b/azure-mgmt-web/azure/mgmt/web/models/migrate_my_sql_status.py index 10d9ae053e22..e0842f2b4f33 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/migrate_my_sql_status.py +++ b/azure-mgmt-web/azure/mgmt/web/models/migrate_my_sql_status.py @@ -28,8 +28,8 @@ class MigrateMySqlStatus(ProxyOnlyResource): :vartype type: str :ivar migration_operation_status: Status of the migration task. Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created' - :vartype migration_operation_status: str or :class:`OperationStatus - ` + :vartype migration_operation_status: str or + ~azure.mgmt.web.models.OperationStatus :ivar operation_id: Operation ID for the migration task. :vartype operation_id: str :ivar local_my_sql_enabled: True if the web app has in app MySql enabled diff --git a/azure-mgmt-web/azure/mgmt/web/models/ms_deploy.py b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy.py index c6b76ce7410f..28c4c4594ebd 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/ms_deploy.py +++ b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy.py @@ -37,7 +37,7 @@ class MSDeploy(ProxyOnlyResource): :type set_parameters_xml_file_uri: str :param set_parameters: MSDeploy Parameters. Must not be set if SetParametersXmlFileUri is used. - :type set_parameters: dict + :type set_parameters: dict[str, str] :param skip_app_data: Controls whether the MSDeploy operation skips the App_Data directory. If set to true, the existing App_Data directory on the diff --git a/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log.py b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log.py index 7ac982753ba5..df7088ddf559 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log.py +++ b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log.py @@ -27,8 +27,7 @@ class MSDeployLog(ProxyOnlyResource): :ivar type: Resource type. :vartype type: str :ivar entries: List of log entry messages - :vartype entries: list of :class:`MSDeployLogEntry - ` + :vartype entries: list[~azure.mgmt.web.models.MSDeployLogEntry] """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log_entry.py b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log_entry.py index fa7ff1f38aa6..8037d67f531d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log_entry.py +++ b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log_entry.py @@ -22,8 +22,7 @@ class MSDeployLogEntry(Model): :vartype time: datetime :ivar type: Log entry type. Possible values include: 'Message', 'Warning', 'Error' - :vartype type: str or :class:`MSDeployLogEntryType - ` + :vartype type: str or ~azure.mgmt.web.models.MSDeployLogEntryType :ivar message: Log entry message :vartype message: str """ @@ -41,6 +40,7 @@ class MSDeployLogEntry(Model): } def __init__(self): + super(MSDeployLogEntry, self).__init__() self.time = None self.type = None self.message = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_status.py b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_status.py index 275860a51acc..d18f357a754d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_status.py +++ b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_status.py @@ -30,8 +30,8 @@ class MSDeployStatus(ProxyOnlyResource): :vartype deployer: str :ivar provisioning_state: Provisioning state. Possible values include: 'accepted', 'running', 'succeeded', 'failed', 'canceled' - :vartype provisioning_state: str or :class:`MSDeployProvisioningState - ` + :vartype provisioning_state: str or + ~azure.mgmt.web.models.MSDeployProvisioningState :ivar start_time: Start time of deploy operation :vartype start_time: datetime :ivar end_time: End time of deploy operation diff --git a/azure-mgmt-web/azure/mgmt/web/models/name_identifier.py b/azure-mgmt-web/azure/mgmt/web/models/name_identifier.py index 7baa4246e8fc..e539125ff5d2 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/name_identifier.py +++ b/azure-mgmt-web/azure/mgmt/web/models/name_identifier.py @@ -24,4 +24,5 @@ class NameIdentifier(Model): } def __init__(self, name=None): + super(NameIdentifier, self).__init__() self.name = name diff --git a/azure-mgmt-web/azure/mgmt/web/models/name_value_pair.py b/azure-mgmt-web/azure/mgmt/web/models/name_value_pair.py index eb789d78c9cf..649b62089621 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/name_value_pair.py +++ b/azure-mgmt-web/azure/mgmt/web/models/name_value_pair.py @@ -27,5 +27,6 @@ class NameValuePair(Model): } def __init__(self, name=None, value=None): + super(NameValuePair, self).__init__() self.name = name self.value = value diff --git a/azure-mgmt-web/azure/mgmt/web/models/network_access_control_entry.py b/azure-mgmt-web/azure/mgmt/web/models/network_access_control_entry.py index 2543da62dbba..68b4c10e18c3 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/network_access_control_entry.py +++ b/azure-mgmt-web/azure/mgmt/web/models/network_access_control_entry.py @@ -16,8 +16,7 @@ class NetworkAccessControlEntry(Model): """Network access control entry. :param action: Action object. Possible values include: 'Permit', 'Deny' - :type action: str or :class:`AccessControlEntryAction - ` + :type action: str or ~azure.mgmt.web.models.AccessControlEntryAction :param description: Description. :type description: str :param order: Order of precedence. @@ -34,6 +33,7 @@ class NetworkAccessControlEntry(Model): } def __init__(self, action=None, description=None, order=None, remote_subnet=None): + super(NetworkAccessControlEntry, self).__init__() self.action = action self.description = description self.order = order diff --git a/azure-mgmt-web/azure/mgmt/web/models/network_features.py b/azure-mgmt-web/azure/mgmt/web/models/network_features.py index ded8014a291d..332bde6a2de7 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/network_features.py +++ b/azure-mgmt-web/azure/mgmt/web/models/network_features.py @@ -30,14 +30,13 @@ class NetworkFeatures(ProxyOnlyResource): :ivar virtual_network_name: The Virtual Network name. :vartype virtual_network_name: str :ivar virtual_network_connection: The Virtual Network summary view. - :vartype virtual_network_connection: :class:`VnetInfo - ` + :vartype virtual_network_connection: ~azure.mgmt.web.models.VnetInfo :ivar hybrid_connections: The Hybrid Connections summary view. - :vartype hybrid_connections: list of :class:`RelayServiceConnectionEntity - ` + :vartype hybrid_connections: + list[~azure.mgmt.web.models.RelayServiceConnectionEntity] :ivar hybrid_connections_v2: The Hybrid Connection V2 (Service Bus) view. - :vartype hybrid_connections_v2: list of :class:`HybridConnection - ` + :vartype hybrid_connections_v2: + list[~azure.mgmt.web.models.HybridConnection] """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/operation.py b/azure-mgmt-web/azure/mgmt/web/models/operation.py index faa4405e9531..3ef4d4e0ddbe 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/operation.py +++ b/azure-mgmt-web/azure/mgmt/web/models/operation.py @@ -21,11 +21,9 @@ class Operation(Model): :type name: str :param status: The current status of the operation. Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created' - :type status: str or :class:`OperationStatus - ` + :type status: str or ~azure.mgmt.web.models.OperationStatus :param errors: Any errors associate with the operation. - :type errors: list of :class:`ErrorEntity - ` + :type errors: list[~azure.mgmt.web.models.ErrorEntity] :param created_time: Time when operation has started. :type created_time: datetime :param modified_time: Time when operation has been updated. @@ -48,6 +46,7 @@ class Operation(Model): } def __init__(self, id=None, name=None, status=None, errors=None, created_time=None, modified_time=None, expiration_time=None, geo_master_operation_id=None): + super(Operation, self).__init__() self.id = id self.name = name self.status = status diff --git a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_response.py b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_response.py index 1ce2ae0333b9..b3e8a5864d52 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_response.py +++ b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_response.py @@ -20,7 +20,7 @@ class PerfMonResponse(Model): :param message: The message. :type message: str :param data: The performance monitor counters. - :type data: :class:`PerfMonSet ` + :type data: ~azure.mgmt.web.models.PerfMonSet """ _attribute_map = { @@ -30,6 +30,7 @@ class PerfMonResponse(Model): } def __init__(self, code=None, message=None, data=None): + super(PerfMonResponse, self).__init__() self.code = code self.message = message self.data = data diff --git a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample.py b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample.py index 4794a9a44d5e..bdff69d727cd 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample.py +++ b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample.py @@ -33,6 +33,7 @@ class PerfMonSample(Model): } def __init__(self, time=None, instance_name=None, value=None, core_count=None): + super(PerfMonSample, self).__init__() self.time = time self.instance_name = instance_name self.value = value diff --git a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_set.py b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_set.py index 7e9909fc2255..6325d0cf6cfd 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_set.py +++ b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_set.py @@ -24,8 +24,7 @@ class PerfMonSet(Model): :param time_grain: Presented time grain. :type time_grain: str :param values: Collection of workers that are active during this time. - :type values: list of :class:`PerfMonSample - ` + :type values: list[~azure.mgmt.web.models.PerfMonSample] """ _attribute_map = { @@ -37,6 +36,7 @@ class PerfMonSet(Model): } def __init__(self, name=None, start_time=None, end_time=None, time_grain=None, values=None): + super(PerfMonSet, self).__init__() self.name = name self.start_time = start_time self.end_time = end_time diff --git a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on.py b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on.py index e9190395cfd2..9e963f1b9b82 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on.py +++ b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on.py @@ -29,7 +29,7 @@ class PremierAddOn(Resource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param sku: SKU. :type sku: str :param product: Product. @@ -41,7 +41,7 @@ class PremierAddOn(Resource): :param premier_add_on_location: Location. :type premier_add_on_location: str :param premier_add_on_tags: Tags. - :type premier_add_on_tags: dict + :type premier_add_on_tags: dict[str, str] :param marketplace_publisher: Marketplace publisher. :type marketplace_publisher: str :param marketplace_offer: Marketplace offer. diff --git a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer.py b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer.py index b98625e8cc64..8931aab36fc9 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer.py +++ b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer.py @@ -43,8 +43,7 @@ class PremierAddOnOffer(ProxyOnlyResource): restricted to. Possible values include: 'None', 'Free', 'Shared', 'Basic', 'Standard', 'Premium' :type web_hosting_plan_restrictions: str or - :class:`AppServicePlanRestrictions - ` + ~azure.mgmt.web.models.AppServicePlanRestrictions :param privacy_policy_url: Privacy policy URL. :type privacy_policy_url: str :param legal_terms_url: Legal terms URL. diff --git a/azure-mgmt-web/azure/mgmt/web/models/process_info.py b/azure-mgmt-web/azure/mgmt/web/models/process_info.py index 9151d49df5c7..ac9316ca7fb6 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/process_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/process_info.py @@ -43,15 +43,13 @@ class ProcessInfo(ProxyOnlyResource): :param parent: Parent process. :type parent: str :param children: Child process list. - :type children: list of str + :type children: list[str] :param threads: Thread list. - :type threads: list of :class:`ProcessThreadInfo - ` + :type threads: list[~azure.mgmt.web.models.ProcessThreadInfo] :param open_file_handles: List of open files. - :type open_file_handles: list of str + :type open_file_handles: list[str] :param modules: List of modules. - :type modules: list of :class:`ProcessModuleInfo - ` + :type modules: list[~azure.mgmt.web.models.ProcessModuleInfo] :param file_name: File name of this process. :type file_name: str :param command_line: Command line. @@ -93,7 +91,7 @@ class ProcessInfo(ProxyOnlyResource): :param time_stamp: Time stamp. :type time_stamp: datetime :param environment_variables: List of environment variables. - :type environment_variables: dict + :type environment_variables: dict[str, str] :param is_scm_site: Is this the SCM site? :type is_scm_site: bool :param is_web_job: Is this a Web Job? diff --git a/azure-mgmt-web/azure/mgmt/web/models/proxy_only_resource.py b/azure-mgmt-web/azure/mgmt/web/models/proxy_only_resource.py index 4a74c2e5c320..0a2fbf5b4f9d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/proxy_only_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/proxy_only_resource.py @@ -43,6 +43,7 @@ class ProxyOnlyResource(Model): } def __init__(self, kind=None): + super(ProxyOnlyResource, self).__init__() self.id = None self.name = None self.kind = kind diff --git a/azure-mgmt-web/azure/mgmt/web/models/public_certificate.py b/azure-mgmt-web/azure/mgmt/web/models/public_certificate.py index eaec3a29f171..5d1e38da2dd0 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/public_certificate.py +++ b/azure-mgmt-web/azure/mgmt/web/models/public_certificate.py @@ -31,8 +31,7 @@ class PublicCertificate(ProxyOnlyResource): :param public_certificate_location: Public Certificate Location. Possible values include: 'CurrentUserMy', 'LocalMachineMy', 'Unknown' :type public_certificate_location: str or - :class:`PublicCertificateLocation - ` + ~azure.mgmt.web.models.PublicCertificateLocation :ivar thumbprint: Certificate Thumbprint :vartype thumbprint: str """ diff --git a/azure-mgmt-web/azure/mgmt/web/models/push_settings.py b/azure-mgmt-web/azure/mgmt/web/models/push_settings.py index b1bb1d734150..9c89aa6540ca 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/push_settings.py +++ b/azure-mgmt-web/azure/mgmt/web/models/push_settings.py @@ -49,6 +49,7 @@ class PushSettings(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'is_push_enabled': {'required': True}, } _attribute_map = { @@ -62,7 +63,7 @@ class PushSettings(ProxyOnlyResource): 'dynamic_tags_json': {'key': 'properties.dynamicTagsJson', 'type': 'str'}, } - def __init__(self, kind=None, is_push_enabled=None, tag_whitelist_json=None, tags_requiring_auth=None, dynamic_tags_json=None): + def __init__(self, is_push_enabled, kind=None, tag_whitelist_json=None, tags_requiring_auth=None, dynamic_tags_json=None): super(PushSettings, self).__init__(kind=kind) self.is_push_enabled = is_push_enabled self.tag_whitelist_json = tag_whitelist_json diff --git a/azure-mgmt-web/azure/mgmt/web/models/ramp_up_rule.py b/azure-mgmt-web/azure/mgmt/web/models/ramp_up_rule.py index f1ee023d653c..ea9c98a44b32 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/ramp_up_rule.py +++ b/azure-mgmt-web/azure/mgmt/web/models/ramp_up_rule.py @@ -61,6 +61,7 @@ class RampUpRule(Model): } def __init__(self, action_host_name=None, reroute_percentage=None, change_step=None, change_interval_in_minutes=None, min_reroute_percentage=None, max_reroute_percentage=None, change_decision_callback_url=None, name=None): + super(RampUpRule, self).__init__() self.action_host_name = action_host_name self.reroute_percentage = reroute_percentage self.change_step = change_step diff --git a/azure-mgmt-web/azure/mgmt/web/models/recommendation.py b/azure-mgmt-web/azure/mgmt/web/models/recommendation.py index 78edeb3ce14c..f53222b7f41d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/recommendation.py +++ b/azure-mgmt-web/azure/mgmt/web/models/recommendation.py @@ -26,8 +26,7 @@ class Recommendation(Model): :param resource_scope: Name of a resource type this recommendation applies, e.g. Subscription, ServerFarm, Site. Possible values include: 'ServerFarm', 'Subscription', 'WebSite' - :type resource_scope: str or :class:`ResourceScopeType - ` + :type resource_scope: str or ~azure.mgmt.web.models.ResourceScopeType :param rule_name: Unique name of the rule. :type rule_name: str :param display_name: UI friendly name of the rule (may not be unique). @@ -37,14 +36,13 @@ class Recommendation(Model): :param level: Level indicating how critical this recommendation can impact. Possible values include: 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion' - :type level: str or :class:`NotificationLevel - ` + :type level: str or ~azure.mgmt.web.models.NotificationLevel :param channels: List of channels that this recommendation can apply. Possible values include: 'Notification', 'Api', 'Email', 'Webhook', 'All' - :type channels: str or :class:`Channels ` + :type channels: str or ~azure.mgmt.web.models.Channels :param tags: The list of category tags that this recommendation belongs to. - :type tags: list of str + :type tags: list[str] :param action_name: Name of action recommended by this object. :type action_name: str :param start_time: The beginning time in UTC of a range that the @@ -101,6 +99,7 @@ class Recommendation(Model): } def __init__(self, creation_time=None, recommendation_id=None, resource_id=None, resource_scope=None, rule_name=None, display_name=None, message=None, level=None, channels=None, tags=None, action_name=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score=None, is_dynamic=None, extension_name=None, blade_name=None, forward_link=None): + super(Recommendation, self).__init__() self.creation_time = creation_time self.recommendation_id = recommendation_id self.resource_id = resource_id diff --git a/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule.py b/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule.py index e18962aee2c2..d8e666053a44 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule.py +++ b/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule.py @@ -34,13 +34,12 @@ class RecommendationRule(Model): :param level: Level of impact indicating how critical this rule is. Possible values include: 'Critical', 'Warning', 'Information', 'NonUrgentSuggestion' - :type level: str or :class:`NotificationLevel - ` + :type level: str or ~azure.mgmt.web.models.NotificationLevel :param channels: List of available channels that this rule applies. Possible values include: 'Notification', 'Api', 'Email', 'Webhook', 'All' - :type channels: str or :class:`Channels ` + :type channels: str or ~azure.mgmt.web.models.Channels :param tags: An array of category tags that the rule contains. - :type tags: list of str + :type tags: list[str] :param is_dynamic: True if this is associated with a dynamically added rule :type is_dynamic: bool @@ -72,6 +71,7 @@ class RecommendationRule(Model): } def __init__(self, name=None, display_name=None, message=None, recommendation_id=None, description=None, action_name=None, level=None, channels=None, tags=None, is_dynamic=None, extension_name=None, blade_name=None, forward_link=None): + super(RecommendationRule, self).__init__() self.name = name self.display_name = display_name self.message = message diff --git a/azure-mgmt-web/azure/mgmt/web/models/reissue_certificate_order_request.py b/azure-mgmt-web/azure/mgmt/web/models/reissue_certificate_order_request.py index d9af86eb3727..e1b23a6e6c82 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/reissue_certificate_order_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/reissue_certificate_order_request.py @@ -29,7 +29,7 @@ class ReissueCertificateOrderRequest(Resource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param key_size: Certificate Key Size. :type key_size: int :param delay_existing_revoke_in_hours: Delay in hours to revoke existing diff --git a/azure-mgmt-web/azure/mgmt/web/models/renew_certificate_order_request.py b/azure-mgmt-web/azure/mgmt/web/models/renew_certificate_order_request.py index c2cf037d707a..f90b73c1f50e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/renew_certificate_order_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/renew_certificate_order_request.py @@ -29,7 +29,7 @@ class RenewCertificateOrderRequest(Resource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :param key_size: Certificate Key Size. :type key_size: int :param csr: Csr to be used for re-key operation. diff --git a/azure-mgmt-web/azure/mgmt/web/models/requests_based_trigger.py b/azure-mgmt-web/azure/mgmt/web/models/requests_based_trigger.py index 65b2540260c1..5fe30b09b601 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/requests_based_trigger.py +++ b/azure-mgmt-web/azure/mgmt/web/models/requests_based_trigger.py @@ -27,5 +27,6 @@ class RequestsBasedTrigger(Model): } def __init__(self, count=None, time_interval=None): + super(RequestsBasedTrigger, self).__init__() self.count = count self.time_interval = time_interval diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource.py b/azure-mgmt-web/azure/mgmt/web/models/resource.py index c892b30b2c92..0f01dbf64c7c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource.py @@ -29,7 +29,7 @@ class Resource(Model): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] """ _validation = { @@ -49,6 +49,7 @@ class Resource(Model): } def __init__(self, location, kind=None, tags=None): + super(Resource, self).__init__() self.id = None self.name = None self.kind = kind diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_metric.py b/azure-mgmt-web/azure/mgmt/web/models/resource_metric.py index 47057590af0c..52c84254552e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_metric.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_metric.py @@ -19,8 +19,7 @@ class ResourceMetric(Model): sending a request. :ivar name: Name of metric. - :vartype name: :class:`ResourceMetricName - ` + :vartype name: ~azure.mgmt.web.models.ResourceMetricName :ivar unit: Metric unit. :vartype unit: str :ivar time_grain: Metric granularity. E.g PT1H, PT5M, P1D @@ -34,11 +33,9 @@ class ResourceMetric(Model): :ivar id: Resource Id. :vartype id: str :ivar metric_values: Metric values. - :vartype metric_values: list of :class:`ResourceMetricValue - ` + :vartype metric_values: list[~azure.mgmt.web.models.ResourceMetricValue] :ivar properties: Properties. - :vartype properties: list of :class:`ResourceMetricProperty - ` + :vartype properties: list[~azure.mgmt.web.models.ResourceMetricProperty] """ _validation = { @@ -66,6 +63,7 @@ class ResourceMetric(Model): } def __init__(self): + super(ResourceMetric, self).__init__() self.name = None self.unit = None self.time_grain = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_availability.py b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_availability.py index ed1332ac0f29..7736a639de6e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_availability.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_availability.py @@ -35,5 +35,6 @@ class ResourceMetricAvailability(Model): } def __init__(self): + super(ResourceMetricAvailability, self).__init__() self.time_grain = None self.retention = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition.py b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition.py index 7e17b6b6493d..bbf5aca0fe79 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition.py @@ -27,22 +27,22 @@ class ResourceMetricDefinition(ProxyOnlyResource): :ivar type: Resource type. :vartype type: str :ivar resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: :class:`ResourceMetricName - ` + :vartype resource_metric_definition_name: + ~azure.mgmt.web.models.ResourceMetricName :ivar unit: Unit of the metric. :vartype unit: str :ivar primary_aggregation_type: Primary aggregation type. :vartype primary_aggregation_type: str :ivar metric_availabilities: List of time grains supported for the metric together with retention period. - :vartype metric_availabilities: list of :class:`ResourceMetricAvailability - ` + :vartype metric_availabilities: + list[~azure.mgmt.web.models.ResourceMetricAvailability] :ivar resource_uri: Resource URI. :vartype resource_uri: str :ivar resource_metric_definition_id: Resource ID. :vartype resource_metric_definition_id: str :ivar properties: Properties. - :vartype properties: dict + :vartype properties: dict[str, str] """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_name.py b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_name.py index 7906405ca6b7..fc3985dd48f7 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_name.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_name.py @@ -35,5 +35,6 @@ class ResourceMetricName(Model): } def __init__(self): + super(ResourceMetricName, self).__init__() self.value = None self.localized_value = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_property.py b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_property.py index 1abd81809774..f9bd040c6801 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_property.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_property.py @@ -27,5 +27,6 @@ class ResourceMetricProperty(Model): } def __init__(self, key=None, value=None): + super(ResourceMetricProperty, self).__init__() self.key = key self.value = value diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_value.py b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_value.py index f4767d4dee8f..28283adfdf1d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_value.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_value.py @@ -31,8 +31,7 @@ class ResourceMetricValue(Model): :ivar count: Value count. :vartype count: float :ivar properties: Properties. - :vartype properties: list of :class:`ResourceMetricProperty - ` + :vartype properties: list[~azure.mgmt.web.models.ResourceMetricProperty] """ _validation = { @@ -56,6 +55,7 @@ class ResourceMetricValue(Model): } def __init__(self): + super(ResourceMetricValue, self).__init__() self.timestamp = None self.average = None self.minimum = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_name_availability.py b/azure-mgmt-web/azure/mgmt/web/models/resource_name_availability.py index f4919d12e4ed..456eb9416870 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_name_availability.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_name_availability.py @@ -23,8 +23,7 @@ class ResourceNameAvailability(Model): match Azure App Service naming requirements. AlreadyExists indicates that the name is already in use and is therefore unavailable. Possible values include: 'Invalid', 'AlreadyExists' - :type reason: str or :class:`InAvailabilityReasonType - ` + :type reason: str or ~azure.mgmt.web.models.InAvailabilityReasonType :param message: If reason == invalid, provide the user with the reason why the given name is invalid, and provide the resource naming requirements so that the user can select a valid name. If reason == AlreadyExists, explain @@ -40,6 +39,7 @@ class ResourceNameAvailability(Model): } def __init__(self, name_available=None, reason=None, message=None): + super(ResourceNameAvailability, self).__init__() self.name_available = name_available self.reason = reason self.message = message diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_name_availability_request.py b/azure-mgmt-web/azure/mgmt/web/models/resource_name_availability_request.py index 0e61f75c08a0..cc0649c1ce5b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_name_availability_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_name_availability_request.py @@ -19,8 +19,7 @@ class ResourceNameAvailabilityRequest(Model): :type name: str :param type: Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment' - :type type: str or :class:`CheckNameResourceTypes - ` + :type type: str or ~azure.mgmt.web.models.CheckNameResourceTypes :param is_fqdn: Is fully qualified domain name. :type is_fqdn: bool """ @@ -37,6 +36,7 @@ class ResourceNameAvailabilityRequest(Model): } def __init__(self, name, type, is_fqdn=None): + super(ResourceNameAvailabilityRequest, self).__init__() self.name = name self.type = type self.is_fqdn = is_fqdn diff --git a/azure-mgmt-web/azure/mgmt/web/models/restore_request.py b/azure-mgmt-web/azure/mgmt/web/models/restore_request.py index 36ff81d76415..72c3ccec6db0 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/restore_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/restore_request.py @@ -38,8 +38,7 @@ class RestoreRequest(ProxyOnlyResource): :type site_name: str :param databases: Collection of databases which should be restored. This list has to match the list of databases included in the backup. - :type databases: list of :class:`DatabaseBackupSetting - ` + :type databases: list[~azure.mgmt.web.models.DatabaseBackupSetting] :param ignore_conflicting_host_names: Changes a logic when restoring an app with custom domains. true to remove custom domains automatically. If false, custom domains are added to @@ -54,8 +53,8 @@ class RestoreRequest(ProxyOnlyResource): :type app_service_plan: str :param operation_type: Operation type. Possible values include: 'Default', 'Clone', 'Relocation', 'Snapshot'. Default value: "Default" . - :type operation_type: str or :class:`BackupRestoreOperationType - ` + :type operation_type: str or + ~azure.mgmt.web.models.BackupRestoreOperationType :param adjust_connection_strings: true if SiteConfig.ConnectionStrings should be set in new app; otherwise, false. @@ -69,6 +68,8 @@ class RestoreRequest(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'storage_account_url': {'required': True}, + 'overwrite': {'required': True}, } _attribute_map = { @@ -89,7 +90,7 @@ class RestoreRequest(ProxyOnlyResource): 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, } - def __init__(self, kind=None, storage_account_url=None, blob_name=None, overwrite=None, site_name=None, databases=None, ignore_conflicting_host_names=False, ignore_databases=False, app_service_plan=None, operation_type="Default", adjust_connection_strings=None, hosting_environment=None): + def __init__(self, storage_account_url, overwrite, kind=None, blob_name=None, site_name=None, databases=None, ignore_conflicting_host_names=False, ignore_databases=False, app_service_plan=None, operation_type="Default", adjust_connection_strings=None, hosting_environment=None): super(RestoreRequest, self).__init__(kind=kind) self.storage_account_url = storage_account_url self.blob_name = blob_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/service_specification.py b/azure-mgmt-web/azure/mgmt/web/models/service_specification.py index 0568d6dbabf0..1e26b614ff36 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/service_specification.py +++ b/azure-mgmt-web/azure/mgmt/web/models/service_specification.py @@ -16,8 +16,8 @@ class ServiceSpecification(Model): """ServiceSpecification. :param metric_specifications: - :type metric_specifications: list of :class:`MetricSpecification - ` + :type metric_specifications: + list[~azure.mgmt.web.models.MetricSpecification] """ _attribute_map = { @@ -25,4 +25,5 @@ class ServiceSpecification(Model): } def __init__(self, metric_specifications=None): + super(ServiceSpecification, self).__init__() self.metric_specifications = metric_specifications diff --git a/azure-mgmt-web/azure/mgmt/web/models/site.py b/azure-mgmt-web/azure/mgmt/web/models/site.py index 643e845cf7b5..9c33ad0b366b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site.py @@ -29,17 +29,16 @@ class Site(Resource): :ivar type: Resource type. :vartype type: str :param tags: Resource tags. - :type tags: dict + :type tags: dict[str, str] :ivar state: Current state of the app. :vartype state: str :ivar host_names: Hostnames associated with the app. - :vartype host_names: list of str + :vartype host_names: list[str] :ivar repository_site_name: Name of the repository site. :vartype repository_site_name: str :ivar usage_state: State indicating whether the app has exceeded its quota usage. Read-only. Possible values include: 'Normal', 'Exceeded' - :vartype usage_state: str or :class:`UsageState - ` + :vartype usage_state: str or ~azure.mgmt.web.models.UsageState :param enabled: true if the app is enabled; otherwise, false. Setting this value to false disables the app (takes the app offline). @@ -47,16 +46,15 @@ class Site(Resource): :ivar enabled_host_names: Enabled hostnames for the app.Hostnames need to be assigned (see HostNames) AND enabled. Otherwise, the app is not served on those hostnames. - :vartype enabled_host_names: list of str + :vartype enabled_host_names: list[str] :ivar availability_state: Management information availability state for the app. Possible values include: 'Normal', 'Limited', 'DisasterRecoveryMode' - :vartype availability_state: str or :class:`SiteAvailabilityState - ` + :vartype availability_state: str or + ~azure.mgmt.web.models.SiteAvailabilityState :param host_name_ssl_states: Hostname SSL states are used to manage the SSL bindings for app's hostnames. - :type host_name_ssl_states: list of :class:`HostNameSslState - ` + :type host_name_ssl_states: list[~azure.mgmt.web.models.HostNameSslState] :param server_farm_id: Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". @@ -68,10 +66,10 @@ class Site(Resource): Read-only. :vartype last_modified_time_utc: datetime :param site_config: Configuration of the app. - :type site_config: :class:`SiteConfig ` + :type site_config: ~azure.mgmt.web.models.SiteConfig :ivar traffic_manager_host_names: Azure Traffic Manager hostnames associated with the app. Read-only. - :vartype traffic_manager_host_names: list of str + :vartype traffic_manager_host_names: list[str] :param scm_site_also_stopped: true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false. Default value: False . @@ -81,8 +79,8 @@ class Site(Resource): :vartype target_swap_slot: str :param hosting_environment_profile: App Service Environment to use for the app. - :type hosting_environment_profile: :class:`HostingEnvironmentProfile - ` + :type hosting_environment_profile: + ~azure.mgmt.web.models.HostingEnvironmentProfile :param client_affinity_enabled: true to enable client affinity; false to stop sending session affinity cookies, which route client requests in the same session to the same instance. @@ -113,12 +111,10 @@ class Site(Resource): :vartype max_number_of_workers: int :param cloning_info: If specified during app creation, the app is cloned from a source app. - :type cloning_info: :class:`CloningInfo - ` + :type cloning_info: ~azure.mgmt.web.models.CloningInfo :param snapshot_info: If specified during app creation, the app is created from a previous snapshot. - :type snapshot_info: :class:`SnapshotRecoveryRequest - ` + :type snapshot_info: ~azure.mgmt.web.models.SnapshotRecoveryRequest :ivar resource_group: Name of the resource group the app belongs to. Read-only. :vartype resource_group: str @@ -128,8 +124,7 @@ class Site(Resource): :ivar default_host_name: Default hostname of the app. Read-only. :vartype default_host_name: str :ivar slot_swap_status: Status of the last deployment slot swap operation. - :vartype slot_swap_status: :class:`SlotSwapStatus - ` + :vartype slot_swap_status: ~azure.mgmt.web.models.SlotSwapStatus :ivar premium_app_deployed: Indicates whether app is deployed as a premium app. :vartype premium_app_deployed: bool diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings.py b/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings.py index 78e0527b951c..ad9faca40f10 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings.py @@ -39,8 +39,7 @@ class SiteAuthSettings(ProxyOnlyResource): unauthenticated client attempts to access the app. Possible values include: 'RedirectToLoginPage', 'AllowAnonymous' :type unauthenticated_client_action: str or - :class:`UnauthenticatedClientAction - ` + ~azure.mgmt.web.models.UnauthenticatedClientAction :param token_store_enabled: true to durably store platform-specific security tokens that are obtained during login flows; otherwise, false. @@ -52,7 +51,7 @@ class SiteAuthSettings(ProxyOnlyResource): This is an advanced setting typically only needed by Windows Store application backends. Note that URLs within the current domain are always implicitly allowed. - :type allowed_external_redirect_urls: list of str + :type allowed_external_redirect_urls: list[str] :param default_provider: The default authentication provider to use when multiple providers are configured. This setting is only needed if multiple providers are configured and the @@ -60,8 +59,8 @@ class SiteAuthSettings(ProxyOnlyResource): action is set to "RedirectToLoginPage". Possible values include: 'AzureActiveDirectory', 'Facebook', 'Google', 'MicrosoftAccount', 'Twitter' - :type default_provider: str or :class:`BuiltInAuthenticationProvider - ` + :type default_provider: str or + ~azure.mgmt.web.models.BuiltInAuthenticationProvider :param token_refresh_extension_hours: The number of hours after session token expiration that a session token can be used to call the token refresh API. The default is 72 hours. @@ -96,11 +95,11 @@ class SiteAuthSettings(ProxyOnlyResource): Azure Active Directory. Note that the ClientID value is always considered an allowed audience, regardless of this setting. - :type allowed_audiences: list of str + :type allowed_audiences: list[str] :param additional_login_params: Login parameters to send to the OpenID Connect authorization endpoint when a user logs in. Each parameter must be in the form "key=value". - :type additional_login_params: list of str + :type additional_login_params: list[str] :param google_client_id: The OpenID Connect Client ID for the Google web application. This setting is required for enabling Google Sign-In. @@ -119,7 +118,7 @@ class SiteAuthSettings(ProxyOnlyResource): "email" are used as default scopes. Google Sign-In documentation: https://developers.google.com/identity/sign-in/web/ - :type google_oauth_scopes: list of str + :type google_oauth_scopes: list[str] :param facebook_app_id: The App ID of the Facebook app used for login. This setting is required for enabling Facebook Login. Facebook Login documentation: @@ -136,7 +135,7 @@ class SiteAuthSettings(ProxyOnlyResource): This setting is optional. Facebook Login documentation: https://developers.facebook.com/docs/facebook-login - :type facebook_oauth_scopes: list of str + :type facebook_oauth_scopes: list[str] :param twitter_consumer_key: The OAuth 1.0a consumer key of the Twitter application used for sign-in. This setting is required for enabling Twitter Sign-In. @@ -165,7 +164,7 @@ class SiteAuthSettings(ProxyOnlyResource): default scope. Microsoft Account Scopes and permissions documentation: https://msdn.microsoft.com/en-us/library/dn631845.aspx - :type microsoft_account_oauth_scopes: list of str + :type microsoft_account_oauth_scopes: list[str] """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_cloneability.py b/azure-mgmt-web/azure/mgmt/web/models/site_cloneability.py index dd154f4e7433..b58b934354c4 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_cloneability.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_cloneability.py @@ -17,21 +17,20 @@ class SiteCloneability(Model): :param result: Name of app. Possible values include: 'Cloneable', 'PartiallyCloneable', 'NotCloneable' - :type result: str or :class:`CloneAbilityResult - ` + :type result: str or ~azure.mgmt.web.models.CloneAbilityResult :param blocking_features: List of features enabled on app that prevent cloning. - :type blocking_features: list of :class:`SiteCloneabilityCriterion - ` + :type blocking_features: + list[~azure.mgmt.web.models.SiteCloneabilityCriterion] :param unsupported_features: List of features enabled on app that are non-blocking but cannot be cloned. The app can still be cloned but the features in this list will not be set up on cloned app. - :type unsupported_features: list of :class:`SiteCloneabilityCriterion - ` + :type unsupported_features: + list[~azure.mgmt.web.models.SiteCloneabilityCriterion] :param blocking_characteristics: List of blocking application characteristics. - :type blocking_characteristics: list of :class:`SiteCloneabilityCriterion - ` + :type blocking_characteristics: + list[~azure.mgmt.web.models.SiteCloneabilityCriterion] """ _attribute_map = { @@ -42,6 +41,7 @@ class SiteCloneability(Model): } def __init__(self, result=None, blocking_features=None, unsupported_features=None, blocking_characteristics=None): + super(SiteCloneability, self).__init__() self.result = result self.blocking_features = blocking_features self.unsupported_features = unsupported_features diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_cloneability_criterion.py b/azure-mgmt-web/azure/mgmt/web/models/site_cloneability_criterion.py index 23ca011a0d5f..8e6bf29ccb39 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_cloneability_criterion.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_cloneability_criterion.py @@ -27,5 +27,6 @@ class SiteCloneabilityCriterion(Model): } def __init__(self, name=None, description=None): + super(SiteCloneabilityCriterion, self).__init__() self.name = name self.description = description 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 68c82028d3b7..04323b7b395a 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config.py @@ -21,7 +21,7 @@ class SiteConfig(Model): :param number_of_workers: Number of workers. :type number_of_workers: int :param default_documents: Default documents. - :type default_documents: list of str + :type default_documents: list[str] :param net_framework_version: .NET Framework version. Default value: "v4.6" . :type net_framework_version: str @@ -54,23 +54,19 @@ class SiteConfig(Model): :param publishing_username: Publishing user name. :type publishing_username: str :param app_settings: Application settings. - :type app_settings: list of :class:`NameValuePair - ` + :type app_settings: list[~azure.mgmt.web.models.NameValuePair] :param connection_strings: Connection strings. - :type connection_strings: list of :class:`ConnStringInfo - ` + :type connection_strings: list[~azure.mgmt.web.models.ConnStringInfo] :ivar machine_key: Site MachineKey. - :vartype machine_key: :class:`SiteMachineKey - ` + :vartype machine_key: ~azure.mgmt.web.models.SiteMachineKey :param handler_mappings: Handler mappings. - :type handler_mappings: list of :class:`HandlerMapping - ` + :type handler_mappings: list[~azure.mgmt.web.models.HandlerMapping] :param document_root: Document root. :type document_root: str :param scm_type: SCM type. Possible values include: 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive', 'VSO' - :type scm_type: str or :class:`ScmType ` + :type scm_type: str or ~azure.mgmt.web.models.ScmType :param use32_bit_worker_process: true to use 32-bit worker process; otherwise, false. :type use32_bit_worker_process: bool @@ -90,47 +86,43 @@ class SiteConfig(Model): :type app_command_line: str :param managed_pipeline_mode: Managed pipeline mode. Possible values include: 'Integrated', 'Classic' - :type managed_pipeline_mode: str or :class:`ManagedPipelineMode - ` + :type managed_pipeline_mode: str or + ~azure.mgmt.web.models.ManagedPipelineMode :param virtual_applications: Virtual applications. - :type virtual_applications: list of :class:`VirtualApplication - ` + :type virtual_applications: + list[~azure.mgmt.web.models.VirtualApplication] :param load_balancing: Site load balancing. Possible values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or :class:`SiteLoadBalancing - ` + :type load_balancing: str or ~azure.mgmt.web.models.SiteLoadBalancing :param experiments: This is work around for polymophic types. - :type experiments: :class:`Experiments - ` + :type experiments: ~azure.mgmt.web.models.Experiments :param limits: Site limits. - :type limits: :class:`SiteLimits ` + :type limits: ~azure.mgmt.web.models.SiteLimits :param auto_heal_enabled: true if Auto Heal is enabled; otherwise, false. :type auto_heal_enabled: bool :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: :class:`AutoHealRules - ` + :type auto_heal_rules: ~azure.mgmt.web.models.AutoHealRules :param tracing_options: Tracing options. :type tracing_options: str :param vnet_name: Virtual Network name. :type vnet_name: str :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: :class:`CorsSettings ` + :type cors: ~azure.mgmt.web.models.CorsSettings :param push: Push endpoint settings. - :type push: :class:`PushSettings ` + :type push: ~azure.mgmt.web.models.PushSettings :param api_definition: Information about the formal API definition for the app. - :type api_definition: :class:`ApiDefinitionInfo - ` + :type api_definition: ~azure.mgmt.web.models.ApiDefinitionInfo :param auto_swap_slot_name: Auto-swap slot name. :type auto_swap_slot_name: str :param local_my_sql_enabled: true to enable local MySQL; otherwise, false. Default value: False . :type local_my_sql_enabled: bool :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: list of :class:`IpSecurityRestriction - ` + :type ip_security_restrictions: + list[~azure.mgmt.web.models.IpSecurityRestriction] """ _validation = { @@ -184,6 +176,7 @@ class SiteConfig(Model): } def __init__(self, number_of_workers=None, default_documents=None, net_framework_version="v4.6", php_version=None, python_version=None, node_version=None, linux_fx_version=None, request_tracing_enabled=None, request_tracing_expiration_time=None, remote_debugging_enabled=None, remote_debugging_version=None, http_logging_enabled=None, logs_directory_size_limit=None, detailed_error_logging_enabled=None, publishing_username=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root=None, scm_type=None, use32_bit_worker_process=None, web_sockets_enabled=None, always_on=None, java_version=None, java_container=None, java_container_version=None, app_command_line=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled=None, auto_heal_rules=None, tracing_options=None, vnet_name=None, cors=None, push=None, api_definition=None, auto_swap_slot_name=None, local_my_sql_enabled=False, ip_security_restrictions=None): + super(SiteConfig, self).__init__() self.number_of_workers = number_of_workers self.default_documents = default_documents self.net_framework_version = net_framework_version 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 5ac25207de3e..2b98834663bf 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 @@ -29,7 +29,7 @@ class SiteConfigResource(ProxyOnlyResource): :param number_of_workers: Number of workers. :type number_of_workers: int :param default_documents: Default documents. - :type default_documents: list of str + :type default_documents: list[str] :param net_framework_version: .NET Framework version. Default value: "v4.6" . :type net_framework_version: str @@ -62,23 +62,19 @@ class SiteConfigResource(ProxyOnlyResource): :param publishing_username: Publishing user name. :type publishing_username: str :param app_settings: Application settings. - :type app_settings: list of :class:`NameValuePair - ` + :type app_settings: list[~azure.mgmt.web.models.NameValuePair] :param connection_strings: Connection strings. - :type connection_strings: list of :class:`ConnStringInfo - ` + :type connection_strings: list[~azure.mgmt.web.models.ConnStringInfo] :ivar machine_key: Site MachineKey. - :vartype machine_key: :class:`SiteMachineKey - ` + :vartype machine_key: ~azure.mgmt.web.models.SiteMachineKey :param handler_mappings: Handler mappings. - :type handler_mappings: list of :class:`HandlerMapping - ` + :type handler_mappings: list[~azure.mgmt.web.models.HandlerMapping] :param document_root: Document root. :type document_root: str :param scm_type: SCM type. Possible values include: 'None', 'Dropbox', 'Tfs', 'LocalGit', 'GitHub', 'CodePlexGit', 'CodePlexHg', 'BitbucketGit', 'BitbucketHg', 'ExternalGit', 'ExternalHg', 'OneDrive', 'VSO' - :type scm_type: str or :class:`ScmType ` + :type scm_type: str or ~azure.mgmt.web.models.ScmType :param use32_bit_worker_process: true to use 32-bit worker process; otherwise, false. :type use32_bit_worker_process: bool @@ -98,47 +94,43 @@ class SiteConfigResource(ProxyOnlyResource): :type app_command_line: str :param managed_pipeline_mode: Managed pipeline mode. Possible values include: 'Integrated', 'Classic' - :type managed_pipeline_mode: str or :class:`ManagedPipelineMode - ` + :type managed_pipeline_mode: str or + ~azure.mgmt.web.models.ManagedPipelineMode :param virtual_applications: Virtual applications. - :type virtual_applications: list of :class:`VirtualApplication - ` + :type virtual_applications: + list[~azure.mgmt.web.models.VirtualApplication] :param load_balancing: Site load balancing. Possible values include: 'WeightedRoundRobin', 'LeastRequests', 'LeastResponseTime', 'WeightedTotalTraffic', 'RequestHash' - :type load_balancing: str or :class:`SiteLoadBalancing - ` + :type load_balancing: str or ~azure.mgmt.web.models.SiteLoadBalancing :param experiments: This is work around for polymophic types. - :type experiments: :class:`Experiments - ` + :type experiments: ~azure.mgmt.web.models.Experiments :param limits: Site limits. - :type limits: :class:`SiteLimits ` + :type limits: ~azure.mgmt.web.models.SiteLimits :param auto_heal_enabled: true if Auto Heal is enabled; otherwise, false. :type auto_heal_enabled: bool :param auto_heal_rules: Auto Heal rules. - :type auto_heal_rules: :class:`AutoHealRules - ` + :type auto_heal_rules: ~azure.mgmt.web.models.AutoHealRules :param tracing_options: Tracing options. :type tracing_options: str :param vnet_name: Virtual Network name. :type vnet_name: str :param cors: Cross-Origin Resource Sharing (CORS) settings. - :type cors: :class:`CorsSettings ` + :type cors: ~azure.mgmt.web.models.CorsSettings :param push: Push endpoint settings. - :type push: :class:`PushSettings ` + :type push: ~azure.mgmt.web.models.PushSettings :param api_definition: Information about the formal API definition for the app. - :type api_definition: :class:`ApiDefinitionInfo - ` + :type api_definition: ~azure.mgmt.web.models.ApiDefinitionInfo :param auto_swap_slot_name: Auto-swap slot name. :type auto_swap_slot_name: str :param local_my_sql_enabled: true to enable local MySQL; otherwise, false. Default value: False . :type local_my_sql_enabled: bool :param ip_security_restrictions: IP security restrictions. - :type ip_security_restrictions: list of :class:`IpSecurityRestriction - ` + :type ip_security_restrictions: + list[~azure.mgmt.web.models.IpSecurityRestriction] """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_extension_info.py b/azure-mgmt-web/azure/mgmt/web/models/site_extension_info.py index 6f9e3ceadee4..f09fd23f9e9e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_extension_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_extension_info.py @@ -32,8 +32,8 @@ class SiteExtensionInfo(ProxyOnlyResource): :type title: str :param site_extension_info_type: Site extension type. Possible values include: 'Gallery', 'WebRoot' - :type site_extension_info_type: str or :class:`SiteExtensionType - ` + :type site_extension_info_type: str or + ~azure.mgmt.web.models.SiteExtensionType :param summary: Summary description. :type summary: str :param description: Detailed description. @@ -51,7 +51,7 @@ class SiteExtensionInfo(ProxyOnlyResource): :param feed_url: Feed URL. :type feed_url: str :param authors: List of authors. - :type authors: list of str + :type authors: list[str] :param installation_args: Installer command line parameters. :type installation_args: str :param published_date_time: Published timestamp. diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_limits.py b/azure-mgmt-web/azure/mgmt/web/models/site_limits.py index 97255e86863c..f1e9cca487a1 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_limits.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_limits.py @@ -30,6 +30,7 @@ class SiteLimits(Model): } def __init__(self, max_percentage_cpu=None, max_memory_in_mb=None, max_disk_size_in_mb=None): + super(SiteLimits, self).__init__() self.max_percentage_cpu = max_percentage_cpu self.max_memory_in_mb = max_memory_in_mb self.max_disk_size_in_mb = max_disk_size_in_mb diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_logs_config.py b/azure-mgmt-web/azure/mgmt/web/models/site_logs_config.py index 2927f312302a..8a5be995652d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_logs_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_logs_config.py @@ -27,17 +27,13 @@ class SiteLogsConfig(ProxyOnlyResource): :ivar type: Resource type. :vartype type: str :param application_logs: Application logs configuration. - :type application_logs: :class:`ApplicationLogsConfig - ` + :type application_logs: ~azure.mgmt.web.models.ApplicationLogsConfig :param http_logs: HTTP logs configuration. - :type http_logs: :class:`HttpLogsConfig - ` + :type http_logs: ~azure.mgmt.web.models.HttpLogsConfig :param failed_requests_tracing: Failed requests tracing configuration. - :type failed_requests_tracing: :class:`EnabledConfig - ` + :type failed_requests_tracing: ~azure.mgmt.web.models.EnabledConfig :param detailed_error_messages: Detailed error messages configuration. - :type detailed_error_messages: :class:`EnabledConfig - ` + :type detailed_error_messages: ~azure.mgmt.web.models.EnabledConfig """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_machine_key.py b/azure-mgmt-web/azure/mgmt/web/models/site_machine_key.py index efb33f7d11e2..b63fc5d202da 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_machine_key.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_machine_key.py @@ -33,6 +33,7 @@ class SiteMachineKey(Model): } def __init__(self, validation=None, validation_key=None, decryption=None, decryption_key=None): + super(SiteMachineKey, self).__init__() self.validation = validation self.validation_key = validation_key self.decryption = decryption diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_seal.py b/azure-mgmt-web/azure/mgmt/web/models/site_seal.py index 641f987ec2ce..8512e5255443 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_seal.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_seal.py @@ -28,4 +28,5 @@ class SiteSeal(Model): } def __init__(self, html): + super(SiteSeal, self).__init__() self.html = html diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_seal_request.py b/azure-mgmt-web/azure/mgmt/web/models/site_seal_request.py index dff37b18118d..14b8d6fc1550 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_seal_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_seal_request.py @@ -27,5 +27,6 @@ class SiteSealRequest(Model): } def __init__(self, light_theme=None, locale=None): + super(SiteSealRequest, self).__init__() self.light_theme = light_theme self.locale = locale diff --git a/azure-mgmt-web/azure/mgmt/web/models/sku_capacity.py b/azure-mgmt-web/azure/mgmt/web/models/sku_capacity.py index aef1cb7801b2..6e3ca3b8378c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/sku_capacity.py +++ b/azure-mgmt-web/azure/mgmt/web/models/sku_capacity.py @@ -33,6 +33,7 @@ class SkuCapacity(Model): } def __init__(self, minimum=None, maximum=None, default=None, scale_type=None): + super(SkuCapacity, self).__init__() self.minimum = minimum self.maximum = maximum self.default = default diff --git a/azure-mgmt-web/azure/mgmt/web/models/sku_description.py b/azure-mgmt-web/azure/mgmt/web/models/sku_description.py index 12114a307edd..4e5ac3fc4498 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/sku_description.py +++ b/azure-mgmt-web/azure/mgmt/web/models/sku_description.py @@ -26,14 +26,12 @@ class SkuDescription(Model): :param capacity: Current number of instances assigned to the resource. :type capacity: int :param sku_capacity: Min, max, and default scale values of the SKU. - :type sku_capacity: :class:`SkuCapacity - ` + :type sku_capacity: ~azure.mgmt.web.models.SkuCapacity :param locations: Locations of the SKU. - :type locations: list of str + :type locations: list[str] :param capabilities: Capabilities of the SKU, e.g., is traffic manager enabled? - :type capabilities: list of :class:`Capability - ` + :type capabilities: list[~azure.mgmt.web.models.Capability] """ _attribute_map = { @@ -48,6 +46,7 @@ class SkuDescription(Model): } def __init__(self, name=None, tier=None, size=None, family=None, capacity=None, sku_capacity=None, locations=None, capabilities=None): + super(SkuDescription, self).__init__() self.name = name self.tier = tier self.size = size diff --git a/azure-mgmt-web/azure/mgmt/web/models/sku_info.py b/azure-mgmt-web/azure/mgmt/web/models/sku_info.py index e666ac7c82fd..04431f22a4a1 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/sku_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/sku_info.py @@ -18,9 +18,9 @@ class SkuInfo(Model): :param resource_type: Resource type that this SKU applies to. :type resource_type: str :param sku: Name and tier of the SKU. - :type sku: :class:`SkuDescription ` + :type sku: ~azure.mgmt.web.models.SkuDescription :param capacity: Min, max, and default scale values of the SKU. - :type capacity: :class:`SkuCapacity ` + :type capacity: ~azure.mgmt.web.models.SkuCapacity """ _attribute_map = { @@ -30,6 +30,7 @@ class SkuInfo(Model): } def __init__(self, resource_type=None, sku=None, capacity=None): + super(SkuInfo, self).__init__() self.resource_type = resource_type self.sku = sku self.capacity = capacity diff --git a/azure-mgmt-web/azure/mgmt/web/models/sku_infos.py b/azure-mgmt-web/azure/mgmt/web/models/sku_infos.py index 04d70219e007..f5f9fbadd447 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/sku_infos.py +++ b/azure-mgmt-web/azure/mgmt/web/models/sku_infos.py @@ -18,8 +18,7 @@ class SkuInfos(Model): :param resource_type: Resource type that this SKU applies to. :type resource_type: str :param skus: List of SKUs the subscription is able to use. - :type skus: list of :class:`GlobalCsmSkuDescription - ` + :type skus: list[~azure.mgmt.web.models.GlobalCsmSkuDescription] """ _attribute_map = { @@ -28,5 +27,6 @@ class SkuInfos(Model): } def __init__(self, resource_type=None, skus=None): + super(SkuInfos, self).__init__() self.resource_type = resource_type self.skus = skus 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 48c410337580..1bb9f07e671b 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 @@ -27,9 +27,9 @@ class SlotConfigNamesResource(ProxyOnlyResource): :ivar type: Resource type. :vartype type: str :param connection_string_names: List of connection string names. - :type connection_string_names: list of str + :type connection_string_names: list[str] :param app_setting_names: List of application settings names. - :type app_setting_names: list of str + :type app_setting_names: list[str] """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/slot_swap_status.py b/azure-mgmt-web/azure/mgmt/web/models/slot_swap_status.py index be7dab2d1c55..fa0589c5c1d3 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/slot_swap_status.py +++ b/azure-mgmt-web/azure/mgmt/web/models/slot_swap_status.py @@ -40,6 +40,7 @@ class SlotSwapStatus(Model): } def __init__(self): + super(SlotSwapStatus, self).__init__() self.timestamp_utc = None self.source_slot_name = None self.destination_slot_name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/slow_requests_based_trigger.py b/azure-mgmt-web/azure/mgmt/web/models/slow_requests_based_trigger.py index bd17702941ae..b4cf1db5fcd4 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/slow_requests_based_trigger.py +++ b/azure-mgmt-web/azure/mgmt/web/models/slow_requests_based_trigger.py @@ -30,6 +30,7 @@ class SlowRequestsBasedTrigger(Model): } def __init__(self, time_taken=None, count=None, time_interval=None): + super(SlowRequestsBasedTrigger, self).__init__() self.time_taken = time_taken self.count = count self.time_interval = time_interval diff --git a/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_request.py b/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_request.py index 190179fd8670..594a87aa73ac 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_request.py @@ -31,8 +31,7 @@ class SnapshotRecoveryRequest(ProxyOnlyResource): :type snapshot_time: str :param recovery_target: Specifies the web app that snapshot contents will be written to. - :type recovery_target: :class:`SnapshotRecoveryTarget - ` + :type recovery_target: ~azure.mgmt.web.models.SnapshotRecoveryTarget :param overwrite: If true the recovery operation can overwrite source app; otherwise, false. :type overwrite: bool @@ -49,6 +48,7 @@ class SnapshotRecoveryRequest(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'overwrite': {'required': True}, } _attribute_map = { @@ -63,7 +63,7 @@ class SnapshotRecoveryRequest(ProxyOnlyResource): 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, } - def __init__(self, kind=None, snapshot_time=None, recovery_target=None, overwrite=None, recover_configuration=None, ignore_conflicting_host_names=None): + def __init__(self, overwrite, kind=None, snapshot_time=None, recovery_target=None, recover_configuration=None, ignore_conflicting_host_names=None): super(SnapshotRecoveryRequest, self).__init__(kind=kind) self.snapshot_time = snapshot_time self.recovery_target = recovery_target diff --git a/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_target.py b/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_target.py index a3762682392f..86e831e9a8b7 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_target.py +++ b/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_target.py @@ -32,5 +32,6 @@ class SnapshotRecoveryTarget(Model): } def __init__(self, location=None, id=None): + super(SnapshotRecoveryTarget, self).__init__() self.location = location self.id = id diff --git a/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity.py b/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity.py index b89dcace2d0f..793b7021d873 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity.py +++ b/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity.py @@ -27,12 +27,10 @@ class StampCapacity(Model): :type unit: str :param compute_mode: Shared/dedicated workers. Possible values include: 'Shared', 'Dedicated', 'Dynamic' - :type compute_mode: str or :class:`ComputeModeOptions - ` + :type compute_mode: str or ~azure.mgmt.web.models.ComputeModeOptions :param worker_size: Size of the machines. Possible values include: 'Default', 'Small', 'Medium', 'Large' - :type worker_size: str or :class:`WorkerSizeOptions - ` + :type worker_size: str or ~azure.mgmt.web.models.WorkerSizeOptions :param worker_size_id: Size ID of machines: 0 - Small 1 - Medium @@ -63,6 +61,7 @@ class StampCapacity(Model): } def __init__(self, name=None, available_capacity=None, total_capacity=None, unit=None, compute_mode=None, worker_size=None, worker_size_id=None, exclude_from_capacity_allocation=None, is_applicable_for_all_compute_modes=None, site_mode=None): + super(StampCapacity, self).__init__() self.name = name self.available_capacity = available_capacity self.total_capacity = total_capacity diff --git a/azure-mgmt-web/azure/mgmt/web/models/status_codes_based_trigger.py b/azure-mgmt-web/azure/mgmt/web/models/status_codes_based_trigger.py index 34f8740cc663..c2db8a2f10a9 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/status_codes_based_trigger.py +++ b/azure-mgmt-web/azure/mgmt/web/models/status_codes_based_trigger.py @@ -36,6 +36,7 @@ class StatusCodesBasedTrigger(Model): } def __init__(self, status=None, sub_status=None, win32_status=None, count=None, time_interval=None): + super(StatusCodesBasedTrigger, self).__init__() self.status = status self.sub_status = sub_status self.win32_status = win32_status diff --git a/azure-mgmt-web/azure/mgmt/web/models/storage_migration_options.py b/azure-mgmt-web/azure/mgmt/web/models/storage_migration_options.py index c7fafbc71d5d..e92a9f06c9b2 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/storage_migration_options.py +++ b/azure-mgmt-web/azure/mgmt/web/models/storage_migration_options.py @@ -43,6 +43,8 @@ class StorageMigrationOptions(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'azurefiles_connection_string': {'required': True}, + 'azurefiles_share': {'required': True}, } _attribute_map = { @@ -56,7 +58,7 @@ class StorageMigrationOptions(ProxyOnlyResource): 'block_write_access_to_site': {'key': 'properties.blockWriteAccessToSite', 'type': 'bool'}, } - def __init__(self, kind=None, azurefiles_connection_string=None, azurefiles_share=None, switch_site_after_migration=False, block_write_access_to_site=False): + def __init__(self, azurefiles_connection_string, azurefiles_share, kind=None, switch_site_after_migration=False, block_write_access_to_site=False): super(StorageMigrationOptions, self).__init__(kind=kind) self.azurefiles_connection_string = azurefiles_connection_string self.azurefiles_share = azurefiles_share diff --git a/azure-mgmt-web/azure/mgmt/web/models/string_dictionary.py b/azure-mgmt-web/azure/mgmt/web/models/string_dictionary.py index 1cd7bec15f5b..875d8325abaf 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/string_dictionary.py +++ b/azure-mgmt-web/azure/mgmt/web/models/string_dictionary.py @@ -27,7 +27,7 @@ class StringDictionary(ProxyOnlyResource): :ivar type: Resource type. :vartype type: str :param properties: Settings. - :type properties: dict + :type properties: dict[str, str] """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/tld_legal_agreement.py b/azure-mgmt-web/azure/mgmt/web/models/tld_legal_agreement.py index 292649a8d195..c7ac735feb00 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/tld_legal_agreement.py +++ b/azure-mgmt-web/azure/mgmt/web/models/tld_legal_agreement.py @@ -39,6 +39,7 @@ class TldLegalAgreement(Model): } def __init__(self, agreement_key, title, content, url=None): + super(TldLegalAgreement, self).__init__() self.agreement_key = agreement_key self.title = title self.content = content diff --git a/azure-mgmt-web/azure/mgmt/web/models/top_level_domain_agreement_option.py b/azure-mgmt-web/azure/mgmt/web/models/top_level_domain_agreement_option.py index fdfdcd99c7d5..c22b5dfd1948 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/top_level_domain_agreement_option.py +++ b/azure-mgmt-web/azure/mgmt/web/models/top_level_domain_agreement_option.py @@ -31,5 +31,6 @@ class TopLevelDomainAgreementOption(Model): } def __init__(self, include_privacy=None, for_transfer=None): + super(TopLevelDomainAgreementOption, self).__init__() self.include_privacy = include_privacy self.for_transfer = for_transfer diff --git a/azure-mgmt-web/azure/mgmt/web/models/triggered_job_history.py b/azure-mgmt-web/azure/mgmt/web/models/triggered_job_history.py index 7928400fa810..52afa075ca28 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/triggered_job_history.py +++ b/azure-mgmt-web/azure/mgmt/web/models/triggered_job_history.py @@ -28,8 +28,7 @@ class TriggeredJobHistory(ProxyOnlyResource): :ivar type: Resource type. :vartype type: str :param triggered_job_runs: List of triggered web job runs. - :type triggered_job_runs: list of :class:`TriggeredJobRun - ` + :type triggered_job_runs: list[~azure.mgmt.web.models.TriggeredJobRun] """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/triggered_job_run.py b/azure-mgmt-web/azure/mgmt/web/models/triggered_job_run.py index 821c247fc872..3b9bef7b7671 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/triggered_job_run.py +++ b/azure-mgmt-web/azure/mgmt/web/models/triggered_job_run.py @@ -32,8 +32,7 @@ class TriggeredJobRun(ProxyOnlyResource): :vartype triggered_job_run_name: str :param status: Job status. Possible values include: 'Success', 'Failed', 'Error' - :type status: str or :class:`TriggeredWebJobStatus - ` + :type status: str or ~azure.mgmt.web.models.TriggeredWebJobStatus :param start_time: Start time. :type start_time: datetime :param end_time: End time. diff --git a/azure-mgmt-web/azure/mgmt/web/models/triggered_web_job.py b/azure-mgmt-web/azure/mgmt/web/models/triggered_web_job.py index 8633501f1607..a02e213995ab 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/triggered_web_job.py +++ b/azure-mgmt-web/azure/mgmt/web/models/triggered_web_job.py @@ -27,8 +27,7 @@ class TriggeredWebJob(ProxyOnlyResource): :ivar type: Resource type. :vartype type: str :param latest_run: Latest job run information. - :type latest_run: :class:`TriggeredJobRun - ` + :type latest_run: ~azure.mgmt.web.models.TriggeredJobRun :param history_url: History URL. :type history_url: str :param scheduler_logs_url: Scheduler Logs URL. @@ -44,8 +43,7 @@ class TriggeredWebJob(ProxyOnlyResource): :type extra_info_url: str :param job_type: Job type. Possible values include: 'Continuous', 'Triggered' - :type job_type: str or :class:`WebJobType - ` + :type job_type: str or ~azure.mgmt.web.models.WebJobType :param error: Error information. :type error: str :param using_sdk: Using SDK? diff --git a/azure-mgmt-web/azure/mgmt/web/models/usage.py b/azure-mgmt-web/azure/mgmt/web/models/usage.py index e654d0904090..7ae5ab1dba10 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/usage.py +++ b/azure-mgmt-web/azure/mgmt/web/models/usage.py @@ -42,8 +42,7 @@ class Usage(ProxyOnlyResource): :vartype next_reset_time: datetime :ivar compute_mode: Compute mode used for this usage. Possible values include: 'Shared', 'Dedicated', 'Dynamic' - :vartype compute_mode: str or :class:`ComputeModeOptions - ` + :vartype compute_mode: str or ~azure.mgmt.web.models.ComputeModeOptions :ivar site_mode: Site mode used for this usage. :vartype site_mode: str """ diff --git a/azure-mgmt-web/azure/mgmt/web/models/user.py b/azure-mgmt-web/azure/mgmt/web/models/user.py index 8fe1c8681c53..bb48fef75395 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/user.py +++ b/azure-mgmt-web/azure/mgmt/web/models/user.py @@ -43,6 +43,7 @@ class User(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'publishing_user_name': {'required': True}, } _attribute_map = { @@ -57,7 +58,7 @@ class User(ProxyOnlyResource): 'publishing_password_hash_salt': {'key': 'properties.publishingPasswordHashSalt', 'type': 'str'}, } - def __init__(self, kind=None, user_name=None, publishing_user_name=None, publishing_password=None, publishing_password_hash=None, publishing_password_hash_salt=None): + def __init__(self, publishing_user_name, kind=None, user_name=None, publishing_password=None, publishing_password_hash=None, publishing_password_hash_salt=None): super(User, self).__init__(kind=kind) self.user_name = user_name self.publishing_user_name = publishing_user_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/validate_request.py b/azure-mgmt-web/azure/mgmt/web/models/validate_request.py index f641027d6377..26b45266b08e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/validate_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/validate_request.py @@ -19,8 +19,7 @@ class ValidateRequest(Model): :type name: str :param type: Resource type used for verification. Possible values include: 'ServerFarm', 'Site' - :type type: str or :class:`ValidateResourceTypes - ` + :type type: str or ~azure.mgmt.web.models.ValidateResourceTypes :param location: Expected location of the resource. :type location: str :param server_farm_id: ARM resource ID of an App Service plan that would @@ -57,6 +56,7 @@ class ValidateRequest(Model): } def __init__(self, name, type, location, server_farm_id=None, sku_name=None, need_linux_workers=None, capacity=None, hosting_environment=None): + super(ValidateRequest, self).__init__() self.name = name self.type = type self.location = location diff --git a/azure-mgmt-web/azure/mgmt/web/models/validate_response.py b/azure-mgmt-web/azure/mgmt/web/models/validate_response.py index 50f8917ab909..72e3aebdcb3b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/validate_response.py +++ b/azure-mgmt-web/azure/mgmt/web/models/validate_response.py @@ -18,8 +18,7 @@ class ValidateResponse(Model): :param status: Result of validation. :type status: str :param error: Error details for the case when validation fails. - :type error: :class:`ValidateResponseError - ` + :type error: ~azure.mgmt.web.models.ValidateResponseError """ _attribute_map = { @@ -28,5 +27,6 @@ class ValidateResponse(Model): } def __init__(self, status=None, error=None): + super(ValidateResponse, self).__init__() self.status = status self.error = error diff --git a/azure-mgmt-web/azure/mgmt/web/models/validate_response_error.py b/azure-mgmt-web/azure/mgmt/web/models/validate_response_error.py index 93d8169cccda..6186f924e892 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/validate_response_error.py +++ b/azure-mgmt-web/azure/mgmt/web/models/validate_response_error.py @@ -27,5 +27,6 @@ class ValidateResponseError(Model): } def __init__(self, code=None, message=None): + super(ValidateResponseError, self).__init__() self.code = code self.message = message diff --git a/azure-mgmt-web/azure/mgmt/web/models/virtual_application.py b/azure-mgmt-web/azure/mgmt/web/models/virtual_application.py index 3448c49fc947..6394e8f4a0dd 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/virtual_application.py +++ b/azure-mgmt-web/azure/mgmt/web/models/virtual_application.py @@ -23,8 +23,7 @@ class VirtualApplication(Model): otherwise, false. :type preload_enabled: bool :param virtual_directories: Virtual directories for virtual application. - :type virtual_directories: list of :class:`VirtualDirectory - ` + :type virtual_directories: list[~azure.mgmt.web.models.VirtualDirectory] """ _attribute_map = { @@ -35,6 +34,7 @@ class VirtualApplication(Model): } def __init__(self, virtual_path=None, physical_path=None, preload_enabled=None, virtual_directories=None): + super(VirtualApplication, self).__init__() self.virtual_path = virtual_path self.physical_path = physical_path self.preload_enabled = preload_enabled diff --git a/azure-mgmt-web/azure/mgmt/web/models/virtual_directory.py b/azure-mgmt-web/azure/mgmt/web/models/virtual_directory.py index aec360b35ad5..8742aa28ba2d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/virtual_directory.py +++ b/azure-mgmt-web/azure/mgmt/web/models/virtual_directory.py @@ -27,5 +27,6 @@ class VirtualDirectory(Model): } def __init__(self, virtual_path=None, physical_path=None): + super(VirtualDirectory, self).__init__() self.virtual_path = virtual_path self.physical_path = physical_path diff --git a/azure-mgmt-web/azure/mgmt/web/models/virtual_ip_mapping.py b/azure-mgmt-web/azure/mgmt/web/models/virtual_ip_mapping.py index 295228b57acd..6a8674d29b36 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/virtual_ip_mapping.py +++ b/azure-mgmt-web/azure/mgmt/web/models/virtual_ip_mapping.py @@ -33,6 +33,7 @@ class VirtualIPMapping(Model): } def __init__(self, virtual_ip=None, internal_http_port=None, internal_https_port=None, in_use=None): + super(VirtualIPMapping, self).__init__() self.virtual_ip = virtual_ip self.internal_http_port = internal_http_port self.internal_https_port = internal_https_port diff --git a/azure-mgmt-web/azure/mgmt/web/models/virtual_network_profile.py b/azure-mgmt-web/azure/mgmt/web/models/virtual_network_profile.py index 9c82615cdc74..f4d62a216f3c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/virtual_network_profile.py +++ b/azure-mgmt-web/azure/mgmt/web/models/virtual_network_profile.py @@ -41,6 +41,7 @@ class VirtualNetworkProfile(Model): } def __init__(self, id=None, subnet=None): + super(VirtualNetworkProfile, self).__init__() self.id = id self.name = None self.type = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_gateway.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_gateway.py index 82188df3b2f8..2f48fa8b30cf 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/vnet_gateway.py +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_gateway.py @@ -37,6 +37,7 @@ class VnetGateway(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'vpn_package_uri': {'required': True}, } _attribute_map = { @@ -48,7 +49,7 @@ class VnetGateway(ProxyOnlyResource): 'vpn_package_uri': {'key': 'properties.vpnPackageUri', 'type': 'str'}, } - def __init__(self, kind=None, vnet_name=None, vpn_package_uri=None): + def __init__(self, vpn_package_uri, kind=None, vnet_name=None): super(VnetGateway, self).__init__(kind=kind) self.vnet_name = vnet_name self.vpn_package_uri = vpn_package_uri diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_info.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_info.py index 3218867d0005..866e2d090e7b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/vnet_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_info.py @@ -35,8 +35,7 @@ class VnetInfo(ProxyOnlyResource): Point-To-Site VPN connection. :type cert_blob: str :ivar routes: The routes that this Virtual Network connection uses. - :vartype routes: list of :class:`VnetRoute - ` + :vartype routes: list[~azure.mgmt.web.models.VnetRoute] :ivar resync_required: true if a resync is required; otherwise, false. :vartype resync_required: bool diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_route.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_route.py index d00419b8f22f..ef511e8fb23b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/vnet_route.py +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_route.py @@ -44,8 +44,7 @@ class VnetRoute(ProxyOnlyResource): STATIC - Static route set on the app only These values will be used for syncing an app's routes with those from a Virtual Network. Possible values include: 'DEFAULT', 'INHERITED', 'STATIC' - :type route_type: str or :class:`RouteType - ` + :type route_type: str or ~azure.mgmt.web.models.RouteType """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_validation_failure_details.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_validation_failure_details.py index e8be07272e0a..4ac9adf0d201 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/vnet_validation_failure_details.py +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_validation_failure_details.py @@ -29,8 +29,7 @@ class VnetValidationFailureDetails(ProxyOnlyResource): :param failed: A flag describing whether or not validation failed. :type failed: bool :param failed_tests: A list of tests that failed in the validation. - :type failed_tests: list of :class:`VnetValidationTestFailure - ` + :type failed_tests: list[~azure.mgmt.web.models.VnetValidationTestFailure] """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/web_app_collection.py b/azure-mgmt-web/azure/mgmt/web/models/web_app_collection.py index 15570597c645..814854da5718 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/web_app_collection.py +++ b/azure-mgmt-web/azure/mgmt/web/models/web_app_collection.py @@ -16,7 +16,7 @@ class WebAppCollection(Model): """Collection of App Service apps. :param value: Collection of resources. - :type value: list of :class:`Site ` + :type value: list[~azure.mgmt.web.models.Site] :param next_link: Link to next page of resources. :type next_link: str """ @@ -31,5 +31,6 @@ class WebAppCollection(Model): } def __init__(self, value, next_link=None): + super(WebAppCollection, self).__init__() self.value = value self.next_link = next_link diff --git a/azure-mgmt-web/azure/mgmt/web/models/web_job.py b/azure-mgmt-web/azure/mgmt/web/models/web_job.py index d33ae6a6c3cc..d0062e56986a 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/web_job.py +++ b/azure-mgmt-web/azure/mgmt/web/models/web_job.py @@ -36,8 +36,7 @@ class WebJob(ProxyOnlyResource): :type extra_info_url: str :param job_type: Job type. Possible values include: 'Continuous', 'Triggered' - :type job_type: str or :class:`WebJobType - ` + :type job_type: str or ~azure.mgmt.web.models.WebJobType :param error: Error information. :type error: str :param using_sdk: Using SDK? diff --git a/azure-mgmt-web/azure/mgmt/web/models/worker_pool.py b/azure-mgmt-web/azure/mgmt/web/models/worker_pool.py index 3d2463efe41f..c26d02899ed2 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/worker_pool.py +++ b/azure-mgmt-web/azure/mgmt/web/models/worker_pool.py @@ -22,15 +22,14 @@ class WorkerPool(Model): :type worker_size_id: int :param compute_mode: Shared or dedicated app hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic' - :type compute_mode: str or :class:`ComputeModeOptions - ` + :type compute_mode: str or ~azure.mgmt.web.models.ComputeModeOptions :param worker_size: VM size of the worker pool instances. :type worker_size: str :param worker_count: Number of instances in the worker pool. :type worker_count: int :ivar instance_names: Names of all instances in the worker pool (read only). - :vartype instance_names: list of str + :vartype instance_names: list[str] """ _validation = { @@ -46,6 +45,7 @@ class WorkerPool(Model): } def __init__(self, worker_size_id=None, compute_mode=None, worker_size=None, worker_count=None): + super(WorkerPool, self).__init__() self.worker_size_id = worker_size_id self.compute_mode = compute_mode self.worker_size = worker_size diff --git a/azure-mgmt-web/azure/mgmt/web/models/worker_pool_resource.py b/azure-mgmt-web/azure/mgmt/web/models/worker_pool_resource.py index 68d938ce5338..869353189d58 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/worker_pool_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/worker_pool_resource.py @@ -30,17 +30,16 @@ class WorkerPoolResource(ProxyOnlyResource): :type worker_size_id: int :param compute_mode: Shared or dedicated app hosting. Possible values include: 'Shared', 'Dedicated', 'Dynamic' - :type compute_mode: str or :class:`ComputeModeOptions - ` + :type compute_mode: str or ~azure.mgmt.web.models.ComputeModeOptions :param worker_size: VM size of the worker pool instances. :type worker_size: str :param worker_count: Number of instances in the worker pool. :type worker_count: int :ivar instance_names: Names of all instances in the worker pool (read only). - :vartype instance_names: list of str + :vartype instance_names: list[str] :param sku: - :type sku: :class:`SkuDescription ` + :type sku: ~azure.mgmt.web.models.SkuDescription """ _validation = { diff --git a/azure-mgmt-web/azure/mgmt/web/operations/app_service_certificate_orders_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/app_service_certificate_orders_operations.py index 313918051282..81f11d31af9e 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/app_service_certificate_orders_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/app_service_certificate_orders_operations.py @@ -12,6 +12,7 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError from msrestazure.azure_operation import AzureOperationPoller from .. import models @@ -27,6 +28,8 @@ class AppServiceCertificateOrdersOperations(object): :ivar api_version: API Version. Constant value: "2015-08-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -47,11 +50,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - :class:`AppServiceCertificateOrder - ` - :rtype: :class:`AppServiceCertificateOrderPaged - ` + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.models.AppServiceCertificateOrder] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -85,7 +86,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -113,18 +114,14 @@ def validate_purchase_information( :param app_service_certificate_order: Information for a certificate order. :type app_service_certificate_order: - :class:`AppServiceCertificateOrder - ` + ~azure.mgmt.web.models.AppServiceCertificateOrder :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: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -154,7 +151,7 @@ def validate_purchase_information( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -179,11 +176,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - :class:`AppServiceCertificateOrder - ` - :rtype: :class:`AppServiceCertificateOrderPaged - ` + :return: An iterator like instance of AppServiceCertificateOrder + :rtype: + ~azure.mgmt.web.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.models.AppServiceCertificateOrder] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -218,7 +213,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -253,13 +248,9 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`AppServiceCertificateOrder - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`AppServiceCertificateOrder - ` or - :class:`ClientRawResponse` + :return: AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.AppServiceCertificateOrder or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -287,7 +278,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -305,36 +296,9 @@ def get( return deserialized - def create_or_update( - self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): - """Create or update a certificate purchase order. - - Create or update a certificate purchase order. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param certificate_order_name: Name of the certificate order. - :type certificate_order_name: str - :param certificate_distinguished_name: Distinguished name to to use - for the certificate order. - :type certificate_distinguished_name: - :class:`AppServiceCertificateOrder - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`AppServiceCertificateOrder - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_or_update_initial( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}' path_format_arguments = { @@ -362,19 +326,77 @@ def create_or_update( body_content = self._serialize.body(certificate_distinguished_name, 'AppServiceCertificateOrder') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateOrder', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, certificate_order_name, certificate_distinguished_name, custom_headers=None, raw=False, **operation_config): + """Create or update a certificate purchase order. + + Create or update a certificate purchase order. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param certificate_distinguished_name: Distinguished name to to use + for the certificate order. + :type certificate_distinguished_name: + ~azure.mgmt.web.models.AppServiceCertificateOrder + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + AppServiceCertificateOrder or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.AppServiceCertificateOrder] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + certificate_order_name=certificate_order_name, + certificate_distinguished_name=certificate_distinguished_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -383,12 +405,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateOrder', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateOrder', response) + deserialized = self._deserialize('AppServiceCertificateOrder', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -396,10 +413,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -423,11 +436,8 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -455,7 +465,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -482,11 +492,9 @@ def list_certificates( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - :class:`AppServiceCertificateResource - ` - :rtype: :class:`AppServiceCertificateResourcePaged - ` + :return: An iterator like instance of AppServiceCertificateResource + :rtype: + ~azure.mgmt.web.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.models.AppServiceCertificateResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -522,7 +530,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -559,13 +567,10 @@ def get_certificate( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`AppServiceCertificateResource - ` or - :class:`ClientRawResponse` if + :return: AppServiceCertificateResource or ClientRawResponse if raw=true - :rtype: :class:`AppServiceCertificateResource - ` or - :class:`ClientRawResponse` + :rtype: ~azure.mgmt.web.models.AppServiceCertificateResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -594,7 +599,7 @@ def get_certificate( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -612,36 +617,9 @@ def get_certificate( return deserialized - def create_or_update_certificate( - self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): - """Creates or updates a certificate and associates with key vault secret. - - Creates or updates a certificate and associates with key vault secret. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param certificate_order_name: Name of the certificate order. - :type certificate_order_name: str - :param name: Name of the certificate. - :type name: str - :param key_vault_certificate: Key vault certificate resource Id. - :type key_vault_certificate: :class:`AppServiceCertificateResource - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`AppServiceCertificateResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_or_update_certificate_initial( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}' path_format_arguments = { @@ -670,19 +648,79 @@ def create_or_update_certificate( body_content = self._serialize.body(key_vault_certificate, 'AppServiceCertificateResource') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceCertificateResource', response) + if response.status_code == 201: + deserialized = self._deserialize('AppServiceCertificateResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_certificate( + self, resource_group_name, certificate_order_name, name, key_vault_certificate, custom_headers=None, raw=False, **operation_config): + """Creates or updates a certificate and associates with key vault secret. + + Creates or updates a certificate and associates with key vault secret. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param certificate_order_name: Name of the certificate order. + :type certificate_order_name: str + :param name: Name of the certificate. + :type name: str + :param key_vault_certificate: Key vault certificate resource Id. + :type key_vault_certificate: + ~azure.mgmt.web.models.AppServiceCertificateResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + AppServiceCertificateResource or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.AppServiceCertificateResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_certificate_initial( + resource_group_name=resource_group_name, + certificate_order_name=certificate_order_name, + name=name, + key_vault_certificate=key_vault_certificate, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -691,12 +729,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceCertificateResource', response) - if response.status_code == 201: - deserialized = self._deserialize('AppServiceCertificateResource', response) + deserialized = self._deserialize('AppServiceCertificateResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -704,10 +737,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -733,11 +762,8 @@ def delete_certificate( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -766,7 +792,7 @@ def delete_certificate( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -790,18 +816,14 @@ def reissue( :type certificate_order_name: str :param reissue_certificate_order_request: Parameters for the reissue. :type reissue_certificate_order_request: - :class:`ReissueCertificateOrderRequest - ` + ~azure.mgmt.web.models.ReissueCertificateOrderRequest :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: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -833,7 +855,7 @@ def reissue( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -857,18 +879,14 @@ def renew( :type certificate_order_name: str :param renew_certificate_order_request: Renew parameters :type renew_certificate_order_request: - :class:`RenewCertificateOrderRequest - ` + ~azure.mgmt.web.models.RenewCertificateOrderRequest :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: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -900,7 +918,7 @@ def renew( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -927,11 +945,8 @@ def resend_email( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -959,7 +974,7 @@ def resend_email( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -988,11 +1003,8 @@ def resend_request_emails( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ name_identifier = models.NameIdentifier(name=name) @@ -1026,7 +1038,7 @@ def resend_request_emails( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -1057,11 +1069,9 @@ def retrieve_site_seal( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteSeal ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteSeal ` or - :class:`ClientRawResponse` + :return: SiteSeal or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteSeal or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) @@ -1095,7 +1105,7 @@ def retrieve_site_seal( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1129,11 +1139,8 @@ def verify_domain_ownership( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1161,7 +1168,7 @@ def verify_domain_ownership( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -1188,13 +1195,9 @@ def retrieve_certificate_actions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`CertificateOrderAction - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`CertificateOrderAction - ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.CertificateOrderAction] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1222,7 +1225,7 @@ def retrieve_certificate_actions( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1256,13 +1259,9 @@ def retrieve_certificate_email_history( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`CertificateEmail - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`CertificateEmail - ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.CertificateEmail] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1290,7 +1289,7 @@ def retrieve_certificate_email_history( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-web/azure/mgmt/web/operations/app_service_environments_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/app_service_environments_operations.py index 498904476840..dba9b0486dde 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/app_service_environments_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/app_service_environments_operations.py @@ -12,6 +12,7 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError from msrestazure.azure_operation import AzureOperationPoller from .. import models @@ -27,6 +28,8 @@ class AppServiceEnvironmentsOperations(object): :ivar api_version: API Version. Constant value: "2016-09-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -47,10 +50,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`AppServiceEnvironment - ` - :rtype: :class:`AppServiceEnvironmentPaged - ` + :return: An iterator like instance of AppServiceEnvironment + :rtype: + ~azure.mgmt.web.models.AppServiceEnvironmentPaged[~azure.mgmt.web.models.AppServiceEnvironment] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -84,7 +86,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -117,10 +119,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`AppServiceEnvironment - ` - :rtype: :class:`AppServiceEnvironmentPaged - ` + :return: An iterator like instance of AppServiceEnvironment + :rtype: + ~azure.mgmt.web.models.AppServiceEnvironmentPaged[~azure.mgmt.web.models.AppServiceEnvironment] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -155,7 +156,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -190,13 +191,10 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`AppServiceEnvironmentResource - ` or - :class:`ClientRawResponse` if + :return: AppServiceEnvironmentResource or ClientRawResponse if raw=true - :rtype: :class:`AppServiceEnvironmentResource - ` or - :class:`ClientRawResponse` + :rtype: ~azure.mgmt.web.models.AppServiceEnvironmentResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -224,7 +222,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -242,36 +240,9 @@ def get( return deserialized - def create_or_update( - self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update an App Service Environment. - - Create or update an App Service Environment. - :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 Service Environment. - :type name: str - :param hosting_environment_envelope: Configuration details of the App - Service Environment. - :type hosting_environment_envelope: - :class:`AppServiceEnvironmentResource - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`AppServiceEnvironmentResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_or_update_initial( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}' path_format_arguments = { @@ -299,19 +270,77 @@ def create_or_update( body_content = self._serialize.body(hosting_environment_envelope, 'AppServiceEnvironmentResource') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServiceEnvironmentResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, hosting_environment_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update an App Service Environment. + + Create or update an App Service Environment. + + :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 Service Environment. + :type name: str + :param hosting_environment_envelope: Configuration details of the App + Service Environment. + :type hosting_environment_envelope: + ~azure.mgmt.web.models.AppServiceEnvironmentResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + AppServiceEnvironmentResource or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.AppServiceEnvironmentResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + hosting_environment_envelope=hosting_environment_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -320,12 +349,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServiceEnvironmentResource', response) + deserialized = self._deserialize('AppServiceEnvironmentResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -333,10 +357,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -344,34 +364,9 @@ def get_long_running_output(response): long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) - def delete( - self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): - """Delete an App Service Environment. - - Delete an App Service Environment. - :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 Service Environment. - :type name: str - :param force_delete: Specify true to force the deletion - even if the App Service Environment contains resources. The default is - false. - :type force_delete: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns None or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _delete_initial( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}' path_format_arguments = { @@ -398,18 +393,66 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [202, 204, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, name, force_delete=None, custom_headers=None, raw=False, **operation_config): + """Delete an App Service Environment. + + Delete an App Service Environment. + + :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 Service Environment. + :type name: str + :param force_delete: Specify true to force the deletion + even if the App Service Environment contains resources. The default is + false. + :type force_delete: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + name=name, + force_delete=force_delete, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -422,10 +465,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -451,10 +490,9 @@ def list_capacities( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`StampCapacity - ` - :rtype: :class:`StampCapacityPaged - ` + :return: An iterator like instance of StampCapacity + :rtype: + ~azure.mgmt.web.models.StampCapacityPaged[~azure.mgmt.web.models.StampCapacity] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -490,7 +528,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -525,13 +563,9 @@ def list_vips( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`AddressResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`AddressResponse - ` or - :class:`ClientRawResponse` + :return: AddressResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.AddressResponse or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -559,7 +593,7 @@ def list_vips( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -593,13 +627,9 @@ def list_diagnostics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`HostingEnvironmentDiagnostics - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`HostingEnvironmentDiagnostics - ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.HostingEnvironmentDiagnostics] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -627,7 +657,7 @@ def list_diagnostics( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -663,13 +693,10 @@ def get_diagnostics_item( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HostingEnvironmentDiagnostics - ` or - :class:`ClientRawResponse` if + :return: HostingEnvironmentDiagnostics or ClientRawResponse if raw=true - :rtype: :class:`HostingEnvironmentDiagnostics - ` or - :class:`ClientRawResponse` + :rtype: ~azure.mgmt.web.models.HostingEnvironmentDiagnostics or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -698,7 +725,7 @@ def get_diagnostics_item( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -732,13 +759,9 @@ def list_metric_definitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`MetricDefinition - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`MetricDefinition - ` or - :class:`ClientRawResponse` + :return: MetricDefinition or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.MetricDefinition or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -766,7 +789,7 @@ def list_metric_definitions( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -809,10 +832,9 @@ def list_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetric - ` - :rtype: :class:`ResourceMetricPaged - ` + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -852,7 +874,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -887,10 +909,9 @@ def list_multi_role_pools( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`WorkerPoolResource - ` - :rtype: :class:`WorkerPoolResourcePaged - ` + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.models.WorkerPoolResourcePaged[~azure.mgmt.web.models.WorkerPoolResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -926,7 +947,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -961,13 +982,9 @@ def get_multi_role_pool( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`WorkerPoolResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`WorkerPoolResource - ` or - :class:`ClientRawResponse` + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -995,7 +1012,7 @@ def get_multi_role_pool( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1013,34 +1030,9 @@ def get_multi_role_pool( return deserialized - def create_or_update_multi_role_pool( - self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update a multi-role pool. - - Create or update a multi-role pool. - :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 Service Environment. - :type name: str - :param multi_role_pool_envelope: Properties of the multi-role pool. - :type multi_role_pool_envelope: :class:`WorkerPoolResource - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`WorkerPoolResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_or_update_multi_role_pool_initial( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default' path_format_arguments = { @@ -1068,19 +1060,76 @@ def create_or_update_multi_role_pool( body_content = self._serialize.body(multi_role_pool_envelope, 'WorkerPoolResource') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_multi_role_pool( + self, resource_group_name, name, multi_role_pool_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a multi-role pool. + + Create or update a multi-role pool. + + :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 Service Environment. + :type name: str + :param multi_role_pool_envelope: Properties of the multi-role pool. + :type multi_role_pool_envelope: + ~azure.mgmt.web.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + WorkerPoolResource or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.WorkerPoolResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_multi_role_pool_initial( + resource_group_name=resource_group_name, + name=name, + multi_role_pool_envelope=multi_role_pool_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -1089,12 +1138,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) + deserialized = self._deserialize('WorkerPoolResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -1102,10 +1146,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -1133,10 +1173,9 @@ def list_multi_role_pool_instance_metric_definitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetricDefinition - ` - :rtype: :class:`ResourceMetricDefinitionPaged - ` + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1173,7 +1212,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1215,10 +1254,9 @@ def list_multi_role_pool_instance_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetric - ` - :rtype: :class:`ResourceMetricPaged - ` + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1257,7 +1295,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1294,10 +1332,9 @@ def list_multi_role_metric_definitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetricDefinition - ` - :rtype: :class:`ResourceMetricDefinitionPaged - ` + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1333,7 +1370,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1383,10 +1420,9 @@ def list_multi_role_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetric - ` - :rtype: :class:`ResourceMetricPaged - ` + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1432,7 +1468,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1467,9 +1503,9 @@ def list_multi_role_pool_skus( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`SkuInfo - ` - :rtype: :class:`SkuInfoPaged ` + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.models.SkuInfoPaged[~azure.mgmt.web.models.SkuInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1505,7 +1541,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1540,9 +1576,9 @@ def list_multi_role_usages( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Usage - ` - :rtype: :class:`UsagePaged ` + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.models.UsagePaged[~azure.mgmt.web.models.Usage] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1578,7 +1614,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1613,11 +1649,9 @@ def list_operations( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`Operation ` - or :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`Operation ` - or :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.Operation] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1645,7 +1679,7 @@ def list_operations( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1679,11 +1713,8 @@ def reboot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1711,7 +1742,7 @@ def reboot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202, 400, 404, 409]: exp = CloudError(response) @@ -1722,6 +1753,54 @@ def reboot( client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def _resume_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume' + 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + def resume( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): """Resume an App Service Environment. @@ -1736,64 +1815,58 @@ def resume( :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: An iterator like instance of :class:`Site - ` - :rtype: :class:`SitePaged ` + :return: An instance of AzureOperationPoller that returns + WebAppCollection or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.WebAppCollection] + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume' - 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) + raw_result = self._resume_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + # Construct and send request + def long_running_send(): + return raw_result.response - else: - url = next_link - query_parameters = {} + def get_long_running_status(status_link, headers=None): - # Construct headers + request = self._client.get(status_link) + if headers: + request.headers.update(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') + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) + def get_long_running_output(response): if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - return response + deserialized = self._deserialize('WebAppCollection', response) - # Deserialize response - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if raw: - header_dict = {} - client_raw_response = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + return deserialized - return deserialized + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) def list_app_service_plans( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): @@ -1811,10 +1884,9 @@ def list_app_service_plans( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`AppServicePlan - ` - :rtype: :class:`AppServicePlanPaged - ` + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.models.AppServicePlanPaged[~azure.mgmt.web.models.AppServicePlan] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1850,7 +1922,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1888,9 +1960,8 @@ def list_web_apps( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Site - ` - :rtype: :class:`SitePaged ` + :return: An iterator like instance of Site + :rtype: ~azure.mgmt.web.models.SitePaged[~azure.mgmt.web.models.Site] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1928,7 +1999,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1947,6 +2018,54 @@ def internal_paging(next_link=None, raw=False): return deserialized + + def _suspend_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend' + 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + def suspend( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): """Suspend an App Service Environment. @@ -1961,64 +2080,58 @@ def suspend( :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: An iterator like instance of :class:`Site - ` - :rtype: :class:`SitePaged ` + :return: An instance of AzureOperationPoller that returns + WebAppCollection or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.WebAppCollection] + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend' - 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) + raw_result = self._suspend_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + # Construct and send request + def long_running_send(): + return raw_result.response - else: - url = next_link - query_parameters = {} + def get_long_running_status(status_link, headers=None): - # Construct headers + request = self._client.get(status_link) + if headers: + request.headers.update(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') + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] + return self._client.send( + request, header_parameters, stream=False, **operation_config) - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) + def get_long_running_output(response): if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - return response + deserialized = self._deserialize('WebAppCollection', response) - # Deserialize response - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if raw: - header_dict = {} - client_raw_response = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + return deserialized - return deserialized + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) def list_usages( self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): @@ -2042,10 +2155,9 @@ def list_usages( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`CsmUsageQuota - ` - :rtype: :class:`CsmUsageQuotaPaged - ` + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.models.CsmUsageQuotaPaged[~azure.mgmt.web.models.CsmUsageQuota] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2083,7 +2195,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2118,10 +2230,9 @@ def list_worker_pools( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`WorkerPoolResource - ` - :rtype: :class:`WorkerPoolResourcePaged - ` + :return: An iterator like instance of WorkerPoolResource + :rtype: + ~azure.mgmt.web.models.WorkerPoolResourcePaged[~azure.mgmt.web.models.WorkerPoolResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2157,7 +2268,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2194,13 +2305,9 @@ def get_worker_pool( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`WorkerPoolResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`WorkerPoolResource - ` or - :class:`ClientRawResponse` + :return: WorkerPoolResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.WorkerPoolResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2229,7 +2336,7 @@ def get_worker_pool( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2247,36 +2354,9 @@ def get_worker_pool( return deserialized - def create_or_update_worker_pool( - self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): - """Create or update a worker pool. - - Create or update a worker pool. - :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 Service Environment. - :type name: str - :param worker_pool_name: Name of the worker pool. - :type worker_pool_name: str - :param worker_pool_envelope: Properties of the worker pool. - :type worker_pool_envelope: :class:`WorkerPoolResource - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`WorkerPoolResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_or_update_worker_pool_initial( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}' path_format_arguments = { @@ -2305,19 +2385,78 @@ def create_or_update_worker_pool( body_content = self._serialize.body(worker_pool_envelope, 'WorkerPoolResource') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 202, 400, 404, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WorkerPoolResource', response) + if response.status_code == 202: + deserialized = self._deserialize('WorkerPoolResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_worker_pool( + self, resource_group_name, name, worker_pool_name, worker_pool_envelope, custom_headers=None, raw=False, **operation_config): + """Create or update a worker pool. + + Create or update a worker pool. + + :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 Service Environment. + :type name: str + :param worker_pool_name: Name of the worker pool. + :type worker_pool_name: str + :param worker_pool_envelope: Properties of the worker pool. + :type worker_pool_envelope: ~azure.mgmt.web.models.WorkerPoolResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + WorkerPoolResource or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.WorkerPoolResource] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_worker_pool_initial( + resource_group_name=resource_group_name, + name=name, + worker_pool_name=worker_pool_name, + worker_pool_envelope=worker_pool_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -2326,12 +2465,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('WorkerPoolResource', response) - if response.status_code == 202: - deserialized = self._deserialize('WorkerPoolResource', response) + deserialized = self._deserialize('WorkerPoolResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -2339,10 +2473,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -2372,10 +2502,9 @@ def list_worker_pool_instance_metric_definitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetricDefinition - ` - :rtype: :class:`ResourceMetricDefinitionPaged - ` + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2413,7 +2542,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2463,10 +2592,9 @@ def list_worker_pool_instance_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetric - ` - :rtype: :class:`ResourceMetricPaged - ` + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2508,7 +2636,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2545,10 +2673,9 @@ def list_web_worker_metric_definitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetricDefinition - ` - :rtype: :class:`ResourceMetricDefinitionPaged - ` + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2585,7 +2712,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2633,10 +2760,9 @@ def list_web_worker_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetric - ` - :rtype: :class:`ResourceMetricPaged - ` + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2677,7 +2803,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2714,9 +2840,9 @@ def list_worker_pool_skus( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`SkuInfo - ` - :rtype: :class:`SkuInfoPaged ` + :return: An iterator like instance of SkuInfo + :rtype: + ~azure.mgmt.web.models.SkuInfoPaged[~azure.mgmt.web.models.SkuInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2753,7 +2879,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2790,9 +2916,9 @@ def list_web_worker_usages( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Usage - ` - :rtype: :class:`UsagePaged ` + :return: An iterator like instance of Usage + :rtype: + ~azure.mgmt.web.models.UsagePaged[~azure.mgmt.web.models.Usage] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2829,7 +2955,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-web/azure/mgmt/web/operations/app_service_plans_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/app_service_plans_operations.py index f16b9cd3a830..16899b1ec83d 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/app_service_plans_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/app_service_plans_operations.py @@ -12,6 +12,7 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError from msrestazure.azure_operation import AzureOperationPoller from .. import models @@ -27,6 +28,8 @@ class AppServicePlansOperations(object): :ivar api_version: API Version. Constant value: "2016-09-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -52,10 +55,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`AppServicePlan - ` - :rtype: :class:`AppServicePlanPaged - ` + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.models.AppServicePlanPaged[~azure.mgmt.web.models.AppServicePlan] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -91,7 +93,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -124,10 +126,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`AppServicePlan - ` - :rtype: :class:`AppServicePlanPaged - ` + :return: An iterator like instance of AppServicePlan + :rtype: + ~azure.mgmt.web.models.AppServicePlanPaged[~azure.mgmt.web.models.AppServicePlan] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -162,7 +163,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -197,12 +198,9 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`AppServicePlan - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`AppServicePlan ` - or :class:`ClientRawResponse` + :return: AppServicePlan or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.AppServicePlan or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -230,7 +228,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -248,34 +246,9 @@ def get( return deserialized - def create_or_update( - self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): - """Creates or updates an App Service Plan. - - Creates or updates an App Service Plan. - :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 Service plan. - :type name: str - :param app_service_plan: Details of the App Service plan. - :type app_service_plan: :class:`AppServicePlan - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`AppServicePlan - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_or_update_initial( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}' path_format_arguments = { @@ -303,19 +276,75 @@ def create_or_update( body_content = self._serialize.body(app_service_plan, 'AppServicePlan') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('AppServicePlan', response) + if response.status_code == 202: + deserialized = self._deserialize('AppServicePlan', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, name, app_service_plan, custom_headers=None, raw=False, **operation_config): + """Creates or updates an App Service Plan. + + Creates or updates an App Service Plan. + + :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 Service plan. + :type name: str + :param app_service_plan: Details of the App Service plan. + :type app_service_plan: ~azure.mgmt.web.models.AppServicePlan + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + AppServicePlan or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.AppServicePlan] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + app_service_plan=app_service_plan, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -324,12 +353,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('AppServicePlan', response) - if response.status_code == 202: - deserialized = self._deserialize('AppServicePlan', response) + deserialized = self._deserialize('AppServicePlan', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -337,10 +361,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -364,11 +384,8 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -396,7 +413,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -423,12 +440,9 @@ def list_capabilities( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`Capability - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`Capability ` - or :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.Capability] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -456,7 +470,7 @@ def list_capabilities( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -494,13 +508,9 @@ def get_hybrid_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HybridConnection - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnection - ` or - :class:`ClientRawResponse` + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -530,7 +540,7 @@ def get_hybrid_connection( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -568,11 +578,8 @@ def delete_hybrid_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -602,7 +609,7 @@ def delete_hybrid_connection( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -633,13 +640,9 @@ def list_hybrid_connection_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HybridConnectionKey - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnectionKey - ` or - :class:`ClientRawResponse` + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -669,7 +672,7 @@ def list_hybrid_connection_keys( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -708,7 +711,7 @@ def list_web_apps_by_hybrid_connection( :param operation_config: :ref:`Operation configuration overrides`. :return: An iterator like instance of str - :rtype: :class:`StrPaged ` + :rtype: ~azure.mgmt.web.models.StrPaged[str] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -746,7 +749,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -783,13 +786,9 @@ def get_hybrid_connection_plan_limit( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HybridConnectionLimits - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnectionLimits - ` or - :class:`ClientRawResponse` + :return: HybridConnectionLimits or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnectionLimits or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -817,7 +816,7 @@ def get_hybrid_connection_plan_limit( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -851,10 +850,9 @@ def list_hybrid_connections( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`HybridConnection - ` - :rtype: :class:`HybridConnectionPaged - ` + :return: An iterator like instance of HybridConnection + :rtype: + ~azure.mgmt.web.models.HybridConnectionPaged[~azure.mgmt.web.models.HybridConnection] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -890,7 +888,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -927,10 +925,9 @@ def list_metric_defintions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetricDefinition - ` - :rtype: :class:`ResourceMetricDefinitionPaged - ` + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -966,7 +963,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1010,10 +1007,9 @@ def list_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetric - ` - :rtype: :class:`ResourceMetricPaged - ` + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1053,7 +1049,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1093,11 +1089,8 @@ def restart_web_apps( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1127,7 +1120,7 @@ def restart_web_apps( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -1164,9 +1157,8 @@ def list_web_apps( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Site - ` - :rtype: :class:`SitePaged ` + :return: An iterator like instance of Site + :rtype: ~azure.mgmt.web.models.SitePaged[~azure.mgmt.web.models.Site] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1208,7 +1200,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1243,11 +1235,9 @@ def list_vnets( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`VnetInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`VnetInfo ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1275,7 +1265,7 @@ def list_vnets( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1311,11 +1301,9 @@ def get_vnet_from_server_farm( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VnetInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetInfo ` or - :class:`ClientRawResponse` + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1344,7 +1332,7 @@ def get_vnet_from_server_farm( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -1383,11 +1371,9 @@ def get_vnet_gateway( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VnetGateway ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetGateway ` or - :class:`ClientRawResponse` + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1417,7 +1403,7 @@ def get_vnet_gateway( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1452,18 +1438,15 @@ def update_vnet_gateway( is supported. :type gateway_name: str :param connection_envelope: Definition of the gateway. - :type connection_envelope: :class:`VnetGateway - ` + :type connection_envelope: ~azure.mgmt.web.models.VnetGateway :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: :class:`VnetGateway ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetGateway ` or - :class:`ClientRawResponse` + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1497,7 +1480,7 @@ def update_vnet_gateway( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1535,11 +1518,9 @@ def list_routes_for_vnet( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`VnetRoute ` - or :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`VnetRoute ` - or :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1568,7 +1549,7 @@ def list_routes_for_vnet( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1606,11 +1587,9 @@ def get_route_for_vnet( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`VnetRoute ` - or :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`VnetRoute ` - or :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.VnetRoute] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1640,7 +1619,7 @@ def get_route_for_vnet( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -1674,17 +1653,15 @@ def create_or_update_vnet_route( :param route_name: Name of the Virtual Network route. :type route_name: str :param route: Definition of the Virtual Network route. - :type route: :class:`VnetRoute ` + :type route: ~azure.mgmt.web.models.VnetRoute :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: :class:`VnetRoute ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetRoute ` or - :class:`ClientRawResponse` + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1718,7 +1695,7 @@ def create_or_update_vnet_route( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 400, 404]: exp = CloudError(response) @@ -1756,11 +1733,8 @@ def delete_vnet_route( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1790,7 +1764,7 @@ def delete_vnet_route( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -1817,17 +1791,15 @@ def update_vnet_route( :param route_name: Name of the Virtual Network route. :type route_name: str :param route: Definition of the Virtual Network route. - :type route: :class:`VnetRoute ` + :type route: ~azure.mgmt.web.models.VnetRoute :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: :class:`VnetRoute ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetRoute ` or - :class:`ClientRawResponse` + :return: VnetRoute or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetRoute or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1861,7 +1833,7 @@ def update_vnet_route( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 400, 404]: exp = CloudError(response) @@ -1898,11 +1870,8 @@ def reboot_worker( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1931,7 +1900,7 @@ def reboot_worker( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) diff --git a/azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py index df91dd69a593..6df0bd2b6cbe 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py @@ -26,6 +26,8 @@ class CertificatesOperations(object): :ivar api_version: API Version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -46,10 +48,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Certificate - ` - :rtype: :class:`CertificatePaged - ` + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.models.CertificatePaged[~azure.mgmt.web.models.Certificate] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -83,7 +84,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -116,10 +117,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Certificate - ` - :rtype: :class:`CertificatePaged - ` + :return: An iterator like instance of Certificate + :rtype: + ~azure.mgmt.web.models.CertificatePaged[~azure.mgmt.web.models.Certificate] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -154,7 +154,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -189,11 +189,9 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Certificate ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Certificate ` or - :class:`ClientRawResponse` + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Certificate or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -221,7 +219,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -252,18 +250,15 @@ def create_or_update( :type name: str :param certificate_envelope: Details of certificate, if it exists already. - :type certificate_envelope: :class:`Certificate - ` + :type certificate_envelope: ~azure.mgmt.web.models.Certificate :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: :class:`Certificate ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Certificate ` or - :class:`ClientRawResponse` + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Certificate or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -295,7 +290,7 @@ def create_or_update( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -329,11 +324,8 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -361,7 +353,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -385,18 +377,15 @@ def update( :type name: str :param certificate_envelope: Details of certificate, if it exists already. - :type certificate_envelope: :class:`Certificate - ` + :type certificate_envelope: ~azure.mgmt.web.models.Certificate :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: :class:`Certificate ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Certificate ` or - :class:`ClientRawResponse` + :return: Certificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Certificate or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -428,7 +417,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-web/azure/mgmt/web/operations/deleted_web_apps_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/deleted_web_apps_operations.py index 0640bbac8cad..8caf9aff5d22 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/deleted_web_apps_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/deleted_web_apps_operations.py @@ -26,6 +26,8 @@ class DeletedWebAppsOperations(object): :ivar api_version: API Version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -46,10 +48,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`DeletedSite - ` - :rtype: :class:`DeletedSitePaged - ` + :return: An iterator like instance of DeletedSite + :rtype: + ~azure.mgmt.web.models.DeletedSitePaged[~azure.mgmt.web.models.DeletedSite] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -83,7 +84,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py index 24577afcfb00..f295ec34711d 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py @@ -12,6 +12,7 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError from msrestazure.azure_operation import AzureOperationPoller from .. import models @@ -27,6 +28,8 @@ class DomainsOperations(object): :ivar api_version: API Version. Constant value: "2015-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -49,13 +52,10 @@ def check_availability( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`DomainAvailablilityCheckResult - ` or - :class:`ClientRawResponse` if + :return: DomainAvailablilityCheckResult or ClientRawResponse if raw=true - :rtype: :class:`DomainAvailablilityCheckResult - ` or - :class:`ClientRawResponse` + :rtype: ~azure.mgmt.web.models.DomainAvailablilityCheckResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ identifier = models.NameIdentifier(name=name) @@ -87,7 +87,7 @@ def check_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -116,9 +116,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Domain - ` - :rtype: :class:`DomainPaged ` + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.models.DomainPaged[~azure.mgmt.web.models.Domain] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -152,7 +152,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -182,13 +182,10 @@ def get_control_center_sso_request( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`DomainControlCenterSsoRequest - ` or - :class:`ClientRawResponse` if + :return: DomainControlCenterSsoRequest or ClientRawResponse if raw=true - :rtype: :class:`DomainControlCenterSsoRequest - ` or - :class:`ClientRawResponse` + :rtype: ~azure.mgmt.web.models.DomainControlCenterSsoRequest or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -214,7 +211,7 @@ def get_control_center_sso_request( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -248,10 +245,9 @@ def list_recommendations( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`NameIdentifier - ` - :rtype: :class:`NameIdentifierPaged - ` + :return: An iterator like instance of NameIdentifier + :rtype: + ~azure.mgmt.web.models.NameIdentifierPaged[~azure.mgmt.web.models.NameIdentifier] :raises: :class:`CloudError` """ parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) @@ -290,7 +286,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -323,9 +319,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Domain - ` - :rtype: :class:`DomainPaged ` + :return: An iterator like instance of Domain + :rtype: + ~azure.mgmt.web.models.DomainPaged[~azure.mgmt.web.models.Domain] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -360,7 +356,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -395,11 +391,9 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Domain ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Domain ` or - :class:`ClientRawResponse` + :return: Domain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Domain or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -427,7 +421,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -445,32 +439,9 @@ def get( return deserialized - def create_or_update( - self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): - """Creates or updates a domain. - - Creates or updates a domain. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param domain_name: Name of the domain. - :type domain_name: str - :param domain: Domain registration information. - :type domain: :class:`Domain ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`Domain ` - or :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_or_update_initial( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}' path_format_arguments = { @@ -498,33 +469,84 @@ def create_or_update( body_content = self._serialize.body(domain, 'Domain') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Domain', response) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update( + self, resource_group_name, domain_name, domain, custom_headers=None, raw=False, **operation_config): + """Creates or updates a domain. + + Creates or updates a domain. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param domain_name: Name of the domain. + :type domain_name: str + :param domain: Domain registration information. + :type domain: ~azure.mgmt.web.models.Domain + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns Domain or + ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.Domain] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + domain_name=domain_name, + domain=domain, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - if response.status_code not in [202, 200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 202: - deserialized = self._deserialize('Domain', response) - if response.status_code == 200: - deserialized = self._deserialize('Domain', response) + deserialized = self._deserialize('Domain', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -532,10 +554,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -563,11 +581,8 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -597,7 +612,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -624,11 +639,9 @@ def list_ownership_identifiers( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of - :class:`DomainOwnershipIdentifier - ` - :rtype: :class:`DomainOwnershipIdentifierPaged - ` + :return: An iterator like instance of DomainOwnershipIdentifier + :rtype: + ~azure.mgmt.web.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.models.DomainOwnershipIdentifier] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -664,7 +677,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -701,13 +714,9 @@ def get_ownership_identifier( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`DomainOwnershipIdentifier - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`DomainOwnershipIdentifier - ` or - :class:`ClientRawResponse` + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.DomainOwnershipIdentifier or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -736,7 +745,7 @@ def get_ownership_identifier( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -771,20 +780,16 @@ def create_or_update_ownership_identifier( :type name: str :param domain_ownership_identifier: A JSON representation of the domain ownership properties. - :type domain_ownership_identifier: :class:`DomainOwnershipIdentifier - ` + :type domain_ownership_identifier: + ~azure.mgmt.web.models.DomainOwnershipIdentifier :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: :class:`DomainOwnershipIdentifier - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`DomainOwnershipIdentifier - ` or - :class:`ClientRawResponse` + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.DomainOwnershipIdentifier or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -817,7 +822,7 @@ def create_or_update_ownership_identifier( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -853,11 +858,8 @@ def delete_ownership_identifier( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -886,7 +888,7 @@ def delete_ownership_identifier( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -914,20 +916,16 @@ def update_ownership_identifier( :type name: str :param domain_ownership_identifier: A JSON representation of the domain ownership properties. - :type domain_ownership_identifier: :class:`DomainOwnershipIdentifier - ` + :type domain_ownership_identifier: + ~azure.mgmt.web.models.DomainOwnershipIdentifier :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: :class:`DomainOwnershipIdentifier - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`DomainOwnershipIdentifier - ` or - :class:`ClientRawResponse` + :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.DomainOwnershipIdentifier or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -960,7 +958,7 @@ def update_ownership_identifier( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py index 0918c57dbdb9..52d776bdf39e 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py @@ -26,6 +26,8 @@ class ProviderOperations(object): :ivar api_version: API Version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -46,11 +48,8 @@ def get_available_stacks( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: object or - :class:`ClientRawResponse` if - raw=true - :rtype: object or - :class:`ClientRawResponse` + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -72,7 +71,7 @@ def get_available_stacks( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -99,10 +98,9 @@ def list_operations( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`CsmOperationDescription - ` - :rtype: :class:`CsmOperationDescriptionPaged - ` + :return: An iterator like instance of CsmOperationDescription + :rtype: + ~azure.mgmt.web.models.CsmOperationDescriptionPaged[~azure.mgmt.web.models.CsmOperationDescription] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -132,7 +130,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -162,11 +160,8 @@ def get_available_stacks_on_prem( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: object or - :class:`ClientRawResponse` if - raw=true - :rtype: object or - :class:`ClientRawResponse` + :return: object or ClientRawResponse if raw=true + :rtype: object or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -192,7 +187,7 @@ def get_available_stacks_on_prem( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py index 0fdd644c4076..d5d18e611f3e 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py @@ -26,6 +26,8 @@ class RecommendationsOperations(object): :ivar api_version: API Version. Constant value: "2016-03-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -55,13 +57,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`Recommendation - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`Recommendation - ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.Recommendation] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -91,7 +89,7 @@ def list( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -120,11 +118,8 @@ def reset_all_filters( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -150,7 +145,7 @@ def reset_all_filters( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -184,13 +179,9 @@ def list_history_for_web_app( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`Recommendation - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`Recommendation - ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.Recommendation] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -220,7 +211,7 @@ def list_history_for_web_app( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -262,13 +253,9 @@ def list_recommended_rules_for_web_app( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`Recommendation - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`Recommendation - ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.Recommendation] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -300,7 +287,7 @@ def list_recommended_rules_for_web_app( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -334,11 +321,8 @@ def disable_all_for_web_app( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -366,7 +350,7 @@ def disable_all_for_web_app( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -393,11 +377,8 @@ def reset_all_filters_for_web_app( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -425,7 +406,7 @@ def reset_all_filters_for_web_app( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -457,13 +438,9 @@ def get_rule_details_by_web_app( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`RecommendationRule - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RecommendationRule - ` or - :class:`ClientRawResponse` + :return: RecommendationRule or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RecommendationRule or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -494,7 +471,7 @@ def get_rule_details_by_web_app( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-web/azure/mgmt/web/operations/top_level_domains_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/top_level_domains_operations.py index ce7232f947c0..d53d59b6d3f5 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/top_level_domains_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/top_level_domains_operations.py @@ -26,6 +26,8 @@ class TopLevelDomainsOperations(object): :ivar api_version: API Version. Constant value: "2015-04-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -46,10 +48,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`TopLevelDomain - ` - :rtype: :class:`TopLevelDomainPaged - ` + :return: An iterator like instance of TopLevelDomain + :rtype: + ~azure.mgmt.web.models.TopLevelDomainPaged[~azure.mgmt.web.models.TopLevelDomain] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -83,7 +84,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -115,12 +116,9 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`TopLevelDomain - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`TopLevelDomain ` - or :class:`ClientRawResponse` + :return: TopLevelDomain or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.TopLevelDomain or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -147,7 +145,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -188,10 +186,9 @@ def list_agreements( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`TldLegalAgreement - ` - :rtype: :class:`TldLegalAgreementPaged - ` + :return: An iterator like instance of TldLegalAgreement + :rtype: + ~azure.mgmt.web.models.TldLegalAgreementPaged[~azure.mgmt.web.models.TldLegalAgreement] :raises: :class:`CloudError` """ agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) @@ -231,7 +228,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) 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 96090c1d38f8..b69a6425314c 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 @@ -12,6 +12,7 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError from msrestazure.azure_operation import AzureOperationPoller from .. import models @@ -27,6 +28,8 @@ class WebAppsOperations(object): :ivar api_version: API Version. Constant value: "2016-08-01". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -47,9 +50,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Site - ` - :rtype: :class:`SitePaged ` + :return: An iterator like instance of Site + :rtype: ~azure.mgmt.web.models.SitePaged[~azure.mgmt.web.models.Site] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -83,7 +85,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -120,9 +122,8 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Site - ` - :rtype: :class:`SitePaged ` + :return: An iterator like instance of Site + :rtype: ~azure.mgmt.web.models.SitePaged[~azure.mgmt.web.models.Site] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -159,7 +160,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -194,11 +195,9 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Site ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Site ` or - :class:`ClientRawResponse` + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Site or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -226,7 +225,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -244,6 +243,66 @@ def get( return deserialized + + def _create_or_update_initial( + self, resource_group_name, name, site_envelope, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}' + 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 = {} + if skip_dns_registration is not None: + query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') + if skip_custom_domain_verification is not None: + query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') + if force_dns_registration is not None: + query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool') + if ttl_in_seconds is not None: + query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str') + 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(site_envelope, 'Site') + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + def create_or_update( self, resource_group_name, name, site_envelope, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, **operation_config): """Creates a new web, mobile, or API app in an existing resource group, or @@ -260,7 +319,7 @@ def create_or_update( :type name: str :param site_envelope: A JSON representation of the app properties. See example. - :type site_envelope: :class:`Site ` + :type site_envelope: ~azure.mgmt.web.models.Site :param skip_dns_registration: If true web app hostname is not registered with DNS on creation. This parameter is only used for app creation. @@ -277,64 +336,41 @@ def create_or_update( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`Site ` or - :class:`ClientRawResponse` if - raw=true + :return: An instance of AzureOperationPoller that returns Site or + ClientRawResponse if raw=true :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.Site] + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}' - 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 = {} - if skip_dns_registration is not None: - query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') - if skip_custom_domain_verification is not None: - query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') - if force_dns_registration is not None: - query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool') - if ttl_in_seconds is not None: - query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str') - 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(site_envelope, 'Site') + raw_result = self._create_or_update_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + skip_dns_registration=skip_dns_registration, + skip_custom_domain_verification=skip_custom_domain_verification, + force_dns_registration=force_dns_registration, + ttl_in_seconds=ttl_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result # Construct and send request def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -343,12 +379,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) + deserialized = self._deserialize('Site', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -356,10 +387,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -391,11 +418,8 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -429,7 +453,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -458,13 +482,9 @@ def analyze_custom_hostname( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`CustomHostnameAnalysisResult - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`CustomHostnameAnalysisResult - ` or - :class:`ClientRawResponse` + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -494,7 +514,7 @@ def analyze_custom_hostname( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -535,11 +555,8 @@ def apply_slot_config_to_production( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) @@ -573,7 +590,7 @@ def apply_slot_config_to_production( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -597,18 +614,15 @@ def backup( :type name: str :param request: Backup configuration. You can use the JSON response from the POST action as input here. - :type request: :class:`BackupRequest - ` + :type request: ~azure.mgmt.web.models.BackupRequest :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: :class:`BackupItem ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupItem ` or - :class:`ClientRawResponse` + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.BackupItem or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -640,7 +654,7 @@ def backup( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -674,10 +688,9 @@ def list_backups( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`BackupItem - ` - :rtype: :class:`BackupItemPaged - ` + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.models.BackupItemPaged[~azure.mgmt.web.models.BackupItem] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -713,7 +726,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -747,19 +760,15 @@ def discover_restore( :type name: str :param request: A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. - :type request: :class:`RestoreRequest - ` + :type request: ~azure.mgmt.web.models.RestoreRequest :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: :class:`RestoreRequest - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RestoreRequest ` - or :class:`ClientRawResponse` + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -791,7 +800,7 @@ def discover_restore( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -827,11 +836,9 @@ def get_backup_status( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupItem ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupItem ` or - :class:`ClientRawResponse` + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.BackupItem or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -860,7 +867,7 @@ def get_backup_status( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -896,11 +903,8 @@ def delete_backup( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -929,7 +933,7 @@ def delete_backup( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -960,18 +964,15 @@ def list_backup_status_secrets( :param backup_id: ID of backup. :type backup_id: str :param request: Information on backup request. - :type request: :class:`BackupRequest - ` + :type request: ~azure.mgmt.web.models.BackupRequest :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: :class:`BackupItem ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupItem ` or - :class:`ClientRawResponse` + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.BackupItem or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1004,7 +1005,7 @@ def list_backup_status_secrets( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1022,38 +1023,9 @@ def list_backup_status_secrets( return deserialized - def restore( - self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): - """Restores a specific backup to another app (or deployment slot, if - specified). - - Restores a specific backup to another app (or deployment slot, if - specified). - :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 backup_id: ID of the backup. - :type backup_id: str - :param request: Information on restore request . - :type request: :class:`RestoreRequest - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`RestoreResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _restore_initial( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore' path_format_arguments = { @@ -1082,19 +1054,78 @@ def restore( body_content = self._serialize.body(request, 'RestoreRequest') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RestoreResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restore( + self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, **operation_config): + """Restores a specific backup to another app (or deployment slot, if + specified). + + Restores a specific backup to another app (or deployment slot, if + specified). + + :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 backup_id: ID of the backup. + :type backup_id: str + :param request: Information on restore request . + :type request: ~azure.mgmt.web.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + RestoreResponse or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.RestoreResponse] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._restore_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -1103,10 +1134,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RestoreResponse', response) + deserialized = self._deserialize('RestoreResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -1114,10 +1142,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -1141,10 +1165,9 @@ def list_configurations( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`SiteConfigResource - ` - :rtype: :class:`SiteConfigResourcePaged - ` + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.models.SiteConfigResourcePaged[~azure.mgmt.web.models.SiteConfigResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -1180,7 +1203,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1213,19 +1236,15 @@ def update_application_settings( :param kind: Kind of resource. :type kind: str :param properties: Settings. - :type properties: dict + :type properties: dict[str, 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: :class:`StringDictionary - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`StringDictionary - ` or - :class:`ClientRawResponse` + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ app_settings = models.StringDictionary(kind=kind, properties=properties) @@ -1259,7 +1278,7 @@ def update_application_settings( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1293,13 +1312,9 @@ def list_application_settings( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`StringDictionary - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`StringDictionary - ` or - :class:`ClientRawResponse` + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1327,7 +1342,7 @@ def list_application_settings( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1359,20 +1374,15 @@ def update_auth_settings( :param name: Name of web app. :type name: str :param site_auth_settings: Auth settings associated with web app. - :type site_auth_settings: :class:`SiteAuthSettings - ` + :type site_auth_settings: ~azure.mgmt.web.models.SiteAuthSettings :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: :class:`SiteAuthSettings - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteAuthSettings - ` or - :class:`ClientRawResponse` + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1404,7 +1414,7 @@ def update_auth_settings( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1438,13 +1448,9 @@ def get_auth_settings( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteAuthSettings - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteAuthSettings - ` or - :class:`ClientRawResponse` + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1472,7 +1478,7 @@ def get_auth_settings( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1502,18 +1508,15 @@ def update_backup_configuration( :param name: Name of the app. :type name: str :param request: Edited backup configuration. - :type request: :class:`BackupRequest - ` + :type request: ~azure.mgmt.web.models.BackupRequest :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: :class:`BackupRequest ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupRequest ` - or :class:`ClientRawResponse` + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1545,7 +1548,7 @@ def update_backup_configuration( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1579,11 +1582,8 @@ def delete_backup_configuration( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1611,7 +1611,7 @@ def delete_backup_configuration( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1638,11 +1638,9 @@ def get_backup_configuration( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupRequest ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupRequest ` - or :class:`ClientRawResponse` + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1670,7 +1668,7 @@ def get_backup_configuration( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1702,19 +1700,16 @@ def update_connection_strings( :param kind: Kind of resource. :type kind: str :param properties: Connection strings. - :type properties: dict + :type properties: dict[str, + ~azure.mgmt.web.models.ConnStringValueTypePair] :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: :class:`ConnectionStringDictionary - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ConnectionStringDictionary - ` or - :class:`ClientRawResponse` + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ConnectionStringDictionary or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) @@ -1748,7 +1743,7 @@ def update_connection_strings( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1782,13 +1777,9 @@ def list_connection_strings( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ConnectionStringDictionary - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ConnectionStringDictionary - ` or - :class:`ClientRawResponse` + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ConnectionStringDictionary or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1816,7 +1807,7 @@ def list_connection_strings( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1850,12 +1841,9 @@ def get_diagnostic_logs_configuration( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteLogsConfig - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteLogsConfig ` - or :class:`ClientRawResponse` + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1883,7 +1871,7 @@ def get_diagnostic_logs_configuration( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1914,19 +1902,15 @@ def update_diagnostic_logs_config( :type name: str :param site_logs_config: A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. - :type site_logs_config: :class:`SiteLogsConfig - ` + :type site_logs_config: ~azure.mgmt.web.models.SiteLogsConfig :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: :class:`SiteLogsConfig - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteLogsConfig ` - or :class:`ClientRawResponse` + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -1958,7 +1942,7 @@ def update_diagnostic_logs_config( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -1990,19 +1974,15 @@ def update_metadata( :param kind: Kind of resource. :type kind: str :param properties: Settings. - :type properties: dict + :type properties: dict[str, 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: :class:`StringDictionary - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`StringDictionary - ` or - :class:`ClientRawResponse` + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ metadata = models.StringDictionary(kind=kind, properties=properties) @@ -2036,7 +2016,7 @@ def update_metadata( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2070,13 +2050,9 @@ def list_metadata( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`StringDictionary - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`StringDictionary - ` or - :class:`ClientRawResponse` + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2104,7 +2080,7 @@ def list_metadata( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2122,30 +2098,9 @@ def list_metadata( return deserialized - def list_publishing_credentials( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the Git/FTP publishing credentials of an app. - - Gets the Git/FTP publishing credentials 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 - :return: - :class:`AzureOperationPoller` - instance that returns :class:`User ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _list_publishing_credentials_initial( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list' path_format_arguments = { @@ -2170,18 +2125,69 @@ def list_publishing_credentials( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the Git/FTP publishing credentials of an app. + + Gets the Git/FTP publishing credentials 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 + :return: An instance of AzureOperationPoller that returns User or + ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.User] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._list_publishing_credentials_initial( + resource_group_name=resource_group_name, + name=name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -2190,10 +2196,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) + deserialized = self._deserialize('User', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -2201,10 +2204,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -2224,18 +2223,15 @@ def update_site_push_settings( :param name: Name of web app. :type name: str :param push_settings: Push settings associated with web app. - :type push_settings: :class:`PushSettings - ` + :type push_settings: ~azure.mgmt.web.models.PushSettings :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: :class:`PushSettings ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PushSettings ` or - :class:`ClientRawResponse` + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PushSettings or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2267,7 +2263,7 @@ def update_site_push_settings( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2301,11 +2297,9 @@ def list_site_push_settings( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`PushSettings ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PushSettings ` or - :class:`ClientRawResponse` + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PushSettings or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2333,7 +2327,7 @@ def list_site_push_settings( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2369,13 +2363,9 @@ def list_slot_configuration_names( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SlotConfigNamesResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SlotConfigNamesResource - ` or - :class:`ClientRawResponse` + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2403,7 +2393,7 @@ def list_slot_configuration_names( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2436,20 +2426,16 @@ def update_slot_configuration_names( :type name: str :param slot_config_names: Names of application settings and connection strings. See example. - :type slot_config_names: :class:`SlotConfigNamesResource - ` + :type slot_config_names: + ~azure.mgmt.web.models.SlotConfigNamesResource :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: :class:`SlotConfigNamesResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SlotConfigNamesResource - ` or - :class:`ClientRawResponse` + :return: SlotConfigNamesResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SlotConfigNamesResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2481,7 +2467,7 @@ def update_slot_configuration_names( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2517,13 +2503,9 @@ def get_configuration( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2551,7 +2533,7 @@ def get_configuration( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2582,20 +2564,15 @@ def create_or_update_configuration( :type name: str :param site_config: JSON representation of a SiteConfig object. See example. - :type site_config: :class:`SiteConfigResource - ` + :type site_config: ~azure.mgmt.web.models.SiteConfigResource :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: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2627,7 +2604,7 @@ def create_or_update_configuration( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2658,20 +2635,15 @@ def update_configuration( :type name: str :param site_config: JSON representation of a SiteConfig object. See example. - :type site_config: :class:`SiteConfigResource - ` + :type site_config: ~azure.mgmt.web.models.SiteConfigResource :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: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2703,7 +2675,7 @@ def update_configuration( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2739,13 +2711,9 @@ def list_configuration_snapshot_info( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`SiteConfigurationSnapshotInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`SiteConfigurationSnapshotInfo - ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.SiteConfigurationSnapshotInfo] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2773,7 +2741,7 @@ def list_configuration_snapshot_info( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2811,13 +2779,9 @@ def get_configuration_snapshot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2846,7 +2810,7 @@ def get_configuration_snapshot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -2882,11 +2846,8 @@ def recover_site_configuration_snapshot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -2915,7 +2876,7 @@ def recover_site_configuration_snapshot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -2942,10 +2903,9 @@ def list_continuous_web_jobs( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ContinuousWebJob - ` - :rtype: :class:`ContinuousWebJobPaged - ` + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.models.ContinuousWebJobPaged[~azure.mgmt.web.models.ContinuousWebJob] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -2981,7 +2941,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3020,13 +2980,9 @@ def get_continuous_web_job( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ContinuousWebJob - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ContinuousWebJob - ` or - :class:`ClientRawResponse` + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -3056,7 +3012,7 @@ def get_continuous_web_job( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -3094,11 +3050,8 @@ def delete_continuous_web_job( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -3128,7 +3081,7 @@ def delete_continuous_web_job( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -3159,11 +3112,8 @@ def start_continuous_web_job( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -3193,7 +3143,7 @@ def start_continuous_web_job( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -3224,11 +3174,8 @@ def stop_continuous_web_job( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -3258,7 +3205,7 @@ def stop_continuous_web_job( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -3285,10 +3232,9 @@ def list_deployments( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Deployment - ` - :rtype: :class:`DeploymentPaged - ` + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.models.DeploymentPaged[~azure.mgmt.web.models.Deployment] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -3324,7 +3270,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3361,11 +3307,9 @@ def get_deployment( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Deployment ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Deployment ` or - :class:`ClientRawResponse` + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Deployment or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -3394,7 +3338,7 @@ def get_deployment( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3426,18 +3370,15 @@ def create_deployment( :param id: ID of an existing deployment. :type id: str :param deployment: Deployment details. - :type deployment: :class:`Deployment - ` + :type deployment: ~azure.mgmt.web.models.Deployment :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: :class:`Deployment ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Deployment ` or - :class:`ClientRawResponse` + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Deployment or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -3470,7 +3411,7 @@ def create_deployment( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3506,11 +3447,8 @@ def delete_deployment( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -3539,7 +3477,7 @@ def delete_deployment( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -3572,11 +3510,9 @@ def list_deployment_log( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Deployment ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Deployment ` or - :class:`ClientRawResponse` + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Deployment or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -3605,7 +3541,7 @@ def list_deployment_log( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3639,10 +3575,9 @@ def list_domain_ownership_identifiers( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Identifier - ` - :rtype: :class:`IdentifierPaged - ` + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.models.IdentifierPaged[~azure.mgmt.web.models.Identifier] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -3678,7 +3613,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3716,11 +3651,9 @@ def get_domain_ownership_identifier( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Identifier ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Identifier ` or - :class:`ClientRawResponse` + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Identifier or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -3749,7 +3682,7 @@ def get_domain_ownership_identifier( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3792,11 +3725,9 @@ def create_or_update_domain_ownership_identifier( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Identifier ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Identifier ` or - :class:`ClientRawResponse` + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Identifier or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) @@ -3831,7 +3762,7 @@ def create_or_update_domain_ownership_identifier( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -3868,11 +3799,8 @@ def delete_domain_ownership_identifier( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -3901,7 +3829,7 @@ def delete_domain_ownership_identifier( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -3937,11 +3865,9 @@ def update_domain_ownership_identifier( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Identifier ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Identifier ` or - :class:`ClientRawResponse` + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Identifier or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) @@ -3976,7 +3902,7 @@ def update_domain_ownership_identifier( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -4010,12 +3936,9 @@ def get_ms_deploy_status( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`MSDeployStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`MSDeployStatus ` - or :class:`ClientRawResponse` + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -4043,7 +3966,7 @@ def get_ms_deploy_status( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -4061,33 +3984,9 @@ def get_ms_deploy_status( return deserialized - def create_ms_deploy_operation( - self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): - """Invoke the MSDeploy web app extension. - - Invoke the MSDeploy web app extension. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Name of web app. - :type name: str - :param ms_deploy: Details of MSDeploy operation - :type ms_deploy: :class:`MSDeploy ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`MSDeployStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_ms_deploy_operation_initial( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy' path_format_arguments = { @@ -4115,19 +4014,73 @@ def create_ms_deploy_operation( body_content = self._serialize.body(ms_deploy, 'MSDeploy') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation( + self, resource_group_name, name, ms_deploy, custom_headers=None, raw=False, **operation_config): + """Invoke the MSDeploy web app extension. + + Invoke the MSDeploy web app extension. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param ms_deploy: Details of MSDeploy operation + :type ms_deploy: ~azure.mgmt.web.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + MSDeployStatus or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.MSDeployStatus] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_ms_deploy_operation_initial( + resource_group_name=resource_group_name, + name=name, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -4136,10 +4089,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) + deserialized = self._deserialize('MSDeployStatus', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -4147,10 +4097,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -4174,11 +4120,9 @@ def get_ms_deploy_log( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`MSDeployLog ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`MSDeployLog ` or - :class:`ClientRawResponse` + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -4206,7 +4150,7 @@ def get_ms_deploy_log( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -4240,10 +4184,9 @@ def list_functions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`FunctionEnvelope - ` - :rtype: :class:`FunctionEnvelopePaged - ` + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.models.FunctionEnvelopePaged[~azure.mgmt.web.models.FunctionEnvelope] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -4279,7 +4222,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -4314,11 +4257,8 @@ def get_functions_admin_token( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: str or - :class:`ClientRawResponse` if - raw=true - :rtype: str or - :class:`ClientRawResponse` + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -4346,7 +4286,7 @@ def get_functions_admin_token( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -4382,13 +4322,9 @@ def get_function( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`FunctionEnvelope - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`FunctionEnvelope - ` or - :class:`ClientRawResponse` + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -4417,7 +4353,7 @@ def get_function( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -4435,36 +4371,9 @@ def get_function( return deserialized - def create_function( - self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): - """Create function for web site, or a deployment slot. - - Create function for web site, or a deployment slot. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Site name. - :type name: str - :param function_name: Function name. - :type function_name: str - :param function_envelope: Function details. - :type function_envelope: :class:`FunctionEnvelope - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`FunctionEnvelope - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_function_initial( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/{functionName}' path_format_arguments = { @@ -4493,19 +4402,76 @@ def create_function( body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_function( + self, resource_group_name, name, function_name, function_envelope, custom_headers=None, raw=False, **operation_config): + """Create function for web site, or a deployment slot. + + Create function for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param function_envelope: Function details. + :type function_envelope: ~azure.mgmt.web.models.FunctionEnvelope + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + FunctionEnvelope or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.FunctionEnvelope] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_function_initial( + resource_group_name=resource_group_name, + name=name, + function_name=function_name, + function_envelope=function_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -4514,10 +4480,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) + deserialized = self._deserialize('FunctionEnvelope', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -4525,10 +4488,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -4554,11 +4513,8 @@ def delete_function( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -4587,7 +4543,7 @@ def delete_function( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204, 404]: exp = CloudError(response) @@ -4618,13 +4574,9 @@ def list_function_secrets( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`FunctionSecrets - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`FunctionSecrets - ` or - :class:`ClientRawResponse` + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -4653,7 +4605,7 @@ def list_function_secrets( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -4687,10 +4639,9 @@ def list_host_name_bindings( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`HostNameBinding - ` - :rtype: :class:`HostNameBindingPaged - ` + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.models.HostNameBindingPaged[~azure.mgmt.web.models.HostNameBinding] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -4726,7 +4677,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -4765,13 +4716,9 @@ def get_host_name_binding( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HostNameBinding - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HostNameBinding - ` or - :class:`ClientRawResponse` + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -4800,7 +4747,7 @@ def get_host_name_binding( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -4833,20 +4780,15 @@ def create_or_update_host_name_binding( :type host_name: str :param host_name_binding: Binding details. This is the JSON representation of a HostNameBinding object. - :type host_name_binding: :class:`HostNameBinding - ` + :type host_name_binding: ~azure.mgmt.web.models.HostNameBinding :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: :class:`HostNameBinding - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HostNameBinding - ` or - :class:`ClientRawResponse` + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -4879,7 +4821,7 @@ def create_or_update_host_name_binding( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -4915,11 +4857,8 @@ def delete_host_name_binding( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -4948,7 +4887,7 @@ def delete_host_name_binding( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -4981,13 +4920,9 @@ def get_hybrid_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HybridConnection - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnection - ` or - :class:`ClientRawResponse` + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -5017,7 +4952,7 @@ def get_hybrid_connection( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -5051,20 +4986,15 @@ def create_or_update_hybrid_connection( :param relay_name: The relay name for this hybrid connection. :type relay_name: str :param connection_envelope: The details of the hybrid connection. - :type connection_envelope: :class:`HybridConnection - ` + :type connection_envelope: ~azure.mgmt.web.models.HybridConnection :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: :class:`HybridConnection - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnection - ` or - :class:`ClientRawResponse` + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -5098,7 +5028,7 @@ def create_or_update_hybrid_connection( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -5136,11 +5066,8 @@ def delete_hybrid_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -5170,7 +5097,7 @@ def delete_hybrid_connection( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -5197,20 +5124,15 @@ def update_hybrid_connection( :param relay_name: The relay name for this hybrid connection. :type relay_name: str :param connection_envelope: The details of the hybrid connection. - :type connection_envelope: :class:`HybridConnection - ` + :type connection_envelope: ~azure.mgmt.web.models.HybridConnection :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: :class:`HybridConnection - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnection - ` or - :class:`ClientRawResponse` + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -5244,7 +5166,7 @@ def update_hybrid_connection( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -5282,13 +5204,9 @@ def list_hybrid_connection_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HybridConnectionKey - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnectionKey - ` or - :class:`ClientRawResponse` + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -5318,7 +5236,7 @@ def list_hybrid_connection_keys( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -5352,13 +5270,9 @@ def list_hybrid_connections( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HybridConnection - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnection - ` or - :class:`ClientRawResponse` + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -5386,7 +5300,7 @@ def list_hybrid_connections( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -5422,13 +5336,9 @@ def list_relay_service_connections( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -5456,7 +5366,7 @@ def list_relay_service_connections( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -5492,13 +5402,9 @@ def get_relay_service_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -5527,7 +5433,7 @@ def get_relay_service_connection( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -5562,20 +5468,16 @@ def create_or_update_relay_service_connection( :type entity_name: str :param connection_envelope: Details of the hybrid connection configuration. - :type connection_envelope: :class:`RelayServiceConnectionEntity - ` + :type connection_envelope: + ~azure.mgmt.web.models.RelayServiceConnectionEntity :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: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -5608,7 +5510,7 @@ def create_or_update_relay_service_connection( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -5644,11 +5546,8 @@ def delete_relay_service_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -5677,7 +5576,7 @@ def delete_relay_service_connection( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -5705,20 +5604,16 @@ def update_relay_service_connection( :type entity_name: str :param connection_envelope: Details of the hybrid connection configuration. - :type connection_envelope: :class:`RelayServiceConnectionEntity - ` + :type connection_envelope: + ~azure.mgmt.web.models.RelayServiceConnectionEntity :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: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -5751,7 +5646,7 @@ def update_relay_service_connection( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -5785,10 +5680,9 @@ def list_instance_identifiers( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`SiteInstance - ` - :rtype: :class:`SiteInstancePaged - ` + :return: An iterator like instance of SiteInstance + :rtype: + ~azure.mgmt.web.models.SiteInstancePaged[~azure.mgmt.web.models.SiteInstance] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -5824,7 +5718,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -5861,12 +5755,9 @@ def get_instance_ms_deploy_status( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`MSDeployStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`MSDeployStatus ` - or :class:`ClientRawResponse` + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -5895,7 +5786,7 @@ def get_instance_ms_deploy_status( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -5913,35 +5804,9 @@ def get_instance_ms_deploy_status( return deserialized - def create_instance_ms_deploy_operation( - self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): - """Invoke the MSDeploy web app extension. - - Invoke the MSDeploy web app extension. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Name of web app. - :type name: str - :param instance_id: ID of web app instance. - :type instance_id: str - :param ms_deploy: Details of MSDeploy operation - :type ms_deploy: :class:`MSDeploy ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`MSDeployStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_instance_ms_deploy_operation_initial( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy' path_format_arguments = { @@ -5970,19 +5835,76 @@ def create_instance_ms_deploy_operation( body_content = self._serialize.body(ms_deploy, 'MSDeploy') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation( + self, resource_group_name, name, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + """Invoke the MSDeploy web app extension. + + Invoke the MSDeploy web app extension. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param instance_id: ID of web app instance. + :type instance_id: str + :param ms_deploy: Details of MSDeploy operation + :type ms_deploy: ~azure.mgmt.web.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + MSDeployStatus or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.MSDeployStatus] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_instance_ms_deploy_operation_initial( + resource_group_name=resource_group_name, + name=name, + instance_id=instance_id, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -5991,10 +5913,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) + deserialized = self._deserialize('MSDeployStatus', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -6002,10 +5921,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -6031,11 +5946,9 @@ def get_instance_ms_deploy_log( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`MSDeployLog ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`MSDeployLog ` or - :class:`ClientRawResponse` + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -6064,7 +5977,7 @@ def get_instance_ms_deploy_log( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -6104,10 +6017,9 @@ def list_instance_processes( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProcessInfo - ` - :rtype: :class:`ProcessInfoPaged - ` + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.models.ProcessInfoPaged[~azure.mgmt.web.models.ProcessInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -6144,7 +6056,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -6187,11 +6099,9 @@ def get_instance_process( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProcessInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProcessInfo ` or - :class:`ClientRawResponse` + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -6221,7 +6131,7 @@ def get_instance_process( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -6263,11 +6173,8 @@ def delete_instance_process( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -6297,7 +6204,7 @@ def delete_instance_process( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204, 404]: exp = CloudError(response) @@ -6309,7 +6216,7 @@ def delete_instance_process( return client_raw_response def get_instance_process_dump( - self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, process_id, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. @@ -6330,13 +6237,15 @@ def get_instance_process_dump( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] :param operation_config: :ref:`Operation configuration overrides`. - :return: object or - :class:`ClientRawResponse` if - raw=true - :rtype: object or - :class:`ClientRawResponse` + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -6366,7 +6275,7 @@ def get_instance_process_dump( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=True, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -6376,7 +6285,7 @@ def get_instance_process_dump( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('object', response) + deserialized = self._client.stream_download(response, callback) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -6408,10 +6317,9 @@ def list_instance_process_modules( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProcessModuleInfo - ` - :rtype: :class:`ProcessModuleInfoPaged - ` + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.models.ProcessModuleInfoPaged[~azure.mgmt.web.models.ProcessModuleInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -6449,7 +6357,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -6496,13 +6404,9 @@ def get_instance_process_module( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProcessModuleInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProcessModuleInfo - ` or - :class:`ClientRawResponse` + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -6534,7 +6438,7 @@ def get_instance_process_module( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -6576,10 +6480,9 @@ def list_instance_process_threads( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProcessThreadInfo - ` - :rtype: :class:`ProcessThreadInfoPaged - ` + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.models.ProcessThreadInfoPaged[~azure.mgmt.web.models.ProcessThreadInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -6617,7 +6520,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -6662,13 +6565,9 @@ def get_instance_process_thread( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProcessThreadInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProcessThreadInfo - ` or - :class:`ClientRawResponse` + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessThreadInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -6699,7 +6598,7 @@ def get_instance_process_thread( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -6735,13 +6634,9 @@ def is_cloneable( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteCloneability - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteCloneability - ` or - :class:`ClientRawResponse` + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -6769,7 +6664,7 @@ def is_cloneable( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -6803,13 +6698,9 @@ def list_sync_function_triggers( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`FunctionSecrets - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`FunctionSecrets - ` or - :class:`ClientRawResponse` + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -6837,7 +6728,7 @@ def list_sync_function_triggers( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -6873,10 +6764,9 @@ def list_metric_definitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetricDefinition - ` - :rtype: :class:`ResourceMetricDefinitionPaged - ` + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -6912,7 +6802,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -6956,10 +6846,9 @@ def list_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetric - ` - :rtype: :class:`ResourceMetricPaged - ` + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -6999,7 +6888,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7018,36 +6907,9 @@ def internal_paging(next_link=None, raw=False): return deserialized - def migrate_storage( - self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): - """Restores a web app. - - Restores a web app. - :param subscription_name: Azure subscription. - :type subscription_name: str - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Name of web app. - :type name: str - :param migration_options: Migration migrationOptions. - :type migration_options: :class:`StorageMigrationOptions - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`StorageMigrationResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _migrate_storage_initial( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate' path_format_arguments = { @@ -7076,19 +6938,77 @@ def migrate_storage( body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('StorageMigrationResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_storage( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): + """Restores a web app. + + Restores a web app. + + :param subscription_name: Azure subscription. + :type subscription_name: str + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param migration_options: Migration migrationOptions. + :type migration_options: + ~azure.mgmt.web.models.StorageMigrationOptions + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + StorageMigrationResponse or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.StorageMigrationResponse] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._migrate_storage_initial( + subscription_name=subscription_name, + resource_group_name=resource_group_name, + name=name, + migration_options=migration_options, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -7097,10 +7017,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('StorageMigrationResponse', response) + deserialized = self._deserialize('StorageMigrationResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -7108,10 +7025,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -7119,34 +7032,9 @@ def get_long_running_output(response): long_running_send, get_long_running_output, get_long_running_status, long_running_operation_timeout) - def migrate_my_sql( - self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): - """Migrates a local (in-app) MySql database to a remote MySql database. - - Migrates a local (in-app) MySql database to a remote MySql database. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Name of web app. - :type name: str - :param migration_request_envelope: MySql migration options. - :type migration_request_envelope: :class:`MigrateMySqlRequest - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`Operation - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _migrate_my_sql_initial( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql' path_format_arguments = { @@ -7174,19 +7062,74 @@ def migrate_my_sql( body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Operation', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def migrate_my_sql( + self, resource_group_name, name, migration_request_envelope, custom_headers=None, raw=False, **operation_config): + """Migrates a local (in-app) MySql database to a remote MySql database. + + Migrates a local (in-app) MySql database to a remote MySql database. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param migration_request_envelope: MySql migration options. + :type migration_request_envelope: + ~azure.mgmt.web.models.MigrateMySqlRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns Operation or + ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.Operation] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._migrate_my_sql_initial( + resource_group_name=resource_group_name, + name=name, + migration_request_envelope=migration_request_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -7195,10 +7138,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Operation', response) + deserialized = self._deserialize('Operation', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -7206,10 +7146,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -7235,13 +7171,9 @@ def get_migrate_my_sql_status( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`MigrateMySqlStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`MigrateMySqlStatus - ` or - :class:`ClientRawResponse` + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -7269,7 +7201,7 @@ def get_migrate_my_sql_status( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7308,13 +7240,9 @@ def list_network_features( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`NetworkFeatures - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`NetworkFeatures - ` or - :class:`ClientRawResponse` + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -7343,7 +7271,7 @@ def list_network_features( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -7383,11 +7311,8 @@ def start_web_site_network_trace( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: str or - :class:`ClientRawResponse` if - raw=true - :rtype: str or - :class:`ClientRawResponse` + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -7421,7 +7346,7 @@ def start_web_site_network_trace( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7455,11 +7380,8 @@ def stop_web_site_network_trace( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: str or - :class:`ClientRawResponse` if - raw=true - :rtype: str or - :class:`ClientRawResponse` + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -7487,7 +7409,7 @@ def stop_web_site_network_trace( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7523,11 +7445,8 @@ def generate_new_site_publishing_password( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -7555,7 +7474,7 @@ def generate_new_site_publishing_password( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -7587,10 +7506,9 @@ def list_perf_mon_counters( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`PerfMonResponse - ` - :rtype: :class:`PerfMonResponsePaged - ` + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.models.PerfMonResponsePaged[~azure.mgmt.web.models.PerfMonResponse] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -7628,7 +7546,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7663,13 +7581,9 @@ def get_site_php_error_log_flag( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SitePhpErrorLogFlag - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SitePhpErrorLogFlag - ` or - :class:`ClientRawResponse` + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -7697,7 +7611,7 @@ def get_site_php_error_log_flag( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7731,11 +7645,9 @@ def list_premier_add_ons( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`PremierAddOn ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PremierAddOn ` or - :class:`ClientRawResponse` + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -7763,7 +7675,7 @@ def list_premier_add_ons( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7799,11 +7711,9 @@ def get_premier_add_on( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`PremierAddOn ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PremierAddOn ` or - :class:`ClientRawResponse` + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -7832,7 +7742,7 @@ def get_premier_add_on( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7865,18 +7775,15 @@ def add_premier_add_on( :type premier_add_on_name: str :param premier_add_on: A JSON representation of the edited premier add-on. - :type premier_add_on: :class:`PremierAddOn - ` + :type premier_add_on: ~azure.mgmt.web.models.PremierAddOn :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: :class:`PremierAddOn ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PremierAddOn ` or - :class:`ClientRawResponse` + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -7909,7 +7816,7 @@ def add_premier_add_on( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7945,11 +7852,8 @@ def delete_premier_add_on( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -7978,7 +7882,7 @@ def delete_premier_add_on( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -8007,10 +7911,9 @@ def list_processes( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProcessInfo - ` - :rtype: :class:`ProcessInfoPaged - ` + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.models.ProcessInfoPaged[~azure.mgmt.web.models.ProcessInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -8046,7 +7949,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -8085,11 +7988,9 @@ def get_process( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProcessInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProcessInfo ` or - :class:`ClientRawResponse` + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -8118,7 +8019,7 @@ def get_process( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -8156,11 +8057,8 @@ def delete_process( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -8189,7 +8087,7 @@ def delete_process( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204, 404]: exp = CloudError(response) @@ -8201,7 +8099,7 @@ def delete_process( return client_raw_response def get_process_dump( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. @@ -8218,13 +8116,15 @@ def get_process_dump( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] :param operation_config: :ref:`Operation configuration overrides`. - :return: object or - :class:`ClientRawResponse` if - raw=true - :rtype: object or - :class:`ClientRawResponse` + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -8253,7 +8153,7 @@ def get_process_dump( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=True, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -8263,7 +8163,7 @@ def get_process_dump( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('object', response) + deserialized = self._client.stream_download(response, callback) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -8291,10 +8191,9 @@ def list_process_modules( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProcessModuleInfo - ` - :rtype: :class:`ProcessModuleInfoPaged - ` + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.models.ProcessModuleInfoPaged[~azure.mgmt.web.models.ProcessModuleInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -8331,7 +8230,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -8374,13 +8273,9 @@ def get_process_module( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProcessModuleInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProcessModuleInfo - ` or - :class:`ClientRawResponse` + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -8411,7 +8306,7 @@ def get_process_module( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -8449,10 +8344,9 @@ def list_process_threads( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProcessThreadInfo - ` - :rtype: :class:`ProcessThreadInfoPaged - ` + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.models.ProcessThreadInfoPaged[~azure.mgmt.web.models.ProcessThreadInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -8489,7 +8383,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -8530,13 +8424,9 @@ def get_process_thread( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProcessThreadInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProcessThreadInfo - ` or - :class:`ClientRawResponse` + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessThreadInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -8566,7 +8456,7 @@ def get_process_thread( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -8600,10 +8490,9 @@ def list_public_certificates( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`PublicCertificate - ` - :rtype: :class:`PublicCertificatePaged - ` + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.models.PublicCertificatePaged[~azure.mgmt.web.models.PublicCertificate] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -8639,7 +8528,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -8678,13 +8567,9 @@ def get_public_certificate( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`PublicCertificate - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PublicCertificate - ` or - :class:`ClientRawResponse` + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -8713,7 +8598,7 @@ def get_public_certificate( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -8746,20 +8631,15 @@ def create_or_update_public_certificate( :type public_certificate_name: str :param public_certificate: Public certificate details. This is the JSON representation of a PublicCertificate object. - :type public_certificate: :class:`PublicCertificate - ` + :type public_certificate: ~azure.mgmt.web.models.PublicCertificate :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: :class:`PublicCertificate - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PublicCertificate - ` or - :class:`ClientRawResponse` + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -8792,7 +8672,7 @@ def create_or_update_public_certificate( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -8828,11 +8708,8 @@ def delete_public_certificate( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -8861,7 +8738,7 @@ def delete_public_certificate( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -8889,8 +8766,7 @@ def list_publishing_profile_xml_with_secrets( FileZilla3 WebDeploy -- default Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' - :type format: str or :class:`PublishingProfileFormat - ` + :type format: str or ~azure.mgmt.web.models.PublishingProfileFormat :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -8901,11 +8777,8 @@ def list_publishing_profile_xml_with_secrets( :type callback: Callable[Bytes, response=None] :param operation_config: :ref:`Operation configuration overrides`. - :return: Generator or - :class:`ClientRawResponse` if - raw=true - :rtype: Generator or - :class:`ClientRawResponse` + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ publishing_profile_options = models.CsmPublishingProfileOptions(format=format) @@ -8939,7 +8812,7 @@ def list_publishing_profile_xml_with_secrets( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=True, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -8957,35 +8830,9 @@ def list_publishing_profile_xml_with_secrets( return deserialized - def recover( - self, resource_group_name, name, recovery_entity, custom_headers=None, raw=False, **operation_config): - """Recovers a web app to a previous snapshot. - - Recovers a web app to a previous snapshot. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Name of web app. - :type name: str - :param recovery_entity: Snapshot data used for web app recovery. - Snapshot information can be obtained by calling GetDeletedSites or - GetSiteSnapshots API. - :type recovery_entity: :class:`SnapshotRecoveryRequest - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns None or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _recover_initial( + self, resource_group_name, name, recovery_entity, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover' path_format_arguments = { @@ -9013,19 +8860,67 @@ def recover( body_content = self._serialize.body(recovery_entity, 'SnapshotRecoveryRequest') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def recover( + self, resource_group_name, name, recovery_entity, custom_headers=None, raw=False, **operation_config): + """Recovers a web app to a previous snapshot. + + Recovers a web app to a previous snapshot. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param recovery_entity: Snapshot data used for web app recovery. + Snapshot information can be obtained by calling GetDeletedSites or + GetSiteSnapshots API. + :type recovery_entity: ~azure.mgmt.web.models.SnapshotRecoveryRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._recover_initial( + resource_group_name=resource_group_name, + name=name, + recovery_entity=recovery_entity, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -9038,10 +8933,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -9067,11 +8958,8 @@ def reset_production_slot_config( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -9099,7 +8987,7 @@ def reset_production_slot_config( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -9134,11 +9022,8 @@ def restart( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -9170,7 +9055,7 @@ def restart( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -9197,10 +9082,9 @@ def list_site_extensions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`SiteExtensionInfo - ` - :rtype: :class:`SiteExtensionInfoPaged - ` + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.models.SiteExtensionInfoPaged[~azure.mgmt.web.models.SiteExtensionInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -9236,7 +9120,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -9277,13 +9161,9 @@ def get_site_extension( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteExtensionInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteExtensionInfo - ` or - :class:`ClientRawResponse` + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -9313,7 +9193,7 @@ def get_site_extension( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -9331,35 +9211,9 @@ def get_site_extension( return deserialized - def install_site_extension( - self, resource_group_name, name, site_extension_id, extension_name, custom_headers=None, raw=False, **operation_config): - """Install site extension on a web site, or a deployment slot. - - Install site extension on a web site, or a deployment slot. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Site name. - :type name: str - :param site_extension_id: Site extension name. - :type site_extension_id: str - :param extension_name: - :type extension_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 - :return: - :class:`AzureOperationPoller` - instance that returns :class:`SiteExtensionInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _install_site_extension_initial( + self, resource_group_name, name, site_extension_id, extension_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{extensionName}' path_format_arguments = { @@ -9386,32 +9240,86 @@ def install_site_extension( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension( + self, resource_group_name, name, site_extension_id, extension_name, custom_headers=None, raw=False, **operation_config): + """Install site extension on a web site, or a deployment slot. - request = self._client.put(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + Install site extension on a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :param extension_name: + :type extension_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 + :return: An instance of AzureOperationPoller that returns + SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.SiteExtensionInfo] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._install_site_extension_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + extension_name=extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - if response.status_code not in [201, 200, 429]: + if response.status_code not in [200, 201, 429]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) + deserialized = self._deserialize('SiteExtensionInfo', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -9419,10 +9327,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -9450,11 +9354,8 @@ def delete_site_extension( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -9484,7 +9385,7 @@ def delete_site_extension( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204, 404]: exp = CloudError(response) @@ -9511,9 +9412,8 @@ def list_slots( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Site - ` - :rtype: :class:`SitePaged ` + :return: An iterator like instance of Site + :rtype: ~azure.mgmt.web.models.SitePaged[~azure.mgmt.web.models.Site] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -9549,7 +9449,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -9587,11 +9487,9 @@ def get_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Site ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Site ` or - :class:`ClientRawResponse` + :return: Site or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Site or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -9620,7 +9518,7 @@ def get_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -9638,6 +9536,67 @@ def get_slot( return deserialized + + def _create_or_update_slot_initial( + self, resource_group_name, name, site_envelope, slot, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' + 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 = {} + if skip_dns_registration is not None: + query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') + if skip_custom_domain_verification is not None: + query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') + if force_dns_registration is not None: + query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool') + if ttl_in_seconds is not None: + query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str') + 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(site_envelope, 'Site') + + # 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, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Site', response) + if response.status_code == 202: + deserialized = self._deserialize('Site', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + def create_or_update_slot( self, resource_group_name, name, site_envelope, slot, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, **operation_config): """Creates a new web, mobile, or API app in an existing resource group, or @@ -9654,7 +9613,7 @@ def create_or_update_slot( :type name: str :param site_envelope: A JSON representation of the app properties. See example. - :type site_envelope: :class:`Site ` + :type site_envelope: ~azure.mgmt.web.models.Site :param slot: Name of the deployment slot to create or update. By default, this API attempts to create or modify the production slot. :type slot: str @@ -9674,65 +9633,42 @@ def create_or_update_slot( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`Site ` or - :class:`ClientRawResponse` if - raw=true + :return: An instance of AzureOperationPoller that returns Site or + ClientRawResponse if raw=true :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' - 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 = {} - if skip_dns_registration is not None: - query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') - if skip_custom_domain_verification is not None: - query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') - if force_dns_registration is not None: - query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool') - if ttl_in_seconds is not None: - query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str') - 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(site_envelope, 'Site') + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.Site] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_envelope=site_envelope, + slot=slot, + skip_dns_registration=skip_dns_registration, + skip_custom_domain_verification=skip_custom_domain_verification, + force_dns_registration=force_dns_registration, + ttl_in_seconds=ttl_in_seconds, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result # Construct and send request def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -9741,12 +9677,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Site', response) - if response.status_code == 202: - deserialized = self._deserialize('Site', response) + deserialized = self._deserialize('Site', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -9754,10 +9685,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -9792,11 +9719,8 @@ def delete_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -9831,7 +9755,7 @@ def delete_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -9863,13 +9787,9 @@ def analyze_custom_hostname_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`CustomHostnameAnalysisResult - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`CustomHostnameAnalysisResult - ` or - :class:`ClientRawResponse` + :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.CustomHostnameAnalysisResult or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -9900,7 +9820,7 @@ def analyze_custom_hostname_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -9944,11 +9864,8 @@ def apply_slot_configuration_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) @@ -9983,7 +9900,7 @@ def apply_slot_configuration_slot( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -10007,8 +9924,7 @@ def backup_slot( :type name: str :param request: Backup configuration. You can use the JSON response from the POST action as input here. - :type request: :class:`BackupRequest - ` + :type request: ~azure.mgmt.web.models.BackupRequest :param slot: Name of the deployment slot. If a slot is not specified, the API will create a backup for the production slot. :type slot: str @@ -10017,11 +9933,9 @@ def backup_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupItem ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupItem ` or - :class:`ClientRawResponse` + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.BackupItem or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -10054,7 +9968,7 @@ def backup_slot( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -10091,10 +10005,9 @@ def list_backups_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`BackupItem - ` - :rtype: :class:`BackupItemPaged - ` + :return: An iterator like instance of BackupItem + :rtype: + ~azure.mgmt.web.models.BackupItemPaged[~azure.mgmt.web.models.BackupItem] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -10131,7 +10044,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -10165,8 +10078,7 @@ def discover_restore_slot( :type name: str :param request: A RestoreRequest object that includes Azure storage URL and blog name for discovery of backup. - :type request: :class:`RestoreRequest - ` + :type request: ~azure.mgmt.web.models.RestoreRequest :param slot: Name of the deployment slot. If a slot is not specified, the API will perform discovery for the production slot. :type slot: str @@ -10175,12 +10087,9 @@ def discover_restore_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`RestoreRequest - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RestoreRequest ` - or :class:`ClientRawResponse` + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -10213,7 +10122,7 @@ def discover_restore_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -10252,11 +10161,9 @@ def get_backup_status_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupItem ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupItem ` or - :class:`ClientRawResponse` + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.BackupItem or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -10286,7 +10193,7 @@ def get_backup_status_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -10325,11 +10232,8 @@ def delete_backup_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -10359,7 +10263,7 @@ def delete_backup_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -10390,8 +10294,7 @@ def list_backup_status_secrets_slot( :param backup_id: ID of backup. :type backup_id: str :param request: Information on backup request. - :type request: :class:`BackupRequest - ` + :type request: ~azure.mgmt.web.models.BackupRequest :param slot: Name of web app slot. If not specified then will default to production slot. :type slot: str @@ -10400,11 +10303,9 @@ def list_backup_status_secrets_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupItem ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupItem ` or - :class:`ClientRawResponse` + :return: BackupItem or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.BackupItem or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -10438,7 +10339,7 @@ def list_backup_status_secrets_slot( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -10456,41 +10357,9 @@ def list_backup_status_secrets_slot( return deserialized - def restore_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - """Restores a specific backup to another app (or deployment slot, if - specified). - - Restores a specific backup to another app (or deployment slot, if - specified). - :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 backup_id: ID of the backup. - :type backup_id: str - :param request: Information on restore request . - :type request: :class:`RestoreRequest - ` - :param slot: Name of the deployment slot. If a slot is not specified, - the API will restore a backup of 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 - :return: - :class:`AzureOperationPoller` - instance that returns :class:`RestoreResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _restore_slot_initial( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore' path_format_arguments = { @@ -10520,19 +10389,82 @@ def restore_slot( body_content = self._serialize.body(request, 'RestoreRequest') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RestoreResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def restore_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + """Restores a specific backup to another app (or deployment slot, if + specified). + + Restores a specific backup to another app (or deployment slot, if + specified). + + :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 backup_id: ID of the backup. + :type backup_id: str + :param request: Information on restore request . + :type request: ~azure.mgmt.web.models.RestoreRequest + :param slot: Name of the deployment slot. If a slot is not specified, + the API will restore a backup of 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 + :return: An instance of AzureOperationPoller that returns + RestoreResponse or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.RestoreResponse] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._restore_slot_initial( + resource_group_name=resource_group_name, + name=name, + backup_id=backup_id, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -10541,20 +10473,13 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('RestoreResponse', response) + deserialized = self._deserialize('RestoreResponse', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) + return deserialized long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', @@ -10582,10 +10507,9 @@ def list_configurations_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`SiteConfigResource - ` - :rtype: :class:`SiteConfigResourcePaged - ` + :return: An iterator like instance of SiteConfigResource + :rtype: + ~azure.mgmt.web.models.SiteConfigResourcePaged[~azure.mgmt.web.models.SiteConfigResource] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -10622,7 +10546,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -10658,19 +10582,15 @@ def update_application_settings_slot( :param kind: Kind of resource. :type kind: str :param properties: Settings. - :type properties: dict + :type properties: dict[str, 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: :class:`StringDictionary - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`StringDictionary - ` or - :class:`ClientRawResponse` + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ app_settings = models.StringDictionary(kind=kind, properties=properties) @@ -10705,7 +10625,7 @@ def update_application_settings_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -10742,13 +10662,9 @@ def list_application_settings_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`StringDictionary - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`StringDictionary - ` or - :class:`ClientRawResponse` + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -10777,7 +10693,7 @@ def list_application_settings_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -10809,8 +10725,7 @@ def update_auth_settings_slot( :param name: Name of web app. :type name: str :param site_auth_settings: Auth settings associated with web app. - :type site_auth_settings: :class:`SiteAuthSettings - ` + :type site_auth_settings: ~azure.mgmt.web.models.SiteAuthSettings :param slot: Name of web app slot. If not specified then will default to production slot. :type slot: str @@ -10819,13 +10734,9 @@ def update_auth_settings_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteAuthSettings - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteAuthSettings - ` or - :class:`ClientRawResponse` + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -10858,7 +10769,7 @@ def update_auth_settings_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -10895,13 +10806,9 @@ def get_auth_settings_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteAuthSettings - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteAuthSettings - ` or - :class:`ClientRawResponse` + :return: SiteAuthSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteAuthSettings or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -10930,7 +10837,7 @@ def get_auth_settings_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -10960,8 +10867,7 @@ def update_backup_configuration_slot( :param name: Name of the app. :type name: str :param request: Edited backup configuration. - :type request: :class:`BackupRequest - ` + :type request: ~azure.mgmt.web.models.BackupRequest :param slot: Name of the deployment slot. If a slot is not specified, the API will update the backup configuration for the production slot. :type slot: str @@ -10970,11 +10876,9 @@ def update_backup_configuration_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupRequest ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupRequest ` - or :class:`ClientRawResponse` + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -11007,7 +10911,7 @@ def update_backup_configuration_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -11044,11 +10948,8 @@ def delete_backup_configuration_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -11077,7 +10978,7 @@ def delete_backup_configuration_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -11107,11 +11008,9 @@ def get_backup_configuration_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`BackupRequest ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`BackupRequest ` - or :class:`ClientRawResponse` + :return: BackupRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.BackupRequest or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -11140,7 +11039,7 @@ def get_backup_configuration_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -11175,19 +11074,16 @@ def update_connection_strings_slot( :param kind: Kind of resource. :type kind: str :param properties: Connection strings. - :type properties: dict + :type properties: dict[str, + ~azure.mgmt.web.models.ConnStringValueTypePair] :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: :class:`ConnectionStringDictionary - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ConnectionStringDictionary - ` or - :class:`ClientRawResponse` + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ConnectionStringDictionary or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) @@ -11222,7 +11118,7 @@ def update_connection_strings_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -11259,13 +11155,9 @@ def list_connection_strings_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ConnectionStringDictionary - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ConnectionStringDictionary - ` or - :class:`ClientRawResponse` + :return: ConnectionStringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ConnectionStringDictionary or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -11294,7 +11186,7 @@ def list_connection_strings_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -11331,12 +11223,9 @@ def get_diagnostic_logs_configuration_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteLogsConfig - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteLogsConfig ` - or :class:`ClientRawResponse` + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -11365,7 +11254,7 @@ def get_diagnostic_logs_configuration_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -11396,8 +11285,7 @@ def update_diagnostic_logs_config_slot( :type name: str :param site_logs_config: A SiteLogsConfig JSON object that contains the logging configuration to change in the "properties" property. - :type site_logs_config: :class:`SiteLogsConfig - ` + :type site_logs_config: ~azure.mgmt.web.models.SiteLogsConfig :param slot: Name of the deployment slot. If a slot is not specified, the API will update the logging configuration for the production slot. :type slot: str @@ -11406,12 +11294,9 @@ def update_diagnostic_logs_config_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteLogsConfig - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteLogsConfig ` - or :class:`ClientRawResponse` + :return: SiteLogsConfig or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteLogsConfig or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -11444,7 +11329,7 @@ def update_diagnostic_logs_config_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -11479,19 +11364,15 @@ def update_metadata_slot( :param kind: Kind of resource. :type kind: str :param properties: Settings. - :type properties: dict + :type properties: dict[str, 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: :class:`StringDictionary - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`StringDictionary - ` or - :class:`ClientRawResponse` + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ metadata = models.StringDictionary(kind=kind, properties=properties) @@ -11526,7 +11407,7 @@ def update_metadata_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -11563,13 +11444,9 @@ def list_metadata_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`StringDictionary - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`StringDictionary - ` or - :class:`ClientRawResponse` + :return: StringDictionary or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.StringDictionary or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -11598,7 +11475,7 @@ def list_metadata_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -11616,33 +11493,9 @@ def list_metadata_slot( return deserialized - def list_publishing_credentials_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the Git/FTP publishing credentials of an app. - - Gets the Git/FTP publishing credentials 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 get the publishing credentials 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 - :return: - :class:`AzureOperationPoller` - instance that returns :class:`User ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _list_publishing_credentials_slot_initial( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list' path_format_arguments = { @@ -11668,18 +11521,73 @@ def list_publishing_credentials_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('User', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_publishing_credentials_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the Git/FTP publishing credentials of an app. + + Gets the Git/FTP publishing credentials 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 get the publishing credentials 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 + :return: An instance of AzureOperationPoller that returns User or + ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.User] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._list_publishing_credentials_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -11688,10 +11596,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('User', response) + deserialized = self._deserialize('User', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -11699,10 +11604,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -11722,8 +11623,7 @@ def update_site_push_settings_slot( :param name: Name of web app. :type name: str :param push_settings: Push settings associated with web app. - :type push_settings: :class:`PushSettings - ` + :type push_settings: ~azure.mgmt.web.models.PushSettings :param slot: Name of web app slot. If not specified then will default to production slot. :type slot: str @@ -11732,11 +11632,9 @@ def update_site_push_settings_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`PushSettings ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PushSettings ` or - :class:`ClientRawResponse` + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PushSettings or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -11769,7 +11667,7 @@ def update_site_push_settings_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -11806,11 +11704,9 @@ def list_site_push_settings_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`PushSettings ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PushSettings ` or - :class:`ClientRawResponse` + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PushSettings or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -11839,7 +11735,7 @@ def list_site_push_settings_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -11878,13 +11774,9 @@ def get_configuration_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -11913,7 +11805,7 @@ def get_configuration_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -11944,8 +11836,7 @@ def create_or_update_configuration_slot( :type name: str :param site_config: JSON representation of a SiteConfig object. See example. - :type site_config: :class:`SiteConfigResource - ` + :type site_config: ~azure.mgmt.web.models.SiteConfigResource :param slot: Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. :type slot: str @@ -11954,13 +11845,9 @@ def create_or_update_configuration_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -11993,7 +11880,7 @@ def create_or_update_configuration_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -12024,8 +11911,7 @@ def update_configuration_slot( :type name: str :param site_config: JSON representation of a SiteConfig object. See example. - :type site_config: :class:`SiteConfigResource - ` + :type site_config: ~azure.mgmt.web.models.SiteConfigResource :param slot: Name of the deployment slot. If a slot is not specified, the API will update configuration for the production slot. :type slot: str @@ -12034,13 +11920,9 @@ def update_configuration_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -12073,7 +11955,7 @@ def update_configuration_slot( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -12112,13 +11994,9 @@ def list_configuration_snapshot_info_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`SiteConfigurationSnapshotInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`SiteConfigurationSnapshotInfo - ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.SiteConfigurationSnapshotInfo] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -12147,7 +12025,7 @@ def list_configuration_snapshot_info_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -12188,13 +12066,9 @@ def get_configuration_snapshot_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteConfigResource - ` or - :class:`ClientRawResponse` + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -12224,7 +12098,7 @@ def get_configuration_snapshot_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -12263,11 +12137,8 @@ def recover_site_configuration_snapshot_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -12297,7 +12168,7 @@ def recover_site_configuration_snapshot_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -12327,10 +12198,9 @@ def list_continuous_web_jobs_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ContinuousWebJob - ` - :rtype: :class:`ContinuousWebJobPaged - ` + :return: An iterator like instance of ContinuousWebJob + :rtype: + ~azure.mgmt.web.models.ContinuousWebJobPaged[~azure.mgmt.web.models.ContinuousWebJob] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -12367,7 +12237,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -12409,13 +12279,9 @@ def get_continuous_web_job_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ContinuousWebJob - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ContinuousWebJob - ` or - :class:`ClientRawResponse` + :return: ContinuousWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ContinuousWebJob or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -12446,7 +12312,7 @@ def get_continuous_web_job_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -12487,11 +12353,8 @@ def delete_continuous_web_job_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -12522,7 +12385,7 @@ def delete_continuous_web_job_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -12556,11 +12419,8 @@ def start_continuous_web_job_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -12591,7 +12451,7 @@ def start_continuous_web_job_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -12625,11 +12485,8 @@ def stop_continuous_web_job_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -12660,7 +12517,7 @@ def stop_continuous_web_job_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -12690,10 +12547,9 @@ def list_deployments_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Deployment - ` - :rtype: :class:`DeploymentPaged - ` + :return: An iterator like instance of Deployment + :rtype: + ~azure.mgmt.web.models.DeploymentPaged[~azure.mgmt.web.models.Deployment] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -12730,7 +12586,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -12770,11 +12626,9 @@ def get_deployment_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Deployment ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Deployment ` or - :class:`ClientRawResponse` + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Deployment or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -12804,7 +12658,7 @@ def get_deployment_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -12839,18 +12693,15 @@ def create_deployment_slot( the API creates a deployment for the production slot. :type slot: str :param deployment: Deployment details. - :type deployment: :class:`Deployment - ` + :type deployment: ~azure.mgmt.web.models.Deployment :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: :class:`Deployment ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Deployment ` or - :class:`ClientRawResponse` + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Deployment or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -12884,7 +12735,7 @@ def create_deployment_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -12923,11 +12774,8 @@ def delete_deployment_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -12957,7 +12805,7 @@ def delete_deployment_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -12993,11 +12841,9 @@ def list_deployment_log_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Deployment ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Deployment ` or - :class:`ClientRawResponse` + :return: Deployment or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Deployment or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -13027,7 +12873,7 @@ def list_deployment_log_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -13064,10 +12910,9 @@ def list_domain_ownership_identifiers_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Identifier - ` - :rtype: :class:`IdentifierPaged - ` + :return: An iterator like instance of Identifier + :rtype: + ~azure.mgmt.web.models.IdentifierPaged[~azure.mgmt.web.models.Identifier] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -13104,7 +12949,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -13145,11 +12990,9 @@ def get_domain_ownership_identifier_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Identifier ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Identifier ` or - :class:`ClientRawResponse` + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Identifier or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -13179,7 +13022,7 @@ def get_domain_ownership_identifier_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -13225,11 +13068,9 @@ def create_or_update_domain_ownership_identifier_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Identifier ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Identifier ` or - :class:`ClientRawResponse` + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Identifier or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) @@ -13265,7 +13106,7 @@ def create_or_update_domain_ownership_identifier_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -13305,11 +13146,8 @@ def delete_domain_ownership_identifier_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -13339,7 +13177,7 @@ def delete_domain_ownership_identifier_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -13378,11 +13216,9 @@ def update_domain_ownership_identifier_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`Identifier ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`Identifier ` or - :class:`ClientRawResponse` + :return: Identifier or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.Identifier or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) @@ -13418,7 +13254,7 @@ def update_domain_ownership_identifier_slot( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -13455,12 +13291,9 @@ def get_ms_deploy_status_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`MSDeployStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`MSDeployStatus ` - or :class:`ClientRawResponse` + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -13489,7 +13322,7 @@ def get_ms_deploy_status_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -13507,36 +13340,9 @@ def get_ms_deploy_status_slot( return deserialized - def create_ms_deploy_operation_slot( - self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): - """Invoke the MSDeploy web app extension. - - Invoke the MSDeploy web app extension. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Name of web app. - :type name: str - :param slot: Name of web app slot. If not specified then will default - to production slot. - :type slot: str - :param ms_deploy: Details of MSDeploy operation - :type ms_deploy: :class:`MSDeploy ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`MSDeployStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy' path_format_arguments = { @@ -13565,19 +13371,77 @@ def create_ms_deploy_operation_slot( body_content = self._serialize.body(ms_deploy, 'MSDeploy') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_ms_deploy_operation_slot( + self, resource_group_name, name, slot, ms_deploy, custom_headers=None, raw=False, **operation_config): + """Invoke the MSDeploy web app extension. + + Invoke the MSDeploy web app extension. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param ms_deploy: Details of MSDeploy operation + :type ms_deploy: ~azure.mgmt.web.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + MSDeployStatus or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.MSDeployStatus] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -13586,10 +13450,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) + deserialized = self._deserialize('MSDeployStatus', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -13597,10 +13458,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -13627,11 +13484,9 @@ def get_ms_deploy_log_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`MSDeployLog ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`MSDeployLog ` or - :class:`ClientRawResponse` + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -13660,7 +13515,7 @@ def get_ms_deploy_log_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -13697,10 +13552,9 @@ def list_instance_functions_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`FunctionEnvelope - ` - :rtype: :class:`FunctionEnvelopePaged - ` + :return: An iterator like instance of FunctionEnvelope + :rtype: + ~azure.mgmt.web.models.FunctionEnvelopePaged[~azure.mgmt.web.models.FunctionEnvelope] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -13737,7 +13591,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -13775,11 +13629,8 @@ def get_functions_admin_token_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: str or - :class:`ClientRawResponse` if - raw=true - :rtype: str or - :class:`ClientRawResponse` + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -13808,7 +13659,7 @@ def get_functions_admin_token_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -13847,13 +13698,9 @@ def get_instance_function_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`FunctionEnvelope - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`FunctionEnvelope - ` or - :class:`ClientRawResponse` + :return: FunctionEnvelope or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.FunctionEnvelope or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -13883,7 +13730,7 @@ def get_instance_function_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -13901,39 +13748,9 @@ def get_instance_function_slot( return deserialized - def create_instance_function_slot( - self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): - """Create function for web site, or a deployment slot. - - Create function for web site, or a deployment slot. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Site name. - :type name: str - :param function_name: Function name. - :type function_name: str - :param slot: Name of the deployment slot. If a slot is not specified, - the API deletes a deployment for the production slot. - :type slot: str - :param function_envelope: Function details. - :type function_envelope: :class:`FunctionEnvelope - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`FunctionEnvelope - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_instance_function_slot_initial( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/{functionName}' path_format_arguments = { @@ -13963,19 +13780,80 @@ def create_instance_function_slot( body_content = self._serialize.body(function_envelope, 'FunctionEnvelope') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('FunctionEnvelope', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_function_slot( + self, resource_group_name, name, function_name, slot, function_envelope, custom_headers=None, raw=False, **operation_config): + """Create function for web site, or a deployment slot. + + Create function for web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param function_name: Function name. + :type function_name: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API deletes a deployment for the production slot. + :type slot: str + :param function_envelope: Function details. + :type function_envelope: ~azure.mgmt.web.models.FunctionEnvelope + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + FunctionEnvelope or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.FunctionEnvelope] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_instance_function_slot_initial( + resource_group_name=resource_group_name, + name=name, + function_name=function_name, + slot=slot, + function_envelope=function_envelope, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -13984,10 +13862,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('FunctionEnvelope', response) + deserialized = self._deserialize('FunctionEnvelope', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -13995,10 +13870,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -14027,11 +13898,8 @@ def delete_instance_function_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -14061,7 +13929,7 @@ def delete_instance_function_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204, 404]: exp = CloudError(response) @@ -14095,13 +13963,9 @@ def list_function_secrets_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`FunctionSecrets - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`FunctionSecrets - ` or - :class:`ClientRawResponse` + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -14131,7 +13995,7 @@ def list_function_secrets_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -14168,10 +14032,9 @@ def list_host_name_bindings_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`HostNameBinding - ` - :rtype: :class:`HostNameBindingPaged - ` + :return: An iterator like instance of HostNameBinding + :rtype: + ~azure.mgmt.web.models.HostNameBindingPaged[~azure.mgmt.web.models.HostNameBinding] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -14208,7 +14071,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -14250,13 +14113,9 @@ def get_host_name_binding_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HostNameBinding - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HostNameBinding - ` or - :class:`ClientRawResponse` + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -14286,7 +14145,7 @@ def get_host_name_binding_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -14319,8 +14178,7 @@ def create_or_update_host_name_binding_slot( :type host_name: str :param host_name_binding: Binding details. This is the JSON representation of a HostNameBinding object. - :type host_name_binding: :class:`HostNameBinding - ` + :type host_name_binding: ~azure.mgmt.web.models.HostNameBinding :param slot: Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. :type slot: str @@ -14329,13 +14187,9 @@ def create_or_update_host_name_binding_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HostNameBinding - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HostNameBinding - ` or - :class:`ClientRawResponse` + :return: HostNameBinding or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HostNameBinding or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -14369,7 +14223,7 @@ def create_or_update_host_name_binding_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -14408,11 +14262,8 @@ def delete_host_name_binding_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -14442,7 +14293,7 @@ def delete_host_name_binding_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -14477,13 +14328,9 @@ def get_hybrid_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HybridConnection - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnection - ` or - :class:`ClientRawResponse` + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -14514,7 +14361,7 @@ def get_hybrid_connection_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -14548,8 +14395,7 @@ def create_or_update_hybrid_connection_slot( :param relay_name: The relay name for this hybrid connection. :type relay_name: str :param connection_envelope: The details of the hybrid connection. - :type connection_envelope: :class:`HybridConnection - ` + :type connection_envelope: ~azure.mgmt.web.models.HybridConnection :param slot: The name of the slot for the web app. :type slot: str :param dict custom_headers: headers that will be added to the request @@ -14557,13 +14403,9 @@ def create_or_update_hybrid_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HybridConnection - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnection - ` or - :class:`ClientRawResponse` + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -14598,7 +14440,7 @@ def create_or_update_hybrid_connection_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -14638,11 +14480,8 @@ def delete_hybrid_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -14673,7 +14512,7 @@ def delete_hybrid_connection_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -14700,8 +14539,7 @@ def update_hybrid_connection_slot( :param relay_name: The relay name for this hybrid connection. :type relay_name: str :param connection_envelope: The details of the hybrid connection. - :type connection_envelope: :class:`HybridConnection - ` + :type connection_envelope: ~azure.mgmt.web.models.HybridConnection :param slot: The name of the slot for the web app. :type slot: str :param dict custom_headers: headers that will be added to the request @@ -14709,13 +14547,9 @@ def update_hybrid_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HybridConnection - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnection - ` or - :class:`ClientRawResponse` + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -14750,7 +14584,7 @@ def update_hybrid_connection_slot( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -14790,13 +14624,9 @@ def list_hybrid_connection_keys_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HybridConnectionKey - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnectionKey - ` or - :class:`ClientRawResponse` + :return: HybridConnectionKey or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnectionKey or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -14827,7 +14657,7 @@ def list_hybrid_connection_keys_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -14863,13 +14693,9 @@ def list_hybrid_connections_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`HybridConnection - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`HybridConnection - ` or - :class:`ClientRawResponse` + :return: HybridConnection or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.HybridConnection or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -14898,7 +14724,7 @@ def list_hybrid_connections_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -14937,13 +14763,9 @@ def list_relay_service_connections_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -14972,7 +14794,7 @@ def list_relay_service_connections_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -15011,13 +14833,9 @@ def get_relay_service_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -15047,7 +14865,7 @@ def get_relay_service_connection_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -15082,8 +14900,8 @@ def create_or_update_relay_service_connection_slot( :type entity_name: str :param connection_envelope: Details of the hybrid connection configuration. - :type connection_envelope: :class:`RelayServiceConnectionEntity - ` + :type connection_envelope: + ~azure.mgmt.web.models.RelayServiceConnectionEntity :param slot: Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. @@ -15093,13 +14911,9 @@ def create_or_update_relay_service_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -15133,7 +14947,7 @@ def create_or_update_relay_service_connection_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -15172,11 +14986,8 @@ def delete_relay_service_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -15206,7 +15017,7 @@ def delete_relay_service_connection_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -15234,8 +15045,8 @@ def update_relay_service_connection_slot( :type entity_name: str :param connection_envelope: Details of the hybrid connection configuration. - :type connection_envelope: :class:`RelayServiceConnectionEntity - ` + :type connection_envelope: + ~azure.mgmt.web.models.RelayServiceConnectionEntity :param slot: Name of the deployment slot. If a slot is not specified, the API will create or update a hybrid connection for the production slot. @@ -15245,13 +15056,9 @@ def update_relay_service_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`RelayServiceConnectionEntity - ` or - :class:`ClientRawResponse` + :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -15285,7 +15092,7 @@ def update_relay_service_connection_slot( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -15322,10 +15129,9 @@ def list_instance_identifiers_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`SiteInstance - ` - :rtype: :class:`SiteInstancePaged - ` + :return: An iterator like instance of SiteInstance + :rtype: + ~azure.mgmt.web.models.SiteInstancePaged[~azure.mgmt.web.models.SiteInstance] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -15362,7 +15168,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -15402,12 +15208,9 @@ def get_instance_ms_deploy_status_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`MSDeployStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`MSDeployStatus ` - or :class:`ClientRawResponse` + :return: MSDeployStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.MSDeployStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -15436,17 +15239,69 @@ def get_instance_ms_deploy_status_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + + def _create_instance_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy' + 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'), + 'instanceId': self._serialize.url("instance_id", instance_id, '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(ms_deploy, 'MSDeploy') + + # 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]: + if response.status_code not in [201, 409]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 200: + if response.status_code == 201: deserialized = self._deserialize('MSDeployStatus', response) if raw: @@ -15472,63 +15327,43 @@ def create_instance_ms_deploy_operation_slot( :param instance_id: ID of web app instance. :type instance_id: str :param ms_deploy: Details of MSDeploy operation - :type ms_deploy: :class:`MSDeploy ` + :type ms_deploy: ~azure.mgmt.web.models.MSDeploy :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`MSDeployStatus - ` or - :class:`ClientRawResponse` if - raw=true + :return: An instance of AzureOperationPoller that returns + MSDeployStatus or ClientRawResponse if raw=true :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.MSDeployStatus] + or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy' - 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'), - 'instanceId': self._serialize.url("instance_id", instance_id, '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(ms_deploy, 'MSDeploy') + raw_result = self._create_instance_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + instance_id=instance_id, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result # Construct and send request def long_running_send(): - - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -15537,10 +15372,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) + deserialized = self._deserialize('MSDeployStatus', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -15548,10 +15380,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -15580,11 +15408,9 @@ def get_instance_ms_deploy_log_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`MSDeployLog ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`MSDeployLog ` or - :class:`ClientRawResponse` + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -15614,7 +15440,7 @@ def get_instance_ms_deploy_log_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -15657,10 +15483,9 @@ def list_instance_processes_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProcessInfo - ` - :rtype: :class:`ProcessInfoPaged - ` + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.models.ProcessInfoPaged[~azure.mgmt.web.models.ProcessInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -15698,7 +15523,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -15744,11 +15569,9 @@ def get_instance_process_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProcessInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProcessInfo ` or - :class:`ClientRawResponse` + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -15779,7 +15602,7 @@ def get_instance_process_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -15824,11 +15647,8 @@ def delete_instance_process_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -15859,7 +15679,7 @@ def delete_instance_process_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204, 404]: exp = CloudError(response) @@ -15871,7 +15691,7 @@ def delete_instance_process_slot( return client_raw_response def get_instance_process_dump_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. @@ -15895,13 +15715,15 @@ def get_instance_process_dump_slot( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] :param operation_config: :ref:`Operation configuration overrides`. - :return: object or - :class:`ClientRawResponse` if - raw=true - :rtype: object or - :class:`ClientRawResponse` + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -15932,7 +15754,7 @@ def get_instance_process_dump_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=True, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -15942,7 +15764,7 @@ def get_instance_process_dump_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('object', response) + deserialized = self._client.stream_download(response, callback) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -15977,10 +15799,9 @@ def list_instance_process_modules_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProcessModuleInfo - ` - :rtype: :class:`ProcessModuleInfoPaged - ` + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.models.ProcessModuleInfoPaged[~azure.mgmt.web.models.ProcessModuleInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -16019,7 +15840,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -16069,13 +15890,9 @@ def get_instance_process_module_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProcessModuleInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProcessModuleInfo - ` or - :class:`ClientRawResponse` + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -16108,7 +15925,7 @@ def get_instance_process_module_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -16153,10 +15970,9 @@ def list_instance_process_threads_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProcessThreadInfo - ` - :rtype: :class:`ProcessThreadInfoPaged - ` + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.models.ProcessThreadInfoPaged[~azure.mgmt.web.models.ProcessThreadInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -16195,7 +16011,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -16243,13 +16059,9 @@ def get_instance_process_thread_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProcessThreadInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProcessThreadInfo - ` or - :class:`ClientRawResponse` + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessThreadInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -16281,7 +16093,7 @@ def get_instance_process_thread_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -16320,13 +16132,9 @@ def is_cloneable_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteCloneability - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteCloneability - ` or - :class:`ClientRawResponse` + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -16355,7 +16163,7 @@ def is_cloneable_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -16392,13 +16200,9 @@ def list_sync_function_triggers_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`FunctionSecrets - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`FunctionSecrets - ` or - :class:`ClientRawResponse` + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -16427,7 +16231,7 @@ def list_sync_function_triggers_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -16466,10 +16270,9 @@ def list_metric_definitions_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetricDefinition - ` - :rtype: :class:`ResourceMetricDefinitionPaged - ` + :return: An iterator like instance of ResourceMetricDefinition + :rtype: + ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -16506,7 +16309,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -16553,10 +16356,9 @@ def list_metrics_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ResourceMetric - ` - :rtype: :class:`ResourceMetricPaged - ` + :return: An iterator like instance of ResourceMetric + :rtype: + ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -16597,7 +16399,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -16636,13 +16438,9 @@ def get_migrate_my_sql_status_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`MigrateMySqlStatus - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`MigrateMySqlStatus - ` or - :class:`ClientRawResponse` + :return: MigrateMySqlStatus or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.MigrateMySqlStatus or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -16671,7 +16469,7 @@ def get_migrate_my_sql_status_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -16713,13 +16511,9 @@ def list_network_features_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`NetworkFeatures - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`NetworkFeatures - ` or - :class:`ClientRawResponse` + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.NetworkFeatures or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -16749,7 +16543,7 @@ def list_network_features_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -16791,11 +16585,8 @@ def start_web_site_network_trace_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: str or - :class:`ClientRawResponse` if - raw=true - :rtype: str or - :class:`ClientRawResponse` + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -16830,7 +16621,7 @@ def start_web_site_network_trace_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -16866,11 +16657,8 @@ def stop_web_site_network_trace_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: str or - :class:`ClientRawResponse` if - raw=true - :rtype: str or - :class:`ClientRawResponse` + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -16899,7 +16687,7 @@ def stop_web_site_network_trace_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -16938,11 +16726,8 @@ def generate_new_site_publishing_password_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -16971,7 +16756,7 @@ def generate_new_site_publishing_password_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -17006,10 +16791,9 @@ def list_perf_mon_counters_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`PerfMonResponse - ` - :rtype: :class:`PerfMonResponsePaged - ` + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.models.PerfMonResponsePaged[~azure.mgmt.web.models.PerfMonResponse] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -17048,7 +16832,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -17086,13 +16870,9 @@ def get_site_php_error_log_flag_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SitePhpErrorLogFlag - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SitePhpErrorLogFlag - ` or - :class:`ClientRawResponse` + :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SitePhpErrorLogFlag or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -17121,7 +16901,7 @@ def get_site_php_error_log_flag_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -17158,11 +16938,9 @@ def list_premier_add_ons_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`PremierAddOn ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PremierAddOn ` or - :class:`ClientRawResponse` + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -17191,7 +16969,7 @@ def list_premier_add_ons_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -17230,11 +17008,9 @@ def get_premier_add_on_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`PremierAddOn ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PremierAddOn ` or - :class:`ClientRawResponse` + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -17264,7 +17040,7 @@ def get_premier_add_on_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -17297,8 +17073,7 @@ def add_premier_add_on_slot( :type premier_add_on_name: str :param premier_add_on: A JSON representation of the edited premier add-on. - :type premier_add_on: :class:`PremierAddOn - ` + :type premier_add_on: ~azure.mgmt.web.models.PremierAddOn :param slot: Name of the deployment slot. If a slot is not specified, the API will update the named add-on for the production slot. :type slot: str @@ -17307,11 +17082,9 @@ def add_premier_add_on_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`PremierAddOn ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PremierAddOn ` or - :class:`ClientRawResponse` + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -17345,7 +17118,7 @@ def add_premier_add_on_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -17384,11 +17157,8 @@ def delete_premier_add_on_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -17418,7 +17188,7 @@ def delete_premier_add_on_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -17450,10 +17220,9 @@ def list_processes_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProcessInfo - ` - :rtype: :class:`ProcessInfoPaged - ` + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.models.ProcessInfoPaged[~azure.mgmt.web.models.ProcessInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -17490,7 +17259,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -17532,11 +17301,9 @@ def get_process_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProcessInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProcessInfo ` or - :class:`ClientRawResponse` + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -17566,7 +17333,7 @@ def get_process_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -17607,11 +17374,8 @@ def delete_process_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -17641,7 +17405,7 @@ def delete_process_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204, 404]: exp = CloudError(response) @@ -17653,7 +17417,7 @@ def delete_process_slot( return client_raw_response def get_process_dump_slot( - self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, process_id, slot, custom_headers=None, raw=False, callback=None, **operation_config): """Get a memory dump of a process by its ID for a specific scaled-out instance in a web site. @@ -17673,13 +17437,15 @@ def get_process_dump_slot( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] :param operation_config: :ref:`Operation configuration overrides`. - :return: object or - :class:`ClientRawResponse` if - raw=true - :rtype: object or - :class:`ClientRawResponse` + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -17709,7 +17475,7 @@ def get_process_dump_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=True, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -17719,7 +17485,7 @@ def get_process_dump_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('object', response) + deserialized = self._client.stream_download(response, callback) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -17750,10 +17516,9 @@ def list_process_modules_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProcessModuleInfo - ` - :rtype: :class:`ProcessModuleInfoPaged - ` + :return: An iterator like instance of ProcessModuleInfo + :rtype: + ~azure.mgmt.web.models.ProcessModuleInfoPaged[~azure.mgmt.web.models.ProcessModuleInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -17791,7 +17556,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -17837,13 +17602,9 @@ def get_process_module_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProcessModuleInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProcessModuleInfo - ` or - :class:`ClientRawResponse` + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessModuleInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -17875,7 +17636,7 @@ def get_process_module_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -17916,10 +17677,9 @@ def list_process_threads_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`ProcessThreadInfo - ` - :rtype: :class:`ProcessThreadInfoPaged - ` + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.models.ProcessThreadInfoPaged[~azure.mgmt.web.models.ProcessThreadInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -17957,7 +17717,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -18001,13 +17761,9 @@ def get_process_thread_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ProcessThreadInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ProcessThreadInfo - ` or - :class:`ClientRawResponse` + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessThreadInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -18038,7 +17794,7 @@ def get_process_thread_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -18075,10 +17831,9 @@ def list_public_certificates_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`PublicCertificate - ` - :rtype: :class:`PublicCertificatePaged - ` + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.models.PublicCertificatePaged[~azure.mgmt.web.models.PublicCertificate] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -18115,7 +17870,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -18157,13 +17912,9 @@ def get_public_certificate_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`PublicCertificate - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PublicCertificate - ` or - :class:`ClientRawResponse` + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -18193,7 +17944,7 @@ def get_public_certificate_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -18226,8 +17977,7 @@ def create_or_update_public_certificate_slot( :type public_certificate_name: str :param public_certificate: Public certificate details. This is the JSON representation of a PublicCertificate object. - :type public_certificate: :class:`PublicCertificate - ` + :type public_certificate: ~azure.mgmt.web.models.PublicCertificate :param slot: Name of the deployment slot. If a slot is not specified, the API will create a binding for the production slot. :type slot: str @@ -18236,13 +17986,9 @@ def create_or_update_public_certificate_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`PublicCertificate - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`PublicCertificate - ` or - :class:`ClientRawResponse` + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -18276,7 +18022,7 @@ def create_or_update_public_certificate_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -18315,11 +18061,8 @@ def delete_public_certificate_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -18349,7 +18092,7 @@ def delete_public_certificate_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -18380,8 +18123,7 @@ def list_publishing_profile_xml_with_secrets_slot( FileZilla3 WebDeploy -- default Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' - :type format: str or :class:`PublishingProfileFormat - ` + :type format: str or ~azure.mgmt.web.models.PublishingProfileFormat :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -18392,11 +18134,8 @@ def list_publishing_profile_xml_with_secrets_slot( :type callback: Callable[Bytes, response=None] :param operation_config: :ref:`Operation configuration overrides`. - :return: Generator or - :class:`ClientRawResponse` if - raw=true - :rtype: Generator or - :class:`ClientRawResponse` + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ publishing_profile_options = models.CsmPublishingProfileOptions(format=format) @@ -18431,7 +18170,7 @@ def list_publishing_profile_xml_with_secrets_slot( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=True, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -18449,38 +18188,9 @@ def list_publishing_profile_xml_with_secrets_slot( return deserialized - def recover_slot( - self, resource_group_name, name, recovery_entity, slot, custom_headers=None, raw=False, **operation_config): - """Recovers a web app to a previous snapshot. - - Recovers a web app to a previous snapshot. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Name of web app. - :type name: str - :param recovery_entity: Snapshot data used for web app recovery. - Snapshot information can be obtained by calling GetDeletedSites or - GetSiteSnapshots API. - :type recovery_entity: :class:`SnapshotRecoveryRequest - ` - :param slot: Name of web app slot. If not specified then will default - to 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 - :return: - :class:`AzureOperationPoller` - instance that returns None or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _recover_slot_initial( + self, resource_group_name, name, recovery_entity, slot, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover' path_format_arguments = { @@ -18509,19 +18219,71 @@ def recover_slot( body_content = self._serialize.body(recovery_entity, 'SnapshotRecoveryRequest') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def recover_slot( + self, resource_group_name, name, recovery_entity, slot, custom_headers=None, raw=False, **operation_config): + """Recovers a web app to a previous snapshot. + + Recovers a web app to a previous snapshot. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param recovery_entity: Snapshot data used for web app recovery. + Snapshot information can be obtained by calling GetDeletedSites or + GetSiteSnapshots API. + :type recovery_entity: ~azure.mgmt.web.models.SnapshotRecoveryRequest + :param slot: Name of web app slot. If not specified then will default + to 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 + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._recover_slot_initial( + resource_group_name=resource_group_name, + name=name, + recovery_entity=recovery_entity, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -18534,10 +18296,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -18566,11 +18324,8 @@ def reset_slot_configuration_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -18599,7 +18354,7 @@ def reset_slot_configuration_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -18637,11 +18392,8 @@ def restart_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -18674,7 +18426,7 @@ def restart_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -18704,10 +18456,9 @@ def list_site_extensions_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`SiteExtensionInfo - ` - :rtype: :class:`SiteExtensionInfoPaged - ` + :return: An iterator like instance of SiteExtensionInfo + :rtype: + ~azure.mgmt.web.models.SiteExtensionInfoPaged[~azure.mgmt.web.models.SiteExtensionInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -18744,7 +18495,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -18788,13 +18539,9 @@ def get_site_extension_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteExtensionInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteExtensionInfo - ` or - :class:`ClientRawResponse` + :return: SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteExtensionInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -18825,7 +18572,7 @@ def get_site_extension_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -18843,38 +18590,9 @@ def get_site_extension_slot( return deserialized - def install_site_extension_slot( - self, resource_group_name, name, site_extension_id, slot, extension_name, custom_headers=None, raw=False, **operation_config): - """Install site extension on a web site, or a deployment slot. - - Install site extension on a web site, or a deployment slot. - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Site name. - :type name: str - :param site_extension_id: Site extension name. - :type site_extension_id: str - :param slot: Name of the deployment slot. If a slot is not specified, - the API deletes a deployment for the production slot. - :type slot: str - :param extension_name: - :type extension_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 - :return: - :class:`AzureOperationPoller` - instance that returns :class:`SiteExtensionInfo - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _install_site_extension_slot_initial( + self, resource_group_name, name, site_extension_id, slot, extension_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{extensionName}' path_format_arguments = { @@ -18902,32 +18620,90 @@ def install_site_extension_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 201, 429]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteExtensionInfo', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteExtensionInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def install_site_extension_slot( + self, resource_group_name, name, site_extension_id, slot, extension_name, custom_headers=None, raw=False, **operation_config): + """Install site extension on a web site, or a deployment slot. + + Install site extension on a web site, or a deployment slot. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param site_extension_id: Site extension name. + :type site_extension_id: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API deletes a deployment for the production slot. + :type slot: str + :param extension_name: + :type extension_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 + :return: An instance of AzureOperationPoller that returns + SiteExtensionInfo or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.SiteExtensionInfo] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._install_site_extension_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + slot=slot, + extension_name=extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result - request = self._client.put(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - if response.status_code not in [201, 200, 429]: + if response.status_code not in [200, 201, 429]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 201: - deserialized = self._deserialize('SiteExtensionInfo', response) - if response.status_code == 200: - deserialized = self._deserialize('SiteExtensionInfo', response) + deserialized = self._deserialize('SiteExtensionInfo', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -18935,10 +18711,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -18969,11 +18741,8 @@ def delete_site_extension_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -19004,7 +18773,7 @@ def delete_site_extension_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204, 404]: exp = CloudError(response) @@ -19039,10 +18808,9 @@ def list_slot_differences_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`SlotDifference - ` - :rtype: :class:`SlotDifferencePaged - ` + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.models.SlotDifferencePaged[~azure.mgmt.web.models.SlotDifference] :raises: :class:`CloudError` """ slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) @@ -19084,7 +18852,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -19101,7 +18869,53 @@ def internal_paging(next_link=None, raw=False): client_raw_response = models.SlotDifferencePaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response - return deserialized + return deserialized + + + def _swap_slot_slot_initial( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap' + 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(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response def swap_slot_slot( self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): @@ -19125,59 +18939,38 @@ def swap_slot_slot( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns None or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap' - 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(slot_swap_entity, 'CsmSlotEntity') + raw_result = self._swap_slot_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result # Construct and send request def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -19190,10 +18983,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -19219,9 +19008,9 @@ def list_snapshots_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Snapshot - ` - :rtype: :class:`SnapshotPaged ` + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.models.SnapshotPaged[~azure.mgmt.web.models.Snapshot] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -19258,7 +19047,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -19297,13 +19086,9 @@ def get_source_control_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteSourceControl - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteSourceControl - ` or - :class:`ClientRawResponse` + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -19332,7 +19117,7 @@ def get_source_control_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -19350,39 +19135,9 @@ def get_source_control_slot( return deserialized - def create_or_update_source_control_slot( - self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): - """Updates the source control configuration of an app. - - Updates the source control configuration 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 site_source_control: JSON representation of a SiteSourceControl - object. See example. - :type site_source_control: :class:`SiteSourceControl - ` - :param slot: Name of the deployment slot. If a slot is not specified, - the API will update the source control configuration 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 - :return: - :class:`AzureOperationPoller` - instance that returns :class:`SiteSourceControl - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_or_update_source_control_slot_initial( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web' path_format_arguments = { @@ -19411,19 +19166,81 @@ def create_or_update_source_control_slot( body_content = self._serialize.body(site_source_control, 'SiteSourceControl') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control_slot( + self, resource_group_name, name, site_source_control, slot, custom_headers=None, raw=False, **operation_config): + """Updates the source control configuration of an app. + + Updates the source control configuration 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 site_source_control: JSON representation of a SiteSourceControl + object. See example. + :type site_source_control: ~azure.mgmt.web.models.SiteSourceControl + :param slot: Name of the deployment slot. If a slot is not specified, + the API will update the source control configuration 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 + :return: An instance of AzureOperationPoller that returns + SiteSourceControl or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.SiteSourceControl] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_source_control_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -19432,12 +19249,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) + deserialized = self._deserialize('SiteSourceControl', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -19445,10 +19257,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -19476,11 +19284,8 @@ def delete_source_control_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -19509,7 +19314,7 @@ def delete_source_control_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202, 404]: exp = CloudError(response) @@ -19539,11 +19344,8 @@ def start_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -19572,7 +19374,7 @@ def start_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -19602,11 +19404,8 @@ def stop_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -19635,7 +19434,7 @@ def stop_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -19665,11 +19464,8 @@ def sync_repository_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -19698,7 +19494,7 @@ def sync_repository_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -19728,11 +19524,8 @@ def sync_function_triggers_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -19761,7 +19554,7 @@ def sync_function_triggers_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -19791,10 +19584,9 @@ def list_triggered_web_jobs_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`TriggeredWebJob - ` - :rtype: :class:`TriggeredWebJobPaged - ` + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.models.TriggeredWebJobPaged[~azure.mgmt.web.models.TriggeredWebJob] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -19831,7 +19623,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -19873,13 +19665,9 @@ def get_triggered_web_job_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`TriggeredWebJob - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`TriggeredWebJob - ` or - :class:`ClientRawResponse` + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -19910,7 +19698,7 @@ def get_triggered_web_job_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -19951,11 +19739,8 @@ def delete_triggered_web_job_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -19986,7 +19771,7 @@ def delete_triggered_web_job_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -20020,10 +19805,9 @@ def list_triggered_web_job_history_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`TriggeredJobHistory - ` - :rtype: :class:`TriggeredJobHistoryPaged - ` + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.models.TriggeredJobHistoryPaged[~azure.mgmt.web.models.TriggeredJobHistory] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -20062,7 +19846,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -20108,13 +19892,9 @@ def get_triggered_web_job_history_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`TriggeredJobHistory - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`TriggeredJobHistory - ` or - :class:`ClientRawResponse` + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -20146,7 +19926,7 @@ def get_triggered_web_job_history_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -20187,11 +19967,8 @@ def run_triggered_web_job_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -20222,7 +19999,7 @@ def run_triggered_web_job_slot( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -20260,10 +20037,9 @@ def list_usages_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`CsmUsageQuota - ` - :rtype: :class:`CsmUsageQuotaPaged - ` + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.models.CsmUsageQuotaPaged[~azure.mgmt.web.models.CsmUsageQuota] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -20302,7 +20078,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -20340,11 +20116,9 @@ def list_vnet_connections_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`VnetInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`VnetInfo ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -20373,7 +20147,7 @@ def list_vnet_connections_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -20414,11 +20188,9 @@ def get_vnet_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VnetInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetInfo ` or - :class:`ClientRawResponse` + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -20448,7 +20220,7 @@ def get_vnet_connection_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -20483,8 +20255,7 @@ def create_or_update_vnet_connection_slot( :type vnet_name: str :param connection_envelope: Properties of the Virtual Network connection. See example. - :type connection_envelope: :class:`VnetInfo - ` + :type connection_envelope: ~azure.mgmt.web.models.VnetInfo :param slot: Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. :type slot: str @@ -20493,11 +20264,9 @@ def create_or_update_vnet_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VnetInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetInfo ` or - :class:`ClientRawResponse` + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -20531,7 +20300,7 @@ def create_or_update_vnet_connection_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -20572,11 +20341,8 @@ def delete_vnet_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -20606,7 +20372,7 @@ def delete_vnet_connection_slot( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -20634,8 +20400,7 @@ def update_vnet_connection_slot( :type vnet_name: str :param connection_envelope: Properties of the Virtual Network connection. See example. - :type connection_envelope: :class:`VnetInfo - ` + :type connection_envelope: ~azure.mgmt.web.models.VnetInfo :param slot: Name of the deployment slot. If a slot is not specified, the API will add or update connections for the production slot. :type slot: str @@ -20644,11 +20409,9 @@ def update_vnet_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VnetInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetInfo ` or - :class:`ClientRawResponse` + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -20682,7 +20445,7 @@ def update_vnet_connection_slot( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -20724,11 +20487,9 @@ def get_vnet_connection_gateway_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VnetGateway ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetGateway ` or - :class:`ClientRawResponse` + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -20759,7 +20520,7 @@ def get_vnet_connection_gateway_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -20797,8 +20558,7 @@ def create_or_update_vnet_connection_gateway_slot( :type gateway_name: str :param connection_envelope: The properties to update this gateway with. - :type connection_envelope: :class:`VnetGateway - ` + :type connection_envelope: ~azure.mgmt.web.models.VnetGateway :param slot: Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production slot's Virtual Network. @@ -20808,11 +20568,9 @@ def create_or_update_vnet_connection_gateway_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VnetGateway ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetGateway ` or - :class:`ClientRawResponse` + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -20847,7 +20605,7 @@ def create_or_update_vnet_connection_gateway_slot( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -20885,8 +20643,7 @@ def update_vnet_connection_gateway_slot( :type gateway_name: str :param connection_envelope: The properties to update this gateway with. - :type connection_envelope: :class:`VnetGateway - ` + :type connection_envelope: ~azure.mgmt.web.models.VnetGateway :param slot: Name of the deployment slot. If a slot is not specified, the API will add or update a gateway for the production slot's Virtual Network. @@ -20896,11 +20653,9 @@ def update_vnet_connection_gateway_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VnetGateway ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetGateway ` or - :class:`ClientRawResponse` + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -20935,7 +20690,7 @@ def update_vnet_connection_gateway_slot( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -20972,9 +20727,9 @@ def list_web_jobs_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`WebJob - ` - :rtype: :class:`WebJobPaged ` + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.models.WebJobPaged[~azure.mgmt.web.models.WebJob] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -21011,7 +20766,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -21051,11 +20806,9 @@ def get_web_job_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`WebJob ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`WebJob ` or - :class:`ClientRawResponse` + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.WebJob or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -21085,7 +20838,7 @@ def get_web_job_slot( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -21124,10 +20877,9 @@ def list_slot_differences_from_production( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`SlotDifference - ` - :rtype: :class:`SlotDifferencePaged - ` + :return: An iterator like instance of SlotDifference + :rtype: + ~azure.mgmt.web.models.SlotDifferencePaged[~azure.mgmt.web.models.SlotDifference] :raises: :class:`CloudError` """ slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) @@ -21168,7 +20920,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -21187,35 +20939,9 @@ def internal_paging(next_link=None, raw=False): return deserialized - def swap_slot_with_production( - self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """Swaps two deployment slots of an app. - - Swaps two deployment slots 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 target_slot: Destination deployment slot during swap operation. - :type target_slot: str - :param preserve_vnet: true to preserve Virtual Network to - the slot during swap; otherwise, false. - :type preserve_vnet: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns None or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _swap_slot_with_production_initial( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) # Construct URL @@ -21245,19 +20971,69 @@ def swap_slot_with_production( body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def swap_slot_with_production( + self, resource_group_name, name, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """Swaps two deployment slots of an app. + + Swaps two deployment slots 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 target_slot: Destination deployment slot during swap operation. + :type target_slot: str + :param preserve_vnet: true to preserve Virtual Network to + the slot during swap; otherwise, false. + :type preserve_vnet: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._swap_slot_with_production_initial( + resource_group_name=resource_group_name, + name=name, + target_slot=target_slot, + preserve_vnet=preserve_vnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -21270,10 +21046,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -21297,9 +21069,9 @@ def list_snapshots( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`Snapshot - ` - :rtype: :class:`SnapshotPaged ` + :return: An iterator like instance of Snapshot + :rtype: + ~azure.mgmt.web.models.SnapshotPaged[~azure.mgmt.web.models.Snapshot] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -21335,7 +21107,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -21370,13 +21142,9 @@ def get_source_control( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SiteSourceControl - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SiteSourceControl - ` or - :class:`ClientRawResponse` + :return: SiteSourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteSourceControl or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -21404,7 +21172,7 @@ def get_source_control( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -21422,35 +21190,9 @@ def get_source_control( return deserialized - def create_or_update_source_control( - self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): - """Updates the source control configuration of an app. - - Updates the source control configuration 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 site_source_control: JSON representation of a SiteSourceControl - object. See example. - :type site_source_control: :class:`SiteSourceControl - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: - :class:`AzureOperationPoller` - instance that returns :class:`SiteSourceControl - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: - :class:`AzureOperationPoller` - or :class:`ClientRawResponse` - :raises: :class:`CloudError` - """ + def _create_or_update_source_control_initial( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web' path_format_arguments = { @@ -21478,19 +21220,76 @@ def create_or_update_source_control( body_content = self._serialize.body(site_source_control, 'SiteSourceControl') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 201]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 201: + deserialized = self._deserialize('SiteSourceControl', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_source_control( + self, resource_group_name, name, site_source_control, custom_headers=None, raw=False, **operation_config): + """Updates the source control configuration of an app. + + Updates the source control configuration 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 site_source_control: JSON representation of a SiteSourceControl + object. See example. + :type site_source_control: ~azure.mgmt.web.models.SiteSourceControl + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns + SiteSourceControl or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.SiteSourceControl] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._create_or_update_source_control_initial( + resource_group_name=resource_group_name, + name=name, + site_source_control=site_source_control, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -21499,12 +21298,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('SiteSourceControl', response) - if response.status_code == 201: - deserialized = self._deserialize('SiteSourceControl', response) + deserialized = self._deserialize('SiteSourceControl', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -21512,10 +21306,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -21539,11 +21329,8 @@ def delete_source_control( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -21571,7 +21358,7 @@ def delete_source_control( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202, 404]: exp = CloudError(response) @@ -21598,11 +21385,8 @@ def start( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -21630,7 +21414,7 @@ def start( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -21657,11 +21441,8 @@ def stop( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -21689,7 +21470,7 @@ def stop( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -21716,11 +21497,8 @@ def sync_repository( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -21748,7 +21526,7 @@ def sync_repository( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -21775,11 +21553,8 @@ def sync_function_triggers( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -21807,7 +21582,7 @@ def sync_function_triggers( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -21834,10 +21609,9 @@ def list_triggered_web_jobs( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`TriggeredWebJob - ` - :rtype: :class:`TriggeredWebJobPaged - ` + :return: An iterator like instance of TriggeredWebJob + :rtype: + ~azure.mgmt.web.models.TriggeredWebJobPaged[~azure.mgmt.web.models.TriggeredWebJob] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -21873,7 +21647,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -21912,13 +21686,9 @@ def get_triggered_web_job( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`TriggeredWebJob - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`TriggeredWebJob - ` or - :class:`ClientRawResponse` + :return: TriggeredWebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.TriggeredWebJob or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -21948,7 +21718,7 @@ def get_triggered_web_job( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -21986,11 +21756,8 @@ def delete_triggered_web_job( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -22020,7 +21787,7 @@ def delete_triggered_web_job( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 204]: exp = CloudError(response) @@ -22051,10 +21818,9 @@ def list_triggered_web_job_history( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`TriggeredJobHistory - ` - :rtype: :class:`TriggeredJobHistoryPaged - ` + :return: An iterator like instance of TriggeredJobHistory + :rtype: + ~azure.mgmt.web.models.TriggeredJobHistoryPaged[~azure.mgmt.web.models.TriggeredJobHistory] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -22092,7 +21858,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -22135,13 +21901,9 @@ def get_triggered_web_job_history( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`TriggeredJobHistory - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`TriggeredJobHistory - ` or - :class:`ClientRawResponse` + :return: TriggeredJobHistory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.TriggeredJobHistory or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -22172,7 +21934,7 @@ def get_triggered_web_job_history( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -22210,11 +21972,8 @@ def run_triggered_web_job( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -22244,7 +22003,7 @@ def run_triggered_web_job( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -22279,10 +22038,9 @@ def list_usages( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`CsmUsageQuota - ` - :rtype: :class:`CsmUsageQuotaPaged - ` + :return: An iterator like instance of CsmUsageQuota + :rtype: + ~azure.mgmt.web.models.CsmUsageQuotaPaged[~azure.mgmt.web.models.CsmUsageQuota] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -22320,7 +22078,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -22355,11 +22113,9 @@ def list_vnet_connections( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list of :class:`VnetInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: list of :class:`VnetInfo ` or - :class:`ClientRawResponse` + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.VnetInfo] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -22387,7 +22143,7 @@ def list_vnet_connections( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -22425,11 +22181,9 @@ def get_vnet_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VnetInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetInfo ` or - :class:`ClientRawResponse` + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -22458,7 +22212,7 @@ def get_vnet_connection( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -22493,18 +22247,15 @@ def create_or_update_vnet_connection( :type vnet_name: str :param connection_envelope: Properties of the Virtual Network connection. See example. - :type connection_envelope: :class:`VnetInfo - ` + :type connection_envelope: ~azure.mgmt.web.models.VnetInfo :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: :class:`VnetInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetInfo ` or - :class:`ClientRawResponse` + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -22537,7 +22288,7 @@ def create_or_update_vnet_connection( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -22575,11 +22326,8 @@ def delete_vnet_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -22608,7 +22356,7 @@ def delete_vnet_connection( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -22636,18 +22384,15 @@ def update_vnet_connection( :type vnet_name: str :param connection_envelope: Properties of the Virtual Network connection. See example. - :type connection_envelope: :class:`VnetInfo - ` + :type connection_envelope: ~azure.mgmt.web.models.VnetInfo :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: :class:`VnetInfo ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetInfo ` or - :class:`ClientRawResponse` + :return: VnetInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetInfo or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -22680,7 +22425,7 @@ def update_vnet_connection( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -22719,11 +22464,9 @@ def get_vnet_connection_gateway( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`VnetGateway ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetGateway ` or - :class:`ClientRawResponse` + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -22753,7 +22496,7 @@ def get_vnet_connection_gateway( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -22791,18 +22534,15 @@ def create_or_update_vnet_connection_gateway( :type gateway_name: str :param connection_envelope: The properties to update this gateway with. - :type connection_envelope: :class:`VnetGateway - ` + :type connection_envelope: ~azure.mgmt.web.models.VnetGateway :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: :class:`VnetGateway ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetGateway ` or - :class:`ClientRawResponse` + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -22836,7 +22576,7 @@ def create_or_update_vnet_connection_gateway( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -22874,18 +22614,15 @@ def update_vnet_connection_gateway( :type gateway_name: str :param connection_envelope: The properties to update this gateway with. - :type connection_envelope: :class:`VnetGateway - ` + :type connection_envelope: ~azure.mgmt.web.models.VnetGateway :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: :class:`VnetGateway ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetGateway ` or - :class:`ClientRawResponse` + :return: VnetGateway or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetGateway or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -22919,7 +22656,7 @@ def update_vnet_connection_gateway( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -22953,9 +22690,9 @@ def list_web_jobs( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`WebJob - ` - :rtype: :class:`WebJobPaged ` + :return: An iterator like instance of WebJob + :rtype: + ~azure.mgmt.web.models.WebJobPaged[~azure.mgmt.web.models.WebJob] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): @@ -22991,7 +22728,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -23028,11 +22765,9 @@ def get_web_job( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`WebJob ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`WebJob ` or - :class:`ClientRawResponse` + :return: WebJob or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.WebJob or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL @@ -23061,7 +22796,7 @@ def get_web_job( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py b/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py index 1aa045ec52a1..b672d95d401e 100644 --- a/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py +++ b/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py @@ -51,8 +51,6 @@ def __init__( raise ValueError("Parameter 'credentials' must not be None.") if subscription_id is None: raise ValueError("Parameter 'subscription_id' must not be None.") - if not isinstance(subscription_id, str): - raise TypeError("Parameter 'subscription_id' must be str.") if not base_url: base_url = 'https://management.azure.com' @@ -143,11 +141,9 @@ def get_publishing_user( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`User ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`User ` or - :class:`ClientRawResponse` + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.User or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -171,7 +167,7 @@ def get_publishing_user( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -196,17 +192,15 @@ def update_publishing_user( Updates publishing user. :param user_details: Details of publishing user - :type user_details: :class:`User ` + :type user_details: ~azure.mgmt.web.models.User :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: :class:`User ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`User ` or - :class:`ClientRawResponse` + :return: User or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.User or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -234,7 +228,7 @@ def update_publishing_user( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -263,10 +257,9 @@ def list_source_controls( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`SourceControl - ` - :rtype: :class:`SourceControlPaged - ` + :return: An iterator like instance of SourceControl + :rtype: + ~azure.mgmt.web.models.SourceControlPaged[~azure.mgmt.web.models.SourceControl] :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -298,7 +291,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -326,18 +319,15 @@ def update_source_control( :param source_control_type: Type of source control :type source_control_type: str :param request_message: Source control token information - :type request_message: :class:`SourceControl - ` + :type request_message: ~azure.mgmt.web.models.SourceControl :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: :class:`SourceControl ` - or :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SourceControl ` - or :class:`ClientRawResponse` + :return: SourceControl or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SourceControl or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -369,7 +359,7 @@ def update_source_control( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -397,8 +387,7 @@ def check_name_availability( :type name: str :param type: Resource type used for verification. Possible values include: 'Site', 'Slot', 'HostingEnvironment' - :type type: str or :class:`CheckNameResourceTypes - ` + :type type: str or ~azure.mgmt.web.models.CheckNameResourceTypes :param is_fqdn: Is fully qualified domain name. :type is_fqdn: bool :param dict custom_headers: headers that will be added to the request @@ -406,13 +395,9 @@ def check_name_availability( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`ResourceNameAvailability - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ResourceNameAvailability - ` or - :class:`ClientRawResponse` + :return: ResourceNameAvailability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ResourceNameAvailability or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -446,7 +431,7 @@ def check_name_availability( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -473,7 +458,7 @@ def list_geo_regions( :param sku: Name of SKU used to filter the regions. Possible values include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'PremiumV2', 'Dynamic', 'Isolated' - :type sku: str or :class:`SkuName ` + :type sku: str or ~azure.mgmt.web.models.SkuName :param linux_workers_enabled: Specify true if you want to filter to only regions that support Linux workers. :type linux_workers_enabled: bool @@ -482,9 +467,9 @@ def list_geo_regions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`GeoRegion - ` - :rtype: :class:`GeoRegionPaged ` + :return: An iterator like instance of GeoRegion + :rtype: + ~azure.mgmt.web.models.GeoRegionPaged[~azure.mgmt.web.models.GeoRegion] :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -524,7 +509,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -554,10 +539,9 @@ def list_premier_add_on_offers( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of :class:`PremierAddOnOffer - ` - :rtype: :class:`PremierAddOnOfferPaged - ` + :return: An iterator like instance of PremierAddOnOffer + :rtype: + ~azure.mgmt.web.models.PremierAddOnOfferPaged[~azure.mgmt.web.models.PremierAddOnOffer] :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -593,7 +577,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -623,11 +607,9 @@ def list_skus( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: :class:`SkuInfos ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`SkuInfos ` or - :class:`ClientRawResponse` + :return: SkuInfos or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SkuInfos or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -655,7 +637,7 @@ def list_skus( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -681,20 +663,15 @@ def verify_hosting_environment_vnet( analyzing the Network Security Group rules. :param parameters: VNET information - :type parameters: :class:`VnetParameters - ` + :type parameters: ~azure.mgmt.web.models.VnetParameters :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: :class:`VnetValidationFailureDetails - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`VnetValidationFailureDetails - ` or - :class:`ClientRawResponse` + :return: VnetValidationFailureDetails or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.VnetValidationFailureDetails or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -726,7 +703,7 @@ def verify_hosting_environment_vnet( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -756,17 +733,14 @@ def move( :param target_resource_group: :type target_resource_group: str :param resources: - :type resources: list of str + :type resources: list[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: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) @@ -801,7 +775,7 @@ def move( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) @@ -822,20 +796,15 @@ def validate( resource belongs. :type resource_group_name: str :param validate_request: Request with the resources to validate. - :type validate_request: :class:`ValidateRequest - ` + :type validate_request: ~azure.mgmt.web.models.ValidateRequest :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: :class:`ValidateResponse - ` or - :class:`ClientRawResponse` if - raw=true - :rtype: :class:`ValidateResponse - ` or - :class:`ClientRawResponse` + :return: ValidateResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ValidateResponse or + ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -868,7 +837,7 @@ def validate( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -898,17 +867,14 @@ def validate_move( :param target_resource_group: :type target_resource_group: str :param resources: - :type resources: list of str + :type resources: list[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: None or - :class:`ClientRawResponse` if - raw=true - :rtype: None or - :class:`ClientRawResponse` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) @@ -943,7 +909,7 @@ def validate_move( # Construct and send request request = self._client.post(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [204]: exp = CloudError(response) diff --git a/azure-mgmt-web/build.json b/azure-mgmt-web/build.json index 9bdf5a64b99c..7bbed83ffdda 100644 --- a/azure-mgmt-web/build.json +++ b/azure-mgmt-web/build.json @@ -1 +1,339 @@ -{"autorest": "1.2.2", "date": "2017-09-21T23:40:10Z", "version": ""} \ No newline at end of file +{ + "autorest": [ + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4216", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.53", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "dts-generator": "^2.1.0", + "mocha": "^4.0.1", + "mocha-typescript": "^1.1.7", + "shx": "0.2.2", + "static-link": "^0.2.3", + "vscode-jsonrpc": "^3.3.1" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "_shasum": "f6b97454df552dfa54bd0df23f8309665be5fd4c", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4216", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.5700.2827454052185.personal-lock", + "options": { + "port": 22188, + "host": "2130712184", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.5700.2827454052185.personal-lock:22188" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.0.21", + "dependencies": { + "dotnet-2.0.0": "^1.3.2" + }, + "optionalDependencies": {}, + "devDependencies": { + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.1.1", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.0.21", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.5700.2827454052185.personal-lock", + "options": { + "port": 22188, + "host": "2130712184", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.5700.2827454052185.personal-lock:22188" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.3.38", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "2.3.1", + "autorest": "^2.0.4201", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "903bb77932e4ed1b8bc3b25cc39b167143494f6c", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.3.38", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.3.38/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.5700.2827454052185.personal-lock", + "options": { + "port": 22188, + "host": "2130712184", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.5700.2827454052185.personal-lock:22188" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.python", + "version": "2.1.32", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "^2.3.13", + "autorest": "^2.0.4203", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.1.32/node_modules/@microsoft.azure/autorest.python", + "_shasum": "a55495304b0ef354e9eb0505f4414fe7777fdb52", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.python@2.1.32", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.32/node_modules/@microsoft.azure/autorest.python", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.1.32/node_modules/@microsoft.azure/autorest.python", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.32/node_modules/@microsoft.azure/autorest.python", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.1.32/node_modules/@microsoft.azure/autorest.python", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.32/node_modules/@microsoft.azure/autorest.python" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.1.32/node_modules/@microsoft.azure/autorest.python", + "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.1.32/node_modules/@microsoft.azure/autorest.python" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "sharedLock": { + "name": "/root/.autorest", + "exclusiveLock": { + "name": "_root_.autorest.exclusive-lock", + "options": { + "port": 45234, + "host": "2130706813", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.exclusive-lock:45234" + }, + "busyLock": { + "name": "_root_.autorest.busy-lock", + "options": { + "port": 37199, + "host": "2130756895", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.busy-lock:37199" + }, + "personalLock": { + "name": "_root_.autorest.5700.2827454052185.personal-lock", + "options": { + "port": 22188, + "host": "2130712184", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.5700.2827454052185.personal-lock:22188" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + } + ], + "autorest_bootstrap": {} +} \ No newline at end of file