diff --git a/azure-mgmt-web/azure/mgmt/web/models/__init__.py b/azure-mgmt-web/azure/mgmt/web/models/__init__.py index 162303c91095..02034b49e4b2 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/__init__.py +++ b/azure-mgmt-web/azure/mgmt/web/models/__init__.py @@ -21,13 +21,11 @@ from .renew_certificate_order_request import RenewCertificateOrderRequest from .site_seal import SiteSeal from .site_seal_request import SiteSealRequest -from .managed_service_identity import ManagedServiceIdentity -from .slot_swap_status import SlotSwapStatus -from .snapshot_recovery_target import SnapshotRecoveryTarget from .vnet_route import VnetRoute from .vnet_info import VnetInfo from .vnet_gateway import VnetGateway from .user import User +from .snapshot_recovery_target import SnapshotRecoveryTarget from .snapshot_recovery_request import SnapshotRecoveryRequest from .resource_metric_availability import ResourceMetricAvailability from .resource_metric_name import ResourceMetricName @@ -36,6 +34,8 @@ from .hybrid_connection_key import HybridConnectionKey from .hybrid_connection import HybridConnection from .proxy_only_resource import ProxyOnlyResource +from .managed_service_identity import ManagedServiceIdentity +from .slot_swap_status import SlotSwapStatus from .cloning_info import CloningInfo from .hosting_environment_profile import HostingEnvironmentProfile from .ip_security_restriction import IpSecurityRestriction @@ -66,6 +66,13 @@ from .app_service_plan import AppServicePlan from .resource import Resource from .name_identifier import NameIdentifier +from .metric_availability import MetricAvailability +from .dimension import Dimension +from .metric_specification import MetricSpecification +from .service_specification import ServiceSpecification +from .csm_operation_description_properties import CsmOperationDescriptionProperties +from .csm_operation_display import CsmOperationDisplay +from .csm_operation_description import CsmOperationDescription from .address import Address from .contact import Contact from .host_name import HostName @@ -96,13 +103,19 @@ from .resource_metric import ResourceMetric from .web_app_collection import WebAppCollection from .deleted_site import DeletedSite -from .csm_operation_display import CsmOperationDisplay -from .dimension import Dimension -from .metric_availability import MetricAvailability -from .metric_specification import MetricSpecification -from .service_specification import ServiceSpecification -from .csm_operation_description_properties import CsmOperationDescriptionProperties -from .csm_operation_description import CsmOperationDescription +from .solution import Solution +from .detector_abnormal_time_period import DetectorAbnormalTimePeriod +from .abnormal_time_period import AbnormalTimePeriod +from .detector_definition import DetectorDefinition +from .diagnostic_metric_sample import DiagnosticMetricSample +from .diagnostic_metric_set import DiagnosticMetricSet +from .data_source import DataSource +from .response_meta_data import ResponseMetaData +from .analysis_data import AnalysisData +from .analysis_definition import AnalysisDefinition +from .diagnostic_analysis import DiagnosticAnalysis +from .diagnostic_category import DiagnosticCategory +from .diagnostic_detector_response import DiagnosticDetectorResponse from .recommendation import Recommendation from .recommendation_rule import RecommendationRule from .csm_move_resource_envelope import CsmMoveResourceEnvelope @@ -196,6 +209,7 @@ from .hybrid_connection_limits import HybridConnectionLimits from .app_service_certificate_order_paged import AppServiceCertificateOrderPaged from .app_service_certificate_resource_paged import AppServiceCertificateResourcePaged +from .csm_operation_description_paged import CsmOperationDescriptionPaged from .domain_paged import DomainPaged from .name_identifier_paged import NameIdentifierPaged from .domain_ownership_identifier_paged import DomainOwnershipIdentifierPaged @@ -203,7 +217,9 @@ from .tld_legal_agreement_paged import TldLegalAgreementPaged from .certificate_paged import CertificatePaged from .deleted_site_paged import DeletedSitePaged -from .csm_operation_description_paged import CsmOperationDescriptionPaged +from .diagnostic_category_paged import DiagnosticCategoryPaged +from .analysis_definition_paged import AnalysisDefinitionPaged +from .detector_definition_paged import DetectorDefinitionPaged from .source_control_paged import SourceControlPaged from .geo_region_paged import GeoRegionPaged from .premier_add_on_offer_paged import PremierAddOnOfferPaged @@ -268,6 +284,8 @@ WorkerSizeOptions, AccessControlEntryAction, OperationStatus, + IssueType, + SolutionType, ResourceScopeType, NotificationLevel, Channels, @@ -309,13 +327,11 @@ 'RenewCertificateOrderRequest', 'SiteSeal', 'SiteSealRequest', - 'ManagedServiceIdentity', - 'SlotSwapStatus', - 'SnapshotRecoveryTarget', 'VnetRoute', 'VnetInfo', 'VnetGateway', 'User', + 'SnapshotRecoveryTarget', 'SnapshotRecoveryRequest', 'ResourceMetricAvailability', 'ResourceMetricName', @@ -324,6 +340,8 @@ 'HybridConnectionKey', 'HybridConnection', 'ProxyOnlyResource', + 'ManagedServiceIdentity', + 'SlotSwapStatus', 'CloningInfo', 'HostingEnvironmentProfile', 'IpSecurityRestriction', @@ -354,6 +372,13 @@ 'AppServicePlan', 'Resource', 'NameIdentifier', + 'MetricAvailability', + 'Dimension', + 'MetricSpecification', + 'ServiceSpecification', + 'CsmOperationDescriptionProperties', + 'CsmOperationDisplay', + 'CsmOperationDescription', 'Address', 'Contact', 'HostName', @@ -384,13 +409,19 @@ 'ResourceMetric', 'WebAppCollection', 'DeletedSite', - 'CsmOperationDisplay', - 'Dimension', - 'MetricAvailability', - 'MetricSpecification', - 'ServiceSpecification', - 'CsmOperationDescriptionProperties', - 'CsmOperationDescription', + 'Solution', + 'DetectorAbnormalTimePeriod', + 'AbnormalTimePeriod', + 'DetectorDefinition', + 'DiagnosticMetricSample', + 'DiagnosticMetricSet', + 'DataSource', + 'ResponseMetaData', + 'AnalysisData', + 'AnalysisDefinition', + 'DiagnosticAnalysis', + 'DiagnosticCategory', + 'DiagnosticDetectorResponse', 'Recommendation', 'RecommendationRule', 'CsmMoveResourceEnvelope', @@ -484,6 +515,7 @@ 'HybridConnectionLimits', 'AppServiceCertificateOrderPaged', 'AppServiceCertificateResourcePaged', + 'CsmOperationDescriptionPaged', 'DomainPaged', 'NameIdentifierPaged', 'DomainOwnershipIdentifierPaged', @@ -491,7 +523,9 @@ 'TldLegalAgreementPaged', 'CertificatePaged', 'DeletedSitePaged', - 'CsmOperationDescriptionPaged', + 'DiagnosticCategoryPaged', + 'AnalysisDefinitionPaged', + 'DetectorDefinitionPaged', 'SourceControlPaged', 'GeoRegionPaged', 'PremierAddOnOfferPaged', @@ -555,6 +589,8 @@ 'WorkerSizeOptions', 'AccessControlEntryAction', 'OperationStatus', + 'IssueType', + 'SolutionType', 'ResourceScopeType', 'NotificationLevel', 'Channels', diff --git a/azure-mgmt-web/azure/mgmt/web/models/abnormal_time_period.py b/azure-mgmt-web/azure/mgmt/web/models/abnormal_time_period.py new file mode 100644 index 000000000000..d2b01c9e5999 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/abnormal_time_period.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AbnormalTimePeriod(Model): + """Class representing Abnormal Time Period identified in diagnosis. + + :param start_time: Start time of the downtime + :type start_time: datetime + :param end_time: End time of the downtime + :type end_time: datetime + :param events: List of Possible Cause of downtime + :type events: list[~azure.mgmt.web.models.DetectorAbnormalTimePeriod] + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.models.Solution] + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'events': {'key': 'events', 'type': '[DetectorAbnormalTimePeriod]'}, + 'solutions': {'key': 'solutions', 'type': '[Solution]'}, + } + + def __init__(self, start_time=None, end_time=None, events=None, solutions=None): + super(AbnormalTimePeriod, self).__init__() + self.start_time = start_time + self.end_time = end_time + self.events = events + self.solutions = solutions diff --git a/azure-mgmt-web/azure/mgmt/web/models/address.py b/azure-mgmt-web/azure/mgmt/web/models/address.py index 7e82b188bc08..9b8956e9ed18 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 acd876bc9367..7bb9c356952b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/address_response.py +++ b/azure-mgmt-web/azure/mgmt/web/models/address_response.py @@ -35,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/analysis_data.py b/azure-mgmt-web/azure/mgmt/web/models/analysis_data.py new file mode 100644 index 000000000000..648935998a8f --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/analysis_data.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class AnalysisData(Model): + """Class Representing Detector Evidence used for analysis. + + :param source: Name of the Detector + :type source: str + :param detector_definition: Detector Definition + :type detector_definition: ~azure.mgmt.web.models.DetectorDefinition + :param metrics: Source Metrics + :type metrics: list[~azure.mgmt.web.models.DiagnosticMetricSet] + :param data: Additional Source Data + :type data: list[list[~azure.mgmt.web.models.NameValuePair]] + :param detector_meta_data: Detector Meta Data + :type detector_meta_data: ~azure.mgmt.web.models.ResponseMetaData + """ + + _attribute_map = { + 'source': {'key': 'source', 'type': 'str'}, + 'detector_definition': {'key': 'detectorDefinition', 'type': 'DetectorDefinition'}, + 'metrics': {'key': 'metrics', 'type': '[DiagnosticMetricSet]'}, + 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, + 'detector_meta_data': {'key': 'detectorMetaData', 'type': 'ResponseMetaData'}, + } + + def __init__(self, source=None, detector_definition=None, metrics=None, data=None, detector_meta_data=None): + super(AnalysisData, self).__init__() + self.source = source + self.detector_definition = detector_definition + self.metrics = metrics + self.data = data + self.detector_meta_data = detector_meta_data diff --git a/azure-mgmt-web/azure/mgmt/web/models/analysis_definition.py b/azure-mgmt-web/azure/mgmt/web/models/analysis_definition.py new file mode 100644 index 000000000000..3cdc5f3bf839 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/analysis_definition.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource import ProxyOnlyResource + + +class AnalysisDefinition(ProxyOnlyResource): + """Definition of Analysis. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar description: Description of the Analysis + :vartype description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, kind=None): + super(AnalysisDefinition, self).__init__(kind=kind) + self.description = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/analysis_definition_paged.py b/azure-mgmt-web/azure/mgmt/web/models/analysis_definition_paged.py new file mode 100644 index 000000000000..a0f2b6c00789 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/analysis_definition_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class AnalysisDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`AnalysisDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[AnalysisDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(AnalysisDefinitionPaged, self).__init__(*args, **kwargs) 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 384929060ff0..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 @@ -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 e221b3e6579a..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 @@ -89,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}, @@ -130,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_order_patch_resource.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_order_patch_resource.py index eed987d7c916..d8e89475dd34 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_order_patch_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_order_patch_resource.py @@ -84,6 +84,7 @@ class AppServiceCertificateOrderPatchResource(ProxyOnlyResource): '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}, @@ -123,7 +124,7 @@ class AppServiceCertificateOrderPatchResource(ProxyOnlyResource): 'next_auto_renewal_time_stamp': {'key': 'properties.nextAutoRenewalTimeStamp', 'type': 'iso-8601'}, } - def __init__(self, kind=None, certificates=None, distinguished_name=None, validity_in_years=1, key_size=2048, product_type=None, auto_renew=True, csr=None): + def __init__(self, product_type, kind=None, certificates=None, distinguished_name=None, validity_in_years=1, key_size=2048, auto_renew=True, csr=None): super(AppServiceCertificateOrderPatchResource, self).__init__(kind=kind) self.certificates = certificates self.distinguished_name = distinguished_name 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 a06cca0bfdb3..db13b73e5f00 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 @@ -189,6 +189,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, user_whitelisted_ip_ranges=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_plan.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan.py index 3215659d3043..69647b08d17a 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 @@ -66,7 +66,8 @@ class AppServicePlan(Resource): :type spot_expiration_time: datetime :ivar resource_group: Resource group of the App Service plan. :vartype resource_group: str - :param reserved: Reserved. Default value: False . + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . :type reserved: bool :param target_worker_count: Scaling worker count. :type target_worker_count: int @@ -86,6 +87,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}, @@ -122,7 +124,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, is_spot=None, spot_expiration_time=None, 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, is_spot=None, spot_expiration_time=None, 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/app_service_plan_patch_resource.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource.py index 7991d1f75a1e..a2a773a5469e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource.py @@ -63,7 +63,8 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :type spot_expiration_time: datetime :ivar resource_group: Resource group of the App Service plan. :vartype resource_group: str - :param reserved: Reserved. Default value: False . + :param reserved: If Linux app service plan true, + false otherwise. Default value: False . :type reserved: bool :param target_worker_count: Scaling worker count. :type target_worker_count: int @@ -80,6 +81,7 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'app_service_plan_patch_resource_name': {'required': True}, 'status': {'readonly': True}, 'subscription': {'readonly': True}, 'maximum_number_of_workers': {'readonly': True}, @@ -113,7 +115,7 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, } - def __init__(self, kind=None, app_service_plan_patch_resource_name=None, worker_tier_name=None, admin_site_name=None, hosting_environment_profile=None, per_site_scaling=False, is_spot=None, spot_expiration_time=None, reserved=False, target_worker_count=None, target_worker_size_id=None): + def __init__(self, app_service_plan_patch_resource_name, kind=None, worker_tier_name=None, admin_site_name=None, hosting_environment_profile=None, per_site_scaling=False, is_spot=None, spot_expiration_time=None, reserved=False, target_worker_count=None, target_worker_size_id=None): super(AppServicePlanPatchResource, self).__init__(kind=kind) self.app_service_plan_patch_resource_name = app_service_plan_patch_resource_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 3a70f1371c44..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 @@ -33,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 6d29f1aaa560..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 @@ -32,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 599a4107f926..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 @@ -28,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 30bb97e82be4..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 @@ -33,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 6743e9e8c80c..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 @@ -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 f19318501316..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 @@ -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_request.py b/azure-mgmt-web/azure/mgmt/web/models/backup_request.py index 9dc6325154ac..d3e9df59b00d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/backup_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/backup_request.py @@ -48,6 +48,8 @@ class BackupRequest(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'backup_request_name': {'required': True}, + 'storage_account_url': {'required': True}, } _attribute_map = { @@ -63,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 43d000943f9b..c1267a13c4f0 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/backup_schedule.py +++ b/azure-mgmt-web/azure/mgmt/web/models/backup_schedule.py @@ -59,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 9e72eaa7b9b8..5183a1ad5dca 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate.py @@ -94,6 +94,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}, @@ -132,7 +133,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 16cb48875e5c..fecd8e11d4e7 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 aad5ce3401e4..3144e61ed987 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 @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class CertificateOrderAction(Resource): +class CertificateOrderAction(ProxyOnlyResource): """Certificate order action. Variables are only populated by the server, and will be ignored when @@ -24,12 +24,8 @@ class CertificateOrderAction(Resource): :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :type tags: dict[str, str] :param certificate_order_action_type: Action type. Possible values include: 'CertificateIssued', 'CertificateOrderCanceled', 'CertificateOrderCreated', 'CertificateRevoked', @@ -45,7 +41,6 @@ class CertificateOrderAction(Resource): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'location': {'required': True}, 'type': {'readonly': True}, } @@ -53,14 +48,12 @@ class CertificateOrderAction(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'certificate_order_action_type': {'key': 'properties.type', 'type': 'CertificateOrderActionType'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, } - def __init__(self, location, kind=None, tags=None, certificate_order_action_type=None, created_at=None): - super(CertificateOrderAction, self).__init__(kind=kind, location=location, tags=tags) + def __init__(self, kind=None, certificate_order_action_type=None, created_at=None): + super(CertificateOrderAction, self).__init__(kind=kind) self.certificate_order_action_type = certificate_order_action_type self.created_at = created_at diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate_patch_resource.py b/azure-mgmt-web/azure/mgmt/web/models/certificate_patch_resource.py index f6c996e997e4..3492c509073c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate_patch_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate_patch_resource.py @@ -89,6 +89,7 @@ class CertificatePatchResource(ProxyOnlyResource): 'issuer': {'readonly': True}, 'issue_date': {'readonly': True}, 'expiration_date': {'readonly': True}, + 'password': {'required': True}, 'thumbprint': {'readonly': True}, 'valid': {'readonly': True}, 'cer_blob': {'readonly': True}, @@ -125,7 +126,7 @@ class CertificatePatchResource(ProxyOnlyResource): 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, } - def __init__(self, kind=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, password, kind=None, host_names=None, pfx_blob=None, key_vault_id=None, key_vault_secret_name=None, server_farm_id=None): super(CertificatePatchResource, self).__init__(kind=kind) self.friendly_name = None self.subject_name = None 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 2381b4cc9019..193c1610ef4d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/cloning_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/cloning_info.py @@ -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 597e88f7b0af..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 @@ -32,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 de7a202bc73b..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 @@ -34,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/contact.py b/azure-mgmt-web/azure/mgmt/web/models/contact.py index 426a70ab42fe..28b3c6749af2 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/contact.py +++ b/azure-mgmt-web/azure/mgmt/web/models/contact.py @@ -32,7 +32,7 @@ class Contact(Model): :type name_last: str :param name_middle: Middle name. :type name_middle: str - :param organization: Organization. + :param organization: Organization contact belongs to. :type organization: str :param phone: Phone number. :type phone: str @@ -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/cors_settings.py b/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py index e376f6bef74d..8b4de3fca608 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py +++ b/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py @@ -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 ca27955d1ead..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 @@ -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 8745265b7999..89ee09ec7fae 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 @@ -33,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 77593ee5c89c..9cce3fb92aeb 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 @@ -24,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 55b6e3c17408..f0906307021f 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 0d4744db3ece..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 @@ -27,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 741e82ceadb2..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 @@ -36,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/data_source.py b/azure-mgmt-web/azure/mgmt/web/models/data_source.py new file mode 100644 index 000000000000..03793780359a --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/data_source.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataSource(Model): + """Class representing data source used by the detectors. + + :param instructions: Instrunctions if any for the data source + :type instructions: list[str] + :param data_source_uri: Datasource Uri Links + :type data_source_uri: list[~azure.mgmt.web.models.NameValuePair] + """ + + _attribute_map = { + 'instructions': {'key': 'instructions', 'type': '[str]'}, + 'data_source_uri': {'key': 'dataSourceUri', 'type': '[NameValuePair]'}, + } + + def __init__(self, instructions=None, data_source_uri=None): + super(DataSource, self).__init__() + self.instructions = instructions + self.data_source_uri = data_source_uri 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 d9873b6435c7..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 @@ -42,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 248ee6e939e7..19a9102156d8 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py @@ -50,6 +50,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/deployment_locations.py b/azure-mgmt-web/azure/mgmt/web/models/deployment_locations.py index 1988f14da67e..edda1454a99c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/deployment_locations.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deployment_locations.py @@ -35,6 +35,7 @@ class DeploymentLocations(Model): } def __init__(self, locations=None, hosting_environments=None, hosting_environment_deployment_infos=None): + super(DeploymentLocations, self).__init__() self.locations = locations self.hosting_environments = hosting_environments self.hosting_environment_deployment_infos = hosting_environment_deployment_infos diff --git a/azure-mgmt-web/azure/mgmt/web/models/detector_abnormal_time_period.py b/azure-mgmt-web/azure/mgmt/web/models/detector_abnormal_time_period.py new file mode 100644 index 000000000000..d1bdbc1cb0c8 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/detector_abnormal_time_period.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DetectorAbnormalTimePeriod(Model): + """Class representing Abnormal Time Period detected. + + :param start_time: Start time of the corelated event + :type start_time: datetime + :param end_time: End time of the corelated event + :type end_time: datetime + :param message: Message describing the event + :type message: str + :param source: Represents the name of the Detector + :type source: str + :param priority: Represents the rank of the Detector + :type priority: float + :param meta_data: Downtime metadata + :type meta_data: list[list[~azure.mgmt.web.models.NameValuePair]] + :param type: Represents the type of the Detector. Possible values include: + 'ServiceIncident', 'AppDeployment', 'AppCrash', 'RuntimeIssueDetected', + 'AseDeployment', 'UserIssue', 'PlatformIssue', 'Other' + :type type: str or ~azure.mgmt.web.models.IssueType + :param solutions: List of proposed solutions + :type solutions: list[~azure.mgmt.web.models.Solution] + """ + + _attribute_map = { + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'message': {'key': 'message', 'type': 'str'}, + 'source': {'key': 'source', 'type': 'str'}, + 'priority': {'key': 'priority', 'type': 'float'}, + 'meta_data': {'key': 'metaData', 'type': '[[NameValuePair]]'}, + 'type': {'key': 'type', 'type': 'IssueType'}, + 'solutions': {'key': 'solutions', 'type': '[Solution]'}, + } + + def __init__(self, start_time=None, end_time=None, message=None, source=None, priority=None, meta_data=None, type=None, solutions=None): + super(DetectorAbnormalTimePeriod, self).__init__() + self.start_time = start_time + self.end_time = end_time + self.message = message + self.source = source + self.priority = priority + self.meta_data = meta_data + self.type = type + self.solutions = solutions diff --git a/azure-mgmt-web/azure/mgmt/web/models/detector_definition.py b/azure-mgmt-web/azure/mgmt/web/models/detector_definition.py new file mode 100644 index 000000000000..5cfa7e58126f --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/detector_definition.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource import ProxyOnlyResource + + +class DetectorDefinition(ProxyOnlyResource): + """Class representing detector definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar display_name: Display name of the detector + :vartype display_name: str + :ivar description: Description of the detector + :vartype description: str + :ivar rank: Detector Rank + :vartype rank: float + :ivar is_enabled: Flag representing whether detector is enabled or not. + :vartype is_enabled: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'display_name': {'readonly': True}, + 'description': {'readonly': True}, + 'rank': {'readonly': True}, + 'is_enabled': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'display_name': {'key': 'properties.displayName', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + 'rank': {'key': 'properties.rank', 'type': 'float'}, + 'is_enabled': {'key': 'properties.isEnabled', 'type': 'bool'}, + } + + def __init__(self, kind=None): + super(DetectorDefinition, self).__init__(kind=kind) + self.display_name = None + self.description = None + self.rank = None + self.is_enabled = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/detector_definition_paged.py b/azure-mgmt-web/azure/mgmt/web/models/detector_definition_paged.py new file mode 100644 index 000000000000..c06622eea4e2 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/detector_definition_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DetectorDefinitionPaged(Paged): + """ + A paging container for iterating over a list of :class:`DetectorDefinition ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DetectorDefinition]'} + } + + def __init__(self, *args, **kwargs): + + super(DetectorDefinitionPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-web/azure/mgmt/web/models/diagnostic_analysis.py b/azure-mgmt-web/azure/mgmt/web/models/diagnostic_analysis.py new file mode 100644 index 000000000000..a902a69adfac --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/diagnostic_analysis.py @@ -0,0 +1,68 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource import ProxyOnlyResource + + +class DiagnosticAnalysis(ProxyOnlyResource): + """Class representing a diagnostic analysis done on an application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param start_time: Start time of the period + :type start_time: datetime + :param end_time: End time of the period + :type end_time: datetime + :param abnormal_time_periods: List of time periods. + :type abnormal_time_periods: + list[~azure.mgmt.web.models.AbnormalTimePeriod] + :param payload: Data by each detector + :type payload: list[~azure.mgmt.web.models.AnalysisData] + :param non_correlated_detectors: Data by each detector for detectors that + did not corelate + :type non_correlated_detectors: + list[~azure.mgmt.web.models.DetectorDefinition] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'abnormal_time_periods': {'key': 'properties.abnormalTimePeriods', 'type': '[AbnormalTimePeriod]'}, + 'payload': {'key': 'properties.payload', 'type': '[AnalysisData]'}, + 'non_correlated_detectors': {'key': 'properties.nonCorrelatedDetectors', 'type': '[DetectorDefinition]'}, + } + + def __init__(self, kind=None, start_time=None, end_time=None, abnormal_time_periods=None, payload=None, non_correlated_detectors=None): + super(DiagnosticAnalysis, self).__init__(kind=kind) + self.start_time = start_time + self.end_time = end_time + self.abnormal_time_periods = abnormal_time_periods + self.payload = payload + self.non_correlated_detectors = non_correlated_detectors diff --git a/azure-mgmt-web/azure/mgmt/web/models/diagnostic_category.py b/azure-mgmt-web/azure/mgmt/web/models/diagnostic_category.py new file mode 100644 index 000000000000..9bf7d74e5641 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/diagnostic_category.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource import ProxyOnlyResource + + +class DiagnosticCategory(ProxyOnlyResource): + """Class representing detector definition. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :ivar description: Description of the diagnostic category + :vartype description: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'description': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'description': {'key': 'properties.description', 'type': 'str'}, + } + + def __init__(self, kind=None): + super(DiagnosticCategory, self).__init__(kind=kind) + self.description = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/diagnostic_category_paged.py b/azure-mgmt-web/azure/mgmt/web/models/diagnostic_category_paged.py new file mode 100644 index 000000000000..d5b93f03ced9 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/diagnostic_category_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class DiagnosticCategoryPaged(Paged): + """ + A paging container for iterating over a list of :class:`DiagnosticCategory ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[DiagnosticCategory]'} + } + + def __init__(self, *args, **kwargs): + + super(DiagnosticCategoryPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-web/azure/mgmt/web/models/diagnostic_detector_response.py b/azure-mgmt-web/azure/mgmt/web/models/diagnostic_detector_response.py new file mode 100644 index 000000000000..78d94e8718e5 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/diagnostic_detector_response.py @@ -0,0 +1,79 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource import ProxyOnlyResource + + +class DiagnosticDetectorResponse(ProxyOnlyResource): + """Class representing Reponse from Diagnostic Detectors. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param start_time: Start time of the period + :type start_time: datetime + :param end_time: End time of the period + :type end_time: datetime + :param issue_detected: Flag representing Issue was detected. + :type issue_detected: bool + :param detector_definition: Detector's definition + :type detector_definition: ~azure.mgmt.web.models.DetectorDefinition + :param metrics: Metrics provided by the detector + :type metrics: list[~azure.mgmt.web.models.DiagnosticMetricSet] + :param abnormal_time_periods: List of Correlated events found by the + detector + :type abnormal_time_periods: + list[~azure.mgmt.web.models.DetectorAbnormalTimePeriod] + :param data: Additional Data that detector wants to send. + :type data: list[list[~azure.mgmt.web.models.NameValuePair]] + :param response_meta_data: Meta Data + :type response_meta_data: ~azure.mgmt.web.models.ResponseMetaData + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'issue_detected': {'key': 'properties.issueDetected', 'type': 'bool'}, + 'detector_definition': {'key': 'properties.detectorDefinition', 'type': 'DetectorDefinition'}, + 'metrics': {'key': 'properties.metrics', 'type': '[DiagnosticMetricSet]'}, + 'abnormal_time_periods': {'key': 'properties.abnormalTimePeriods', 'type': '[DetectorAbnormalTimePeriod]'}, + 'data': {'key': 'properties.data', 'type': '[[NameValuePair]]'}, + 'response_meta_data': {'key': 'properties.responseMetaData', 'type': 'ResponseMetaData'}, + } + + def __init__(self, kind=None, start_time=None, end_time=None, issue_detected=None, detector_definition=None, metrics=None, abnormal_time_periods=None, data=None, response_meta_data=None): + super(DiagnosticDetectorResponse, self).__init__(kind=kind) + self.start_time = start_time + self.end_time = end_time + self.issue_detected = issue_detected + self.detector_definition = detector_definition + self.metrics = metrics + self.abnormal_time_periods = abnormal_time_periods + self.data = data + self.response_meta_data = response_meta_data diff --git a/azure-mgmt-web/azure/mgmt/web/models/diagnostic_metric_sample.py b/azure-mgmt-web/azure/mgmt/web/models/diagnostic_metric_sample.py new file mode 100644 index 000000000000..3b43cd9a42d6 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/diagnostic_metric_sample.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiagnosticMetricSample(Model): + """Class representing Diagnostic Metric. + + :param timestamp: Time at which metric is measured + :type timestamp: datetime + :param role_instance: Role Instance. Null if this counter is not per + instance + This is returned and should be whichever instance name we desire to be + returned + i.e. CPU and Memory return RDWORKERNAME (LargeDed..._IN_0) + where RDWORKERNAME is Machine name below and RoleInstance name in + parenthesis + :type role_instance: str + :param total: Total value of the metric. If multiple measurements are made + this will have sum of all. + :type total: float + :param maximum: Maximum of the metric sampled during the time period + :type maximum: float + :param minimum: Minimum of the metric sampled during the time period + :type minimum: float + :param is_aggregated: Whether the values are aggregates across all workers + or not + :type is_aggregated: bool + """ + + _attribute_map = { + 'timestamp': {'key': 'timestamp', 'type': 'iso-8601'}, + 'role_instance': {'key': 'roleInstance', 'type': 'str'}, + 'total': {'key': 'total', 'type': 'float'}, + 'maximum': {'key': 'maximum', 'type': 'float'}, + 'minimum': {'key': 'minimum', 'type': 'float'}, + 'is_aggregated': {'key': 'isAggregated', 'type': 'bool'}, + } + + def __init__(self, timestamp=None, role_instance=None, total=None, maximum=None, minimum=None, is_aggregated=None): + super(DiagnosticMetricSample, self).__init__() + self.timestamp = timestamp + self.role_instance = role_instance + self.total = total + self.maximum = maximum + self.minimum = minimum + self.is_aggregated = is_aggregated diff --git a/azure-mgmt-web/azure/mgmt/web/models/diagnostic_metric_set.py b/azure-mgmt-web/azure/mgmt/web/models/diagnostic_metric_set.py new file mode 100644 index 000000000000..e6c97e7d4711 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/diagnostic_metric_set.py @@ -0,0 +1,51 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DiagnosticMetricSet(Model): + """Class representing Diagnostic Metric information. + + :param name: Name of the metric + :type name: str + :param unit: Metric's unit + :type unit: str + :param start_time: Start time of the period + :type start_time: datetime + :param end_time: End time of the period + :type end_time: datetime + :param time_grain: Presented time grain. Supported grains at the moment + are PT1M, PT1H, P1D + :type time_grain: str + :param values: Collection of metric values for the selected period based + on the + {Microsoft.Web.Hosting.Administration.DiagnosticMetricSet.TimeGrain} + :type values: list[~azure.mgmt.web.models.DiagnosticMetricSample] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'start_time': {'key': 'startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'endTime', 'type': 'iso-8601'}, + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'values': {'key': 'values', 'type': '[DiagnosticMetricSample]'}, + } + + def __init__(self, name=None, unit=None, start_time=None, end_time=None, time_grain=None, values=None): + super(DiagnosticMetricSet, self).__init__() + self.name = name + self.unit = unit + self.start_time = start_time + self.end_time = end_time + self.time_grain = time_grain + self.values = values diff --git a/azure-mgmt-web/azure/mgmt/web/models/dimension.py b/azure-mgmt-web/azure/mgmt/web/models/dimension.py index 319fd4924269..4ae55e1a1931 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/dimension.py +++ b/azure-mgmt-web/azure/mgmt/web/models/dimension.py @@ -35,6 +35,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 401215a96bd7..e53ec56f2283 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/domain.py +++ b/azure-mgmt-web/azure/mgmt/web/models/domain.py @@ -92,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}, @@ -100,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}, } @@ -132,7 +137,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, auth_code=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, auth_code=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 8d69cc4f4c28..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 @@ -34,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_patch_resource.py b/azure-mgmt-web/azure/mgmt/web/models/domain_patch_resource.py index 48c0ffbe0e31..1e14116bb04f 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/domain_patch_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/domain_patch_resource.py @@ -87,6 +87,10 @@ class DomainPatchResource(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': 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}, @@ -95,6 +99,7 @@ class DomainPatchResource(ProxyOnlyResource): '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}, } @@ -125,7 +130,7 @@ class DomainPatchResource(ProxyOnlyResource): 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, } - def __init__(self, kind=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, auth_code=None): + def __init__(self, contact_admin, contact_billing, contact_registrant, contact_tech, consent, kind=None, privacy=None, auto_renew=True, dns_type=None, dns_zone_id=None, target_dns_type=None, auth_code=None): super(DomainPatchResource, self).__init__(kind=kind) self.contact_admin = contact_admin self.contact_billing = contact_billing 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 399114e13b9c..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 @@ -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 6132fc0b9266..f909bd59f684 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/error_entity.py +++ b/azure-mgmt-web/azure/mgmt/web/models/error_entity.py @@ -39,6 +39,7 @@ class ErrorEntity(Model): } def __init__(self, extended_code=None, message_template=None, parameters=None, inner_errors=None, code=None, message=None): + super(ErrorEntity, self).__init__() self.extended_code = extended_code self.message_template = message_template self.parameters = parameters diff --git a/azure-mgmt-web/azure/mgmt/web/models/experiments.py b/azure-mgmt-web/azure/mgmt/web/models/experiments.py index 65b4fd08e744..231d82f98a5d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/experiments.py +++ b/azure-mgmt-web/azure/mgmt/web/models/experiments.py @@ -24,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 f3034d8ab00d..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 @@ -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/global_csm_sku_description.py b/azure-mgmt-web/azure/mgmt/web/models/global_csm_sku_description.py index e7eac0615257..c47cd7e4511b 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 @@ -43,6 +43,7 @@ class GlobalCsmSkuDescription(Model): } def __init__(self, name=None, tier=None, size=None, family=None, capacity=None, locations=None, capabilities=None): + super(GlobalCsmSkuDescription, self).__init__() self.name = name self.tier = tier self.size = size 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 783e58d55a7c..3df8649876dd 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/host_name.py +++ b/azure-mgmt-web/azure/mgmt/web/models/host_name.py @@ -47,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_ssl_state.py b/azure-mgmt-web/azure/mgmt/web/models/host_name_ssl_state.py index 037c036d78a0..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 @@ -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_deployment_info.py b/azure-mgmt-web/azure/mgmt/web/models/hosting_environment_deployment_info.py index 94877394a9dd..c625f9361fb9 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/hosting_environment_deployment_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/hosting_environment_deployment_info.py @@ -27,5 +27,6 @@ class HostingEnvironmentDeploymentInfo(Model): } def __init__(self, name=None, location=None): + super(HostingEnvironmentDeploymentInfo, self).__init__() self.name = name self.location = location 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 0e9804952673..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 @@ -28,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/identifier.py b/azure-mgmt-web/azure/mgmt/web/models/identifier.py index 98cd66526b26..e1c7f9e1b847 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/identifier.py +++ b/azure-mgmt-web/azure/mgmt/web/models/identifier.py @@ -13,7 +13,7 @@ class Identifier(ProxyOnlyResource): - """Identifier. + """A domain specific resource identifier. Variables are only populated by the server, and will be ignored when sending a request. 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/managed_service_identity.py b/azure-mgmt-web/azure/mgmt/web/models/managed_service_identity.py index dabb346359ae..1b611d7b49f2 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/managed_service_identity.py +++ b/azure-mgmt-web/azure/mgmt/web/models/managed_service_identity.py @@ -38,6 +38,7 @@ class ManagedServiceIdentity(Model): } def __init__(self, type=None): + super(ManagedServiceIdentity, self).__init__() self.type = type self.tenant_id = None self.principal_id = None 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 1b0ea0ff6e86..36213f96530a 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_specification.py b/azure-mgmt-web/azure/mgmt/web/models/metric_specification.py index c7a305800154..5d7b06ad95cf 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/metric_specification.py +++ b/azure-mgmt-web/azure/mgmt/web/models/metric_specification.py @@ -66,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 d04e8f4610be..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 @@ -37,6 +37,8 @@ class MigrateMySqlRequest(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'connection_string': {'required': True}, + 'migration_type': {'required': True}, } _attribute_map = { @@ -48,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/ms_deploy_log_entry.py b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log_entry.py index 1cd17b706a27..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 @@ -40,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/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 ff22721b1db3..d6688e09ad4e 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 @@ -17,7 +17,7 @@ class NetworkAccessControlEntry(Model): :param action: Action object. Possible values include: 'Permit', 'Deny' :type action: str or ~azure.mgmt.web.models.AccessControlEntryAction - :param description: Description. + :param description: Description of network access control entry. :type description: str :param order: Order of precedence. :type order: int @@ -33,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/operation.py b/azure-mgmt-web/azure/mgmt/web/models/operation.py index 4554912de477..36d0e4253d22 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/operation.py +++ b/azure-mgmt-web/azure/mgmt/web/models/operation.py @@ -13,7 +13,7 @@ class Operation(Model): - """Operation. + """An operation on a resource. :param id: Operation ID. :type id: str @@ -46,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 c2725bb2f40d..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 @@ -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 84757aaf11b0..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 @@ -36,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 9e963f1b9b82..7efae4b643eb 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 @@ -30,21 +30,21 @@ class PremierAddOn(Resource): :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] - :param sku: SKU. + :param sku: Premier add on SKU. :type sku: str - :param product: Product. + :param product: Premier add on Product. :type product: str - :param vendor: Vendor. + :param vendor: Premier add on Vendor. :type vendor: str - :param premier_add_on_name: Name. + :param premier_add_on_name: Premier add on Name. :type premier_add_on_name: str - :param premier_add_on_location: Location. + :param premier_add_on_location: Premier add on Location. :type premier_add_on_location: str - :param premier_add_on_tags: Tags. + :param premier_add_on_tags: Premier add on Tags. :type premier_add_on_tags: dict[str, str] - :param marketplace_publisher: Marketplace publisher. + :param marketplace_publisher: Premier add on Marketplace publisher. :type marketplace_publisher: str - :param marketplace_offer: Marketplace offer. + :param marketplace_offer: Premier add on Marketplace offer. :type marketplace_offer: str """ 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 8931aab36fc9..4fb08ec1e518 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 @@ -26,18 +26,18 @@ class PremierAddOnOffer(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param sku: SKU. + :param sku: Premier add on SKU. :type sku: str - :param product: Product. + :param product: Premier add on offer Product. :type product: str - :param vendor: Vendor. + :param vendor: Premier add on offer Vendor. :type vendor: str - :param premier_add_on_offer_name: Name. + :param premier_add_on_offer_name: Premier add on offer Name. :type premier_add_on_offer_name: str :param promo_code_required: true if promotion code is required; otherwise, false. :type promo_code_required: bool - :param quota: Quota. + :param quota: Premier add on offer Quota. :type quota: int :param web_hosting_plan_restrictions: App Service plans this offer is restricted to. Possible values include: 'None', 'Free', 'Shared', 'Basic', 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/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 1006bfc80a91..f53222b7f41d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/recommendation.py +++ b/azure-mgmt-web/azure/mgmt/web/models/recommendation.py @@ -99,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 f9ef4f02db31..d8e666053a44 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule.py +++ b/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule.py @@ -71,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 e1b23a6e6c82..3f7713649730 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 @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class ReissueCertificateOrderRequest(Resource): +class ReissueCertificateOrderRequest(ProxyOnlyResource): """Class representing certificate reissue request. Variables are only populated by the server, and will be ignored when @@ -24,12 +24,8 @@ class ReissueCertificateOrderRequest(Resource): :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :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 @@ -45,7 +41,6 @@ class ReissueCertificateOrderRequest(Resource): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'location': {'required': True}, 'type': {'readonly': True}, } @@ -53,17 +48,15 @@ class ReissueCertificateOrderRequest(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'key_size': {'key': 'properties.keySize', 'type': 'int'}, 'delay_existing_revoke_in_hours': {'key': 'properties.delayExistingRevokeInHours', 'type': 'int'}, 'csr': {'key': 'properties.csr', 'type': 'str'}, 'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'}, } - def __init__(self, location, kind=None, tags=None, key_size=None, delay_existing_revoke_in_hours=None, csr=None, is_private_key_external=None): - super(ReissueCertificateOrderRequest, self).__init__(kind=kind, location=location, tags=tags) + def __init__(self, kind=None, key_size=None, delay_existing_revoke_in_hours=None, csr=None, is_private_key_external=None): + super(ReissueCertificateOrderRequest, self).__init__(kind=kind) self.key_size = key_size self.delay_existing_revoke_in_hours = delay_existing_revoke_in_hours self.csr = csr 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 f90b73c1f50e..db5bb60f35b3 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 @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class RenewCertificateOrderRequest(Resource): +class RenewCertificateOrderRequest(ProxyOnlyResource): """Class representing certificate renew request. Variables are only populated by the server, and will be ignored when @@ -24,12 +24,8 @@ class RenewCertificateOrderRequest(Resource): :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str :ivar type: Resource type. :vartype type: str - :param tags: Resource tags. - :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. @@ -42,7 +38,6 @@ class RenewCertificateOrderRequest(Resource): _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, - 'location': {'required': True}, 'type': {'readonly': True}, } @@ -50,16 +45,14 @@ class RenewCertificateOrderRequest(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'key_size': {'key': 'properties.keySize', 'type': 'int'}, 'csr': {'key': 'properties.csr', 'type': 'str'}, 'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'}, } - def __init__(self, location, kind=None, tags=None, key_size=None, csr=None, is_private_key_external=None): - super(RenewCertificateOrderRequest, self).__init__(kind=kind, location=location, tags=tags) + def __init__(self, kind=None, key_size=None, csr=None, is_private_key_external=None): + super(RenewCertificateOrderRequest, self).__init__(kind=kind) self.key_size = key_size self.csr = csr self.is_private_key_external = is_private_key_external 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..9452b8342824 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 @@ -15,7 +15,7 @@ class RequestsBasedTrigger(Model): """Trigger based on total requests. - :param count: Count. + :param count: Request Count. :type count: int :param time_interval: Time interval. :type time_interval: str @@ -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 4e864c0e3c98..0f01dbf64c7c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource.py @@ -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 2a67d8ce3f85..e90d84de81f6 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_metric.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_metric.py @@ -34,7 +34,7 @@ class ResourceMetric(Model): :vartype id: str :ivar metric_values: Metric values. :vartype metric_values: list[~azure.mgmt.web.models.ResourceMetricValue] - :ivar properties: Properties. + :ivar properties: Resource metric properties collection. :vartype properties: list[~azure.mgmt.web.models.ResourceMetricProperty] """ @@ -63,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 bbf5aca0fe79..bcfd2baf221b 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 @@ -41,7 +41,7 @@ class ResourceMetricDefinition(ProxyOnlyResource): :vartype resource_uri: str :ivar resource_metric_definition_id: Resource ID. :vartype resource_metric_definition_id: str - :ivar properties: Properties. + :ivar properties: Resource metric definition properties. :vartype properties: dict[str, str] """ 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 48b4f11d0104..fc4db86574cc 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 @@ -30,7 +30,7 @@ class ResourceMetricValue(Model): :vartype total: float :ivar count: Value count. :vartype count: float - :ivar properties: Properties. + :ivar properties: Resource metric properties collection. :vartype properties: list[~azure.mgmt.web.models.ResourceMetricProperty] """ @@ -55,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 454f01112482..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 @@ -39,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 890f6f5b7c7c..2f7ddebe9493 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 @@ -18,7 +18,9 @@ class ResourceNameAvailabilityRequest(Model): :param name: Resource name to verify. :type name: str :param type: Resource type used for verification. Possible values include: - 'Site', 'Slot', 'HostingEnvironment' + 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', + 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', + 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' :type type: str or ~azure.mgmt.web.models.CheckNameResourceTypes :param is_fqdn: Is fully qualified domain name. :type is_fqdn: bool @@ -36,6 +38,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/response_meta_data.py b/azure-mgmt-web/azure/mgmt/web/models/response_meta_data.py new file mode 100644 index 000000000000..308db7d8a619 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/response_meta_data.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ResponseMetaData(Model): + """ResponseMetaData. + + :param data_source: Source of the Data + :type data_source: ~azure.mgmt.web.models.DataSource + """ + + _attribute_map = { + 'data_source': {'key': 'dataSource', 'type': 'DataSource'}, + } + + def __init__(self, data_source=None): + super(ResponseMetaData, self).__init__() + self.data_source = data_source 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 4e722795e50e..72c3ccec6db0 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/restore_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/restore_request.py @@ -68,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 = { @@ -88,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 929e7357105d..3dae8a238d72 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/service_specification.py +++ b/azure-mgmt-web/azure/mgmt/web/models/service_specification.py @@ -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_cloneability.py b/azure-mgmt-web/azure/mgmt/web/models/site_cloneability.py index a1148e934fb1..b58b934354c4 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_cloneability.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_cloneability.py @@ -41,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 3573def2f535..04323b7b395a 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config.py @@ -176,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_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_machine_key.py b/azure-mgmt-web/azure/mgmt/web/models/site_machine_key.py index efb33f7d11e2..4da2087e595d 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 @@ -19,7 +19,7 @@ class SiteMachineKey(Model): :type validation: str :param validation_key: Validation key. :type validation_key: str - :param decryption: Decryption. + :param decryption: Algorithm used for decryption. :type decryption: str :param decryption_key: Decryption key. :type decryption_key: str @@ -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 17ced88847e2..d2bbd785edeb 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 @@ -28,5 +28,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 854eb0d3cd80..4e5ac3fc4498 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/sku_description.py +++ b/azure-mgmt-web/azure/mgmt/web/models/sku_description.py @@ -46,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 2ff77e02998e..04431f22a4a1 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/sku_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/sku_info.py @@ -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 b643aa9c6af8..f5f9fbadd447 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/sku_infos.py +++ b/azure-mgmt-web/azure/mgmt/web/models/sku_infos.py @@ -27,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_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..3995123a0e1d 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 @@ -17,7 +17,7 @@ class SlowRequestsBasedTrigger(Model): :param time_taken: Time taken. :type time_taken: str - :param count: Count. + :param count: Request Count. :type count: int :param time_interval: Time interval. :type time_interval: str @@ -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 b9bd47a33e30..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 @@ -48,6 +48,7 @@ class SnapshotRecoveryRequest(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'overwrite': {'required': True}, } _attribute_map = { @@ -62,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/solution.py b/azure-mgmt-web/azure/mgmt/web/models/solution.py new file mode 100644 index 000000000000..931fdc999138 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/solution.py @@ -0,0 +1,53 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Solution(Model): + """Class Representing Solution for problems detected. + + :param id: Solution Id. + :type id: float + :param display_name: Display Name of the solution + :type display_name: str + :param order: Order of the solution. + :type order: float + :param description: Description of the solution + :type description: str + :param type: Type of Solution. Possible values include: 'QuickSolution', + 'DeepInvestigation', 'BestPractices' + :type type: str or ~azure.mgmt.web.models.SolutionType + :param data: Solution Data. + :type data: list[list[~azure.mgmt.web.models.NameValuePair]] + :param metadata: Solution Metadata. + :type metadata: list[list[~azure.mgmt.web.models.NameValuePair]] + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'float'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'order': {'key': 'order', 'type': 'float'}, + 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'SolutionType'}, + 'data': {'key': 'data', 'type': '[[NameValuePair]]'}, + 'metadata': {'key': 'metadata', 'type': '[[NameValuePair]]'}, + } + + def __init__(self, id=None, display_name=None, order=None, description=None, type=None, data=None, metadata=None): + super(Solution, self).__init__() + self.id = id + self.display_name = display_name + self.order = order + self.description = description + self.type = type + self.data = data + self.metadata = metadata 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 b733721970de..8ee3fa14d24b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity.py +++ b/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity.py @@ -61,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..32389ee7253d 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 @@ -17,11 +17,11 @@ class StatusCodesBasedTrigger(Model): :param status: HTTP status code. :type status: int - :param sub_status: SubStatus. + :param sub_status: Request Sub Status. :type sub_status: int :param win32_status: Win32 error code. :type win32_status: int - :param count: Count. + :param count: Request Count. :type count: int :param time_interval: Time interval. :type time_interval: str @@ -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/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/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 c3003e326064..d34b163fd640 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/validate_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/validate_request.py @@ -60,6 +60,7 @@ class ValidateRequest(Model): } def __init__(self, name, type, location, server_farm_id=None, sku_name=None, need_linux_workers=None, is_spot=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 1ca74d062b7f..72e3aebdcb3b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/validate_response.py +++ b/azure-mgmt-web/azure/mgmt/web/models/validate_response.py @@ -27,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 056c4442bd98..6394e8f4a0dd 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/virtual_application.py +++ b/azure-mgmt-web/azure/mgmt/web/models/virtual_application.py @@ -34,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/web_app_collection.py b/azure-mgmt-web/azure/mgmt/web/models/web_app_collection.py index 98aeefdb5f4d..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 @@ -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_site_management_client_enums.py b/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py index a8565f29b331..4742eab58251 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py +++ b/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py @@ -271,6 +271,25 @@ class OperationStatus(Enum): created = "Created" +class IssueType(Enum): + + service_incident = "ServiceIncident" + app_deployment = "AppDeployment" + app_crash = "AppCrash" + runtime_issue_detected = "RuntimeIssueDetected" + ase_deployment = "AseDeployment" + user_issue = "UserIssue" + platform_issue = "PlatformIssue" + other = "Other" + + +class SolutionType(Enum): + + quick_solution = "QuickSolution" + deep_investigation = "DeepInvestigation" + best_practices = "BestPractices" + + class ResourceScopeType(Enum): server_farm = "ServerFarm" @@ -316,6 +335,11 @@ class CheckNameResourceTypes(Enum): site = "Site" slot = "Slot" hosting_environment = "HostingEnvironment" + publishing_user = "PublishingUser" + microsoft_websites = "Microsoft.Web/sites" + microsoft_websitesslots = "Microsoft.Web/sites/slots" + microsoft_webhosting_environments = "Microsoft.Web/hostingEnvironments" + microsoft_webpublishing_users = "Microsoft.Web/publishingUsers" class ValidateResourceTypes(Enum): 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 f157d7bd4490..c26d02899ed2 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/worker_pool.py +++ b/azure-mgmt-web/azure/mgmt/web/models/worker_pool.py @@ -45,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/operations/__init__.py b/azure-mgmt-web/azure/mgmt/web/operations/__init__.py index c6060061f3c5..93d9712f46bd 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/__init__.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/__init__.py @@ -10,10 +10,13 @@ # -------------------------------------------------------------------------- from .app_service_certificate_orders_operations import AppServiceCertificateOrdersOperations +from .certificate_registration_provider_operations import CertificateRegistrationProviderOperations from .domains_operations import DomainsOperations from .top_level_domains_operations import TopLevelDomainsOperations +from .domain_registration_provider_operations import DomainRegistrationProviderOperations from .certificates_operations import CertificatesOperations from .deleted_web_apps_operations import DeletedWebAppsOperations +from .diagnostics_operations import DiagnosticsOperations from .provider_operations import ProviderOperations from .recommendations_operations import RecommendationsOperations from .web_apps_operations import WebAppsOperations @@ -22,10 +25,13 @@ __all__ = [ 'AppServiceCertificateOrdersOperations', + 'CertificateRegistrationProviderOperations', 'DomainsOperations', 'TopLevelDomainsOperations', + 'DomainRegistrationProviderOperations', 'CertificatesOperations', 'DeletedWebAppsOperations', + 'DiagnosticsOperations', 'ProviderOperations', 'RecommendationsOperations', 'WebAppsOperations', 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 45fad7700391..bd3efeeac247 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 @@ -83,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) @@ -148,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) @@ -210,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) @@ -275,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) @@ -293,31 +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: - ~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` - """ + 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 = { @@ -345,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): @@ -366,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) @@ -379,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) @@ -435,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) @@ -500,7 +530,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, 201]: exp = CloudError(response) @@ -574,7 +604,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) @@ -643,7 +673,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) @@ -661,32 +691,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: - ~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` - """ + 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 = { @@ -715,19 +722,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): @@ -736,12 +803,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) @@ -749,10 +811,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) @@ -808,7 +866,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) @@ -876,7 +934,7 @@ def update_certificate( # 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, 201]: exp = CloudError(response) @@ -948,7 +1006,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) @@ -1011,7 +1069,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) @@ -1067,7 +1125,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) @@ -1131,7 +1189,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) @@ -1199,7 +1257,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) @@ -1262,7 +1320,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) @@ -1319,7 +1377,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) @@ -1383,7 +1441,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 6c6c29334dc7..a8d7cd6a8b8c 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 @@ -83,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) @@ -153,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) @@ -219,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) @@ -237,31 +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: - ~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` - """ + 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 = { @@ -289,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): @@ -310,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) @@ -323,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) @@ -334,30 +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: 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` - """ + 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 = { @@ -384,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) - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **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 + + # 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): @@ -408,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) @@ -474,7 +527,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, 202, 400, 404, 409]: exp = CloudError(response) @@ -550,7 +603,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) @@ -615,7 +668,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) @@ -679,7 +732,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) @@ -747,7 +800,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) @@ -811,7 +864,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) @@ -896,7 +949,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) @@ -969,7 +1022,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) @@ -1034,7 +1087,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) @@ -1052,30 +1105,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: - ~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` - """ + 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 = { @@ -1103,19 +1135,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): @@ -1124,12 +1213,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) @@ -1137,10 +1221,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) @@ -1201,7 +1281,7 @@ def update_multi_role_pool( # 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, 202, 400, 404, 409]: exp = CloudError(response) @@ -1280,7 +1360,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) @@ -1363,7 +1443,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) @@ -1438,7 +1518,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) @@ -1536,7 +1616,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) @@ -1609,7 +1689,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) @@ -1682,7 +1762,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) @@ -1747,7 +1827,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) @@ -1810,7 +1890,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) @@ -1821,27 +1901,9 @@ def reboot( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def resume( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Resume an App Service Environment. - - Resume 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 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 - WebAppCollection or ClientRawResponse if raw=true - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.WebAppCollection] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + 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 = { @@ -1866,18 +1928,71 @@ def resume( 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, 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. + + Resume 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 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 + WebAppCollection or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.WebAppCollection] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + 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 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): @@ -1886,12 +2001,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('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) + deserialized = self._deserialize('WebAppCollection', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -1899,10 +2009,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) @@ -1964,7 +2070,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) @@ -2041,7 +2147,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) @@ -2060,27 +2166,9 @@ def internal_paging(next_link=None, raw=False): return deserialized - def suspend( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Suspend an App Service Environment. - - Suspend 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 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 - WebAppCollection or ClientRawResponse if raw=true - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.WebAppCollection] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + 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 = { @@ -2105,18 +2193,71 @@ def suspend( 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) + + 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 - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + def suspend( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Suspend an App Service Environment. + + Suspend 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 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 + WebAppCollection or ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.WebAppCollection] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + 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 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): @@ -2125,12 +2266,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('WebAppCollection', response) - if response.status_code == 202: - deserialized = self._deserialize('WebAppCollection', response) + deserialized = self._deserialize('WebAppCollection', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -2138,10 +2274,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) @@ -2211,7 +2343,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) @@ -2284,7 +2416,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) @@ -2352,7 +2484,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) @@ -2370,31 +2502,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: ~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` - """ + 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 = { @@ -2423,19 +2533,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): @@ -2444,12 +2613,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) @@ -2457,10 +2621,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) @@ -2523,7 +2683,7 @@ def update_worker_pool( # 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, 202, 400, 404, 409]: exp = CloudError(response) @@ -2605,7 +2765,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) @@ -2699,7 +2859,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) @@ -2775,7 +2935,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) @@ -2866,7 +3026,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) @@ -2942,7 +3102,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) @@ -3018,7 +3178,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 427bf02c5d9a..60912ee01428 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 @@ -90,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) @@ -160,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) @@ -225,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, 404]: exp = CloudError(response) @@ -243,29 +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: ~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` - """ + 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 = { @@ -293,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): @@ -314,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) @@ -327,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) @@ -383,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, 204]: exp = CloudError(response) @@ -447,7 +477,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, 202]: exp = CloudError(response) @@ -513,7 +543,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) @@ -583,7 +613,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) @@ -652,7 +682,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) @@ -715,7 +745,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) @@ -792,7 +822,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) @@ -859,7 +889,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) @@ -931,7 +961,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) @@ -1006,7 +1036,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) @@ -1092,7 +1122,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) @@ -1163,7 +1193,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) @@ -1243,7 +1273,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) @@ -1307,7 +1337,7 @@ def get_server_farm_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) @@ -1385,7 +1415,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) @@ -1450,7 +1480,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) @@ -1517,7 +1547,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) @@ -1588,7 +1618,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) @@ -1665,7 +1695,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) @@ -1734,7 +1764,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) @@ -1804,7 +1834,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) @@ -1880,7 +1910,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) @@ -1949,7 +1979,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) @@ -2018,7 +2048,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) @@ -2085,7 +2115,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/certificate_registration_provider_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/certificate_registration_provider_operations.py new file mode 100644 index 000000000000..8a2851cea47c --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/operations/certificate_registration_provider_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class CertificateRegistrationProviderOperations(object): + """CertificateRegistrationProviderOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: API Version. Constant value: "2015-08-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-08-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """Implements Csm operations Api to exposes the list of available Csm Apis + under the resource provider. + + Implements Csm operations Api to exposes the list of available Csm Apis + under the resource provider. + + :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 CsmOperationDescription + :rtype: + ~azure.mgmt.web.models.CsmOperationDescriptionPaged[~azure.mgmt.web.models.CsmOperationDescription] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/providers/Microsoft.CertificateRegistration/operations' + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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.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 + + return response + + # Deserialize response + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized 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 f5d2281e74f9..3611ef9ce706 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 @@ -82,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) @@ -152,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) @@ -217,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) @@ -288,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) @@ -351,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) @@ -416,7 +418,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 ea9105593bc0..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 @@ -82,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/diagnostics_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/diagnostics_operations.py new file mode 100644 index 000000000000..8c9b8c4495ba --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/operations/diagnostics_operations.py @@ -0,0 +1,1272 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DiagnosticsOperations(object): + """DiagnosticsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: API Version. Constant value: "2016-03-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2016-03-01" + + self.config = config + + def list_site_diagnostic_categories( + self, resource_group_name, site_name, custom_headers=None, raw=False, **operation_config): + """Get Diagnostics Categories. + + Get Diagnostics Categories. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.models.DiagnosticCategoryPaged[~azure.mgmt.web.models.DiagnosticCategory] + :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/sites/{siteName}/diagnostics' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_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') + + else: + url = next_link + query_parameters = {} + + # 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.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 + + return response + + # Deserialize response + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def get_site_diagnostic_category( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """Get Diagnostics Category. + + Get Diagnostics Category. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param diagnostic_category: Diagnostic Category + :type diagnostic_category: 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: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, '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.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('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_site_analyses( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """Get Site Analyses. + + Get Site Analyses. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param diagnostic_category: Diagnostic Category + :type diagnostic_category: 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: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.models.AnalysisDefinitionPaged[~azure.mgmt.web.models.AnalysisDefinition] + :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/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, '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') + + else: + url = next_link + query_parameters = {} + + # 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.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 + + return response + + # Deserialize response + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def get_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, custom_headers=None, raw=False, **operation_config): + """Get Site Analysis. + + Get Site Analysis. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param diagnostic_category: Diagnostic Category + :type diagnostic_category: str + :param analysis_name: Analysis Name + :type analysis_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'analysisName': self._serialize.url("analysis_name", analysis_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.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('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def execute_site_analysis( + self, resource_group_name, site_name, diagnostic_category, analysis_name, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Execute Analysis. + + Execute Analysis. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param diagnostic_category: Category Name + :type diagnostic_category: str + :param analysis_name: Analysis Resource Name + :type analysis_name: str + :param start_time: Start Time + :type start_time: datetime + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: 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: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'analysisName': self._serialize.url("analysis_name", analysis_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 start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + 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]: + 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('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_site_detectors( + self, resource_group_name, site_name, diagnostic_category, custom_headers=None, raw=False, **operation_config): + """Get Detectors. + + Get Detectors. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param diagnostic_category: Diagnostic Category + :type diagnostic_category: 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: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.models.DetectorDefinitionPaged[~azure.mgmt.web.models.DetectorDefinition] + :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/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, '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') + + else: + url = next_link + query_parameters = {} + + # 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.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 + + return response + + # Deserialize response + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def get_site_detector( + self, resource_group_name, site_name, diagnostic_category, detector_name, custom_headers=None, raw=False, **operation_config): + """Get Detector. + + Get Detector. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param diagnostic_category: Diagnostic Category + :type diagnostic_category: str + :param detector_name: Detector Name + :type detector_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.models.DetectorDefinitionPaged[~azure.mgmt.web.models.DetectorDefinition] + :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/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_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') + + else: + url = next_link + query_parameters = {} + + # 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.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 + + return response + + # Deserialize response + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def execute_site_detector( + self, resource_group_name, site_name, detector_name, diagnostic_category, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Execute Detector. + + Execute Detector. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param detector_name: Detector Resource Name + :type detector_name: str + :param diagnostic_category: Category Name + :type diagnostic_category: str + :param start_time: Start Time + :type start_time: datetime + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: 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: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.DiagnosticDetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, '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 start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + 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]: + 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('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_site_diagnostic_categories_slot( + self, resource_group_name, site_name, slot, custom_headers=None, raw=False, **operation_config): + """Get Diagnostics Categories. + + Get Diagnostics Categories. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param slot: Slot Name + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DiagnosticCategory + :rtype: + ~azure.mgmt.web.models.DiagnosticCategoryPaged[~azure.mgmt.web.models.DiagnosticCategory] + :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/sites/{siteName}/slots/{slot}/diagnostics' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_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') + + else: + url = next_link + query_parameters = {} + + # 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.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 + + return response + + # Deserialize response + deserialized = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DiagnosticCategoryPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def get_site_diagnostic_category_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """Get Diagnostics Category. + + Get Diagnostics Category. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param diagnostic_category: Diagnostic Category + :type diagnostic_category: str + :param slot: Slot Name + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticCategory or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.DiagnosticCategory or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.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('DiagnosticCategory', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_site_analyses_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """Get Site Analyses. + + Get Site Analyses. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param diagnostic_category: Diagnostic Category + :type diagnostic_category: str + :param slot: Slot Name + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of AnalysisDefinition + :rtype: + ~azure.mgmt.web.models.AnalysisDefinitionPaged[~azure.mgmt.web.models.AnalysisDefinition] + :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/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, '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') + + else: + url = next_link + query_parameters = {} + + # 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.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 + + return response + + # Deserialize response + deserialized = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.AnalysisDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def get_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, custom_headers=None, raw=False, **operation_config): + """Get Site Analysis. + + Get Site Analysis. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param diagnostic_category: Diagnostic Category + :type diagnostic_category: str + :param analysis_name: Analysis Name + :type analysis_name: str + :param slot: Slot - optional + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'analysisName': self._serialize.url("analysis_name", analysis_name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.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('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def execute_site_analysis_slot( + self, resource_group_name, site_name, diagnostic_category, analysis_name, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Execute Analysis. + + Execute Analysis. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param diagnostic_category: Category Name + :type diagnostic_category: str + :param analysis_name: Analysis Resource Name + :type analysis_name: str + :param slot: Slot Name + :type slot: str + :param start_time: Start Time + :type start_time: datetime + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: 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: DiagnosticAnalysis or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.DiagnosticAnalysis or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/analyses/{analysisName}/execute' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'analysisName': self._serialize.url("analysis_name", analysis_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 start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + 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]: + 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('DiagnosticAnalysis', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_site_detectors_slot( + self, resource_group_name, site_name, diagnostic_category, slot, custom_headers=None, raw=False, **operation_config): + """Get Detectors. + + Get Detectors. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param diagnostic_category: Diagnostic Category + :type diagnostic_category: str + :param slot: Slot Name + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.models.DetectorDefinitionPaged[~azure.mgmt.web.models.DetectorDefinition] + :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/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, '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') + + else: + url = next_link + query_parameters = {} + + # 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.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 + + return response + + # Deserialize response + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def get_site_detector_slot( + self, resource_group_name, site_name, diagnostic_category, detector_name, slot, custom_headers=None, raw=False, **operation_config): + """Get Detector. + + Get Detector. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param diagnostic_category: Diagnostic Category + :type diagnostic_category: str + :param detector_name: Detector Name + :type detector_name: str + :param slot: Slot Name + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of DetectorDefinition + :rtype: + ~azure.mgmt.web.models.DetectorDefinitionPaged[~azure.mgmt.web.models.DetectorDefinition] + :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/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_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') + + else: + url = next_link + query_parameters = {} + + # 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.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 + + return response + + # Deserialize response + deserialized = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.DetectorDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def execute_site_detector_slot( + self, resource_group_name, site_name, detector_name, diagnostic_category, slot, start_time=None, end_time=None, time_grain=None, custom_headers=None, raw=False, **operation_config): + """Execute Detector. + + Execute Detector. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param site_name: Site Name + :type site_name: str + :param detector_name: Detector Resource Name + :type detector_name: str + :param diagnostic_category: Category Name + :type diagnostic_category: str + :param slot: Slot Name + :type slot: str + :param start_time: Start Time + :type start_time: datetime + :param end_time: End Time + :type end_time: datetime + :param time_grain: Time Grain + :type time_grain: 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: DiagnosticDetectorResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.DiagnosticDetectorResponse or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slot}/diagnostics/{diagnosticCategory}/detectors/{detectorName}/execute' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'siteName': self._serialize.url("site_name", site_name, 'str'), + 'detectorName': self._serialize.url("detector_name", detector_name, 'str'), + 'diagnosticCategory': self._serialize.url("diagnostic_category", diagnostic_category, '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 start_time is not None: + query_parameters['startTime'] = self._serialize.query("start_time", start_time, 'iso-8601') + if end_time is not None: + query_parameters['endTime'] = self._serialize.query("end_time", end_time, 'iso-8601') + if time_grain is not None: + query_parameters['timeGrain'] = self._serialize.query("time_grain", time_grain, 'str', pattern=r'PT[1-9][0-9]+[SMH]') + 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]: + 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('DiagnosticDetectorResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized diff --git a/azure-mgmt-web/azure/mgmt/web/operations/domain_registration_provider_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/domain_registration_provider_operations.py new file mode 100644 index 000000000000..28259fad5dd2 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/operations/domain_registration_provider_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class DomainRegistrationProviderOperations(object): + """DomainRegistrationProviderOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An objec model deserializer. + :ivar api_version: API Version. Constant value: "2015-04-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-04-01" + + self.config = config + + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """Implements Csm operations Api to exposes the list of available Csm Apis + under the resource provider. + + Implements Csm operations Api to exposes the list of available Csm Apis + under the resource provider. + + :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 CsmOperationDescription + :rtype: + ~azure.mgmt.web.models.CsmOperationDescriptionPaged[~azure.mgmt.web.models.CsmOperationDescription] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/providers/Microsoft.DomainRegistration/operations' + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # 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.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 + + return response + + # Deserialize response + deserialized = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.CsmOperationDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized 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 b9ee95a10b0f..9efb853967fe 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 @@ -84,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) @@ -149,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) @@ -208,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) @@ -283,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) @@ -353,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) @@ -418,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) @@ -436,29 +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: ~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` - """ + 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 = { @@ -486,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) @@ -520,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) @@ -582,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) @@ -645,19 +675,19 @@ 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 [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) + if response.status_code == 202: + deserialized = self._deserialize('Domain', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -719,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) @@ -787,7 +817,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) @@ -866,7 +896,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) @@ -932,7 +962,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) @@ -1004,7 +1034,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 2c10eca08a11..6b279d77810d 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 @@ -69,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) @@ -132,7 +134,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,7 +191,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 ae3d77e21d02..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 @@ -87,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) @@ -143,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) @@ -209,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) @@ -285,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) @@ -348,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) @@ -404,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) @@ -469,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 6a408ae6526e..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 @@ -82,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) @@ -143,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) @@ -226,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 65ecd2d0ee7f..dac62beb5789 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 @@ -82,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) @@ -157,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) @@ -222,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, 404]: exp = CloudError(response) @@ -240,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 @@ -280,54 +343,34 @@ def create_or_update( 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): @@ -336,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) @@ -349,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) @@ -419,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, 204, 404]: exp = CloudError(response) @@ -507,7 +541,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, 202]: exp = CloudError(response) @@ -577,7 +611,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) @@ -653,7 +687,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) @@ -717,7 +751,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) @@ -789,7 +823,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) @@ -863,7 +897,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) @@ -930,7 +964,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) @@ -996,7 +1030,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) @@ -1068,7 +1102,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) @@ -1086,33 +1120,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: ~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` - """ + 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 = { @@ -1141,19 +1151,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): @@ -1162,10 +1231,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) @@ -1173,10 +1239,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) @@ -1238,7 +1300,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) @@ -1313,7 +1375,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) @@ -1377,7 +1439,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) @@ -1449,7 +1511,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) @@ -1513,7 +1575,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) @@ -1583,7 +1645,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) @@ -1646,7 +1708,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) @@ -1703,7 +1765,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) @@ -1778,7 +1840,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) @@ -1842,7 +1904,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) @@ -1906,7 +1968,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) @@ -1977,7 +2039,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) @@ -2051,7 +2113,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) @@ -2115,7 +2177,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) @@ -2133,27 +2195,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: 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` - """ + 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 = { @@ -2178,18 +2222,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): @@ -2198,10 +2293,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) @@ -2209,10 +2301,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) @@ -2272,7 +2360,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) @@ -2336,7 +2424,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) @@ -2402,7 +2490,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) @@ -2476,7 +2564,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) @@ -2542,7 +2630,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) @@ -2613,7 +2701,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) @@ -2684,7 +2772,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) @@ -2758,7 +2846,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) @@ -2828,7 +2916,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) @@ -2894,7 +2982,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) @@ -2955,9 +3043,9 @@ def get_web_site_container_logs( # 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=True, **operation_config) - if response.status_code not in [204, 200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -2973,7 +3061,7 @@ def get_web_site_container_logs( return deserialized - def get_container_logs_zip( + def get_web_site_container_logs_zip( self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): """Gets the ZIP archived docker log files for the given site. @@ -3023,9 +3111,9 @@ def get_container_logs_zip( # 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=True, **operation_config) - if response.status_code not in [204, 200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -3095,7 +3183,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) @@ -3163,7 +3251,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) @@ -3229,7 +3317,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) @@ -3288,7 +3376,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) @@ -3347,7 +3435,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) @@ -3412,7 +3500,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) @@ -3480,7 +3568,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) @@ -3553,7 +3641,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) @@ -3619,7 +3707,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) @@ -3683,7 +3771,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) @@ -3755,7 +3843,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) @@ -3824,7 +3912,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) @@ -3904,7 +3992,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) @@ -3971,7 +4059,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) @@ -4044,7 +4132,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) @@ -4108,7 +4196,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) @@ -4126,29 +4214,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: ~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` - """ + 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 = { @@ -4176,19 +4244,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): @@ -4197,10 +4319,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) @@ -4208,10 +4327,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) @@ -4265,7 +4380,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) @@ -4337,7 +4452,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) @@ -4401,7 +4516,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) @@ -4468,7 +4583,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) @@ -4486,31 +4601,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: ~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` - """ + 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 = { @@ -4539,19 +4632,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): @@ -4560,10 +4710,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) @@ -4571,10 +4718,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) @@ -4630,7 +4773,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) @@ -4692,7 +4835,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) @@ -4764,7 +4907,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) @@ -4834,7 +4977,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) @@ -4908,7 +5051,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) @@ -4974,7 +5117,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) @@ -5039,7 +5182,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) @@ -5115,7 +5258,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) @@ -5184,7 +5327,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) @@ -5253,7 +5396,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) @@ -5323,7 +5466,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) @@ -5387,7 +5530,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) @@ -5453,7 +5596,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) @@ -5520,7 +5663,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) @@ -5597,7 +5740,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) @@ -5663,7 +5806,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) @@ -5733,7 +5876,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) @@ -5805,7 +5948,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) @@ -5873,7 +6016,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) @@ -5891,31 +6034,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: ~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` - """ + 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 = { @@ -5944,19 +6065,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): @@ -5965,10 +6143,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) @@ -5976,10 +6151,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) @@ -6036,7 +6207,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) @@ -6115,7 +6286,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) @@ -6190,7 +6361,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,7 +6434,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) @@ -6334,7 +6505,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) @@ -6416,7 +6587,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) @@ -6494,7 +6665,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,7 +6747,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) @@ -6654,7 +6825,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) @@ -6720,7 +6891,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) @@ -6784,7 +6955,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) @@ -6858,7 +7029,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) @@ -6944,7 +7115,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) @@ -6963,32 +7134,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: - ~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` - """ + 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 = { @@ -7017,19 +7165,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): @@ -7038,10 +7244,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) @@ -7049,10 +7252,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) @@ -7060,30 +7259,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: - ~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` - """ + 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 = { @@ -7111,19 +7289,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): @@ -7132,10 +7365,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) @@ -7143,10 +7373,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) @@ -7202,7 +7428,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) @@ -7272,7 +7498,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) @@ -7347,7 +7573,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) @@ -7410,7 +7636,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) @@ -7475,9 +7701,9 @@ 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 [200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -7547,7 +7773,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) @@ -7612,7 +7838,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) @@ -7676,7 +7902,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) @@ -7743,7 +7969,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) @@ -7817,7 +8043,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) @@ -7883,7 +8109,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) @@ -7950,7 +8176,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) @@ -8020,7 +8246,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) @@ -8088,7 +8314,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) @@ -8154,7 +8380,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) @@ -8231,7 +8457,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) @@ -8304,7 +8530,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) @@ -8381,7 +8607,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) @@ -8454,7 +8680,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) @@ -8526,7 +8752,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) @@ -8596,7 +8822,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) @@ -8670,7 +8896,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) @@ -8736,7 +8962,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) @@ -8810,7 +9036,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) @@ -8828,30 +9054,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: ~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` - """ + 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 = { @@ -8879,23 +9084,71 @@ 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 [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 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): - if response.status_code not in [202]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -8904,10 +9157,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) @@ -8962,7 +9211,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) @@ -9030,7 +9279,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) @@ -9095,7 +9344,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) @@ -9165,7 +9414,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) @@ -9183,29 +9432,9 @@ def get_site_extension( return deserialized - def install_site_extension( - self, resource_group_name, name, site_extension_id, 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 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` - """ + def _install_site_extension_initial( + self, resource_group_name, name, site_extension_id, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/siteextensions/{siteExtensionId}' path_format_arguments = { @@ -9231,32 +9460,83 @@ 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, 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. - request = self._client.put(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + :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 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, + 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) @@ -9264,10 +9544,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) @@ -9323,7 +9599,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) @@ -9387,7 +9663,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) @@ -9456,7 +9732,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, 404]: exp = CloudError(response) @@ -9474,6 +9750,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 @@ -9517,55 +9854,35 @@ def create_or_update_slot( or ~msrest.pipeline.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') + 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): @@ -9574,12 +9891,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) @@ -9587,10 +9899,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) @@ -9661,7 +9969,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, 204, 404]: exp = CloudError(response) @@ -9753,7 +10061,7 @@ def update_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, 202]: exp = CloudError(response) @@ -9827,7 +10135,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) @@ -9907,7 +10215,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) @@ -9975,7 +10283,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) @@ -10051,7 +10359,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) @@ -10129,7 +10437,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) @@ -10200,7 +10508,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) @@ -10270,7 +10578,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) @@ -10346,7 +10654,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) @@ -10364,6 +10672,58 @@ def list_backup_status_secrets_slot( return deserialized + + 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 = { + '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'), + 'backupId': self._serialize.url("backup_id", backup_id, '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(request, 'RestoreRequest') + + # 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]: + 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 @@ -10394,48 +10754,32 @@ def restore_slot( or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore' - 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'), - 'backupId': self._serialize.url("backup_id", backup_id, '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(request, 'RestoreRequest') + 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(): - - 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): @@ -10444,10 +10788,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) @@ -10455,10 +10796,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) @@ -10524,7 +10861,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) @@ -10603,7 +10940,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) @@ -10671,7 +11008,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) @@ -10747,7 +11084,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) @@ -10815,7 +11152,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) @@ -10889,7 +11226,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) @@ -10956,7 +11293,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) @@ -11017,7 +11354,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) @@ -11096,7 +11433,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) @@ -11164,7 +11501,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) @@ -11232,7 +11569,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) @@ -11307,7 +11644,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) @@ -11385,7 +11722,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) @@ -11428,7 +11765,54 @@ def list_metadata_slot( :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata/list' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + 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('StringDictionary', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + + 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 = { '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'), @@ -11453,7 +11837,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) @@ -11463,7 +11847,7 @@ def list_metadata_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) + deserialized = self._deserialize('User', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -11495,43 +11879,30 @@ def list_publishing_credentials_slot( or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list' - 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') + 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(): - - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **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): @@ -11540,10 +11911,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) @@ -11551,10 +11919,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) @@ -11618,7 +11982,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) @@ -11686,7 +12050,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) @@ -11756,7 +12120,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) @@ -11831,7 +12195,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) @@ -11906,7 +12270,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) @@ -11984,7 +12348,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) @@ -12058,7 +12422,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) @@ -12128,7 +12492,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) @@ -12193,9 +12557,9 @@ def get_web_site_container_logs_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=True, **operation_config) - if response.status_code not in [204, 200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -12211,7 +12575,7 @@ def get_web_site_container_logs_slot( return deserialized - def get_container_logs_zip_slot( + def get_web_site_container_logs_zip_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): """Gets the ZIP archived docker log files for the given site. @@ -12265,9 +12629,9 @@ def get_container_logs_zip_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=True, **operation_config) - if response.status_code not in [204, 200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -12341,7 +12705,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) @@ -12413,7 +12777,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) @@ -12483,7 +12847,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) @@ -12546,7 +12910,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) @@ -12609,7 +12973,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) @@ -12678,7 +13042,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) @@ -12750,7 +13114,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) @@ -12827,7 +13191,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) @@ -12897,7 +13261,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) @@ -12965,7 +13329,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) @@ -13041,7 +13405,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) @@ -13114,7 +13478,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) @@ -13198,7 +13562,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) @@ -13269,7 +13633,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) @@ -13346,7 +13710,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) @@ -13414,7 +13778,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) @@ -13432,32 +13796,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: ~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` - """ + 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 = { @@ -13486,19 +13827,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): @@ -13507,10 +13906,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) @@ -13518,10 +13914,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) @@ -13579,7 +13971,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) @@ -13655,7 +14047,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) @@ -13723,7 +14115,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) @@ -13794,7 +14186,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) @@ -13812,34 +14204,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: ~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` - """ + 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 = { @@ -13869,19 +14236,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): @@ -13890,10 +14318,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) @@ -13901,10 +14326,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) @@ -13964,7 +14385,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) @@ -14030,7 +14451,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) @@ -14106,7 +14527,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) @@ -14180,7 +14601,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) @@ -14258,7 +14679,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) @@ -14328,7 +14749,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) @@ -14396,7 +14817,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) @@ -14475,7 +14896,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) @@ -14547,7 +14968,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) @@ -14619,7 +15040,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) @@ -14692,7 +15113,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) @@ -14759,7 +15180,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) @@ -14829,7 +15250,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) @@ -14900,7 +15321,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) @@ -14982,7 +15403,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) @@ -15052,7 +15473,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) @@ -15127,7 +15548,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) @@ -15203,7 +15624,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) @@ -15274,17 +15695,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: @@ -15321,48 +15794,32 @@ def create_instance_ms_deploy_operation_slot( 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): @@ -15371,10 +15828,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) @@ -15382,10 +15836,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) @@ -15446,7 +15896,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) @@ -15529,7 +15979,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) @@ -15608,7 +16058,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) @@ -15685,7 +16135,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) @@ -15760,7 +16210,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) @@ -15846,7 +16296,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) @@ -15928,7 +16378,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) @@ -16014,7 +16464,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) @@ -16096,7 +16546,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) @@ -16166,7 +16616,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) @@ -16234,7 +16684,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) @@ -16312,7 +16762,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) @@ -16402,7 +16852,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) @@ -16472,7 +16922,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) @@ -16546,7 +16996,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) @@ -16624,7 +17074,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) @@ -16690,7 +17140,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) @@ -16759,9 +17209,9 @@ 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 [200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -16835,7 +17285,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) @@ -16904,7 +17354,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) @@ -16972,7 +17422,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) @@ -17043,7 +17493,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) @@ -17121,7 +17571,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) @@ -17191,7 +17641,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) @@ -17262,7 +17712,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) @@ -17336,7 +17786,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) @@ -17408,7 +17858,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) @@ -17478,7 +17928,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) @@ -17559,7 +18009,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) @@ -17636,7 +18086,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) @@ -17717,7 +18167,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) @@ -17794,7 +18244,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) @@ -17870,7 +18320,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) @@ -17944,7 +18394,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) @@ -18022,7 +18472,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) @@ -18092,7 +18542,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) @@ -18170,7 +18620,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) @@ -18188,33 +18638,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: ~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` - """ + 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 = { @@ -18243,23 +18669,75 @@ 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 [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 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): - if response.status_code not in [202]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -18268,10 +18746,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) @@ -18330,7 +18804,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) @@ -18402,7 +18876,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) @@ -18471,7 +18945,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) @@ -18545,7 +19019,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) @@ -18563,6 +19037,56 @@ def get_site_extension_slot( return deserialized + + def _install_site_extension_slot_initial( + self, resource_group_name, name, site_extension_id, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}' + 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'), + 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.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, custom_headers=None, raw=False, **operation_config): """Install site extension on a web site, or a deployment slot. @@ -18589,58 +19113,40 @@ def install_site_extension_slot( or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/siteextensions/{siteExtensionId}' - 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'), - 'siteExtensionId': self._serialize.url("site_extension_id", site_extension_id, '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') + raw_result = self._install_site_extension_slot_initial( + resource_group_name=resource_group_name, + name=name, + site_extension_id=site_extension_id, + slot=slot, + 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, **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): - 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) @@ -18648,10 +19154,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) @@ -18711,7 +19213,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) @@ -18790,7 +19292,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) @@ -18809,34 +19311,9 @@ def internal_paging(next_link=None, raw=False): return deserialized - def swap_slot_slot( - self, resource_group_name, name, slot, 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 slot: Name of the source slot. If a slot is not specified, the - production slot is used as the source slot. - :type slot: 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` - """ + 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 @@ -18866,20 +19343,74 @@ def swap_slot_slot( # 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): + """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 slot: Name of the source slot. If a slot is not specified, the + production slot is used as the source slot. + :type slot: 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_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): @@ -18892,10 +19423,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) @@ -18960,7 +19487,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) @@ -19030,7 +19557,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) @@ -19048,6 +19575,59 @@ def get_source_control_slot( return deserialized + + 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 = { + '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(site_source_control, 'SiteSourceControl') + + # 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, 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. @@ -19076,47 +19656,31 @@ def create_or_update_source_control_slot( or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web' - 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(site_source_control, 'SiteSourceControl') + 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(): - - 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): @@ -19125,12 +19689,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) @@ -19138,10 +19697,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) @@ -19199,7 +19754,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) @@ -19268,7 +19823,7 @@ def update_source_control_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, 201]: exp = CloudError(response) @@ -19337,7 +19892,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) @@ -19397,7 +19952,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) @@ -19457,7 +20012,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) @@ -19517,7 +20072,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) @@ -19586,7 +20141,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) @@ -19658,7 +20213,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) @@ -19728,7 +20283,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) @@ -19800,7 +20355,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) @@ -19877,7 +20432,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) @@ -19947,7 +20502,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) @@ -20026,7 +20581,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) @@ -20095,7 +20650,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) @@ -20168,7 +20723,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) @@ -20248,7 +20803,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) @@ -20320,7 +20875,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) @@ -20393,7 +20948,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) @@ -20468,7 +21023,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) @@ -20553,7 +21108,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) @@ -20638,7 +21193,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) @@ -20714,7 +21269,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) @@ -20786,7 +21341,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) @@ -20868,7 +21423,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) @@ -20887,31 +21442,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: 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` - """ + 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 @@ -20941,19 +21474,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): @@ -20966,10 +21549,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) @@ -21031,7 +21610,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) @@ -21096,7 +21675,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) @@ -21114,30 +21693,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: ~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` - """ + 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 = { @@ -21165,19 +21723,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): @@ -21186,12 +21801,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) @@ -21199,10 +21809,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) @@ -21255,7 +21861,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) @@ -21319,7 +21925,7 @@ def update_source_control( # 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, 201]: exp = CloudError(response) @@ -21384,7 +21990,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) @@ -21440,7 +22046,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) @@ -21496,7 +22102,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) @@ -21552,7 +22158,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) @@ -21617,7 +22223,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) @@ -21685,7 +22291,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) @@ -21751,7 +22357,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) @@ -21819,7 +22425,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) @@ -21892,7 +22498,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) @@ -21958,7 +22564,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) @@ -22033,7 +22639,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) @@ -22098,7 +22704,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) @@ -22167,7 +22773,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) @@ -22243,7 +22849,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) @@ -22311,7 +22917,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) @@ -22380,7 +22986,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) @@ -22451,7 +23057,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) @@ -22531,7 +23137,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) @@ -22611,7 +23217,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) @@ -22683,7 +23289,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) @@ -22751,7 +23357,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/version.py b/azure-mgmt-web/azure/mgmt/web/version.py index 7aec38817408..53a203f32aaf 100644 --- a/azure-mgmt-web/azure/mgmt/web/version.py +++ b/azure-mgmt-web/azure/mgmt/web/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.34.1" +VERSION = "" 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 05942f19e7c4..65c6d7858530 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 @@ -18,10 +18,13 @@ from msrestazure.azure_operation import AzureOperationPoller import uuid from .operations.app_service_certificate_orders_operations import AppServiceCertificateOrdersOperations +from .operations.certificate_registration_provider_operations import CertificateRegistrationProviderOperations from .operations.domains_operations import DomainsOperations from .operations.top_level_domains_operations import TopLevelDomainsOperations +from .operations.domain_registration_provider_operations import DomainRegistrationProviderOperations from .operations.certificates_operations import CertificatesOperations from .operations.deleted_web_apps_operations import DeletedWebAppsOperations +from .operations.diagnostics_operations import DiagnosticsOperations from .operations.provider_operations import ProviderOperations from .operations.recommendations_operations import RecommendationsOperations from .operations.web_apps_operations import WebAppsOperations @@ -56,7 +59,7 @@ def __init__( super(WebSiteManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('websitemanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-web/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials @@ -71,14 +74,20 @@ class WebSiteManagementClient(object): :ivar app_service_certificate_orders: AppServiceCertificateOrders operations :vartype app_service_certificate_orders: azure.mgmt.web.operations.AppServiceCertificateOrdersOperations + :ivar certificate_registration_provider: CertificateRegistrationProvider operations + :vartype certificate_registration_provider: azure.mgmt.web.operations.CertificateRegistrationProviderOperations :ivar domains: Domains operations :vartype domains: azure.mgmt.web.operations.DomainsOperations :ivar top_level_domains: TopLevelDomains operations :vartype top_level_domains: azure.mgmt.web.operations.TopLevelDomainsOperations + :ivar domain_registration_provider: DomainRegistrationProvider operations + :vartype domain_registration_provider: azure.mgmt.web.operations.DomainRegistrationProviderOperations :ivar certificates: Certificates operations :vartype certificates: azure.mgmt.web.operations.CertificatesOperations :ivar deleted_web_apps: DeletedWebApps operations :vartype deleted_web_apps: azure.mgmt.web.operations.DeletedWebAppsOperations + :ivar diagnostics: Diagnostics operations + :vartype diagnostics: azure.mgmt.web.operations.DiagnosticsOperations :ivar provider: Provider operations :vartype provider: azure.mgmt.web.operations.ProviderOperations :ivar recommendations: Recommendations operations @@ -111,14 +120,20 @@ def __init__( self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( self._client, self.config, self._serialize, self._deserialize) + self.certificate_registration_provider = CertificateRegistrationProviderOperations( + self._client, self.config, self._serialize, self._deserialize) self.domains = DomainsOperations( self._client, self.config, self._serialize, self._deserialize) self.top_level_domains = TopLevelDomainsOperations( self._client, self.config, self._serialize, self._deserialize) + self.domain_registration_provider = DomainRegistrationProviderOperations( + self._client, self.config, self._serialize, self._deserialize) self.certificates = CertificatesOperations( self._client, self.config, self._serialize, self._deserialize) self.deleted_web_apps = DeletedWebAppsOperations( self._client, self.config, self._serialize, self._deserialize) + self.diagnostics = DiagnosticsOperations( + self._client, self.config, self._serialize, self._deserialize) self.provider = ProviderOperations( self._client, self.config, self._serialize, self._deserialize) self.recommendations = RecommendationsOperations( @@ -167,7 +182,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) @@ -228,7 +243,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) @@ -291,7 +306,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) @@ -353,7 +368,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) @@ -420,7 +435,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) @@ -447,7 +462,9 @@ def check_name_availability( :param name: Resource name to verify. :type name: str :param type: Resource type used for verification. Possible values - include: 'Site', 'Slot', 'HostingEnvironment' + include: 'Site', 'Slot', 'HostingEnvironment', 'PublishingUser', + 'Microsoft.Web/sites', 'Microsoft.Web/sites/slots', + 'Microsoft.Web/hostingEnvironments', 'Microsoft.Web/publishingUsers' :type type: str or ~azure.mgmt.web.models.CheckNameResourceTypes :param is_fqdn: Is fully qualified domain name. :type is_fqdn: bool @@ -492,7 +509,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) @@ -551,7 +568,7 @@ def get_subscription_deployment_locations( # 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) @@ -629,7 +646,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) @@ -697,7 +714,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) @@ -757,7 +774,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) @@ -824,7 +841,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) @@ -896,7 +913,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) @@ -958,7 +975,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) @@ -1030,7 +1047,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 d5356f60b700..3a62efe2d627 100644 --- a/azure-mgmt-web/build.json +++ b/azure-mgmt-web/build.json @@ -4,63 +4,167 @@ "resolvedInfo": null, "packageMetadata": { "name": "@microsoft.azure/autorest-core", - "version": "2.0.4168", + "version": "2.0.4216", "engines": { "node": ">=7.10.0" }, "dependencies": {}, "optionalDependencies": {}, "devDependencies": { - "@microsoft.azure/async-io": "~1.0.22", - "@microsoft.azure/extension": "~1.2.12", "@types/commonmark": "^0.27.0", + "@types/js-yaml": "^3.10.0", "@types/jsonpath": "^0.1.29", - "@types/node": "^8.0.28", - "@types/pify": "0.0.28", + "@types/node": "^8.0.53", "@types/source-map": "^0.5.0", "@types/yargs": "^8.0.2", - "commonmark": "^0.27.0", - "file-url": "^2.0.2", - "get-uri": "^2.0.0", - "jsonpath": "^0.2.11", - "linq-es2015": "^2.4.25", - "mocha": "3.4.2", - "mocha-typescript": "1.1.5", - "pify": "^3.0.0", - "safe-eval": "^0.3.0", - "shx": "^0.2.2", - "source-map": "^0.5.6", - "source-map-support": "^0.4.15", - "strip-bom": "^3.0.0", - "typescript": "2.5.3", - "untildify": "^3.0.2", - "urijs": "^1.18.10", - "vscode-jsonrpc": "^3.3.1", - "yaml-ast-parser": "https://github.com/olydis/yaml-ast-parser/releases/download/0.0.34/yaml-ast-parser-0.0.34.tgz", - "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.4168/node_modules/@microsoft.azure/autorest-core", - "_shasum": "33813111fc9bfa488bd600fbba48bc53cc9182c7", + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4216/node_modules/@microsoft.azure/autorest-core", + "_shasum": "f6b97454df552dfa54bd0df23f8309665be5fd4c", "_shrinkwrap": null, - "bin": null, - "_id": "@microsoft.azure/autorest-core@2.0.4168", - "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "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.4168/node_modules/@microsoft.azure/autorest-core", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" + "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.4168/node_modules/@microsoft.azure/autorest-core", - "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/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.2187.123898211001.personal-lock", + "options": { + "port": 37230, + "host": "2130712189", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.2187.123898211001.personal-lock:37230" + }, + "file": "/tmp/_root_.autorest.lock" + }, + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4229", + "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", + "@types/z-schema": "^3.16.31", + "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.4229/node_modules/@microsoft.azure/autorest-core", + "_shasum": "c19c0ee74fe38c5197be2e965cd729a633166ae0", + "_shrinkwrap": null, + "bin": { + "autorest-core": "./dist/app.js", + "autorest-language-service": "dist/language-service/language-service.js" + }, + "_id": "@microsoft.azure/autorest-core@2.0.4229", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4229/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.2187.123898211001.personal-lock", + "options": { + "port": 37230, + "host": "2130712189", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.2187.123898211001.personal-lock:37230" + }, + "file": "/tmp/_root_.autorest.lock" + }, "dotnetPath": "/root/.dotnet" }, "installationPath": "/root/.autorest" @@ -112,6 +216,37 @@ }, "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.2187.123898211001.personal-lock", + "options": { + "port": 37230, + "host": "2130712189", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.2187.123898211001.personal-lock:37230" + }, + "file": "/tmp/_root_.autorest.lock" + }, "dotnetPath": "/root/.dotnet" }, "installationPath": "/root/.autorest" @@ -120,12 +255,14 @@ "resolvedInfo": null, "packageMetadata": { "name": "@microsoft.azure/autorest.modeler", - "version": "2.1.22", + "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", @@ -144,25 +281,56 @@ "bundleDependencies": false, "peerDependencies": {}, "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_shasum": "ca425289fa38a210d279729048a4a91673f09c67", + "_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.1.22", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "_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.1.22/node_modules/@microsoft.azure/autorest.modeler", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" + "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.1.22/node_modules/@microsoft.azure/autorest.modeler", - "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/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.2187.123898211001.personal-lock", + "options": { + "port": 37230, + "host": "2130712189", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.2187.123898211001.personal-lock:37230" + }, + "file": "/tmp/_root_.autorest.lock" + }, "dotnetPath": "/root/.dotnet" }, "installationPath": "/root/.autorest" @@ -171,14 +339,14 @@ "resolvedInfo": null, "packageMetadata": { "name": "@microsoft.azure/autorest.python", - "version": "2.0.19", + "version": "2.1.32", "dependencies": { "dotnet-2.0.0": "^1.4.4" }, "optionalDependencies": {}, "devDependencies": { - "@microsoft.azure/autorest.testserver": "^1.9.0", - "autorest": "^2.0.0", + "@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", @@ -197,25 +365,56 @@ "bundleDependencies": false, "peerDependencies": {}, "deprecated": false, - "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "_shasum": "e069166c16fd903c8e1fdf9395b433f3043cb6e3", + "_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.0.19", - "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "_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.0.19/node_modules/@microsoft.azure/autorest.python", - "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", - "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" + "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.0.19/node_modules/@microsoft.azure/autorest.python", - "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/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.2187.123898211001.personal-lock", + "options": { + "port": 37230, + "host": "2130712189", + "exclusive": true + }, + "pipe": "/tmp/pipe__root_.autorest.2187.123898211001.personal-lock:37230" + }, + "file": "/tmp/_root_.autorest.lock" + }, "dotnetPath": "/root/.dotnet" }, "installationPath": "/root/.autorest"