diff --git a/azure-mgmt-web/azure/mgmt/web/__init__.py b/azure-mgmt-web/azure/mgmt/web/__init__.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/__init__.py b/azure-mgmt-web/azure/mgmt/web/models/__init__.py old mode 100755 new mode 100644 index c48783cac4f6..b67cb2131a19 --- a/azure-mgmt-web/azure/mgmt/web/models/__init__.py +++ b/azure-mgmt-web/azure/mgmt/web/models/__init__.py @@ -16,73 +16,12 @@ from .certificate_email import CertificateEmail from .certificate_order_action import CertificateOrderAction from .name_identifier import NameIdentifier +from .proxy_only_resource import ProxyOnlyResource from .reissue_certificate_order_request import ReissueCertificateOrderRequest from .renew_certificate_order_request import RenewCertificateOrderRequest from .resource import Resource from .site_seal import SiteSeal from .site_seal_request import SiteSealRequest -from .virtual_ip_mapping import VirtualIPMapping -from .address_response import AddressResponse -from .api_definition_info import ApiDefinitionInfo -from .virtual_network_profile import VirtualNetworkProfile -from .worker_pool import WorkerPool -from .stamp_capacity import StampCapacity -from .network_access_control_entry import NetworkAccessControlEntry -from .name_value_pair import NameValuePair -from .app_service_environment import AppServiceEnvironment -from .app_service_environment_resource import AppServiceEnvironmentResource -from .hosting_environment_profile import HostingEnvironmentProfile -from .sku_capacity import SkuCapacity -from .capability import Capability -from .sku_description import SkuDescription -from .app_service_plan import AppServicePlan -from .auto_heal_custom_action import AutoHealCustomAction -from .auto_heal_actions import AutoHealActions -from .requests_based_trigger import RequestsBasedTrigger -from .status_codes_based_trigger import StatusCodesBasedTrigger -from .slow_requests_based_trigger import SlowRequestsBasedTrigger -from .auto_heal_triggers import AutoHealTriggers -from .auto_heal_rules import AutoHealRules -from .cloning_info import CloningInfo -from .conn_string_info import ConnStringInfo -from .cors_settings import CorsSettings -from .localizable_string import LocalizableString -from .csm_usage_quota import CsmUsageQuota -from .error_entity import ErrorEntity -from .ramp_up_rule import RampUpRule -from .experiments import Experiments -from .handler_mapping import HandlerMapping -from .host_name_ssl_state import HostNameSslState -from .hosting_environment_diagnostics import HostingEnvironmentDiagnostics -from .ip_security_restriction import IpSecurityRestriction -from .metric_availabilily import MetricAvailabilily -from .metric_definition import MetricDefinition -from .operation import Operation -from .push_settings import PushSettings -from .resource_metric_name import ResourceMetricName -from .resource_metric_property import ResourceMetricProperty -from .resource_metric_value import ResourceMetricValue -from .resource_metric import ResourceMetric -from .resource_metric_availability import ResourceMetricAvailability -from .resource_metric_definition import ResourceMetricDefinition -from .site_machine_key import SiteMachineKey -from .virtual_directory import VirtualDirectory -from .virtual_application import VirtualApplication -from .site_limits import SiteLimits -from .site_config import SiteConfig -from .slot_swap_status import SlotSwapStatus -from .site import Site -from .sku_info import SkuInfo -from .usage import Usage -from .web_app_collection import WebAppCollection -from .worker_pool_resource import WorkerPoolResource -from .hybrid_connection import HybridConnection -from .hybrid_connection_key import HybridConnectionKey -from .hybrid_connection_limits import HybridConnectionLimits -from .vnet_gateway import VnetGateway -from .vnet_route import VnetRoute -from .vnet_info import VnetInfo -from .certificate import Certificate from .address import Address from .contact import Contact from .host_name import HostName @@ -92,10 +31,25 @@ from .domain_control_center_sso_request import DomainControlCenterSsoRequest from .domain_ownership_identifier import DomainOwnershipIdentifier from .domain_recommendation_search_parameters import DomainRecommendationSearchParameters +from .tld_legal_agreement import TldLegalAgreement +from .top_level_domain import TopLevelDomain +from .top_level_domain_agreement_option import TopLevelDomainAgreementOption +from .hosting_environment_profile import HostingEnvironmentProfile +from .certificate import Certificate +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 .recommendation import Recommendation from .recommendation_rule import RecommendationRule +from .capability import Capability from .csm_move_resource_envelope import CsmMoveResourceEnvelope from .geo_region import GeoRegion +from .sku_capacity import SkuCapacity from .global_csm_sku_description import GlobalCsmSkuDescription from .premier_add_on_offer import PremierAddOnOffer from .resource_name_availability import ResourceNameAvailability @@ -106,42 +60,85 @@ from .validate_request import ValidateRequest from .validate_response_error import ValidateResponseError from .validate_response import ValidateResponse -from .tld_legal_agreement import TldLegalAgreement -from .top_level_domain import TopLevelDomain -from .top_level_domain_agreement_option import TopLevelDomainAgreementOption +from .vnet_parameters import VnetParameters +from .vnet_validation_test_failure import VnetValidationTestFailure +from .vnet_validation_failure_details import VnetValidationFailureDetails +from .api_definition_info import ApiDefinitionInfo from .file_system_application_logs_config import FileSystemApplicationLogsConfig from .azure_table_storage_application_logs_config import AzureTableStorageApplicationLogsConfig from .azure_blob_storage_application_logs_config import AzureBlobStorageApplicationLogsConfig from .application_logs_config import ApplicationLogsConfig +from .auto_heal_custom_action import AutoHealCustomAction +from .auto_heal_actions import AutoHealActions +from .requests_based_trigger import RequestsBasedTrigger +from .status_codes_based_trigger import StatusCodesBasedTrigger +from .slow_requests_based_trigger import SlowRequestsBasedTrigger +from .auto_heal_triggers import AutoHealTriggers +from .auto_heal_rules import AutoHealRules from .azure_blob_storage_http_logs_config import AzureBlobStorageHttpLogsConfig from .database_backup_setting import DatabaseBackupSetting from .backup_item import BackupItem from .backup_schedule import BackupSchedule from .backup_request import BackupRequest +from .cloning_info import CloningInfo +from .conn_string_info import ConnStringInfo from .conn_string_value_type_pair import ConnStringValueTypePair from .connection_string_dictionary import ConnectionStringDictionary +from .cors_settings import CorsSettings from .csm_publishing_profile_options import CsmPublishingProfileOptions -from .csm_site_recovery_entity import CsmSiteRecoveryEntity from .csm_slot_entity import CsmSlotEntity +from .localizable_string import LocalizableString +from .csm_usage_quota import CsmUsageQuota +from .error_entity import ErrorEntity from .custom_hostname_analysis_result import CustomHostnameAnalysisResult from .deployment import Deployment from .enabled_config import EnabledConfig +from .ramp_up_rule import RampUpRule +from .experiments import Experiments from .file_system_http_logs_config import FileSystemHttpLogsConfig +from .handler_mapping import HandlerMapping from .host_name_binding import HostNameBinding +from .host_name_ssl_state import HostNameSslState from .http_logs_config import HttpLogsConfig +from .hybrid_connection import HybridConnection +from .hybrid_connection_key import HybridConnectionKey from .identifier import Identifier +from .ip_security_restriction import IpSecurityRestriction +from .ms_deploy import MSDeploy +from .ms_deploy_log_entry import MSDeployLogEntry +from .ms_deploy_log import MSDeployLog +from .ms_deploy_status import MSDeployStatus from .migrate_my_sql_request import MigrateMySqlRequest from .migrate_my_sql_status import MigrateMySqlStatus +from .name_value_pair import NameValuePair +from .vnet_route import VnetRoute +from .vnet_info import VnetInfo from .relay_service_connection_entity import RelayServiceConnectionEntity from .network_features import NetworkFeatures +from .operation import Operation from .perf_mon_sample import PerfMonSample from .perf_mon_set import PerfMonSet from .perf_mon_response import PerfMonResponse from .premier_add_on import PremierAddOn -from .recover_response import RecoverResponse -from .resource_health_metadata import ResourceHealthMetadata +from .public_certificate import PublicCertificate +from .push_settings import PushSettings +from .resource_metric_name import ResourceMetricName +from .resource_metric_property import ResourceMetricProperty +from .resource_metric_value import ResourceMetricValue +from .resource_metric import ResourceMetric +from .resource_metric_availability import ResourceMetricAvailability +from .resource_metric_definition import ResourceMetricDefinition from .restore_request import RestoreRequest from .restore_response import RestoreResponse +from .site_machine_key import SiteMachineKey +from .virtual_directory import VirtualDirectory +from .virtual_application import VirtualApplication +from .site_limits import SiteLimits +from .site_config import SiteConfig +from .snapshot_recovery_target import SnapshotRecoveryTarget +from .snapshot_recovery_request import SnapshotRecoveryRequest +from .slot_swap_status import SlotSwapStatus +from .site import Site from .site_auth_settings import SiteAuthSettings from .site_cloneability_criterion import SiteCloneabilityCriterion from .site_cloneability import SiteCloneability @@ -157,63 +154,66 @@ from .storage_migration_options import StorageMigrationOptions from .storage_migration_response import StorageMigrationResponse from .string_dictionary import StringDictionary -from .deleted_site import DeletedSite +from .vnet_gateway import VnetGateway +from .web_app_collection import WebAppCollection +from .virtual_ip_mapping import VirtualIPMapping +from .address_response import AddressResponse +from .virtual_network_profile import VirtualNetworkProfile +from .worker_pool import WorkerPool +from .stamp_capacity import StampCapacity +from .network_access_control_entry import NetworkAccessControlEntry +from .app_service_environment import AppServiceEnvironment +from .app_service_environment_resource import AppServiceEnvironmentResource +from .sku_description import SkuDescription +from .app_service_plan import AppServicePlan +from .hosting_environment_diagnostics import HostingEnvironmentDiagnostics +from .metric_availabilily import MetricAvailabilily +from .metric_definition import MetricDefinition +from .sku_info import SkuInfo +from .usage import Usage +from .worker_pool_resource import WorkerPoolResource +from .hybrid_connection_limits import HybridConnectionLimits from .app_service_certificate_order_paged import AppServiceCertificateOrderPaged from .app_service_certificate_resource_paged import AppServiceCertificateResourcePaged -from .app_service_environment_paged import AppServiceEnvironmentPaged -from .stamp_capacity_paged import StampCapacityPaged -from .resource_metric_paged import ResourceMetricPaged -from .worker_pool_resource_paged import WorkerPoolResourcePaged -from .resource_metric_definition_paged import ResourceMetricDefinitionPaged -from .sku_info_paged import SkuInfoPaged -from .usage_paged import UsagePaged -from .site_paged import SitePaged -from .app_service_plan_paged import AppServicePlanPaged -from .csm_usage_quota_paged import CsmUsageQuotaPaged -from .str_paged import StrPaged -from .hybrid_connection_paged import HybridConnectionPaged -from .certificate_paged import CertificatePaged from .domain_paged import DomainPaged from .name_identifier_paged import NameIdentifierPaged from .domain_ownership_identifier_paged import DomainOwnershipIdentifierPaged +from .top_level_domain_paged import TopLevelDomainPaged +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 .source_control_paged import SourceControlPaged from .geo_region_paged import GeoRegionPaged from .premier_add_on_offer_paged import PremierAddOnOfferPaged -from .top_level_domain_paged import TopLevelDomainPaged -from .tld_legal_agreement_paged import TldLegalAgreementPaged +from .site_paged import SitePaged from .backup_item_paged import BackupItemPaged from .site_config_resource_paged import SiteConfigResourcePaged from .deployment_paged import DeploymentPaged from .identifier_paged import IdentifierPaged from .host_name_binding_paged import HostNameBindingPaged from .site_instance_paged import SiteInstancePaged +from .resource_metric_definition_paged import ResourceMetricDefinitionPaged +from .resource_metric_paged import ResourceMetricPaged from .perf_mon_response_paged import PerfMonResponsePaged +from .public_certificate_paged import PublicCertificatePaged from .slot_difference_paged import SlotDifferencePaged from .snapshot_paged import SnapshotPaged -from .deleted_site_paged import DeletedSitePaged +from .csm_usage_quota_paged import CsmUsageQuotaPaged +from .app_service_environment_paged import AppServiceEnvironmentPaged +from .stamp_capacity_paged import StampCapacityPaged +from .worker_pool_resource_paged import WorkerPoolResourcePaged +from .sku_info_paged import SkuInfoPaged +from .usage_paged import UsagePaged +from .app_service_plan_paged import AppServicePlanPaged +from .str_paged import StrPaged +from .hybrid_connection_paged import HybridConnectionPaged from .web_site_management_client_enums import ( KeyVaultSecretStatus, CertificateProductType, ProvisioningState, CertificateOrderStatus, CertificateOrderActionType, - HostingEnvironmentStatus, - InternalLoadBalancingMode, - ComputeModeOptions, - WorkerSizeOptions, - AccessControlEntryAction, - StatusOptions, - AutoHealActionType, - ConnectionStringType, - SslState, - HostType, - OperationStatus, - UsageState, - SiteAvailabilityState, - ScmType, - ManagedPipelineMode, - SiteLoadBalancing, - RouteType, DomainStatus, AzureResourceType, CustomHostNameDnsRecordType, @@ -228,15 +228,36 @@ CheckNameResourceTypes, ValidateResourceTypes, LogLevel, + AutoHealActionType, BackupItemStatus, DatabaseType, FrequencyUnit, BackupRestoreOperationType, + ConnectionStringType, PublishingProfileFormat, DnsVerificationTestResult, + SslState, + HostType, + MSDeployLogEntryType, + MSDeployProvisioningState, + MySqlMigrationType, + OperationStatus, + RouteType, + PublicCertificateLocation, + UsageState, + SiteAvailabilityState, + ScmType, + ManagedPipelineMode, + SiteLoadBalancing, UnauthenticatedClientAction, BuiltInAuthenticationProvider, CloneAbilityResult, + HostingEnvironmentStatus, + InternalLoadBalancingMode, + ComputeModeOptions, + WorkerSizeOptions, + AccessControlEntryAction, + StatusOptions, SkuName, ) @@ -248,73 +269,12 @@ 'CertificateEmail', 'CertificateOrderAction', 'NameIdentifier', + 'ProxyOnlyResource', 'ReissueCertificateOrderRequest', 'RenewCertificateOrderRequest', 'Resource', 'SiteSeal', 'SiteSealRequest', - 'VirtualIPMapping', - 'AddressResponse', - 'ApiDefinitionInfo', - 'VirtualNetworkProfile', - 'WorkerPool', - 'StampCapacity', - 'NetworkAccessControlEntry', - 'NameValuePair', - 'AppServiceEnvironment', - 'AppServiceEnvironmentResource', - 'HostingEnvironmentProfile', - 'SkuCapacity', - 'Capability', - 'SkuDescription', - 'AppServicePlan', - 'AutoHealCustomAction', - 'AutoHealActions', - 'RequestsBasedTrigger', - 'StatusCodesBasedTrigger', - 'SlowRequestsBasedTrigger', - 'AutoHealTriggers', - 'AutoHealRules', - 'CloningInfo', - 'ConnStringInfo', - 'CorsSettings', - 'LocalizableString', - 'CsmUsageQuota', - 'ErrorEntity', - 'RampUpRule', - 'Experiments', - 'HandlerMapping', - 'HostNameSslState', - 'HostingEnvironmentDiagnostics', - 'IpSecurityRestriction', - 'MetricAvailabilily', - 'MetricDefinition', - 'Operation', - 'PushSettings', - 'ResourceMetricName', - 'ResourceMetricProperty', - 'ResourceMetricValue', - 'ResourceMetric', - 'ResourceMetricAvailability', - 'ResourceMetricDefinition', - 'SiteMachineKey', - 'VirtualDirectory', - 'VirtualApplication', - 'SiteLimits', - 'SiteConfig', - 'SlotSwapStatus', - 'Site', - 'SkuInfo', - 'Usage', - 'WebAppCollection', - 'WorkerPoolResource', - 'HybridConnection', - 'HybridConnectionKey', - 'HybridConnectionLimits', - 'VnetGateway', - 'VnetRoute', - 'VnetInfo', - 'Certificate', 'Address', 'Contact', 'HostName', @@ -324,10 +284,25 @@ 'DomainControlCenterSsoRequest', 'DomainOwnershipIdentifier', 'DomainRecommendationSearchParameters', + 'TldLegalAgreement', + 'TopLevelDomain', + 'TopLevelDomainAgreementOption', + 'HostingEnvironmentProfile', + 'Certificate', + 'DeletedSite', + 'CsmOperationDisplay', + 'Dimension', + 'MetricAvailability', + 'MetricSpecification', + 'ServiceSpecification', + 'CsmOperationDescriptionProperties', + 'CsmOperationDescription', 'Recommendation', 'RecommendationRule', + 'Capability', 'CsmMoveResourceEnvelope', 'GeoRegion', + 'SkuCapacity', 'GlobalCsmSkuDescription', 'PremierAddOnOffer', 'ResourceNameAvailability', @@ -338,42 +313,85 @@ 'ValidateRequest', 'ValidateResponseError', 'ValidateResponse', - 'TldLegalAgreement', - 'TopLevelDomain', - 'TopLevelDomainAgreementOption', + 'VnetParameters', + 'VnetValidationTestFailure', + 'VnetValidationFailureDetails', + 'ApiDefinitionInfo', 'FileSystemApplicationLogsConfig', 'AzureTableStorageApplicationLogsConfig', 'AzureBlobStorageApplicationLogsConfig', 'ApplicationLogsConfig', + 'AutoHealCustomAction', + 'AutoHealActions', + 'RequestsBasedTrigger', + 'StatusCodesBasedTrigger', + 'SlowRequestsBasedTrigger', + 'AutoHealTriggers', + 'AutoHealRules', 'AzureBlobStorageHttpLogsConfig', 'DatabaseBackupSetting', 'BackupItem', 'BackupSchedule', 'BackupRequest', + 'CloningInfo', + 'ConnStringInfo', 'ConnStringValueTypePair', 'ConnectionStringDictionary', + 'CorsSettings', 'CsmPublishingProfileOptions', - 'CsmSiteRecoveryEntity', 'CsmSlotEntity', + 'LocalizableString', + 'CsmUsageQuota', + 'ErrorEntity', 'CustomHostnameAnalysisResult', 'Deployment', 'EnabledConfig', + 'RampUpRule', + 'Experiments', 'FileSystemHttpLogsConfig', + 'HandlerMapping', 'HostNameBinding', + 'HostNameSslState', 'HttpLogsConfig', + 'HybridConnection', + 'HybridConnectionKey', 'Identifier', + 'IpSecurityRestriction', + 'MSDeploy', + 'MSDeployLogEntry', + 'MSDeployLog', + 'MSDeployStatus', 'MigrateMySqlRequest', 'MigrateMySqlStatus', + 'NameValuePair', + 'VnetRoute', + 'VnetInfo', 'RelayServiceConnectionEntity', 'NetworkFeatures', + 'Operation', 'PerfMonSample', 'PerfMonSet', 'PerfMonResponse', 'PremierAddOn', - 'RecoverResponse', - 'ResourceHealthMetadata', + 'PublicCertificate', + 'PushSettings', + 'ResourceMetricName', + 'ResourceMetricProperty', + 'ResourceMetricValue', + 'ResourceMetric', + 'ResourceMetricAvailability', + 'ResourceMetricDefinition', 'RestoreRequest', 'RestoreResponse', + 'SiteMachineKey', + 'VirtualDirectory', + 'VirtualApplication', + 'SiteLimits', + 'SiteConfig', + 'SnapshotRecoveryTarget', + 'SnapshotRecoveryRequest', + 'SlotSwapStatus', + 'Site', 'SiteAuthSettings', 'SiteCloneabilityCriterion', 'SiteCloneability', @@ -389,62 +407,65 @@ 'StorageMigrationOptions', 'StorageMigrationResponse', 'StringDictionary', - 'DeletedSite', + 'VnetGateway', + 'WebAppCollection', + 'VirtualIPMapping', + 'AddressResponse', + 'VirtualNetworkProfile', + 'WorkerPool', + 'StampCapacity', + 'NetworkAccessControlEntry', + 'AppServiceEnvironment', + 'AppServiceEnvironmentResource', + 'SkuDescription', + 'AppServicePlan', + 'HostingEnvironmentDiagnostics', + 'MetricAvailabilily', + 'MetricDefinition', + 'SkuInfo', + 'Usage', + 'WorkerPoolResource', + 'HybridConnectionLimits', 'AppServiceCertificateOrderPaged', 'AppServiceCertificateResourcePaged', - 'AppServiceEnvironmentPaged', - 'StampCapacityPaged', - 'ResourceMetricPaged', - 'WorkerPoolResourcePaged', - 'ResourceMetricDefinitionPaged', - 'SkuInfoPaged', - 'UsagePaged', - 'SitePaged', - 'AppServicePlanPaged', - 'CsmUsageQuotaPaged', - 'StrPaged', - 'HybridConnectionPaged', - 'CertificatePaged', 'DomainPaged', 'NameIdentifierPaged', 'DomainOwnershipIdentifierPaged', + 'TopLevelDomainPaged', + 'TldLegalAgreementPaged', + 'CertificatePaged', + 'DeletedSitePaged', + 'CsmOperationDescriptionPaged', 'SourceControlPaged', 'GeoRegionPaged', 'PremierAddOnOfferPaged', - 'TopLevelDomainPaged', - 'TldLegalAgreementPaged', + 'SitePaged', 'BackupItemPaged', 'SiteConfigResourcePaged', 'DeploymentPaged', 'IdentifierPaged', 'HostNameBindingPaged', 'SiteInstancePaged', + 'ResourceMetricDefinitionPaged', + 'ResourceMetricPaged', 'PerfMonResponsePaged', + 'PublicCertificatePaged', 'SlotDifferencePaged', 'SnapshotPaged', - 'DeletedSitePaged', + 'CsmUsageQuotaPaged', + 'AppServiceEnvironmentPaged', + 'StampCapacityPaged', + 'WorkerPoolResourcePaged', + 'SkuInfoPaged', + 'UsagePaged', + 'AppServicePlanPaged', + 'StrPaged', + 'HybridConnectionPaged', 'KeyVaultSecretStatus', 'CertificateProductType', 'ProvisioningState', 'CertificateOrderStatus', 'CertificateOrderActionType', - 'HostingEnvironmentStatus', - 'InternalLoadBalancingMode', - 'ComputeModeOptions', - 'WorkerSizeOptions', - 'AccessControlEntryAction', - 'StatusOptions', - 'AutoHealActionType', - 'ConnectionStringType', - 'SslState', - 'HostType', - 'OperationStatus', - 'UsageState', - 'SiteAvailabilityState', - 'ScmType', - 'ManagedPipelineMode', - 'SiteLoadBalancing', - 'RouteType', 'DomainStatus', 'AzureResourceType', 'CustomHostNameDnsRecordType', @@ -459,14 +480,35 @@ 'CheckNameResourceTypes', 'ValidateResourceTypes', 'LogLevel', + 'AutoHealActionType', 'BackupItemStatus', 'DatabaseType', 'FrequencyUnit', 'BackupRestoreOperationType', + 'ConnectionStringType', 'PublishingProfileFormat', 'DnsVerificationTestResult', + 'SslState', + 'HostType', + 'MSDeployLogEntryType', + 'MSDeployProvisioningState', + 'MySqlMigrationType', + 'OperationStatus', + 'RouteType', + 'PublicCertificateLocation', + 'UsageState', + 'SiteAvailabilityState', + 'ScmType', + 'ManagedPipelineMode', + 'SiteLoadBalancing', 'UnauthenticatedClientAction', 'BuiltInAuthenticationProvider', 'CloneAbilityResult', + 'HostingEnvironmentStatus', + 'InternalLoadBalancingMode', + 'ComputeModeOptions', + 'WorkerSizeOptions', + 'AccessControlEntryAction', + 'StatusOptions', 'SkuName', ] diff --git a/azure-mgmt-web/azure/mgmt/web/models/address.py b/azure-mgmt-web/azure/mgmt/web/models/address.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/address_response.py b/azure-mgmt-web/azure/mgmt/web/models/address_response.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index c53eda034b4f..a1152b6b8a4d --- 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 @@ -20,14 +20,14 @@ class AppServiceCertificateOrder(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict :param certificates: State of the Key Vault secret. @@ -88,7 +88,9 @@ class AppServiceCertificateOrder(Resource): _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, 'domain_verification_token': {'readonly': True}, 'validity_in_years': {'maximum': 3, 'minimum': 1}, 'provisioning_state': {'readonly': True}, @@ -132,8 +134,8 @@ class AppServiceCertificateOrder(Resource): 'next_auto_renewal_time_stamp': {'key': 'properties.nextAutoRenewalTimeStamp', 'type': 'iso-8601'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, certificates=None, distinguished_name=None, validity_in_years=1, key_size=2048, product_type=None, auto_renew=True, csr=None): - super(AppServiceCertificateOrder, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + 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): + super(AppServiceCertificateOrder, self).__init__(kind=kind, location=location, tags=tags) self.certificates = certificates self.distinguished_name = distinguished_name self.domain_verification_token = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_order_paged.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_order_paged.py old mode 100755 new mode 100644 index bb627eb1ccea..d20102d9afc7 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_order_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_order_paged.py @@ -14,7 +14,7 @@ class AppServiceCertificateOrderPaged(Paged): """ - A paging container for iterating over a list of AppServiceCertificateOrder object + A paging container for iterating over a list of :class:`AppServiceCertificateOrder ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_resource.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_resource.py old mode 100755 new mode 100644 index 1219de2b3cbf..5c45ff9c761b --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_resource.py @@ -21,14 +21,14 @@ class AppServiceCertificateResource(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict :param key_vault_id: Key Vault resource Id. @@ -47,7 +47,9 @@ class AppServiceCertificateResource(Resource): _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, 'provisioning_state': {'readonly': True}, } @@ -63,8 +65,8 @@ class AppServiceCertificateResource(Resource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'KeyVaultSecretStatus'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, key_vault_id=None, key_vault_secret_name=None): - super(AppServiceCertificateResource, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, location, kind=None, tags=None, key_vault_id=None, key_vault_secret_name=None): + super(AppServiceCertificateResource, self).__init__(kind=kind, location=location, tags=tags) 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_resource_paged.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_resource_paged.py old mode 100755 new mode 100644 index 2b5060ead6d0..bd6469897d27 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_resource_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_certificate_resource_paged.py @@ -14,7 +14,7 @@ class AppServiceCertificateResourcePaged(Paged): """ - A paging container for iterating over a list of AppServiceCertificateResource object + A paging container for iterating over a list of :class:`AppServiceCertificateResource ` object """ _attribute_map = { 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_paged.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_paged.py old mode 100755 new mode 100644 index 1f2a0304bdb7..ccdb75515459 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_paged.py @@ -14,7 +14,7 @@ class AppServiceEnvironmentPaged(Paged): """ - A paging container for iterating over a list of AppServiceEnvironment object + A paging container for iterating over a list of :class:`AppServiceEnvironment ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource.py old mode 100755 new mode 100644 index 7487c86bdb5c..df9a13d8967b --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource.py @@ -20,14 +20,14 @@ class AppServiceEnvironmentResource(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict :param app_service_environment_resource_name: Name of the App Service @@ -145,7 +145,9 @@ class AppServiceEnvironmentResource(Resource): _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, 'app_service_environment_resource_name': {'required': True}, 'app_service_environment_resource_location': {'required': True}, 'provisioning_state': {'readonly': True}, @@ -213,8 +215,8 @@ class AppServiceEnvironmentResource(Resource): 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, } - def __init__(self, location, app_service_environment_resource_name, app_service_environment_resource_location, virtual_network, worker_pools, name=None, kind=None, type=None, tags=None, vnet_name=None, vnet_resource_group_name=None, vnet_subnet_name=None, internal_load_balancing_mode=None, multi_size=None, multi_role_count=None, ipssl_address_count=None, dns_suffix=None, network_access_control_list=None, front_end_scale_factor=None, api_management_account_id=None, suspended=None, dynamic_cache_enabled=None, cluster_settings=None): - super(AppServiceEnvironmentResource, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, location, app_service_environment_resource_name, app_service_environment_resource_location, virtual_network, worker_pools, kind=None, tags=None, vnet_name=None, vnet_resource_group_name=None, vnet_subnet_name=None, internal_load_balancing_mode=None, multi_size=None, multi_role_count=None, ipssl_address_count=None, dns_suffix=None, network_access_control_list=None, front_end_scale_factor=None, api_management_account_id=None, suspended=None, dynamic_cache_enabled=None, cluster_settings=None): + super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags) self.app_service_environment_resource_name = app_service_environment_resource_name self.app_service_environment_resource_location = app_service_environment_resource_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 old mode 100755 new mode 100644 index 637372e778c1..446e65859772 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan.py @@ -20,14 +20,14 @@ class AppServicePlan(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict :param app_service_plan_name: Name for the App Service plan. @@ -78,7 +78,9 @@ class AppServicePlan(Resource): _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, 'status': {'readonly': True}, 'subscription': {'readonly': True}, 'maximum_number_of_workers': {'readonly': True}, @@ -113,8 +115,8 @@ class AppServicePlan(Resource): 'sku': {'key': 'sku', 'type': 'SkuDescription'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, app_service_plan_name=None, worker_tier_name=None, admin_site_name=None, hosting_environment_profile=None, per_site_scaling=False, reserved=False, target_worker_count=None, target_worker_size_id=None, sku=None): - super(AppServicePlan, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, location, kind=None, tags=None, app_service_plan_name=None, worker_tier_name=None, admin_site_name=None, hosting_environment_profile=None, per_site_scaling=False, reserved=False, target_worker_count=None, target_worker_size_id=None, sku=None): + 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 self.status = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_paged.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_paged.py old mode 100755 new mode 100644 index c7d761bf274c..240de20bf22d --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_paged.py @@ -14,7 +14,7 @@ class AppServicePlanPaged(Paged): """ - A paging container for iterating over a list of AppServicePlan object + A paging container for iterating over a list of :class:`AppServicePlan ` object """ _attribute_map = { 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index 6aca89aeff84..d3e9babb915b --- 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 @@ -22,7 +22,8 @@ class AzureBlobStorageHttpLogsConfig(Model): Remove blobs older than X days. 0 or lower means no retention. :type retention_in_days: int - :param enabled: Enabled. + :param enabled: True if configuration is enabled, false if it is disabled + and null if configuration is not set. :type enabled: bool """ 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/backup_item.py b/azure-mgmt-web/azure/mgmt/web/models/backup_item.py old mode 100755 new mode 100644 index 8203a6a22b23..60bb4603cc55 --- a/azure-mgmt-web/azure/mgmt/web/models/backup_item.py +++ b/azure-mgmt-web/azure/mgmt/web/models/backup_item.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class BackupItem(Resource): +class BackupItem(ProxyOnlyResource): """Backup description. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class BackupItem(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar backup_id: Id of the backup. :vartype backup_id: int :ivar storage_account_url: SAS URL for the storage account container which @@ -71,7 +67,8 @@ class BackupItem(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'backup_id': {'readonly': True}, 'storage_account_url': {'readonly': True}, 'blob_name': {'readonly': True}, @@ -92,9 +89,7 @@ class BackupItem(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}'}, 'backup_id': {'key': 'properties.id', 'type': 'int'}, 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, 'blob_name': {'key': 'properties.blobName', 'type': 'str'}, @@ -111,8 +106,8 @@ class BackupItem(Resource): 'website_size_in_bytes': {'key': 'properties.websiteSizeInBytes', 'type': 'long'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(BackupItem, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(BackupItem, self).__init__(kind=kind) self.backup_id = None self.storage_account_url = None self.blob_name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/backup_item_paged.py b/azure-mgmt-web/azure/mgmt/web/models/backup_item_paged.py old mode 100755 new mode 100644 index f87994ebedd2..1530489f5d56 --- a/azure-mgmt-web/azure/mgmt/web/models/backup_item_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/backup_item_paged.py @@ -14,7 +14,7 @@ class BackupItemPaged(Paged): """ - A paging container for iterating over a list of BackupItem object + A paging container for iterating over a list of :class:`BackupItem ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/backup_request.py b/azure-mgmt-web/azure/mgmt/web/models/backup_request.py old mode 100755 new mode 100644 index 2e77db49936b..e2da65d556f6 --- a/azure-mgmt-web/azure/mgmt/web/models/backup_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/backup_request.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class BackupRequest(Resource): +class BackupRequest(ProxyOnlyResource): """Description of a backup which will be performed. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class BackupRequest(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param backup_request_name: Name of the backup. :type backup_request_name: str :param enabled: True if the backup schedule is enabled (must be included @@ -45,23 +41,22 @@ class BackupRequest(Resource): :type databases: list of :class:`DatabaseBackupSetting ` :param backup_request_type: Type of the backup. Possible values include: - 'Default', 'Clone', 'Relocation' + 'Default', 'Clone', 'Relocation', 'Snapshot' :type backup_request_type: str or :class:`BackupRestoreOperationType ` """ _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'backup_request_name': {'key': 'properties.name', 'type': 'str'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, @@ -70,8 +65,8 @@ class BackupRequest(Resource): 'backup_request_type': {'key': 'properties.type', 'type': 'BackupRestoreOperationType'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, backup_request_name=None, enabled=None, storage_account_url=None, backup_schedule=None, databases=None, backup_request_type=None): - super(BackupRequest, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, backup_request_name=None, enabled=None, storage_account_url=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 self.storage_account_url = storage_account_url diff --git a/azure-mgmt-web/azure/mgmt/web/models/backup_schedule.py b/azure-mgmt-web/azure/mgmt/web/models/backup_schedule.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/capability.py b/azure-mgmt-web/azure/mgmt/web/models/capability.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate.py b/azure-mgmt-web/azure/mgmt/web/models/certificate.py old mode 100755 new mode 100644 index d6395f0b716a..fc218e6f4621 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate.py @@ -20,14 +20,14 @@ class Certificate(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict :ivar friendly_name: Friendly name of the certificate. @@ -86,7 +86,9 @@ class Certificate(Resource): _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, 'friendly_name': {'readonly': True}, 'subject_name': {'readonly': True}, 'site_name': {'readonly': True}, @@ -134,8 +136,8 @@ class Certificate(Resource): 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, host_names=None, pfx_blob=None, password=None, key_vault_id=None, key_vault_secret_name=None, server_farm_id=None): - super(Certificate, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + 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): + super(Certificate, self).__init__(kind=kind, location=location, tags=tags) self.friendly_name = None self.subject_name = None self.host_names = host_names diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate_details.py b/azure-mgmt-web/azure/mgmt/web/models/certificate_details.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate_email.py b/azure-mgmt-web/azure/mgmt/web/models/certificate_email.py old mode 100755 new mode 100644 index c4a81d856a92..674c722acc58 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate_email.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate_email.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class CertificateEmail(Resource): +class CertificateEmail(ProxyOnlyResource): """SSL certificate email. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class CertificateEmail(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param email_id: Email id. :type email_id: str :param time_stamp: Time stamp. @@ -38,21 +34,20 @@ class CertificateEmail(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'email_id': {'key': 'properties.emailId', 'type': 'str'}, 'time_stamp': {'key': 'properties.timeStamp', 'type': 'iso-8601'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, email_id=None, time_stamp=None): - super(CertificateEmail, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, email_id=None, time_stamp=None): + super(CertificateEmail, self).__init__(kind=kind) self.email_id = email_id self.time_stamp = time_stamp 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 old mode 100755 new mode 100644 index 563434e4f8f4..930c876182bd --- a/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action.py @@ -20,14 +20,14 @@ class CertificateOrderAction(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict :param certificate_order_action_type: Action type. Possible values @@ -45,7 +45,9 @@ class CertificateOrderAction(Resource): _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, } _attribute_map = { @@ -59,7 +61,7 @@ class CertificateOrderAction(Resource): 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, certificate_order_action_type=None, created_at=None): - super(CertificateOrderAction, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + 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) 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_paged.py b/azure-mgmt-web/azure/mgmt/web/models/certificate_paged.py old mode 100755 new mode 100644 index e9239a0e1819..183a18ffe597 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate_paged.py @@ -14,7 +14,7 @@ class CertificatePaged(Paged): """ - A paging container for iterating over a list of Certificate object + A paging container for iterating over a list of :class:`Certificate ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/cloning_info.py b/azure-mgmt-web/azure/mgmt/web/models/cloning_info.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/connection_string_dictionary.py b/azure-mgmt-web/azure/mgmt/web/models/connection_string_dictionary.py old mode 100755 new mode 100644 index e7ee71362419..d3e88bcdbb86 --- a/azure-mgmt-web/azure/mgmt/web/models/connection_string_dictionary.py +++ b/azure-mgmt-web/azure/mgmt/web/models/connection_string_dictionary.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class ConnectionStringDictionary(Resource): +class ConnectionStringDictionary(ProxyOnlyResource): """String dictionary resource. Variables are only populated by the server, and will be ignored when @@ -20,35 +20,30 @@ class ConnectionStringDictionary(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param properties: Connection strings. :type properties: dict """ _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'properties': {'key': 'properties', 'type': '{ConnStringValueTypePair}'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, properties=None): - super(ConnectionStringDictionary, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, properties=None): + super(ConnectionStringDictionary, self).__init__(kind=kind) self.properties = properties diff --git a/azure-mgmt-web/azure/mgmt/web/models/contact.py b/azure-mgmt-web/azure/mgmt/web/models/contact.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py b/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index 10bd4c445a80..64bcf3e1cb2b --- 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 @@ -23,7 +23,7 @@ class CsmMoveResourceEnvelope(Model): """ _validation = { - 'target_resource_group': {'max_length': 90, 'min_length': 1, 'pattern': ' ^[-\w\._\(\)]+[^\.]$'}, + 'target_resource_group': {'max_length': 90, 'min_length': 1, 'pattern': r' ^[-\w\._\(\)]+[^\.]$'}, } _attribute_map = { 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 new file mode 100644 index 000000000000..c38991e8cb89 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description.py @@ -0,0 +1,41 @@ +# 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 CsmOperationDescription(Model): + """CsmOperationDescription. + + :param name: + :type name: str + :param display: + :type display: :class:`CsmOperationDisplay + ` + :param origin: + :type origin: str + :param properties: + :type properties: :class:`CsmOperationDescriptionProperties + ` + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'CsmOperationDisplay'}, + 'origin': {'key': 'origin', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'CsmOperationDescriptionProperties'}, + } + + def __init__(self, name=None, display=None, origin=None, properties=None): + self.name = name + self.display = display + self.origin = origin + self.properties = properties diff --git a/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description_paged.py b/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description_paged.py new file mode 100644 index 000000000000..59a25211c56f --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description_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 CsmOperationDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`CsmOperationDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[CsmOperationDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(CsmOperationDescriptionPaged, self).__init__(*args, **kwargs) 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 new file mode 100644 index 000000000000..4b7ec63febc7 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/csm_operation_description_properties.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 CsmOperationDescriptionProperties(Model): + """CsmOperationDescriptionProperties. + + :param service_specification: + :type service_specification: :class:`ServiceSpecification + ` + """ + + _attribute_map = { + 'service_specification': {'key': 'serviceSpecification', 'type': 'ServiceSpecification'}, + } + + def __init__(self, service_specification=None): + 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 new file mode 100644 index 000000000000..95e6923af121 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/csm_operation_display.py @@ -0,0 +1,39 @@ +# 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 CsmOperationDisplay(Model): + """CsmOperationDisplay. + + :param provider: + :type provider: str + :param resource: + :type resource: str + :param operation: + :type operation: str + :param description: + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, provider=None, resource=None, operation=None, description=None): + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/csm_site_recovery_entity.py b/azure-mgmt-web/azure/mgmt/web/models/csm_site_recovery_entity.py deleted file mode 100755 index 66409bf9bade..000000000000 --- a/azure-mgmt-web/azure/mgmt/web/models/csm_site_recovery_entity.py +++ /dev/null @@ -1,38 +0,0 @@ -# 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 CsmSiteRecoveryEntity(Model): - """Details about app recovery operation. - - :param snapshot_time: Point in time in which the app recovery should be - attempted. - :type snapshot_time: datetime - :param site_name: [Optional] Destination app name into which app should be - recovered. This is case when new app should be created instead. - :type site_name: str - :param slot_name: [Optional] Destination app slot name into which app - should be recovered. - :type slot_name: str - """ - - _attribute_map = { - 'snapshot_time': {'key': 'snapshotTime', 'type': 'iso-8601'}, - 'site_name': {'key': 'siteName', 'type': 'str'}, - 'slot_name': {'key': 'slotName', 'type': 'str'}, - } - - def __init__(self, snapshot_time=None, site_name=None, slot_name=None): - self.snapshot_time = snapshot_time - self.site_name = site_name - self.slot_name = slot_name 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/csm_usage_quota_paged.py b/azure-mgmt-web/azure/mgmt/web/models/csm_usage_quota_paged.py old mode 100755 new mode 100644 index b5e450c8a5e5..da6f2682cd3e --- a/azure-mgmt-web/azure/mgmt/web/models/csm_usage_quota_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/csm_usage_quota_paged.py @@ -14,7 +14,7 @@ class CsmUsageQuotaPaged(Paged): """ - A paging container for iterating over a list of CsmUsageQuota object + A paging container for iterating over a list of :class:`CsmUsageQuota ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/custom_hostname_analysis_result.py b/azure-mgmt-web/azure/mgmt/web/models/custom_hostname_analysis_result.py old mode 100755 new mode 100644 index d9999d2881e5..a4097d641828 --- a/azure-mgmt-web/azure/mgmt/web/models/custom_hostname_analysis_result.py +++ b/azure-mgmt-web/azure/mgmt/web/models/custom_hostname_analysis_result.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class CustomHostnameAnalysisResult(Resource): +class CustomHostnameAnalysisResult(ProxyOnlyResource): """Custom domain analysis. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class CustomHostnameAnalysisResult(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar is_hostname_already_verified: true if hostname is already verified; otherwise, false. :vartype is_hostname_already_verified: bool @@ -67,7 +63,8 @@ class CustomHostnameAnalysisResult(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'is_hostname_already_verified': {'readonly': True}, 'custom_domain_verification_test': {'readonly': True}, 'custom_domain_verification_failure_info': {'readonly': True}, @@ -80,9 +77,7 @@ class CustomHostnameAnalysisResult(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}'}, 'is_hostname_already_verified': {'key': 'properties.isHostnameAlreadyVerified', 'type': 'bool'}, 'custom_domain_verification_test': {'key': 'properties.customDomainVerificationTest', 'type': 'DnsVerificationTestResult'}, 'custom_domain_verification_failure_info': {'key': 'properties.customDomainVerificationFailureInfo', 'type': 'ErrorEntity'}, @@ -96,8 +91,8 @@ class CustomHostnameAnalysisResult(Resource): 'alternate_txt_records': {'key': 'properties.alternateTxtRecords', 'type': '[str]'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None): - super(CustomHostnameAnalysisResult, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, c_name_records=None, txt_records=None, a_records=None, alternate_cname_records=None, alternate_txt_records=None): + super(CustomHostnameAnalysisResult, self).__init__(kind=kind) self.is_hostname_already_verified = None self.custom_domain_verification_test = None self.custom_domain_verification_failure_info = None 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py b/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py old mode 100755 new mode 100644 index 73630b550145..6859ec5c1895 --- a/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py @@ -9,232 +9,45 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from msrest.serialization import Model -class DeletedSite(Resource): +class DeletedSite(Model): """A deleted app. Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Resource Id. - :vartype id: str - :param name: Resource Name. - :type name: str - :param kind: Kind of resource. - :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :param id: Numeric id for the deleted site + :type id: int :ivar deleted_timestamp: Time in UTC when the app was deleted. - :vartype deleted_timestamp: datetime - :ivar state: Current state of the app. - :vartype state: str - :ivar host_names: Hostnames associated with the app. - :vartype host_names: list of str - :ivar repository_site_name: Name of the repository site. - :vartype repository_site_name: str - :ivar usage_state: State indicating whether the app has exceeded its quota - usage. Read-only. Possible values include: 'Normal', 'Exceeded' - :vartype usage_state: str or :class:`UsageState - ` - :param enabled: true if the app is enabled; otherwise, - false. Setting this value to false disables the app (takes - the app offline). - :type enabled: bool - :ivar enabled_host_names: Enabled hostnames for the app.Hostnames need to - be assigned (see HostNames) AND enabled. Otherwise, - the app is not served on those hostnames. - :vartype enabled_host_names: list of str - :ivar availability_state: Management information availability state for - the app. Possible values include: 'Normal', 'Limited', - 'DisasterRecoveryMode' - :vartype availability_state: str or :class:`SiteAvailabilityState - ` - :param host_name_ssl_states: Hostname SSL states are used to manage the - SSL bindings for app's hostnames. - :type host_name_ssl_states: list of :class:`HostNameSslState - ` - :param server_farm_id: Resource ID of the associated App Service plan, - formatted as: - "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". - :type server_farm_id: str - :param reserved: true if reserved; otherwise, - false. Default value: False . - :type reserved: bool - :ivar last_modified_time_utc: Last time the app was modified, in UTC. - Read-only. - :vartype last_modified_time_utc: datetime - :param site_config: Configuration of the app. - :type site_config: :class:`SiteConfig ` - :ivar traffic_manager_host_names: Azure Traffic Manager hostnames - associated with the app. Read-only. - :vartype traffic_manager_host_names: list of str - :ivar premium_app_deployed: Indicates whether app is deployed as a premium - app. - :vartype premium_app_deployed: bool - :param scm_site_also_stopped: true to stop SCM (KUDU) site - when the app is stopped; otherwise, false. The default is - false. Default value: False . - :type scm_site_also_stopped: bool - :ivar target_swap_slot: Specifies which deployment slot this app will swap - into. Read-only. - :vartype target_swap_slot: str - :param hosting_environment_profile: App Service Environment to use for the - app. - :type hosting_environment_profile: :class:`HostingEnvironmentProfile - ` - :param micro_service: Micro services like apps, logic apps. Default value: - "WebSites" . - :type micro_service: str - :param gateway_site_name: Name of gateway app associated with the app. - :type gateway_site_name: str - :param client_affinity_enabled: true to enable client - affinity; false to stop sending session affinity cookies, - which route client requests in the same session to the same instance. - Default is true. - :type client_affinity_enabled: bool - :param client_cert_enabled: true to enable client certificate - authentication (TLS mutual authentication); otherwise, false. - Default is false. - :type client_cert_enabled: bool - :param host_names_disabled: true to disable the public - hostnames of the app; otherwise, false. - If true, the app is only accessible via API management - process. - :type host_names_disabled: bool - :ivar outbound_ip_addresses: List of IP addresses that the app uses for - outbound connections (e.g. database access). Read-only. - :vartype outbound_ip_addresses: str - :param container_size: Size of the function container. - :type container_size: int - :param daily_memory_time_quota: Maximum allowed daily memory-time quota - (applicable on dynamic apps only). - :type daily_memory_time_quota: int - :ivar suspended_till: App suspended till in case memory-time quota is - exceeded. - :vartype suspended_till: datetime - :ivar max_number_of_workers: Maximum number of workers. - This only applies to Functions container. - :vartype max_number_of_workers: int - :param cloning_info: If specified during app creation, the app is cloned - from a source app. - :type cloning_info: :class:`CloningInfo - ` - :ivar resource_group: Name of the resource group the app belongs to. - Read-only. + :vartype deleted_timestamp: str + :ivar subscription: Subscription containing the deleted site + :vartype subscription: str + :ivar resource_group: ResourceGroup that contained the deleted site :vartype resource_group: str - :ivar is_default_container: true if the app is a default - container; otherwise, false. - :vartype is_default_container: bool - :ivar default_host_name: Default hostname of the app. Read-only. - :vartype default_host_name: str - :ivar slot_swap_status: Status of the last deployment slot swap operation. - :vartype slot_swap_status: :class:`SlotSwapStatus - ` + :ivar name: Name of the deleted site + :vartype name: str """ _validation = { - 'id': {'readonly': True}, - 'location': {'required': True}, 'deleted_timestamp': {'readonly': True}, - 'state': {'readonly': True}, - 'host_names': {'readonly': True}, - 'repository_site_name': {'readonly': True}, - 'usage_state': {'readonly': True}, - 'enabled_host_names': {'readonly': True}, - 'availability_state': {'readonly': True}, - 'last_modified_time_utc': {'readonly': True}, - 'traffic_manager_host_names': {'readonly': True}, - 'premium_app_deployed': {'readonly': True}, - 'target_swap_slot': {'readonly': True}, - 'outbound_ip_addresses': {'readonly': True}, - 'suspended_till': {'readonly': True}, - 'max_number_of_workers': {'readonly': True}, + 'subscription': {'readonly': True}, 'resource_group': {'readonly': True}, - 'is_default_container': {'readonly': True}, - 'default_host_name': {'readonly': True}, - 'slot_swap_status': {'readonly': True}, + 'name': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'int'}, + 'deleted_timestamp': {'key': 'deletedTimestamp', 'type': 'str'}, + 'subscription': {'key': 'subscription', 'type': 'str'}, + 'resource_group': {'key': 'resourceGroup', '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}'}, - 'deleted_timestamp': {'key': 'properties.deletedTimestamp', 'type': 'iso-8601'}, - 'state': {'key': 'properties.state', 'type': 'str'}, - 'host_names': {'key': 'properties.hostNames', 'type': '[str]'}, - 'repository_site_name': {'key': 'properties.repositorySiteName', 'type': 'str'}, - 'usage_state': {'key': 'properties.usageState', 'type': 'UsageState'}, - 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, - 'enabled_host_names': {'key': 'properties.enabledHostNames', 'type': '[str]'}, - 'availability_state': {'key': 'properties.availabilityState', 'type': 'SiteAvailabilityState'}, - 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, - 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, - 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, - 'last_modified_time_utc': {'key': 'properties.lastModifiedTimeUtc', 'type': 'iso-8601'}, - 'site_config': {'key': 'properties.siteConfig', 'type': 'SiteConfig'}, - 'traffic_manager_host_names': {'key': 'properties.trafficManagerHostNames', 'type': '[str]'}, - 'premium_app_deployed': {'key': 'properties.premiumAppDeployed', 'type': 'bool'}, - 'scm_site_also_stopped': {'key': 'properties.scmSiteAlsoStopped', 'type': 'bool'}, - 'target_swap_slot': {'key': 'properties.targetSwapSlot', 'type': 'str'}, - 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, - 'micro_service': {'key': 'properties.microService', 'type': 'str'}, - 'gateway_site_name': {'key': 'properties.gatewaySiteName', 'type': 'str'}, - 'client_affinity_enabled': {'key': 'properties.clientAffinityEnabled', 'type': 'bool'}, - 'client_cert_enabled': {'key': 'properties.clientCertEnabled', 'type': 'bool'}, - 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, - 'outbound_ip_addresses': {'key': 'properties.outboundIpAddresses', 'type': 'str'}, - 'container_size': {'key': 'properties.containerSize', 'type': 'int'}, - 'daily_memory_time_quota': {'key': 'properties.dailyMemoryTimeQuota', 'type': 'int'}, - 'suspended_till': {'key': 'properties.suspendedTill', 'type': 'iso-8601'}, - 'max_number_of_workers': {'key': 'properties.maxNumberOfWorkers', 'type': 'int'}, - 'cloning_info': {'key': 'properties.cloningInfo', 'type': 'CloningInfo'}, - 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, - 'is_default_container': {'key': 'properties.isDefaultContainer', 'type': 'bool'}, - 'default_host_name': {'key': 'properties.defaultHostName', 'type': 'str'}, - 'slot_swap_status': {'key': 'properties.slotSwapStatus', 'type': 'SlotSwapStatus'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, enabled=None, host_name_ssl_states=None, server_farm_id=None, reserved=False, site_config=None, scm_site_also_stopped=False, hosting_environment_profile=None, micro_service="WebSites", gateway_site_name=None, client_affinity_enabled=None, client_cert_enabled=None, host_names_disabled=None, container_size=None, daily_memory_time_quota=None, cloning_info=None): - super(DeletedSite, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, id=None): + self.id = id self.deleted_timestamp = None - self.state = None - self.host_names = None - self.repository_site_name = None - self.usage_state = None - self.enabled = enabled - self.enabled_host_names = None - self.availability_state = None - self.host_name_ssl_states = host_name_ssl_states - self.server_farm_id = server_farm_id - self.reserved = reserved - self.last_modified_time_utc = None - self.site_config = site_config - self.traffic_manager_host_names = None - self.premium_app_deployed = None - self.scm_site_also_stopped = scm_site_also_stopped - self.target_swap_slot = None - self.hosting_environment_profile = hosting_environment_profile - self.micro_service = micro_service - self.gateway_site_name = gateway_site_name - self.client_affinity_enabled = client_affinity_enabled - self.client_cert_enabled = client_cert_enabled - self.host_names_disabled = host_names_disabled - self.outbound_ip_addresses = None - self.container_size = container_size - self.daily_memory_time_quota = daily_memory_time_quota - self.suspended_till = None - self.max_number_of_workers = None - self.cloning_info = cloning_info + self.subscription = None self.resource_group = None - self.is_default_container = None - self.default_host_name = None - self.slot_swap_status = None + self.name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/deleted_site_paged.py b/azure-mgmt-web/azure/mgmt/web/models/deleted_site_paged.py old mode 100755 new mode 100644 index 700749d42dc4..68f64b8f938b --- a/azure-mgmt-web/azure/mgmt/web/models/deleted_site_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deleted_site_paged.py @@ -14,7 +14,7 @@ class DeletedSitePaged(Paged): """ - A paging container for iterating over a list of DeletedSite object + A paging container for iterating over a list of :class:`DeletedSite ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/deployment.py b/azure-mgmt-web/azure/mgmt/web/models/deployment.py old mode 100755 new mode 100644 index 8d15dabbf75e..27ce8941211f --- a/azure-mgmt-web/azure/mgmt/web/models/deployment.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deployment.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class Deployment(Resource): +class Deployment(ProxyOnlyResource): """User crendentials used for publishing activity. Variables are only populated by the server, and will be ignored when @@ -20,25 +20,21 @@ class Deployment(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict - :param deployment_id: ID. + :ivar type: Resource type. + :vartype type: str + :param deployment_id: Identifier for deployment. :type deployment_id: str - :param status: Status. + :param status: Deployment status. :type status: int - :param message: Message. + :param message: Details about deployment status. :type message: str - :param author: Author. + :param author: Who authored the deployment. :type author: str - :param deployer: Deployer. + :param deployer: Who performed the deployment. :type deployer: str :param author_email: Author email. :type author_email: str @@ -46,24 +42,24 @@ class Deployment(Resource): :type start_time: datetime :param end_time: End time. :type end_time: datetime - :param active: Active. + :param active: True if deployment is currently active, false if completed + and null if not started. :type active: bool - :param details: Detail. + :param details: Details on deployment. :type details: str """ _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'deployment_id': {'key': 'properties.id', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'int'}, 'message': {'key': 'properties.message', 'type': 'str'}, @@ -76,8 +72,8 @@ class Deployment(Resource): 'details': {'key': 'properties.details', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, deployment_id=None, status=None, message=None, author=None, deployer=None, author_email=None, start_time=None, end_time=None, active=None, details=None): - super(Deployment, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, deployment_id=None, status=None, message=None, author=None, deployer=None, author_email=None, start_time=None, end_time=None, active=None, details=None): + super(Deployment, self).__init__(kind=kind) self.deployment_id = deployment_id self.status = status self.message = message diff --git a/azure-mgmt-web/azure/mgmt/web/models/deployment_paged.py b/azure-mgmt-web/azure/mgmt/web/models/deployment_paged.py old mode 100755 new mode 100644 index a2f968c18929..ac2038dab743 --- a/azure-mgmt-web/azure/mgmt/web/models/deployment_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deployment_paged.py @@ -14,7 +14,7 @@ class DeploymentPaged(Paged): """ - A paging container for iterating over a list of Deployment object + A paging container for iterating over a list of :class:`Deployment ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/dimension.py b/azure-mgmt-web/azure/mgmt/web/models/dimension.py new file mode 100644 index 000000000000..8294d2b456ce --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/dimension.py @@ -0,0 +1,39 @@ +# 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 Dimension(Model): + """Dimension. + + :param name: + :type name: str + :param display_name: + :type display_name: str + :param internal_name: + :type internal_name: str + :param to_be_exported_for_shoebox: + :type to_be_exported_for_shoebox: bool + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'internal_name': {'key': 'internalName', 'type': 'str'}, + 'to_be_exported_for_shoebox': {'key': 'toBeExportedForShoebox', 'type': 'bool'}, + } + + def __init__(self, name=None, display_name=None, internal_name=None, to_be_exported_for_shoebox=None): + self.name = name + self.display_name = display_name + self.internal_name = internal_name + self.to_be_exported_for_shoebox = to_be_exported_for_shoebox diff --git a/azure-mgmt-web/azure/mgmt/web/models/domain.py b/azure-mgmt-web/azure/mgmt/web/models/domain.py old mode 100755 new mode 100644 index c87b2a928ec3..a70681b19d51 --- a/azure-mgmt-web/azure/mgmt/web/models/domain.py +++ b/azure-mgmt-web/azure/mgmt/web/models/domain.py @@ -20,14 +20,14 @@ class Domain(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict :param contact_admin: Administrative contact. @@ -93,7 +93,9 @@ class Domain(Resource): _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, 'registration_status': {'readonly': True}, 'provisioning_state': {'readonly': True}, 'name_servers': {'readonly': True}, @@ -135,8 +137,8 @@ class Domain(Resource): 'auth_code': {'key': 'properties.authCode', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=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): - super(Domain, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + 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): + super(Domain, self).__init__(kind=kind, location=location, tags=tags) self.contact_admin = contact_admin self.contact_billing = contact_billing self.contact_registrant = contact_registrant 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/domain_ownership_identifier.py b/azure-mgmt-web/azure/mgmt/web/models/domain_ownership_identifier.py old mode 100755 new mode 100644 index c6110aba8237..c7ae2551dd52 --- a/azure-mgmt-web/azure/mgmt/web/models/domain_ownership_identifier.py +++ b/azure-mgmt-web/azure/mgmt/web/models/domain_ownership_identifier.py @@ -20,14 +20,14 @@ class DomainOwnershipIdentifier(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict :param ownership_id: Ownership Id. @@ -36,7 +36,9 @@ class DomainOwnershipIdentifier(Resource): _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, } _attribute_map = { @@ -49,6 +51,6 @@ class DomainOwnershipIdentifier(Resource): 'ownership_id': {'key': 'properties.ownershipId', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, ownership_id=None): - super(DomainOwnershipIdentifier, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, location, kind=None, tags=None, ownership_id=None): + super(DomainOwnershipIdentifier, self).__init__(kind=kind, location=location, tags=tags) self.ownership_id = ownership_id diff --git a/azure-mgmt-web/azure/mgmt/web/models/domain_ownership_identifier_paged.py b/azure-mgmt-web/azure/mgmt/web/models/domain_ownership_identifier_paged.py old mode 100755 new mode 100644 index 1ff87a185d0a..8e0784ce1ae4 --- a/azure-mgmt-web/azure/mgmt/web/models/domain_ownership_identifier_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/domain_ownership_identifier_paged.py @@ -14,7 +14,7 @@ class DomainOwnershipIdentifierPaged(Paged): """ - A paging container for iterating over a list of DomainOwnershipIdentifier object + A paging container for iterating over a list of :class:`DomainOwnershipIdentifier ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/domain_paged.py b/azure-mgmt-web/azure/mgmt/web/models/domain_paged.py old mode 100755 new mode 100644 index 1c7e4fdcc098..7a770b0d449f --- a/azure-mgmt-web/azure/mgmt/web/models/domain_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/domain_paged.py @@ -14,7 +14,7 @@ class DomainPaged(Paged): """ - A paging container for iterating over a list of Domain object + A paging container for iterating over a list of :class:`Domain ` object """ _attribute_map = { 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/enabled_config.py b/azure-mgmt-web/azure/mgmt/web/models/enabled_config.py old mode 100755 new mode 100644 index 6d4628cdb2f0..7d20bdd48168 --- a/azure-mgmt-web/azure/mgmt/web/models/enabled_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/enabled_config.py @@ -15,7 +15,8 @@ class EnabledConfig(Model): """Enabled configuration. - :param enabled: Enabled. + :param enabled: True if configuration is enabled, false if it is disabled + and null if configuration is not set. :type enabled: bool """ diff --git a/azure-mgmt-web/azure/mgmt/web/models/error_entity.py b/azure-mgmt-web/azure/mgmt/web/models/error_entity.py old mode 100755 new mode 100644 index d386f3432d18..e559412a967f --- a/azure-mgmt-web/azure/mgmt/web/models/error_entity.py +++ b/azure-mgmt-web/azure/mgmt/web/models/error_entity.py @@ -15,6 +15,10 @@ class ErrorEntity(Model): """Body of the error response returned from the API. + :param code: Basic error code. + :type code: str + :param message: Any details of the error. + :type message: str :param extended_code: Type of error. :type extended_code: str :param message_template: Message template. @@ -24,25 +28,21 @@ class ErrorEntity(Model): :param inner_errors: Inner errors. :type inner_errors: list of :class:`ErrorEntity ` - :param code: Basic error code. - :type code: str - :param message: Any details of the error. - :type message: str """ _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, 'extended_code': {'key': 'extendedCode', 'type': 'str'}, 'message_template': {'key': 'messageTemplate', 'type': 'str'}, 'parameters': {'key': 'parameters', 'type': '[str]'}, 'inner_errors': {'key': 'innerErrors', 'type': '[ErrorEntity]'}, - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, } - def __init__(self, extended_code=None, message_template=None, parameters=None, inner_errors=None, code=None, message=None): + def __init__(self, code=None, message=None, extended_code=None, message_template=None, parameters=None, inner_errors=None): + self.code = code + self.message = message self.extended_code = extended_code self.message_template = message_template self.parameters = parameters self.inner_errors = inner_errors - self.code = code - self.message = message diff --git a/azure-mgmt-web/azure/mgmt/web/models/experiments.py b/azure-mgmt-web/azure/mgmt/web/models/experiments.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index 3f51f666ef20..5f52d2892ba5 --- 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 @@ -24,7 +24,8 @@ class FileSystemHttpLogsConfig(Model): Remove files older than X days. 0 or lower means no retention. :type retention_in_days: int - :param enabled: Enabled. + :param enabled: True if configuration is enabled, false if it is disabled + and null if configuration is not set. :type enabled: bool """ diff --git a/azure-mgmt-web/azure/mgmt/web/models/geo_region.py b/azure-mgmt-web/azure/mgmt/web/models/geo_region.py old mode 100755 new mode 100644 index 6f36d0ab02e0..0cd677eef4a6 --- a/azure-mgmt-web/azure/mgmt/web/models/geo_region.py +++ b/azure-mgmt-web/azure/mgmt/web/models/geo_region.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class GeoRegion(Resource): +class GeoRegion(ProxyOnlyResource): """Geographical region. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class GeoRegion(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar geo_region_name: Region name. :vartype geo_region_name: str :ivar description: Region description. @@ -40,7 +36,8 @@ class GeoRegion(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'geo_region_name': {'readonly': True}, 'description': {'readonly': True}, 'display_name': {'readonly': True}, @@ -50,16 +47,14 @@ class GeoRegion(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}'}, 'geo_region_name': {'key': 'properties.name', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(GeoRegion, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(GeoRegion, self).__init__(kind=kind) self.geo_region_name = None self.description = None self.display_name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/geo_region_paged.py b/azure-mgmt-web/azure/mgmt/web/models/geo_region_paged.py old mode 100755 new mode 100644 index 84b489045a92..db21a1db9d7d --- a/azure-mgmt-web/azure/mgmt/web/models/geo_region_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/geo_region_paged.py @@ -14,7 +14,7 @@ class GeoRegionPaged(Paged): """ - A paging container for iterating over a list of GeoRegion object + A paging container for iterating over a list of :class:`GeoRegion ` object """ _attribute_map = { 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/handler_mapping.py b/azure-mgmt-web/azure/mgmt/web/models/handler_mapping.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/host_name.py b/azure-mgmt-web/azure/mgmt/web/models/host_name.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/host_name_binding.py b/azure-mgmt-web/azure/mgmt/web/models/host_name_binding.py old mode 100755 new mode 100644 index 8e00f0db876c..49273f90910d --- a/azure-mgmt-web/azure/mgmt/web/models/host_name_binding.py +++ b/azure-mgmt-web/azure/mgmt/web/models/host_name_binding.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class HostNameBinding(Resource): +class HostNameBinding(ProxyOnlyResource): """A hostname binding object. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class HostNameBinding(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param host_name_binding_name: Hostname. :type host_name_binding_name: str :param site_name: App Service app name. @@ -56,23 +52,23 @@ class HostNameBinding(Resource): :type ssl_state: str or :class:`SslState ` :param thumbprint: SSL certificate thumbprint :type thumbprint: str - :param virtual_ip: Virtual IP address assigned to the hostname if IP based + :ivar virtual_ip: Virtual IP address assigned to the hostname if IP based SSL is enabled. - :type virtual_ip: str + :vartype virtual_ip: str """ _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'virtual_ip': {'readonly': True}, } _attribute_map = { '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}'}, 'host_name_binding_name': {'key': 'properties.name', 'type': 'str'}, 'site_name': {'key': 'properties.siteName', 'type': 'str'}, 'domain_id': {'key': 'properties.domainId', 'type': 'str'}, @@ -85,8 +81,8 @@ class HostNameBinding(Resource): 'virtual_ip': {'key': 'properties.virtualIP', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, host_name_binding_name=None, site_name=None, domain_id=None, azure_resource_name=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint=None, virtual_ip=None): - super(HostNameBinding, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, host_name_binding_name=None, site_name=None, domain_id=None, azure_resource_name=None, azure_resource_type=None, custom_host_name_dns_record_type=None, host_name_type=None, ssl_state=None, thumbprint=None): + super(HostNameBinding, self).__init__(kind=kind) self.host_name_binding_name = host_name_binding_name self.site_name = site_name self.domain_id = domain_id @@ -96,4 +92,4 @@ def __init__(self, location, name=None, kind=None, type=None, tags=None, host_na self.host_name_type = host_name_type self.ssl_state = ssl_state self.thumbprint = thumbprint - self.virtual_ip = virtual_ip + self.virtual_ip = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/host_name_binding_paged.py b/azure-mgmt-web/azure/mgmt/web/models/host_name_binding_paged.py old mode 100755 new mode 100644 index b537a2a4f9bd..7f11f048093e --- a/azure-mgmt-web/azure/mgmt/web/models/host_name_binding_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/host_name_binding_paged.py @@ -14,7 +14,7 @@ class HostNameBindingPaged(Paged): """ - A paging container for iterating over a list of HostNameBinding object + A paging container for iterating over a list of :class:`HostNameBinding ` object """ _attribute_map = { 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection.py b/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection.py old mode 100755 new mode 100644 index fd8906c20166..3f9b259f4082 --- a/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection.py +++ b/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class HybridConnection(Resource): +class HybridConnection(ProxyOnlyResource): """Hybrid Connection contract. This is used to configure a Hybrid Connection. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class HybridConnection(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param service_bus_namespace: The name of the Service Bus namespace. :type service_bus_namespace: str :param relay_name: The name of the Service Bus relay. @@ -47,20 +43,22 @@ class HybridConnection(Resource): authenticate to Service Bus. In ARM this key will not be returned normally, use the POST /listKeys API instead. :type send_key_value: str + :param service_bus_suffix: The suffix for the service bus endpoint. By + default this is .servicebus.windows.net + :type service_bus_suffix: str """ _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'service_bus_namespace': {'key': 'properties.serviceBusNamespace', 'type': 'str'}, 'relay_name': {'key': 'properties.relayName', 'type': 'str'}, 'relay_arm_uri': {'key': 'properties.relayArmUri', 'type': 'str'}, @@ -68,10 +66,11 @@ class HybridConnection(Resource): 'port': {'key': 'properties.port', 'type': 'int'}, 'send_key_name': {'key': 'properties.sendKeyName', 'type': 'str'}, 'send_key_value': {'key': 'properties.sendKeyValue', 'type': 'str'}, + 'service_bus_suffix': {'key': 'properties.serviceBusSuffix', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, service_bus_namespace=None, relay_name=None, relay_arm_uri=None, hostname=None, port=None, send_key_name=None, send_key_value=None): - super(HybridConnection, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, service_bus_namespace=None, relay_name=None, relay_arm_uri=None, hostname=None, port=None, send_key_name=None, send_key_value=None, service_bus_suffix=None): + super(HybridConnection, self).__init__(kind=kind) self.service_bus_namespace = service_bus_namespace self.relay_name = relay_name self.relay_arm_uri = relay_arm_uri @@ -79,3 +78,4 @@ def __init__(self, location, name=None, kind=None, type=None, tags=None, service self.port = port self.send_key_name = send_key_name self.send_key_value = send_key_value + self.service_bus_suffix = service_bus_suffix diff --git a/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection_key.py b/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection_key.py old mode 100755 new mode 100644 index 08d747fe1523..6cf7f1f35bff --- a/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection_key.py +++ b/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection_key.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class HybridConnectionKey(Resource): +class HybridConnectionKey(ProxyOnlyResource): """Hybrid Connection key contract. This has the send key name and value for a Hybrid Connection. @@ -21,16 +21,12 @@ class HybridConnectionKey(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar send_key_name: The name of the send key. :vartype send_key_name: str :ivar send_key_value: The value of the send key. @@ -39,7 +35,8 @@ class HybridConnectionKey(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'send_key_name': {'readonly': True}, 'send_key_value': {'readonly': True}, } @@ -48,14 +45,12 @@ class HybridConnectionKey(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}'}, 'send_key_name': {'key': 'properties.sendKeyName', 'type': 'str'}, 'send_key_value': {'key': 'properties.sendKeyValue', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(HybridConnectionKey, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(HybridConnectionKey, self).__init__(kind=kind) self.send_key_name = None self.send_key_value = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection_limits.py b/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection_limits.py old mode 100755 new mode 100644 index e991c358b0af..c0a32902b946 --- a/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection_limits.py +++ b/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection_limits.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class HybridConnectionLimits(Resource): +class HybridConnectionLimits(ProxyOnlyResource): """Hybrid Connection limits contract. This is used to return the plan limits of Hybrid Connections. @@ -21,16 +21,12 @@ class HybridConnectionLimits(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar current: The current number of Hybrid Connections. :vartype current: int :ivar maximum: The maximum number of Hybrid Connections allowed. @@ -39,7 +35,8 @@ class HybridConnectionLimits(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'current': {'readonly': True}, 'maximum': {'readonly': True}, } @@ -48,14 +45,12 @@ class HybridConnectionLimits(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}'}, 'current': {'key': 'properties.current', 'type': 'int'}, 'maximum': {'key': 'properties.maximum', 'type': 'int'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(HybridConnectionLimits, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(HybridConnectionLimits, self).__init__(kind=kind) self.current = None self.maximum = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection_paged.py b/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection_paged.py old mode 100755 new mode 100644 index 9ea73d8bd598..15f79886b3d8 --- a/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/hybrid_connection_paged.py @@ -14,7 +14,7 @@ class HybridConnectionPaged(Paged): """ - A paging container for iterating over a list of HybridConnection object + A paging container for iterating over a list of :class:`HybridConnection ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/identifier.py b/azure-mgmt-web/azure/mgmt/web/models/identifier.py old mode 100755 new mode 100644 index c13ea66d5766..98cd66526b26 --- a/azure-mgmt-web/azure/mgmt/web/models/identifier.py +++ b/azure-mgmt-web/azure/mgmt/web/models/identifier.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class Identifier(Resource): +class Identifier(ProxyOnlyResource): """Identifier. Variables are only populated by the server, and will be ignored when @@ -20,35 +20,30 @@ class Identifier(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict - :param identifier_id: ID. + :ivar type: Resource type. + :vartype type: str + :param identifier_id: String representation of the identity. :type identifier_id: str """ _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'identifier_id': {'key': 'properties.id', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, identifier_id=None): - super(Identifier, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, identifier_id=None): + super(Identifier, self).__init__(kind=kind) self.identifier_id = identifier_id diff --git a/azure-mgmt-web/azure/mgmt/web/models/identifier_paged.py b/azure-mgmt-web/azure/mgmt/web/models/identifier_paged.py old mode 100755 new mode 100644 index a19e0d6d7a6d..3e871d8f1c45 --- a/azure-mgmt-web/azure/mgmt/web/models/identifier_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/identifier_paged.py @@ -14,7 +14,7 @@ class IdentifierPaged(Paged): """ - A paging container for iterating over a list of Identifier object + A paging container for iterating over a list of :class:`Identifier ` object """ _attribute_map = { 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/localizable_string.py b/azure-mgmt-web/azure/mgmt/web/models/localizable_string.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/metric_availabilily.py b/azure-mgmt-web/azure/mgmt/web/models/metric_availabilily.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/metric_availability.py b/azure-mgmt-web/azure/mgmt/web/models/metric_availability.py new file mode 100644 index 000000000000..0141039bc1c6 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/metric_availability.py @@ -0,0 +1,31 @@ +# 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 MetricAvailability(Model): + """MetricAvailability. + + :param time_grain: + :type time_grain: str + :param blob_duration: + :type blob_duration: str + """ + + _attribute_map = { + 'time_grain': {'key': 'timeGrain', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, time_grain=None, blob_duration=None): + self.time_grain = time_grain + self.blob_duration = blob_duration diff --git a/azure-mgmt-web/azure/mgmt/web/models/metric_definition.py b/azure-mgmt-web/azure/mgmt/web/models/metric_definition.py old mode 100755 new mode 100644 index d25cfece7fca..4732643e4f99 --- a/azure-mgmt-web/azure/mgmt/web/models/metric_definition.py +++ b/azure-mgmt-web/azure/mgmt/web/models/metric_definition.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class MetricDefinition(Resource): +class MetricDefinition(ProxyOnlyResource): """Metadata for a metric. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class MetricDefinition(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar metric_definition_name: Name of the metric. :vartype metric_definition_name: str :ivar unit: Unit of the metric. @@ -46,7 +42,8 @@ class MetricDefinition(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'metric_definition_name': {'readonly': True}, 'unit': {'readonly': True}, 'primary_aggregation_type': {'readonly': True}, @@ -58,9 +55,7 @@ class MetricDefinition(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}'}, 'metric_definition_name': {'key': 'properties.name', 'type': 'str'}, 'unit': {'key': 'properties.unit', 'type': 'str'}, 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, @@ -68,8 +63,8 @@ class MetricDefinition(Resource): 'display_name': {'key': 'properties.displayName', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(MetricDefinition, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(MetricDefinition, self).__init__(kind=kind) self.metric_definition_name = None self.unit = None self.primary_aggregation_type = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/metric_specification.py b/azure-mgmt-web/azure/mgmt/web/models/metric_specification.py new file mode 100644 index 000000000000..e3f4ce163bf7 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/metric_specification.py @@ -0,0 +1,85 @@ +# 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 MetricSpecification(Model): + """MetricSpecification. + + :param name: + :type name: str + :param display_name: + :type display_name: str + :param display_description: + :type display_description: str + :param unit: + :type unit: str + :param aggregation_type: + :type aggregation_type: str + :param supports_instance_level_aggregation: + :type supports_instance_level_aggregation: bool + :param enable_regional_mdm_account: + :type enable_regional_mdm_account: bool + :param source_mdm_account: + :type source_mdm_account: str + :param source_mdm_namespace: + :type source_mdm_namespace: str + :param metric_filter_pattern: + :type metric_filter_pattern: str + :param fill_gap_with_zero: + :type fill_gap_with_zero: bool + :param is_internal: + :type is_internal: bool + :param dimensions: + :type dimensions: list of :class:`Dimension + ` + :param category: + :type category: str + :param availabilities: + :type availabilities: list of :class:`MetricAvailability + ` + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'display_description': {'key': 'displayDescription', 'type': 'str'}, + 'unit': {'key': 'unit', 'type': 'str'}, + 'aggregation_type': {'key': 'aggregationType', 'type': 'str'}, + 'supports_instance_level_aggregation': {'key': 'supportsInstanceLevelAggregation', 'type': 'bool'}, + 'enable_regional_mdm_account': {'key': 'enableRegionalMdmAccount', 'type': 'bool'}, + 'source_mdm_account': {'key': 'sourceMdmAccount', 'type': 'str'}, + 'source_mdm_namespace': {'key': 'sourceMdmNamespace', 'type': 'str'}, + 'metric_filter_pattern': {'key': 'metricFilterPattern', 'type': 'str'}, + 'fill_gap_with_zero': {'key': 'fillGapWithZero', 'type': 'bool'}, + 'is_internal': {'key': 'isInternal', 'type': 'bool'}, + 'dimensions': {'key': 'dimensions', 'type': '[Dimension]'}, + 'category': {'key': 'category', 'type': 'str'}, + 'availabilities': {'key': 'availabilities', 'type': '[MetricAvailability]'}, + } + + 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): + self.name = name + self.display_name = display_name + self.display_description = display_description + self.unit = unit + self.aggregation_type = aggregation_type + self.supports_instance_level_aggregation = supports_instance_level_aggregation + self.enable_regional_mdm_account = enable_regional_mdm_account + self.source_mdm_account = source_mdm_account + self.source_mdm_namespace = source_mdm_namespace + self.metric_filter_pattern = metric_filter_pattern + self.fill_gap_with_zero = fill_gap_with_zero + self.is_internal = is_internal + self.dimensions = dimensions + self.category = category + self.availabilities = availabilities 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 old mode 100755 new mode 100644 index 1a7c222db9ee..6e0cbb8e84a4 --- 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 @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class MigrateMySqlRequest(Resource): +class MigrateMySqlRequest(ProxyOnlyResource): """MySQL migration request. Variables are only populated by the server, and will be ignored when @@ -20,36 +20,36 @@ class MigrateMySqlRequest(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict - :param connection_string: Connection string to the remote MySQL database - to which data should be migrated. + :ivar type: Resource type. + :vartype type: str + :param connection_string: Connection string to the remote MySQL database. :type connection_string: str + :param migration_type: The type of migration operation to be done. + Possible values include: 'LocalToRemote', 'RemoteToLocal' + :type migration_type: str or :class:`MySqlMigrationType + ` """ _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'migration_type': {'key': 'properties.migrationType', 'type': 'MySqlMigrationType'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, connection_string=None): - super(MigrateMySqlRequest, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, connection_string=None, migration_type=None): + super(MigrateMySqlRequest, self).__init__(kind=kind) self.connection_string = connection_string + self.migration_type = migration_type diff --git a/azure-mgmt-web/azure/mgmt/web/models/migrate_my_sql_status.py b/azure-mgmt-web/azure/mgmt/web/models/migrate_my_sql_status.py old mode 100755 new mode 100644 index ea942f6e3a0d..10d9ae053e22 --- a/azure-mgmt-web/azure/mgmt/web/models/migrate_my_sql_status.py +++ b/azure-mgmt-web/azure/mgmt/web/models/migrate_my_sql_status.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class MigrateMySqlStatus(Resource): +class MigrateMySqlStatus(ProxyOnlyResource): """MySQL migration status. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class MigrateMySqlStatus(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar migration_operation_status: Status of the migration task. Possible values include: 'InProgress', 'Failed', 'Succeeded', 'TimedOut', 'Created' :vartype migration_operation_status: str or :class:`OperationStatus @@ -42,7 +38,8 @@ class MigrateMySqlStatus(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'migration_operation_status': {'readonly': True}, 'operation_id': {'readonly': True}, 'local_my_sql_enabled': {'readonly': True}, @@ -52,16 +49,14 @@ class MigrateMySqlStatus(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}'}, 'migration_operation_status': {'key': 'properties.migrationOperationStatus', 'type': 'OperationStatus'}, 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(MigrateMySqlStatus, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(MigrateMySqlStatus, self).__init__(kind=kind) self.migration_operation_status = None self.operation_id = None self.local_my_sql_enabled = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/ms_deploy.py b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy.py new file mode 100644 index 000000000000..c6bc805b8926 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy.py @@ -0,0 +1,78 @@ +# 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 MSDeploy(ProxyOnlyResource): + """MSDeploy ARM PUT information. + + 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 package_uri: Package URI + :type package_uri: str + :param connection_string: SQL Connection String + :type connection_string: str + :param db_type: Database Type + :type db_type: str + :param set_parameters_xml_file_uri: URI of MSDeploy Parameters file. Must + not be set if SetParameters is used. + :type set_parameters_xml_file_uri: str + :param set_parameters: MSDeploy Parameters. Must not be set if + SetParametersXmlFileUri is used. + :type set_parameters: dict + :param skip_app_data: Controls whether the MSDeploy operation skips the + AppData directory. If set to true, the existing AppData directory on the + destination will not be deleted and overwritten. + :type skip_app_data: bool + :param app_offline: Sets the AppOffline rule while the MSDeploy operation + executes. + :type app_offline: bool + """ + + _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'}, + 'package_uri': {'key': 'properties.packageUri', 'type': 'str'}, + 'connection_string': {'key': 'properties.connectionString', 'type': 'str'}, + 'db_type': {'key': 'properties.dbType', 'type': 'str'}, + 'set_parameters_xml_file_uri': {'key': 'properties.setParametersXmlFileUri', 'type': 'str'}, + 'set_parameters': {'key': 'properties.setParameters', 'type': '{str}'}, + 'skip_app_data': {'key': 'properties.skipAppData', 'type': 'bool'}, + 'app_offline': {'key': 'properties.appOffline', 'type': 'bool'}, + } + + def __init__(self, kind=None, package_uri=None, connection_string=None, db_type=None, set_parameters_xml_file_uri=None, set_parameters=None, skip_app_data=None, app_offline=None): + super(MSDeploy, self).__init__(kind=kind) + self.package_uri = package_uri + self.connection_string = connection_string + self.db_type = db_type + self.set_parameters_xml_file_uri = set_parameters_xml_file_uri + self.set_parameters = set_parameters + self.skip_app_data = skip_app_data + self.app_offline = app_offline diff --git a/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log.py b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log.py new file mode 100644 index 000000000000..7ac982753ba5 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log.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 .proxy_only_resource import ProxyOnlyResource + + +class MSDeployLog(ProxyOnlyResource): + """MSDeploy log. + + 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 entries: List of log entry messages + :vartype entries: list of :class:`MSDeployLogEntry + ` + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'entries': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'entries': {'key': 'properties.entries', 'type': '[MSDeployLogEntry]'}, + } + + def __init__(self, kind=None): + super(MSDeployLog, self).__init__(kind=kind) + self.entries = None 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 new file mode 100644 index 000000000000..fa7ff1f38aa6 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_log_entry.py @@ -0,0 +1,46 @@ +# 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 MSDeployLogEntry(Model): + """MSDeploy log entry. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar time: Timestamp of log entry + :vartype time: datetime + :ivar type: Log entry type. Possible values include: 'Message', 'Warning', + 'Error' + :vartype type: str or :class:`MSDeployLogEntryType + ` + :ivar message: Log entry message + :vartype message: str + """ + + _validation = { + 'time': {'readonly': True}, + 'type': {'readonly': True}, + 'message': {'readonly': True}, + } + + _attribute_map = { + 'time': {'key': 'time', 'type': 'iso-8601'}, + 'type': {'key': 'type', 'type': 'MSDeployLogEntryType'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self): + self.time = None + self.type = None + self.message = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_status.py b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_status.py new file mode 100644 index 000000000000..275860a51acc --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/ms_deploy_status.py @@ -0,0 +1,72 @@ +# 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 MSDeployStatus(ProxyOnlyResource): + """MSDeploy ARM response. + + 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 deployer: Username of deployer + :vartype deployer: str + :ivar provisioning_state: Provisioning state. Possible values include: + 'accepted', 'running', 'succeeded', 'failed', 'canceled' + :vartype provisioning_state: str or :class:`MSDeployProvisioningState + ` + :ivar start_time: Start time of deploy operation + :vartype start_time: datetime + :ivar end_time: End time of deploy operation + :vartype end_time: datetime + :ivar complete: Whether the deployment operation has completed + :vartype complete: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'deployer': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'complete': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deployer': {'key': 'properties.deployer', 'type': 'str'}, + 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'MSDeployProvisioningState'}, + 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'complete': {'key': 'properties.complete', 'type': 'bool'}, + } + + def __init__(self, kind=None): + super(MSDeployStatus, self).__init__(kind=kind) + self.deployer = None + self.provisioning_state = None + self.start_time = None + self.end_time = None + self.complete = 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/name_identifier_paged.py b/azure-mgmt-web/azure/mgmt/web/models/name_identifier_paged.py old mode 100755 new mode 100644 index 6e024f20141e..e5e4d133f7bc --- a/azure-mgmt-web/azure/mgmt/web/models/name_identifier_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/name_identifier_paged.py @@ -14,7 +14,7 @@ class NameIdentifierPaged(Paged): """ - A paging container for iterating over a list of NameIdentifier object + A paging container for iterating over a list of :class:`NameIdentifier ` object """ _attribute_map = { 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/network_features.py b/azure-mgmt-web/azure/mgmt/web/models/network_features.py old mode 100755 new mode 100644 index 71fad3966d49..ded8014a291d --- a/azure-mgmt-web/azure/mgmt/web/models/network_features.py +++ b/azure-mgmt-web/azure/mgmt/web/models/network_features.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class NetworkFeatures(Resource): +class NetworkFeatures(ProxyOnlyResource): """Full view of network features for an app (presently VNET integration and Hybrid Connections). @@ -21,16 +21,12 @@ class NetworkFeatures(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar virtual_network_name: The Virtual Network name. :vartype virtual_network_name: str :ivar virtual_network_connection: The Virtual Network summary view. @@ -46,7 +42,8 @@ class NetworkFeatures(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'virtual_network_name': {'readonly': True}, 'virtual_network_connection': {'readonly': True}, 'hybrid_connections': {'readonly': True}, @@ -57,17 +54,15 @@ class NetworkFeatures(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}'}, 'virtual_network_name': {'key': 'properties.virtualNetworkName', 'type': 'str'}, 'virtual_network_connection': {'key': 'properties.virtualNetworkConnection', 'type': 'VnetInfo'}, 'hybrid_connections': {'key': 'properties.hybridConnections', 'type': '[RelayServiceConnectionEntity]'}, 'hybrid_connections_v2': {'key': 'properties.hybridConnectionsV2', 'type': '[HybridConnection]'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(NetworkFeatures, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(NetworkFeatures, self).__init__(kind=kind) self.virtual_network_name = None self.virtual_network_connection = None self.hybrid_connections = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/operation.py b/azure-mgmt-web/azure/mgmt/web/models/operation.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_response_paged.py b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_response_paged.py old mode 100755 new mode 100644 index 428c25c94d1b..f95659f06ff6 --- a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_response_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_response_paged.py @@ -14,7 +14,7 @@ class PerfMonResponsePaged(Paged): """ - A paging container for iterating over a list of PerfMonResponse object + A paging container for iterating over a list of :class:`PerfMonResponse ` object """ _attribute_map = { 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 old mode 100755 new mode 100644 index 12cb7302de65..4794a9a44d5e --- a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample.py +++ b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample.py @@ -21,15 +21,19 @@ class PerfMonSample(Model): :type instance_name: str :param value: Value of counter at a certain time. :type value: float + :param core_count: Core Count of worker. Not a data member + :type core_count: int """ _attribute_map = { 'time': {'key': 'time', 'type': 'iso-8601'}, 'instance_name': {'key': 'instanceName', 'type': 'str'}, 'value': {'key': 'value', 'type': 'float'}, + 'core_count': {'key': 'coreCount', 'type': 'int'}, } - def __init__(self, time=None, instance_name=None, value=None): + def __init__(self, time=None, instance_name=None, value=None, core_count=None): self.time = time self.instance_name = instance_name self.value = value + self.core_count = core_count 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index a46c929b07ad..e9190395cfd2 --- a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on.py +++ b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on.py @@ -20,14 +20,14 @@ class PremierAddOn(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict :param sku: SKU. @@ -50,7 +50,9 @@ class PremierAddOn(Resource): _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, } _attribute_map = { @@ -70,8 +72,8 @@ class PremierAddOn(Resource): 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, sku=None, product=None, vendor=None, premier_add_on_name=None, premier_add_on_location=None, premier_add_on_tags=None, marketplace_publisher=None, marketplace_offer=None): - super(PremierAddOn, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, location, kind=None, tags=None, sku=None, product=None, vendor=None, premier_add_on_name=None, premier_add_on_location=None, premier_add_on_tags=None, marketplace_publisher=None, marketplace_offer=None): + super(PremierAddOn, self).__init__(kind=kind, location=location, tags=tags) self.sku = sku self.product = product self.vendor = vendor 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 old mode 100755 new mode 100644 index 7c3bdb92bf33..b98625e8cc64 --- 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 @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class PremierAddOnOffer(Resource): +class PremierAddOnOffer(ProxyOnlyResource): """Premier add-on offer. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class PremierAddOnOffer(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param sku: SKU. :type sku: str :param product: Product. @@ -61,16 +57,15 @@ class PremierAddOnOffer(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'sku': {'key': 'properties.sku', 'type': 'str'}, 'product': {'key': 'properties.product', 'type': 'str'}, 'vendor': {'key': 'properties.vendor', 'type': 'str'}, @@ -84,8 +79,8 @@ class PremierAddOnOffer(Resource): 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, sku=None, product=None, vendor=None, premier_add_on_offer_name=None, promo_code_required=None, quota=None, web_hosting_plan_restrictions=None, privacy_policy_url=None, legal_terms_url=None, marketplace_publisher=None, marketplace_offer=None): - super(PremierAddOnOffer, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, sku=None, product=None, vendor=None, premier_add_on_offer_name=None, promo_code_required=None, quota=None, web_hosting_plan_restrictions=None, privacy_policy_url=None, legal_terms_url=None, marketplace_publisher=None, marketplace_offer=None): + super(PremierAddOnOffer, self).__init__(kind=kind) self.sku = sku self.product = product self.vendor = vendor diff --git a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer_paged.py b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer_paged.py old mode 100755 new mode 100644 index 74bee068230b..d01a83d31c85 --- a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer_paged.py @@ -14,7 +14,7 @@ class PremierAddOnOfferPaged(Paged): """ - A paging container for iterating over a list of PremierAddOnOffer object + A paging container for iterating over a list of :class:`PremierAddOnOffer ` object """ _attribute_map = { 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 new file mode 100644 index 000000000000..4a74c2e5c320 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/proxy_only_resource.py @@ -0,0 +1,49 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ProxyOnlyResource(Model): + """Azure proxy only resource. This resource is not tracked by Azure Resource + Manager. + + 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 + """ + + _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'}, + } + + def __init__(self, kind=None): + self.id = None + self.name = None + self.kind = kind + self.type = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/public_certificate.py b/azure-mgmt-web/azure/mgmt/web/models/public_certificate.py new file mode 100644 index 000000000000..eaec3a29f171 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/public_certificate.py @@ -0,0 +1,61 @@ +# 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 PublicCertificate(ProxyOnlyResource): + """Public certificate object. + + 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 blob: Public Certificate byte array + :type blob: str + :param public_certificate_location: Public Certificate Location. Possible + values include: 'CurrentUserMy', 'LocalMachineMy', 'Unknown' + :type public_certificate_location: str or + :class:`PublicCertificateLocation + ` + :ivar thumbprint: Certificate Thumbprint + :vartype thumbprint: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'thumbprint': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'blob': {'key': 'properties.blob', 'type': 'str'}, + 'public_certificate_location': {'key': 'properties.publicCertificateLocation', 'type': 'PublicCertificateLocation'}, + 'thumbprint': {'key': 'properties.thumbprint', 'type': 'str'}, + } + + def __init__(self, kind=None, blob=None, public_certificate_location=None): + super(PublicCertificate, self).__init__(kind=kind) + self.blob = blob + self.public_certificate_location = public_certificate_location + self.thumbprint = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/public_certificate_paged.py b/azure-mgmt-web/azure/mgmt/web/models/public_certificate_paged.py new file mode 100644 index 000000000000..77a571d127d4 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/public_certificate_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 PublicCertificatePaged(Paged): + """ + A paging container for iterating over a list of :class:`PublicCertificate ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[PublicCertificate]'} + } + + def __init__(self, *args, **kwargs): + + super(PublicCertificatePaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-web/azure/mgmt/web/models/push_settings.py b/azure-mgmt-web/azure/mgmt/web/models/push_settings.py old mode 100755 new mode 100644 index dfca4e60d9c1..b1bb1d734150 --- a/azure-mgmt-web/azure/mgmt/web/models/push_settings.py +++ b/azure-mgmt-web/azure/mgmt/web/models/push_settings.py @@ -9,12 +9,23 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .proxy_only_resource import ProxyOnlyResource -class PushSettings(Model): +class PushSettings(ProxyOnlyResource): """Push settings for the App. + 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 is_push_enabled: Gets or sets a flag indicating whether the Push endpoint is enabled. :type is_push_enabled: bool @@ -35,17 +46,24 @@ class PushSettings(Model): """ _validation = { - 'is_push_enabled': {'required': True}, + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { - 'is_push_enabled': {'key': 'isPushEnabled', 'type': 'bool'}, - 'tag_whitelist_json': {'key': 'tagWhitelistJson', 'type': 'str'}, - 'tags_requiring_auth': {'key': 'tagsRequiringAuth', 'type': 'str'}, - 'dynamic_tags_json': {'key': 'dynamicTagsJson', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'is_push_enabled': {'key': 'properties.isPushEnabled', 'type': 'bool'}, + 'tag_whitelist_json': {'key': 'properties.tagWhitelistJson', 'type': 'str'}, + 'tags_requiring_auth': {'key': 'properties.tagsRequiringAuth', 'type': 'str'}, + 'dynamic_tags_json': {'key': 'properties.dynamicTagsJson', 'type': 'str'}, } - def __init__(self, is_push_enabled, tag_whitelist_json=None, tags_requiring_auth=None, dynamic_tags_json=None): + def __init__(self, kind=None, is_push_enabled=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 self.tags_requiring_auth = tags_requiring_auth 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/recommendation.py b/azure-mgmt-web/azure/mgmt/web/models/recommendation.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule.py b/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/recover_response.py b/azure-mgmt-web/azure/mgmt/web/models/recover_response.py deleted file mode 100755 index 370f2176e0b9..000000000000 --- a/azure-mgmt-web/azure/mgmt/web/models/recover_response.py +++ /dev/null @@ -1,56 +0,0 @@ -# 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 .resource import Resource - - -class RecoverResponse(Resource): - """Response for an app recovery request. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :param name: Resource Name. - :type name: str - :param kind: Kind of resource. - :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict - :ivar operation_id: ID of the recovery operation. Can be used to check the - status of the corresponding operation. - :vartype operation_id: str - """ - - _validation = { - 'id': {'readonly': True}, - 'location': {'required': True}, - 'operation_id': {'readonly': True}, - } - - _attribute_map = { - '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}'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, - } - - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(RecoverResponse, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) - self.operation_id = None 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 old mode 100755 new mode 100644 index 5ec87c175faf..d9af86eb3727 --- 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 @@ -20,14 +20,14 @@ class ReissueCertificateOrderRequest(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict :param key_size: Certificate Key Size. @@ -44,7 +44,9 @@ class ReissueCertificateOrderRequest(Resource): _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, } _attribute_map = { @@ -60,8 +62,8 @@ class ReissueCertificateOrderRequest(Resource): 'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, key_size=None, delay_existing_revoke_in_hours=None, csr=None, is_private_key_external=None): - super(ReissueCertificateOrderRequest, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + 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) 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/relay_service_connection_entity.py b/azure-mgmt-web/azure/mgmt/web/models/relay_service_connection_entity.py old mode 100755 new mode 100644 index fbf534174cda..a3dcf67f25c0 --- a/azure-mgmt-web/azure/mgmt/web/models/relay_service_connection_entity.py +++ b/azure-mgmt-web/azure/mgmt/web/models/relay_service_connection_entity.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class RelayServiceConnectionEntity(Resource): +class RelayServiceConnectionEntity(ProxyOnlyResource): """Hybrid Connection for an App Service app. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class RelayServiceConnectionEntity(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param entity_name: :type entity_name: str :param entity_connection_string: @@ -48,16 +44,15 @@ class RelayServiceConnectionEntity(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'entity_name': {'key': 'properties.entityName', 'type': 'str'}, 'entity_connection_string': {'key': 'properties.entityConnectionString', 'type': 'str'}, 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, @@ -67,8 +62,8 @@ class RelayServiceConnectionEntity(Resource): 'biztalk_uri': {'key': 'properties.biztalkUri', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, entity_name=None, entity_connection_string=None, resource_type=None, resource_connection_string=None, hostname=None, port=None, biztalk_uri=None): - super(RelayServiceConnectionEntity, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, entity_name=None, entity_connection_string=None, resource_type=None, resource_connection_string=None, hostname=None, port=None, biztalk_uri=None): + super(RelayServiceConnectionEntity, self).__init__(kind=kind) self.entity_name = entity_name self.entity_connection_string = entity_connection_string self.resource_type = resource_type 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 old mode 100755 new mode 100644 index eac76e59b5cf..c2cf037d707a --- 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 @@ -20,14 +20,14 @@ class RenewCertificateOrderRequest(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict :param key_size: Certificate Key Size. @@ -41,7 +41,9 @@ class RenewCertificateOrderRequest(Resource): _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, } _attribute_map = { @@ -56,8 +58,8 @@ class RenewCertificateOrderRequest(Resource): 'is_private_key_external': {'key': 'properties.isPrivateKeyExternal', 'type': 'bool'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, key_size=None, csr=None, is_private_key_external=None): - super(RenewCertificateOrderRequest, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + 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) 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource.py b/azure-mgmt-web/azure/mgmt/web/models/resource.py old mode 100755 new mode 100644 index 7630122a30eb..c892b30b2c92 --- a/azure-mgmt-web/azure/mgmt/web/models/resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource.py @@ -13,28 +13,30 @@ class Resource(Model): - """Azure resource. + """Azure resource. This resource is tracked in Azure Resource Manager. Variables are only populated by the server, and will be ignored when sending a request. :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict """ _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, } _attribute_map = { @@ -46,10 +48,10 @@ class Resource(Model): 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): + def __init__(self, location, kind=None, tags=None): self.id = None - self.name = name + self.name = None self.kind = kind self.location = location - self.type = type + self.type = None self.tags = tags diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata.py b/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata.py deleted file mode 100755 index bed8f08fd230..000000000000 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata.py +++ /dev/null @@ -1,63 +0,0 @@ -# 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 .resource import Resource - - -class ResourceHealthMetadata(Resource): - """Used for getting ResourceHealthCheck settings. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Resource Id. - :vartype id: str - :param name: Resource Name. - :type name: str - :param kind: Kind of resource. - :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict - :param resource_health_metadata_id: ARM Resource Id - :type resource_health_metadata_id: str - :param category: The category that the resource matches in the RHC Policy - File - :type category: str - :param signal_availability: Is there a health signal for the resource - :type signal_availability: bool - """ - - _validation = { - 'id': {'readonly': True}, - 'location': {'required': True}, - } - - _attribute_map = { - '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}'}, - 'resource_health_metadata_id': {'key': 'properties.id', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'signal_availability': {'key': 'properties.signalAvailability', 'type': 'bool'}, - } - - def __init__(self, location, name=None, kind=None, type=None, tags=None, resource_health_metadata_id=None, category=None, signal_availability=None): - super(ResourceHealthMetadata, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) - self.resource_health_metadata_id = resource_health_metadata_id - self.category = category - self.signal_availability = signal_availability diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_metric.py b/azure-mgmt-web/azure/mgmt/web/models/resource_metric.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index 938ed415abd2..7e17b6b6493d --- a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class ResourceMetricDefinition(Resource): +class ResourceMetricDefinition(ProxyOnlyResource): """Metadata for the metrics. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class ResourceMetricDefinition(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar resource_metric_definition_name: Name of the metric. :vartype resource_metric_definition_name: :class:`ResourceMetricName ` @@ -51,7 +47,8 @@ class ResourceMetricDefinition(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'resource_metric_definition_name': {'readonly': True}, 'unit': {'readonly': True}, 'primary_aggregation_type': {'readonly': True}, @@ -65,9 +62,7 @@ class ResourceMetricDefinition(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}'}, 'resource_metric_definition_name': {'key': 'properties.name', 'type': 'ResourceMetricName'}, 'unit': {'key': 'properties.unit', 'type': 'str'}, 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, @@ -77,8 +72,8 @@ class ResourceMetricDefinition(Resource): 'properties': {'key': 'properties.properties', 'type': '{str}'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(ResourceMetricDefinition, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(ResourceMetricDefinition, self).__init__(kind=kind) self.resource_metric_definition_name = None self.unit = None self.primary_aggregation_type = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition_paged.py b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition_paged.py old mode 100755 new mode 100644 index be570a868f80..561e1197b5af --- a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition_paged.py @@ -14,7 +14,7 @@ class ResourceMetricDefinitionPaged(Paged): """ - A paging container for iterating over a list of ResourceMetricDefinition object + A paging container for iterating over a list of :class:`ResourceMetricDefinition ` object """ _attribute_map = { 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_paged.py b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_paged.py old mode 100755 new mode 100644 index ab751993a716..05823c1ddc61 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_paged.py @@ -14,7 +14,7 @@ class ResourceMetricPaged(Paged): """ - A paging container for iterating over a list of ResourceMetric object + A paging container for iterating over a list of :class:`ResourceMetric ` object """ _attribute_map = { 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/restore_request.py b/azure-mgmt-web/azure/mgmt/web/models/restore_request.py old mode 100755 new mode 100644 index e65479129a49..72b229a6fd8c --- a/azure-mgmt-web/azure/mgmt/web/models/restore_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/restore_request.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class RestoreRequest(Resource): +class RestoreRequest(ProxyOnlyResource): """Description of a restore request. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class RestoreRequest(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param storage_account_url: SAS URL to the container. :type storage_account_url: str :param blob_name: Name of a blob which contains the backup. @@ -50,8 +46,11 @@ class RestoreRequest(Resource): the app's object when it is being restored, but that might fail due to conflicts during the operation. Default value: False . :type ignore_conflicting_host_names: bool + :param ignore_databases: Ignore the databases and only restore the site + content. Default value: False . + :type ignore_databases: bool :param operation_type: Operation type. Possible values include: 'Default', - 'Clone', 'Relocation'. Default value: "Default" . + 'Clone', 'Relocation', 'Snapshot'. Default value: "Default" . :type operation_type: str or :class:`BackupRestoreOperationType ` :param adjust_connection_strings: true if @@ -65,35 +64,36 @@ class RestoreRequest(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, 'blob_name': {'key': 'properties.blobName', 'type': 'str'}, 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, 'site_name': {'key': 'properties.siteName', 'type': 'str'}, 'databases': {'key': 'properties.databases', 'type': '[DatabaseBackupSetting]'}, 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + 'ignore_databases': {'key': 'properties.ignoreDatabases', 'type': 'bool'}, 'operation_type': {'key': 'properties.operationType', 'type': 'BackupRestoreOperationType'}, 'adjust_connection_strings': {'key': 'properties.adjustConnectionStrings', 'type': 'bool'}, 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, storage_account_url=None, blob_name=None, overwrite=None, site_name=None, databases=None, ignore_conflicting_host_names=False, operation_type="Default", adjust_connection_strings=None, hosting_environment=None): - super(RestoreRequest, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + 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, 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 self.overwrite = overwrite self.site_name = site_name self.databases = databases self.ignore_conflicting_host_names = ignore_conflicting_host_names + self.ignore_databases = ignore_databases self.operation_type = operation_type self.adjust_connection_strings = adjust_connection_strings self.hosting_environment = hosting_environment diff --git a/azure-mgmt-web/azure/mgmt/web/models/restore_response.py b/azure-mgmt-web/azure/mgmt/web/models/restore_response.py old mode 100755 new mode 100644 index f3172dd0df41..3be8e1f1a0a5 --- a/azure-mgmt-web/azure/mgmt/web/models/restore_response.py +++ b/azure-mgmt-web/azure/mgmt/web/models/restore_response.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class RestoreResponse(Resource): +class RestoreResponse(ProxyOnlyResource): """Response for an app restore request. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class RestoreResponse(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar operation_id: When server starts the restore process, it will return an operation ID identifying that particular restore operation. :vartype operation_id: str @@ -37,7 +33,8 @@ class RestoreResponse(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'operation_id': {'readonly': True}, } @@ -45,12 +42,10 @@ class RestoreResponse(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}'}, 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(RestoreResponse, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(RestoreResponse, self).__init__(kind=kind) self.operation_id = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/service_specification.py b/azure-mgmt-web/azure/mgmt/web/models/service_specification.py new file mode 100644 index 000000000000..0568d6dbabf0 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/service_specification.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 ServiceSpecification(Model): + """ServiceSpecification. + + :param metric_specifications: + :type metric_specifications: list of :class:`MetricSpecification + ` + """ + + _attribute_map = { + 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + } + + def __init__(self, metric_specifications=None): + self.metric_specifications = metric_specifications diff --git a/azure-mgmt-web/azure/mgmt/web/models/site.py b/azure-mgmt-web/azure/mgmt/web/models/site.py old mode 100755 new mode 100644 index 46e2f057e5cf..643e845cf7b5 --- a/azure-mgmt-web/azure/mgmt/web/models/site.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site.py @@ -20,14 +20,14 @@ class Site(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str :param location: Resource Location. :type location: str - :param type: Resource type. - :type type: str + :ivar type: Resource type. + :vartype type: str :param tags: Resource tags. :type tags: dict :ivar state: Current state of the app. @@ -72,9 +72,6 @@ class Site(Resource): :ivar traffic_manager_host_names: Azure Traffic Manager hostnames associated with the app. Read-only. :vartype traffic_manager_host_names: list of str - :ivar premium_app_deployed: Indicates whether app is deployed as a premium - app. - :vartype premium_app_deployed: bool :param scm_site_also_stopped: true to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false. Default value: False . @@ -86,11 +83,6 @@ class Site(Resource): app. :type hosting_environment_profile: :class:`HostingEnvironmentProfile ` - :param micro_service: Micro services like apps, logic apps. Default value: - "WebSites" . - :type micro_service: str - :param gateway_site_name: Name of gateway app associated with the app. - :type gateway_site_name: str :param client_affinity_enabled: true to enable client affinity; false to stop sending session affinity cookies, which route client requests in the same session to the same instance. @@ -123,6 +115,10 @@ class Site(Resource): from a source app. :type cloning_info: :class:`CloningInfo ` + :param snapshot_info: If specified during app creation, the app is created + from a previous snapshot. + :type snapshot_info: :class:`SnapshotRecoveryRequest + ` :ivar resource_group: Name of the resource group the app belongs to. Read-only. :vartype resource_group: str @@ -134,11 +130,21 @@ class Site(Resource): :ivar slot_swap_status: Status of the last deployment slot swap operation. :vartype slot_swap_status: :class:`SlotSwapStatus ` + :ivar premium_app_deployed: Indicates whether app is deployed as a premium + app. + :vartype premium_app_deployed: bool + :param micro_service: Micro services like apps, logic apps. Default value: + "WebSites" . + :type micro_service: str + :param gateway_site_name: Name of gateway app associated with the app. + :type gateway_site_name: str """ _validation = { 'id': {'readonly': True}, + 'name': {'readonly': True}, 'location': {'required': True}, + 'type': {'readonly': True}, 'state': {'readonly': True}, 'host_names': {'readonly': True}, 'repository_site_name': {'readonly': True}, @@ -147,7 +153,6 @@ class Site(Resource): 'availability_state': {'readonly': True}, 'last_modified_time_utc': {'readonly': True}, 'traffic_manager_host_names': {'readonly': True}, - 'premium_app_deployed': {'readonly': True}, 'target_swap_slot': {'readonly': True}, 'outbound_ip_addresses': {'readonly': True}, 'suspended_till': {'readonly': True}, @@ -156,6 +161,7 @@ class Site(Resource): 'is_default_container': {'readonly': True}, 'default_host_name': {'readonly': True}, 'slot_swap_status': {'readonly': True}, + 'premium_app_deployed': {'readonly': True}, } _attribute_map = { @@ -178,12 +184,9 @@ class Site(Resource): 'last_modified_time_utc': {'key': 'properties.lastModifiedTimeUtc', 'type': 'iso-8601'}, 'site_config': {'key': 'properties.siteConfig', 'type': 'SiteConfig'}, 'traffic_manager_host_names': {'key': 'properties.trafficManagerHostNames', 'type': '[str]'}, - 'premium_app_deployed': {'key': 'properties.premiumAppDeployed', 'type': 'bool'}, 'scm_site_also_stopped': {'key': 'properties.scmSiteAlsoStopped', 'type': 'bool'}, 'target_swap_slot': {'key': 'properties.targetSwapSlot', 'type': 'str'}, 'hosting_environment_profile': {'key': 'properties.hostingEnvironmentProfile', 'type': 'HostingEnvironmentProfile'}, - 'micro_service': {'key': 'properties.microService', 'type': 'str'}, - 'gateway_site_name': {'key': 'properties.gatewaySiteName', 'type': 'str'}, 'client_affinity_enabled': {'key': 'properties.clientAffinityEnabled', 'type': 'bool'}, 'client_cert_enabled': {'key': 'properties.clientCertEnabled', 'type': 'bool'}, 'host_names_disabled': {'key': 'properties.hostNamesDisabled', 'type': 'bool'}, @@ -193,14 +196,18 @@ class Site(Resource): 'suspended_till': {'key': 'properties.suspendedTill', 'type': 'iso-8601'}, 'max_number_of_workers': {'key': 'properties.maxNumberOfWorkers', 'type': 'int'}, 'cloning_info': {'key': 'properties.cloningInfo', 'type': 'CloningInfo'}, + 'snapshot_info': {'key': 'properties.snapshotInfo', 'type': 'SnapshotRecoveryRequest'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'is_default_container': {'key': 'properties.isDefaultContainer', 'type': 'bool'}, 'default_host_name': {'key': 'properties.defaultHostName', 'type': 'str'}, 'slot_swap_status': {'key': 'properties.slotSwapStatus', 'type': 'SlotSwapStatus'}, + 'premium_app_deployed': {'key': 'properties.premiumAppDeployed', 'type': 'bool'}, + 'micro_service': {'key': 'properties.microService', 'type': 'str'}, + 'gateway_site_name': {'key': 'properties.gatewaySiteName', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, enabled=None, host_name_ssl_states=None, server_farm_id=None, reserved=False, site_config=None, scm_site_also_stopped=False, hosting_environment_profile=None, micro_service="WebSites", gateway_site_name=None, client_affinity_enabled=None, client_cert_enabled=None, host_names_disabled=None, container_size=None, daily_memory_time_quota=None, cloning_info=None): - super(Site, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, location, kind=None, tags=None, enabled=None, host_name_ssl_states=None, server_farm_id=None, reserved=False, site_config=None, scm_site_also_stopped=False, hosting_environment_profile=None, client_affinity_enabled=None, client_cert_enabled=None, host_names_disabled=None, container_size=None, daily_memory_time_quota=None, cloning_info=None, snapshot_info=None, micro_service="WebSites", gateway_site_name=None): + super(Site, self).__init__(kind=kind, location=location, tags=tags) self.state = None self.host_names = None self.repository_site_name = None @@ -214,12 +221,9 @@ def __init__(self, location, name=None, kind=None, type=None, tags=None, enabled self.last_modified_time_utc = None self.site_config = site_config self.traffic_manager_host_names = None - self.premium_app_deployed = None self.scm_site_also_stopped = scm_site_also_stopped self.target_swap_slot = None self.hosting_environment_profile = hosting_environment_profile - self.micro_service = micro_service - self.gateway_site_name = gateway_site_name self.client_affinity_enabled = client_affinity_enabled self.client_cert_enabled = client_cert_enabled self.host_names_disabled = host_names_disabled @@ -229,7 +233,11 @@ def __init__(self, location, name=None, kind=None, type=None, tags=None, enabled self.suspended_till = None self.max_number_of_workers = None self.cloning_info = cloning_info + self.snapshot_info = snapshot_info self.resource_group = None self.is_default_container = None self.default_host_name = None self.slot_swap_status = None + self.premium_app_deployed = None + self.micro_service = micro_service + self.gateway_site_name = gateway_site_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings.py b/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings.py old mode 100755 new mode 100644 index 8c46b816efe0..78e0527b951c --- a/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class SiteAuthSettings(Resource): +class SiteAuthSettings(ProxyOnlyResource): """Configuration settings for the Azure App Service Authentication / Authorization feature. @@ -21,16 +21,12 @@ class SiteAuthSettings(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param enabled: true if the Authentication / Authorization feature is enabled for the current app; otherwise, false. :type enabled: bool @@ -174,16 +170,15 @@ class SiteAuthSettings(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'runtime_version': {'key': 'properties.runtimeVersion', 'type': 'str'}, 'unauthenticated_client_action': {'key': 'properties.unauthenticatedClientAction', 'type': 'UnauthenticatedClientAction'}, @@ -209,8 +204,8 @@ class SiteAuthSettings(Resource): 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', 'type': '[str]'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, enabled=None, runtime_version=None, unauthenticated_client_action=None, token_store_enabled=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours=None, client_id=None, client_secret=None, issuer=None, allowed_audiences=None, additional_login_params=None, google_client_id=None, google_client_secret=None, google_oauth_scopes=None, facebook_app_id=None, facebook_app_secret=None, facebook_oauth_scopes=None, twitter_consumer_key=None, twitter_consumer_secret=None, microsoft_account_client_id=None, microsoft_account_client_secret=None, microsoft_account_oauth_scopes=None): - super(SiteAuthSettings, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, enabled=None, runtime_version=None, unauthenticated_client_action=None, token_store_enabled=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours=None, client_id=None, client_secret=None, issuer=None, allowed_audiences=None, additional_login_params=None, google_client_id=None, google_client_secret=None, google_oauth_scopes=None, facebook_app_id=None, facebook_app_secret=None, facebook_oauth_scopes=None, twitter_consumer_key=None, twitter_consumer_secret=None, microsoft_account_client_id=None, microsoft_account_client_secret=None, microsoft_account_oauth_scopes=None): + super(SiteAuthSettings, self).__init__(kind=kind) self.enabled = enabled self.runtime_version = runtime_version self.unauthenticated_client_action = unauthenticated_client_action diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_cloneability.py b/azure-mgmt-web/azure/mgmt/web/models/site_cloneability.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_config.py b/azure-mgmt-web/azure/mgmt/web/models/site_config.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_config_resource.py b/azure-mgmt-web/azure/mgmt/web/models/site_config_resource.py old mode 100755 new mode 100644 index beb941ac7816..5ac25207de3e --- a/azure-mgmt-web/azure/mgmt/web/models/site_config_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config_resource.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class SiteConfigResource(Resource): +class SiteConfigResource(ProxyOnlyResource): """Web app configuration ARM resource. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class SiteConfigResource(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param number_of_workers: Number of workers. :type number_of_workers: int :param default_documents: Default documents. @@ -147,7 +143,8 @@ class SiteConfigResource(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'machine_key': {'readonly': True}, } @@ -155,9 +152,7 @@ class SiteConfigResource(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}'}, 'number_of_workers': {'key': 'properties.numberOfWorkers', 'type': 'int'}, 'default_documents': {'key': 'properties.defaultDocuments', 'type': '[str]'}, 'net_framework_version': {'key': 'properties.netFrameworkVersion', 'type': 'str'}, @@ -203,8 +198,8 @@ class SiteConfigResource(Resource): 'ip_security_restrictions': {'key': 'properties.ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, 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(SiteConfigResource, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, 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(SiteConfigResource, self).__init__(kind=kind) self.number_of_workers = number_of_workers self.default_documents = default_documents self.net_framework_version = net_framework_version diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_config_resource_paged.py b/azure-mgmt-web/azure/mgmt/web/models/site_config_resource_paged.py old mode 100755 new mode 100644 index 889626325af2..f18924b9a537 --- a/azure-mgmt-web/azure/mgmt/web/models/site_config_resource_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config_resource_paged.py @@ -14,7 +14,7 @@ class SiteConfigResourcePaged(Paged): """ - A paging container for iterating over a list of SiteConfigResource object + A paging container for iterating over a list of :class:`SiteConfigResource ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_configuration_snapshot_info.py b/azure-mgmt-web/azure/mgmt/web/models/site_configuration_snapshot_info.py old mode 100755 new mode 100644 index 6f56c1cbad3d..6cb6fb32764f --- a/azure-mgmt-web/azure/mgmt/web/models/site_configuration_snapshot_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_configuration_snapshot_info.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class SiteConfigurationSnapshotInfo(Resource): +class SiteConfigurationSnapshotInfo(ProxyOnlyResource): """A snapshot of a web app configuration. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class SiteConfigurationSnapshotInfo(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar time: The time the snapshot was taken. :vartype time: datetime :ivar site_configuration_snapshot_info_id: The id of the snapshot @@ -38,7 +34,8 @@ class SiteConfigurationSnapshotInfo(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'time': {'readonly': True}, 'site_configuration_snapshot_info_id': {'readonly': True}, } @@ -47,14 +44,12 @@ class SiteConfigurationSnapshotInfo(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}'}, 'time': {'key': 'properties.time', 'type': 'iso-8601'}, 'site_configuration_snapshot_info_id': {'key': 'properties.id', 'type': 'int'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(SiteConfigurationSnapshotInfo, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind) self.time = None self.site_configuration_snapshot_info_id = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_instance.py b/azure-mgmt-web/azure/mgmt/web/models/site_instance.py old mode 100755 new mode 100644 index ccc12afb3429..dfd3fc7c4fd3 --- a/azure-mgmt-web/azure/mgmt/web/models/site_instance.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_instance.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class SiteInstance(Resource): +class SiteInstance(ProxyOnlyResource): """Instance of an app. Variables are only populated by the server, and will be ignored when @@ -20,23 +20,20 @@ class SiteInstance(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar site_instance_name: Name of instance. :vartype site_instance_name: str """ _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'site_instance_name': {'readonly': True}, } @@ -44,12 +41,10 @@ class SiteInstance(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}'}, 'site_instance_name': {'key': 'properties.name', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(SiteInstance, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(SiteInstance, self).__init__(kind=kind) self.site_instance_name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_instance_paged.py b/azure-mgmt-web/azure/mgmt/web/models/site_instance_paged.py old mode 100755 new mode 100644 index 13c65c73cccc..6f082db3ac7b --- a/azure-mgmt-web/azure/mgmt/web/models/site_instance_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_instance_paged.py @@ -14,7 +14,7 @@ class SiteInstancePaged(Paged): """ - A paging container for iterating over a list of SiteInstance object + A paging container for iterating over a list of :class:`SiteInstance ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_limits.py b/azure-mgmt-web/azure/mgmt/web/models/site_limits.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_logs_config.py b/azure-mgmt-web/azure/mgmt/web/models/site_logs_config.py old mode 100755 new mode 100644 index 50f6ec814575..2927f312302a --- a/azure-mgmt-web/azure/mgmt/web/models/site_logs_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_logs_config.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class SiteLogsConfig(Resource): +class SiteLogsConfig(ProxyOnlyResource): """Configuration of App Service site logs. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class SiteLogsConfig(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param application_logs: Application logs configuration. :type application_logs: :class:`ApplicationLogsConfig ` @@ -46,24 +42,23 @@ class SiteLogsConfig(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'application_logs': {'key': 'properties.applicationLogs', 'type': 'ApplicationLogsConfig'}, 'http_logs': {'key': 'properties.httpLogs', 'type': 'HttpLogsConfig'}, 'failed_requests_tracing': {'key': 'properties.failedRequestsTracing', 'type': 'EnabledConfig'}, 'detailed_error_messages': {'key': 'properties.detailedErrorMessages', 'type': 'EnabledConfig'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None): - super(SiteLogsConfig, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, application_logs=None, http_logs=None, failed_requests_tracing=None, detailed_error_messages=None): + super(SiteLogsConfig, self).__init__(kind=kind) self.application_logs = application_logs self.http_logs = http_logs self.failed_requests_tracing = failed_requests_tracing 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_paged.py b/azure-mgmt-web/azure/mgmt/web/models/site_paged.py old mode 100755 new mode 100644 index 53f5a538a612..10fc2d5f2a08 --- a/azure-mgmt-web/azure/mgmt/web/models/site_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_paged.py @@ -14,7 +14,7 @@ class SitePaged(Paged): """ - A paging container for iterating over a list of Site object + A paging container for iterating over a list of :class:`Site ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_php_error_log_flag.py b/azure-mgmt-web/azure/mgmt/web/models/site_php_error_log_flag.py old mode 100755 new mode 100644 index 2f9ee5a70ade..b957e542f038 --- a/azure-mgmt-web/azure/mgmt/web/models/site_php_error_log_flag.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_php_error_log_flag.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class SitePhpErrorLogFlag(Resource): +class SitePhpErrorLogFlag(ProxyOnlyResource): """Used for getting PHP error logging flag. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class SitePhpErrorLogFlag(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param local_log_errors: Local log_errors setting. :type local_log_errors: str :param master_log_errors: Master log_errors setting. @@ -42,24 +38,23 @@ class SitePhpErrorLogFlag(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'local_log_errors': {'key': 'properties.localLogErrors', 'type': 'str'}, 'master_log_errors': {'key': 'properties.masterLogErrors', 'type': 'str'}, 'local_log_errors_max_length': {'key': 'properties.localLogErrorsMaxLength', 'type': 'str'}, 'master_log_errors_max_length': {'key': 'properties.masterLogErrorsMaxLength', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, local_log_errors=None, master_log_errors=None, local_log_errors_max_length=None, master_log_errors_max_length=None): - super(SitePhpErrorLogFlag, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, local_log_errors=None, master_log_errors=None, local_log_errors_max_length=None, master_log_errors_max_length=None): + super(SitePhpErrorLogFlag, self).__init__(kind=kind) self.local_log_errors = local_log_errors self.master_log_errors = master_log_errors self.local_log_errors_max_length = local_log_errors_max_length diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_seal.py b/azure-mgmt-web/azure/mgmt/web/models/site_seal.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_source_control.py b/azure-mgmt-web/azure/mgmt/web/models/site_source_control.py old mode 100755 new mode 100644 index afc9b923ce05..5d296b1d9ccc --- a/azure-mgmt-web/azure/mgmt/web/models/site_source_control.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_source_control.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class SiteSourceControl(Resource): +class SiteSourceControl(ProxyOnlyResource): """Source control configuration for an app. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class SiteSourceControl(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param repo_url: Repository or source control URL. :type repo_url: str :param branch: Name of branch to use for deployment. @@ -48,16 +44,15 @@ class SiteSourceControl(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'repo_url': {'key': 'properties.repoUrl', 'type': 'str'}, 'branch': {'key': 'properties.branch', 'type': 'str'}, 'is_manual_integration': {'key': 'properties.isManualIntegration', 'type': 'bool'}, @@ -65,8 +60,8 @@ class SiteSourceControl(Resource): 'is_mercurial': {'key': 'properties.isMercurial', 'type': 'bool'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, repo_url=None, branch=None, is_manual_integration=None, deployment_rollback_enabled=None, is_mercurial=None): - super(SiteSourceControl, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, repo_url=None, branch=None, is_manual_integration=None, deployment_rollback_enabled=None, is_mercurial=None): + super(SiteSourceControl, self).__init__(kind=kind) self.repo_url = repo_url self.branch = branch self.is_manual_integration = is_manual_integration diff --git a/azure-mgmt-web/azure/mgmt/web/models/sku_capacity.py b/azure-mgmt-web/azure/mgmt/web/models/sku_capacity.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/sku_description.py b/azure-mgmt-web/azure/mgmt/web/models/sku_description.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/sku_info.py b/azure-mgmt-web/azure/mgmt/web/models/sku_info.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/sku_info_paged.py b/azure-mgmt-web/azure/mgmt/web/models/sku_info_paged.py old mode 100755 new mode 100644 index a1ee226de62f..92367e2b0703 --- a/azure-mgmt-web/azure/mgmt/web/models/sku_info_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/sku_info_paged.py @@ -14,7 +14,7 @@ class SkuInfoPaged(Paged): """ - A paging container for iterating over a list of SkuInfo object + A paging container for iterating over a list of :class:`SkuInfo ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/sku_infos.py b/azure-mgmt-web/azure/mgmt/web/models/sku_infos.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/slot_config_names_resource.py b/azure-mgmt-web/azure/mgmt/web/models/slot_config_names_resource.py old mode 100755 new mode 100644 index 90be66ecb0d6..48c410337580 --- a/azure-mgmt-web/azure/mgmt/web/models/slot_config_names_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/slot_config_names_resource.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class SlotConfigNamesResource(Resource): +class SlotConfigNamesResource(ProxyOnlyResource): """Slot Config names azure resource. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class SlotConfigNamesResource(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param connection_string_names: List of connection string names. :type connection_string_names: list of str :param app_setting_names: List of application settings names. @@ -38,21 +34,20 @@ class SlotConfigNamesResource(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'connection_string_names': {'key': 'properties.connectionStringNames', 'type': '[str]'}, 'app_setting_names': {'key': 'properties.appSettingNames', 'type': '[str]'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, connection_string_names=None, app_setting_names=None): - super(SlotConfigNamesResource, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, connection_string_names=None, app_setting_names=None): + super(SlotConfigNamesResource, self).__init__(kind=kind) self.connection_string_names = connection_string_names self.app_setting_names = app_setting_names diff --git a/azure-mgmt-web/azure/mgmt/web/models/slot_difference.py b/azure-mgmt-web/azure/mgmt/web/models/slot_difference.py old mode 100755 new mode 100644 index 8302a960ab49..58b2c975a0a3 --- a/azure-mgmt-web/azure/mgmt/web/models/slot_difference.py +++ b/azure-mgmt-web/azure/mgmt/web/models/slot_difference.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class SlotDifference(Resource): +class SlotDifference(ProxyOnlyResource): """A setting difference between two deployment slots of an app. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class SlotDifference(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar slot_difference_type: Type of the difference: Information, Warning or Error. :vartype slot_difference_type: str @@ -51,7 +47,8 @@ class SlotDifference(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'slot_difference_type': {'readonly': True}, 'setting_type': {'readonly': True}, 'diff_rule': {'readonly': True}, @@ -65,9 +62,7 @@ class SlotDifference(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}'}, 'slot_difference_type': {'key': 'properties.type', 'type': 'str'}, 'setting_type': {'key': 'properties.settingType', 'type': 'str'}, 'diff_rule': {'key': 'properties.diffRule', 'type': 'str'}, @@ -77,8 +72,8 @@ class SlotDifference(Resource): 'description': {'key': 'properties.description', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(SlotDifference, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(SlotDifference, self).__init__(kind=kind) self.slot_difference_type = None self.setting_type = None self.diff_rule = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/slot_difference_paged.py b/azure-mgmt-web/azure/mgmt/web/models/slot_difference_paged.py old mode 100755 new mode 100644 index 617a0a9806db..5f3817a0fdd3 --- a/azure-mgmt-web/azure/mgmt/web/models/slot_difference_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/slot_difference_paged.py @@ -14,7 +14,7 @@ class SlotDifferencePaged(Paged): """ - A paging container for iterating over a list of SlotDifference object + A paging container for iterating over a list of :class:`SlotDifference ` object """ _attribute_map = { 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/snapshot.py b/azure-mgmt-web/azure/mgmt/web/models/snapshot.py old mode 100755 new mode 100644 index 4694d47f32c5..066eae59ceb1 --- a/azure-mgmt-web/azure/mgmt/web/models/snapshot.py +++ b/azure-mgmt-web/azure/mgmt/web/models/snapshot.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class Snapshot(Resource): +class Snapshot(ProxyOnlyResource): """A snapshot of an app. Variables are only populated by the server, and will be ignored when @@ -20,23 +20,20 @@ class Snapshot(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar time: The time the snapshot was taken. - :vartype time: datetime + :vartype time: str """ _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'time': {'readonly': True}, } @@ -44,12 +41,10 @@ class Snapshot(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}'}, - 'time': {'key': 'properties.time', 'type': 'iso-8601'}, + 'time': {'key': 'properties.time', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(Snapshot, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(Snapshot, self).__init__(kind=kind) self.time = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/snapshot_paged.py b/azure-mgmt-web/azure/mgmt/web/models/snapshot_paged.py old mode 100755 new mode 100644 index 8a3fd60f6009..6b3fcd1e5fea --- a/azure-mgmt-web/azure/mgmt/web/models/snapshot_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/snapshot_paged.py @@ -14,7 +14,7 @@ class SnapshotPaged(Paged): """ - A paging container for iterating over a list of Snapshot object + A paging container for iterating over a list of :class:`Snapshot ` object """ _attribute_map = { 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 new file mode 100644 index 000000000000..190179fd8670 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_request.py @@ -0,0 +1,72 @@ +# 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 SnapshotRecoveryRequest(ProxyOnlyResource): + """Details about app recovery operation. + + 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 snapshot_time: Point in time in which the app recovery should be + attempted, formatted as a DateTime string. + :type snapshot_time: str + :param recovery_target: Specifies the web app that snapshot contents will + be written to. + :type recovery_target: :class:`SnapshotRecoveryTarget + ` + :param overwrite: If true the recovery operation can + overwrite source app; otherwise, false. + :type overwrite: bool + :param recover_configuration: If true, site configuration, in addition to + content, will be reverted. + :type recover_configuration: bool + :param ignore_conflicting_host_names: If true, custom hostname conflicts + will be ignored when recovering to a target web app. + This setting is only necessary when RecoverConfiguration is enabled. + :type ignore_conflicting_host_names: bool + """ + + _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'}, + 'snapshot_time': {'key': 'properties.snapshotTime', 'type': 'str'}, + 'recovery_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + '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): + super(SnapshotRecoveryRequest, self).__init__(kind=kind) + self.snapshot_time = snapshot_time + self.recovery_target = recovery_target + self.overwrite = overwrite + self.recover_configuration = recover_configuration + self.ignore_conflicting_host_names = ignore_conflicting_host_names 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 new file mode 100644 index 000000000000..a3762682392f --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_target.py @@ -0,0 +1,36 @@ +# 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 SnapshotRecoveryTarget(Model): + """Specifies the web app that snapshot contents will be written to. + + :param location: Geographical location of the target web app, e.g. + SouthEastAsia, SouthCentralUS + :type location: str + :param id: ARM resource ID of the target app. + /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} + for production slots and + /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} + for other slots. + :type id: str + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, location=None, id=None): + self.location = location + self.id = id diff --git a/azure-mgmt-web/azure/mgmt/web/models/source_control.py b/azure-mgmt-web/azure/mgmt/web/models/source_control.py old mode 100755 new mode 100644 index 892428388b86..154659566101 --- a/azure-mgmt-web/azure/mgmt/web/models/source_control.py +++ b/azure-mgmt-web/azure/mgmt/web/models/source_control.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class SourceControl(Resource): +class SourceControl(ProxyOnlyResource): """The source control OAuth token. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class SourceControl(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param source_control_name: Name or source control type. :type source_control_name: str :param token: OAuth access token. @@ -44,16 +40,15 @@ class SourceControl(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'source_control_name': {'key': 'properties.name', 'type': 'str'}, 'token': {'key': 'properties.token', 'type': 'str'}, 'token_secret': {'key': 'properties.tokenSecret', 'type': 'str'}, @@ -61,8 +56,8 @@ class SourceControl(Resource): 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, source_control_name=None, token=None, token_secret=None, refresh_token=None, expiration_time=None): - super(SourceControl, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, source_control_name=None, token=None, token_secret=None, refresh_token=None, expiration_time=None): + super(SourceControl, self).__init__(kind=kind) self.source_control_name = source_control_name self.token = token self.token_secret = token_secret diff --git a/azure-mgmt-web/azure/mgmt/web/models/source_control_paged.py b/azure-mgmt-web/azure/mgmt/web/models/source_control_paged.py old mode 100755 new mode 100644 index 4c4ae408ff83..5a13849dcd65 --- a/azure-mgmt-web/azure/mgmt/web/models/source_control_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/source_control_paged.py @@ -14,7 +14,7 @@ class SourceControlPaged(Paged): """ - A paging container for iterating over a list of SourceControl object + A paging container for iterating over a list of :class:`SourceControl ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity.py b/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity_paged.py b/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity_paged.py old mode 100755 new mode 100644 index 7aec3e3bafee..4ebc814515ad --- a/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity_paged.py @@ -14,7 +14,7 @@ class StampCapacityPaged(Paged): """ - A paging container for iterating over a list of StampCapacity object + A paging container for iterating over a list of :class:`StampCapacity ` object """ _attribute_map = { 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index c8e71f66d1f6..c7fafbc71d5d --- a/azure-mgmt-web/azure/mgmt/web/models/storage_migration_options.py +++ b/azure-mgmt-web/azure/mgmt/web/models/storage_migration_options.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class StorageMigrationOptions(Resource): +class StorageMigrationOptions(ProxyOnlyResource): """Options for app content migration. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class StorageMigrationOptions(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param azurefiles_connection_string: AzureFiles connection string. :type azurefiles_connection_string: str :param azurefiles_share: AzureFiles share. @@ -45,24 +41,23 @@ class StorageMigrationOptions(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'azurefiles_connection_string': {'key': 'properties.azurefilesConnectionString', 'type': 'str'}, 'azurefiles_share': {'key': 'properties.azurefilesShare', 'type': 'str'}, 'switch_site_after_migration': {'key': 'properties.switchSiteAfterMigration', 'type': 'bool'}, 'block_write_access_to_site': {'key': 'properties.blockWriteAccessToSite', 'type': 'bool'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, azurefiles_connection_string=None, azurefiles_share=None, switch_site_after_migration=False, block_write_access_to_site=False): - super(StorageMigrationOptions, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, azurefiles_connection_string=None, azurefiles_share=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 self.switch_site_after_migration = switch_site_after_migration diff --git a/azure-mgmt-web/azure/mgmt/web/models/storage_migration_response.py b/azure-mgmt-web/azure/mgmt/web/models/storage_migration_response.py old mode 100755 new mode 100644 index b4683b7cd7c3..eda75c3f5171 --- a/azure-mgmt-web/azure/mgmt/web/models/storage_migration_response.py +++ b/azure-mgmt-web/azure/mgmt/web/models/storage_migration_response.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class StorageMigrationResponse(Resource): +class StorageMigrationResponse(ProxyOnlyResource): """Response for a migration of app content request. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class StorageMigrationResponse(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar operation_id: When server starts the migration process, it will return an operation ID identifying that particular migration operation. :vartype operation_id: str @@ -37,7 +33,8 @@ class StorageMigrationResponse(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'operation_id': {'readonly': True}, } @@ -45,12 +42,10 @@ class StorageMigrationResponse(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}'}, 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(StorageMigrationResponse, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(StorageMigrationResponse, self).__init__(kind=kind) self.operation_id = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/str_paged.py b/azure-mgmt-web/azure/mgmt/web/models/str_paged.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/string_dictionary.py b/azure-mgmt-web/azure/mgmt/web/models/string_dictionary.py old mode 100755 new mode 100644 index cb6a377f2ef2..1cd7bec15f5b --- a/azure-mgmt-web/azure/mgmt/web/models/string_dictionary.py +++ b/azure-mgmt-web/azure/mgmt/web/models/string_dictionary.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class StringDictionary(Resource): +class StringDictionary(ProxyOnlyResource): """String dictionary resource. Variables are only populated by the server, and will be ignored when @@ -20,35 +20,30 @@ class StringDictionary(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param properties: Settings. :type properties: dict """ _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'properties': {'key': 'properties', 'type': '{str}'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, properties=None): - super(StringDictionary, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, properties=None): + super(StringDictionary, self).__init__(kind=kind) self.properties = properties 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/tld_legal_agreement_paged.py b/azure-mgmt-web/azure/mgmt/web/models/tld_legal_agreement_paged.py old mode 100755 new mode 100644 index 36bbfaefb5fe..562ca0710fea --- a/azure-mgmt-web/azure/mgmt/web/models/tld_legal_agreement_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/tld_legal_agreement_paged.py @@ -14,7 +14,7 @@ class TldLegalAgreementPaged(Paged): """ - A paging container for iterating over a list of TldLegalAgreement object + A paging container for iterating over a list of :class:`TldLegalAgreement ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/top_level_domain.py b/azure-mgmt-web/azure/mgmt/web/models/top_level_domain.py old mode 100755 new mode 100644 index 816f9c79dce9..c5b5397e3d90 --- a/azure-mgmt-web/azure/mgmt/web/models/top_level_domain.py +++ b/azure-mgmt-web/azure/mgmt/web/models/top_level_domain.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class TopLevelDomain(Resource): +class TopLevelDomain(ProxyOnlyResource): """A top level domain object. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class TopLevelDomain(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar domain_name: Name of the top level domain. :vartype domain_name: str :param privacy: If true, then the top level domain supports @@ -39,7 +35,8 @@ class TopLevelDomain(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'domain_name': {'readonly': True}, } @@ -47,14 +44,12 @@ class TopLevelDomain(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}'}, 'domain_name': {'key': 'properties.name', 'type': 'str'}, 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, privacy=None): - super(TopLevelDomain, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, privacy=None): + super(TopLevelDomain, self).__init__(kind=kind) self.domain_name = None self.privacy = privacy 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/top_level_domain_paged.py b/azure-mgmt-web/azure/mgmt/web/models/top_level_domain_paged.py old mode 100755 new mode 100644 index 3923cfc39169..c60c2a45ad16 --- a/azure-mgmt-web/azure/mgmt/web/models/top_level_domain_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/top_level_domain_paged.py @@ -14,7 +14,7 @@ class TopLevelDomainPaged(Paged): """ - A paging container for iterating over a list of TopLevelDomain object + A paging container for iterating over a list of :class:`TopLevelDomain ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/usage.py b/azure-mgmt-web/azure/mgmt/web/models/usage.py old mode 100755 new mode 100644 index 4af299136fea..e654d0904090 --- a/azure-mgmt-web/azure/mgmt/web/models/usage.py +++ b/azure-mgmt-web/azure/mgmt/web/models/usage.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class Usage(Resource): +class Usage(ProxyOnlyResource): """Usage of the quota resource. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class Usage(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :ivar display_name: Friendly name shown in the UI. :vartype display_name: str :ivar usage_name: Name of the quota. @@ -54,7 +50,8 @@ class Usage(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'display_name': {'readonly': True}, 'usage_name': {'readonly': True}, 'resource_name': {'readonly': True}, @@ -70,9 +67,7 @@ class Usage(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}'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'usage_name': {'key': 'properties.name', 'type': 'str'}, 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, @@ -84,8 +79,8 @@ class Usage(Resource): 'site_mode': {'key': 'properties.siteMode', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None): - super(Usage, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None): + super(Usage, self).__init__(kind=kind) self.display_name = None self.usage_name = None self.resource_name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/usage_paged.py b/azure-mgmt-web/azure/mgmt/web/models/usage_paged.py old mode 100755 new mode 100644 index f357b8c198be..fe1e5c6d4089 --- a/azure-mgmt-web/azure/mgmt/web/models/usage_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/usage_paged.py @@ -14,7 +14,7 @@ class UsagePaged(Paged): """ - A paging container for iterating over a list of Usage object + A paging container for iterating over a list of :class:`Usage ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/models/user.py b/azure-mgmt-web/azure/mgmt/web/models/user.py old mode 100755 new mode 100644 index 7f10daf18f6b..8fe1c8681c53 --- a/azure-mgmt-web/azure/mgmt/web/models/user.py +++ b/azure-mgmt-web/azure/mgmt/web/models/user.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class User(Resource): +class User(ProxyOnlyResource): """User crendentials used for publishing activity. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class User(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param user_name: Username :type user_name: str :param publishing_user_name: Username used for publishing. @@ -45,16 +41,15 @@ class User(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'user_name': {'key': 'properties.name', 'type': 'str'}, 'publishing_user_name': {'key': 'properties.publishingUserName', 'type': 'str'}, 'publishing_password': {'key': 'properties.publishingPassword', 'type': 'str'}, @@ -62,8 +57,8 @@ class User(Resource): 'publishing_password_hash_salt': {'key': 'properties.publishingPasswordHashSalt', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, user_name=None, publishing_user_name=None, publishing_password=None, publishing_password_hash=None, publishing_password_hash_salt=None): - super(User, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, user_name=None, publishing_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 self.publishing_password = publishing_password diff --git a/azure-mgmt-web/azure/mgmt/web/models/validate_request.py b/azure-mgmt-web/azure/mgmt/web/models/validate_request.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/validate_response.py b/azure-mgmt-web/azure/mgmt/web/models/validate_response.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/virtual_application.py b/azure-mgmt-web/azure/mgmt/web/models/virtual_application.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/virtual_directory.py b/azure-mgmt-web/azure/mgmt/web/models/virtual_directory.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_gateway.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_gateway.py old mode 100755 new mode 100644 index a6609bac7d0b..82188df3b2f8 --- a/azure-mgmt-web/azure/mgmt/web/models/vnet_gateway.py +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_gateway.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class VnetGateway(Resource): +class VnetGateway(ProxyOnlyResource): """The Virtual Network gateway contract. This is used to give the Virtual Network gateway access to the VPN package. @@ -21,16 +21,12 @@ class VnetGateway(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param vnet_name: The Virtual Network name. :type vnet_name: str :param vpn_package_uri: The URI where the VPN package can be downloaded. @@ -39,21 +35,20 @@ class VnetGateway(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, 'vpn_package_uri': {'key': 'properties.vpnPackageUri', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, vnet_name=None, vpn_package_uri=None): - super(VnetGateway, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, vnet_name=None, vpn_package_uri=None): + super(VnetGateway, self).__init__(kind=kind) self.vnet_name = vnet_name self.vpn_package_uri = vpn_package_uri diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_info.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_info.py old mode 100755 new mode 100644 index 9df73b4a463b..3218867d0005 --- a/azure-mgmt-web/azure/mgmt/web/models/vnet_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_info.py @@ -9,15 +9,23 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .proxy_only_resource import ProxyOnlyResource -class VnetInfo(Model): +class VnetInfo(ProxyOnlyResource): """Virtual Network information contract. 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 vnet_resource_id: The Virtual Network's resource ID. :type vnet_resource_id: str :ivar cert_thumbprint: The client certificate thumbprint. @@ -38,21 +46,29 @@ class VnetInfo(Model): """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'cert_thumbprint': {'readonly': True}, 'routes': {'readonly': True}, 'resync_required': {'readonly': True}, } _attribute_map = { - 'vnet_resource_id': {'key': 'vnetResourceId', 'type': 'str'}, - 'cert_thumbprint': {'key': 'certThumbprint', 'type': 'str'}, - 'cert_blob': {'key': 'certBlob', 'type': 'str'}, - 'routes': {'key': 'routes', 'type': '[VnetRoute]'}, - 'resync_required': {'key': 'resyncRequired', 'type': 'bool'}, - 'dns_servers': {'key': 'dnsServers', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'vnet_resource_id': {'key': 'properties.vnetResourceId', 'type': 'str'}, + 'cert_thumbprint': {'key': 'properties.certThumbprint', 'type': 'str'}, + 'cert_blob': {'key': 'properties.certBlob', 'type': 'str'}, + 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, + 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, + 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, } - def __init__(self, vnet_resource_id=None, cert_blob=None, dns_servers=None): + def __init__(self, kind=None, vnet_resource_id=None, cert_blob=None, dns_servers=None): + super(VnetInfo, self).__init__(kind=kind) self.vnet_resource_id = vnet_resource_id self.cert_thumbprint = None self.cert_blob = cert_blob diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_parameters.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_parameters.py new file mode 100644 index 000000000000..1226c3ef1b27 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_parameters.py @@ -0,0 +1,57 @@ +# 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 VnetParameters(ProxyOnlyResource): + """The required set of inputs to validate a VNET. + + 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 vnet_resource_group: The Resource Group of the VNET to be validated + :type vnet_resource_group: str + :param vnet_name: The name of the VNET to be validated + :type vnet_name: str + :param vnet_subnet_name: The subnet name to be validated + :type vnet_subnet_name: str + """ + + _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'}, + 'vnet_resource_group': {'key': 'properties.vnetResourceGroup', 'type': 'str'}, + 'vnet_name': {'key': 'properties.vnetName', 'type': 'str'}, + 'vnet_subnet_name': {'key': 'properties.vnetSubnetName', 'type': 'str'}, + } + + def __init__(self, kind=None, vnet_resource_group=None, vnet_name=None, vnet_subnet_name=None): + super(VnetParameters, self).__init__(kind=kind) + self.vnet_resource_group = vnet_resource_group + self.vnet_name = vnet_name + self.vnet_subnet_name = vnet_subnet_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_route.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_route.py old mode 100755 new mode 100644 index 92bb43383727..d00419b8f22f --- a/azure-mgmt-web/azure/mgmt/web/models/vnet_route.py +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_route.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class VnetRoute(Resource): +class VnetRoute(ProxyOnlyResource): """Virtual Network route contract used to pass routing information for a Virtual Network. @@ -21,16 +21,12 @@ class VnetRoute(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param vnet_route_name: The name of this route. This is only returned by the server and does not need to be set by the client. :type vnet_route_name: str @@ -54,24 +50,23 @@ class VnetRoute(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, } _attribute_map = { '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}'}, 'vnet_route_name': {'key': 'properties.name', 'type': 'str'}, 'start_address': {'key': 'properties.startAddress', 'type': 'str'}, 'end_address': {'key': 'properties.endAddress', 'type': 'str'}, 'route_type': {'key': 'properties.routeType', 'type': 'str'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, vnet_route_name=None, start_address=None, end_address=None, route_type=None): - super(VnetRoute, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, vnet_route_name=None, start_address=None, end_address=None, route_type=None): + super(VnetRoute, self).__init__(kind=kind) self.vnet_route_name = vnet_route_name self.start_address = start_address self.end_address = end_address diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_validation_failure_details.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_validation_failure_details.py new file mode 100644 index 000000000000..e8be07272e0a --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_validation_failure_details.py @@ -0,0 +1,54 @@ +# 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 VnetValidationFailureDetails(ProxyOnlyResource): + """A class that describes the reason for a validation failure. + + 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 failed: A flag describing whether or not validation failed. + :type failed: bool + :param failed_tests: A list of tests that failed in the validation. + :type failed_tests: list of :class:`VnetValidationTestFailure + ` + """ + + _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'}, + 'failed': {'key': 'properties.failed', 'type': 'bool'}, + 'failed_tests': {'key': 'properties.failedTests', 'type': '[VnetValidationTestFailure]'}, + } + + def __init__(self, kind=None, failed=None, failed_tests=None): + super(VnetValidationFailureDetails, self).__init__(kind=kind) + self.failed = failed + self.failed_tests = failed_tests diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_validation_test_failure.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_validation_test_failure.py new file mode 100644 index 000000000000..c0d453c1b53a --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_validation_test_failure.py @@ -0,0 +1,54 @@ +# 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 VnetValidationTestFailure(ProxyOnlyResource): + """A class that describes a test that failed during NSG and UDR validation. + + 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 test_name: The name of the test that failed. + :type test_name: str + :param details: The details of what caused the failure, e.g. the blocking + rule name, etc. + :type details: str + """ + + _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'}, + 'test_name': {'key': 'properties.testName', 'type': 'str'}, + 'details': {'key': 'properties.details', 'type': 'str'}, + } + + def __init__(self, kind=None, test_name=None, details=None): + super(VnetValidationTestFailure, self).__init__(kind=kind) + self.test_name = test_name + self.details = details 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 old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index 3643f08cfaba..df6115a5b34d --- 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 @@ -74,144 +74,6 @@ class CertificateOrderActionType(Enum): unknown = "Unknown" -class HostingEnvironmentStatus(Enum): - - preparing = "Preparing" - ready = "Ready" - scaling = "Scaling" - deleting = "Deleting" - - -class InternalLoadBalancingMode(Enum): - - none = "None" - web = "Web" - publishing = "Publishing" - - -class ComputeModeOptions(Enum): - - shared = "Shared" - dedicated = "Dedicated" - dynamic = "Dynamic" - - -class WorkerSizeOptions(Enum): - - default = "Default" - small = "Small" - medium = "Medium" - large = "Large" - - -class AccessControlEntryAction(Enum): - - permit = "Permit" - deny = "Deny" - - -class StatusOptions(Enum): - - ready = "Ready" - pending = "Pending" - - -class AutoHealActionType(Enum): - - recycle = "Recycle" - log_event = "LogEvent" - custom_action = "CustomAction" - - -class ConnectionStringType(Enum): - - my_sql = "MySql" - sql_server = "SQLServer" - sql_azure = "SQLAzure" - custom = "Custom" - notification_hub = "NotificationHub" - service_bus = "ServiceBus" - event_hub = "EventHub" - api_hub = "ApiHub" - doc_db = "DocDb" - redis_cache = "RedisCache" - postgre_sql = "PostgreSQL" - - -class SslState(Enum): - - disabled = "Disabled" - sni_enabled = "SniEnabled" - ip_based_enabled = "IpBasedEnabled" - - -class HostType(Enum): - - standard = "Standard" - repository = "Repository" - - -class OperationStatus(Enum): - - in_progress = "InProgress" - failed = "Failed" - succeeded = "Succeeded" - timed_out = "TimedOut" - created = "Created" - - -class UsageState(Enum): - - normal = "Normal" - exceeded = "Exceeded" - - -class SiteAvailabilityState(Enum): - - normal = "Normal" - limited = "Limited" - disaster_recovery_mode = "DisasterRecoveryMode" - - -class ScmType(Enum): - - none = "None" - dropbox = "Dropbox" - tfs = "Tfs" - local_git = "LocalGit" - git_hub = "GitHub" - code_plex_git = "CodePlexGit" - code_plex_hg = "CodePlexHg" - bitbucket_git = "BitbucketGit" - bitbucket_hg = "BitbucketHg" - external_git = "ExternalGit" - external_hg = "ExternalHg" - one_drive = "OneDrive" - vso = "VSO" - - -class ManagedPipelineMode(Enum): - - integrated = "Integrated" - classic = "Classic" - - -class SiteLoadBalancing(Enum): - - weighted_round_robin = "WeightedRoundRobin" - least_requests = "LeastRequests" - least_response_time = "LeastResponseTime" - weighted_total_traffic = "WeightedTotalTraffic" - request_hash = "RequestHash" - - -class RouteType(Enum): - - default = "DEFAULT" - inherited = "INHERITED" - static = "STATIC" - - class DomainStatus(Enum): active = "Active" @@ -329,6 +191,13 @@ class LogLevel(Enum): error = "Error" +class AutoHealActionType(Enum): + + recycle = "Recycle" + log_event = "LogEvent" + custom_action = "CustomAction" + + class BackupItemStatus(Enum): in_progress = "InProgress" @@ -362,6 +231,22 @@ class BackupRestoreOperationType(Enum): default = "Default" clone = "Clone" relocation = "Relocation" + snapshot = "Snapshot" + + +class ConnectionStringType(Enum): + + my_sql = "MySql" + sql_server = "SQLServer" + sql_azure = "SQLAzure" + custom = "Custom" + notification_hub = "NotificationHub" + service_bus = "ServiceBus" + event_hub = "EventHub" + api_hub = "ApiHub" + doc_db = "DocDb" + redis_cache = "RedisCache" + postgre_sql = "PostgreSQL" class PublishingProfileFormat(Enum): @@ -378,6 +263,109 @@ class DnsVerificationTestResult(Enum): skipped = "Skipped" +class SslState(Enum): + + disabled = "Disabled" + sni_enabled = "SniEnabled" + ip_based_enabled = "IpBasedEnabled" + + +class HostType(Enum): + + standard = "Standard" + repository = "Repository" + + +class MSDeployLogEntryType(Enum): + + message = "Message" + warning = "Warning" + error = "Error" + + +class MSDeployProvisioningState(Enum): + + accepted = "accepted" + running = "running" + succeeded = "succeeded" + failed = "failed" + canceled = "canceled" + + +class MySqlMigrationType(Enum): + + local_to_remote = "LocalToRemote" + remote_to_local = "RemoteToLocal" + + +class OperationStatus(Enum): + + in_progress = "InProgress" + failed = "Failed" + succeeded = "Succeeded" + timed_out = "TimedOut" + created = "Created" + + +class RouteType(Enum): + + default = "DEFAULT" + inherited = "INHERITED" + static = "STATIC" + + +class PublicCertificateLocation(Enum): + + current_user_my = "CurrentUserMy" + local_machine_my = "LocalMachineMy" + unknown = "Unknown" + + +class UsageState(Enum): + + normal = "Normal" + exceeded = "Exceeded" + + +class SiteAvailabilityState(Enum): + + normal = "Normal" + limited = "Limited" + disaster_recovery_mode = "DisasterRecoveryMode" + + +class ScmType(Enum): + + none = "None" + dropbox = "Dropbox" + tfs = "Tfs" + local_git = "LocalGit" + git_hub = "GitHub" + code_plex_git = "CodePlexGit" + code_plex_hg = "CodePlexHg" + bitbucket_git = "BitbucketGit" + bitbucket_hg = "BitbucketHg" + external_git = "ExternalGit" + external_hg = "ExternalHg" + one_drive = "OneDrive" + vso = "VSO" + + +class ManagedPipelineMode(Enum): + + integrated = "Integrated" + classic = "Classic" + + +class SiteLoadBalancing(Enum): + + weighted_round_robin = "WeightedRoundRobin" + least_requests = "LeastRequests" + least_response_time = "LeastResponseTime" + weighted_total_traffic = "WeightedTotalTraffic" + request_hash = "RequestHash" + + class UnauthenticatedClientAction(Enum): redirect_to_login_page = "RedirectToLoginPage" @@ -400,6 +388,48 @@ class CloneAbilityResult(Enum): not_cloneable = "NotCloneable" +class HostingEnvironmentStatus(Enum): + + preparing = "Preparing" + ready = "Ready" + scaling = "Scaling" + deleting = "Deleting" + + +class InternalLoadBalancingMode(Enum): + + none = "None" + web = "Web" + publishing = "Publishing" + + +class ComputeModeOptions(Enum): + + shared = "Shared" + dedicated = "Dedicated" + dynamic = "Dynamic" + + +class WorkerSizeOptions(Enum): + + default = "Default" + small = "Small" + medium = "Medium" + large = "Large" + + +class AccessControlEntryAction(Enum): + + permit = "Permit" + deny = "Deny" + + +class StatusOptions(Enum): + + ready = "Ready" + pending = "Pending" + + class SkuName(Enum): free = "Free" diff --git a/azure-mgmt-web/azure/mgmt/web/models/worker_pool.py b/azure-mgmt-web/azure/mgmt/web/models/worker_pool.py old mode 100755 new mode 100644 diff --git a/azure-mgmt-web/azure/mgmt/web/models/worker_pool_resource.py b/azure-mgmt-web/azure/mgmt/web/models/worker_pool_resource.py old mode 100755 new mode 100644 index 0dda9ae3e284..68d938ce5338 --- a/azure-mgmt-web/azure/mgmt/web/models/worker_pool_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/worker_pool_resource.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .resource import Resource +from .proxy_only_resource import ProxyOnlyResource -class WorkerPoolResource(Resource): +class WorkerPoolResource(ProxyOnlyResource): """Worker pool of an App Service Environment ARM resource. Variables are only populated by the server, and will be ignored when @@ -20,16 +20,12 @@ class WorkerPoolResource(Resource): :ivar id: Resource Id. :vartype id: str - :param name: Resource Name. - :type name: str + :ivar name: Resource Name. + :vartype name: str :param kind: Kind of resource. :type kind: str - :param location: Resource Location. - :type location: str - :param type: Resource type. - :type type: str - :param tags: Resource tags. - :type tags: dict + :ivar type: Resource type. + :vartype type: str :param worker_size_id: Worker size ID for referencing this worker pool. :type worker_size_id: int :param compute_mode: Shared or dedicated app hosting. Possible values @@ -49,7 +45,8 @@ class WorkerPoolResource(Resource): _validation = { 'id': {'readonly': True}, - 'location': {'required': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'instance_names': {'readonly': True}, } @@ -57,9 +54,7 @@ class WorkerPoolResource(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}'}, 'worker_size_id': {'key': 'properties.workerSizeId', 'type': 'int'}, 'compute_mode': {'key': 'properties.computeMode', 'type': 'ComputeModeOptions'}, 'worker_size': {'key': 'properties.workerSize', 'type': 'str'}, @@ -68,8 +63,8 @@ class WorkerPoolResource(Resource): 'sku': {'key': 'sku', 'type': 'SkuDescription'}, } - def __init__(self, location, name=None, kind=None, type=None, tags=None, worker_size_id=None, compute_mode=None, worker_size=None, worker_count=None, sku=None): - super(WorkerPoolResource, self).__init__(name=name, kind=kind, location=location, type=type, tags=tags) + def __init__(self, kind=None, worker_size_id=None, compute_mode=None, worker_size=None, worker_count=None, sku=None): + super(WorkerPoolResource, self).__init__(kind=kind) self.worker_size_id = worker_size_id self.compute_mode = compute_mode self.worker_size = worker_size diff --git a/azure-mgmt-web/azure/mgmt/web/models/worker_pool_resource_paged.py b/azure-mgmt-web/azure/mgmt/web/models/worker_pool_resource_paged.py old mode 100755 new mode 100644 index f95db5e20e51..e05c7fac1619 --- a/azure-mgmt-web/azure/mgmt/web/models/worker_pool_resource_paged.py +++ b/azure-mgmt-web/azure/mgmt/web/models/worker_pool_resource_paged.py @@ -14,7 +14,7 @@ class WorkerPoolResourcePaged(Paged): """ - A paging container for iterating over a list of WorkerPoolResource object + A paging container for iterating over a list of :class:`WorkerPoolResource ` object """ _attribute_map = { diff --git a/azure-mgmt-web/azure/mgmt/web/operations/__init__.py b/azure-mgmt-web/azure/mgmt/web/operations/__init__.py old mode 100755 new mode 100644 index 7e2a95f61dc2..c6060061f3c5 --- a/azure-mgmt-web/azure/mgmt/web/operations/__init__.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/__init__.py @@ -10,25 +10,25 @@ # -------------------------------------------------------------------------- from .app_service_certificate_orders_operations import AppServiceCertificateOrdersOperations -from .app_service_environments_operations import AppServiceEnvironmentsOperations -from .app_service_plans_operations import AppServicePlansOperations -from .certificates_operations import CertificatesOperations from .domains_operations import DomainsOperations -from .recommendations_operations import RecommendationsOperations from .top_level_domains_operations import TopLevelDomainsOperations -from .web_apps_operations import WebAppsOperations +from .certificates_operations import CertificatesOperations from .deleted_web_apps_operations import DeletedWebAppsOperations from .provider_operations import ProviderOperations +from .recommendations_operations import RecommendationsOperations +from .web_apps_operations import WebAppsOperations +from .app_service_environments_operations import AppServiceEnvironmentsOperations +from .app_service_plans_operations import AppServicePlansOperations __all__ = [ 'AppServiceCertificateOrdersOperations', - 'AppServiceEnvironmentsOperations', - 'AppServicePlansOperations', - 'CertificatesOperations', 'DomainsOperations', - 'RecommendationsOperations', 'TopLevelDomainsOperations', - 'WebAppsOperations', + 'CertificatesOperations', 'DeletedWebAppsOperations', 'ProviderOperations', + 'RecommendationsOperations', + 'WebAppsOperations', + 'AppServiceEnvironmentsOperations', + 'AppServicePlansOperations', ] 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 old mode 100755 new mode 100644 index a31d82c4ff1b..313918051282 --- 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 @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller -import uuid from .. import models @@ -47,6 +47,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of + :class:`AppServiceCertificateOrder + ` :rtype: :class:`AppServiceCertificateOrderPaged ` :raises: :class:`CloudError` @@ -117,9 +120,11 @@ def validate_purchase_information( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -174,6 +179,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of + :class:`AppServiceCertificateOrder + ` :rtype: :class:`AppServiceCertificateOrderPaged ` :raises: :class:`CloudError` @@ -184,7 +192,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -245,16 +253,19 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`AppServiceCertificateOrder + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AppServiceCertificateOrder - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -313,18 +324,21 @@ def create_or_update( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`AppServiceCertificateOrder - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -409,15 +423,17 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -466,6 +482,9 @@ def list_certificates( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of + :class:`AppServiceCertificateResource + ` :rtype: :class:`AppServiceCertificateResourcePaged ` :raises: :class:`CloudError` @@ -476,7 +495,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -540,16 +559,19 @@ def get_certificate( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`AppServiceCertificateResource + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AppServiceCertificateResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'name': self._serialize.url("name", name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -609,18 +631,21 @@ def create_or_update_certificate( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`AppServiceCertificateResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'name': self._serialize.url("name", name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -708,15 +733,17 @@ def delete_certificate( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/certificates/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'name': self._serialize.url("name", name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -770,15 +797,17 @@ def reissue( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/reissue' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -835,15 +864,17 @@ def renew( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/renew' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -896,15 +927,17 @@ def resend_email( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendEmail' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -955,9 +988,11 @@ def resend_request_emails( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ name_identifier = models.NameIdentifier(name=name) @@ -965,7 +1000,7 @@ def resend_request_emails( # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/resendRequestEmails' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -1022,9 +1057,11 @@ def retrieve_site_seal( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SiteSeal ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`SiteSeal ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`SiteSeal ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) @@ -1032,7 +1069,7 @@ def retrieve_site_seal( # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/retrieveSiteSeal' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -1092,15 +1129,17 @@ def verify_domain_ownership( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{certificateOrderName}/verifyDomainOwnership' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'certificateOrderName': self._serialize.url("certificate_order_name", certificate_order_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -1149,16 +1188,19 @@ def retrieve_certificate_actions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: list of :class:`CertificateOrderAction + ` or + :class:`ClientRawResponse` if + raw=true :rtype: list of :class:`CertificateOrderAction - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveCertificateActions' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1214,16 +1256,19 @@ def retrieve_certificate_email_history( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: list of :class:`CertificateEmail + ` or + :class:`ClientRawResponse` if + raw=true :rtype: list of :class:`CertificateEmail - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CertificateRegistration/certificateOrders/{name}/retrieveEmailHistory' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } 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 old mode 100755 new mode 100644 index 85f4675e8317..498904476840 --- 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 @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller -import uuid from .. import models @@ -47,6 +47,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`AppServiceEnvironment + ` :rtype: :class:`AppServiceEnvironmentPaged ` :raises: :class:`CloudError` @@ -115,6 +117,8 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`AppServiceEnvironment + ` :rtype: :class:`AppServiceEnvironmentPaged ` :raises: :class:`CloudError` @@ -125,7 +129,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -186,16 +190,19 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`AppServiceEnvironmentResource + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AppServiceEnvironmentResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -254,18 +261,21 @@ def create_or_update( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`AppServiceEnvironmentResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -352,17 +362,20 @@ def delete( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns None or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -438,6 +451,8 @@ def list_capacities( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`StampCapacity + ` :rtype: :class:`StampCapacityPaged ` :raises: :class:`CloudError` @@ -448,7 +463,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/compute' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -510,16 +525,19 @@ def list_vips( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`AddressResponse + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AddressResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -575,16 +593,19 @@ def list_diagnostics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: list of :class:`HostingEnvironmentDiagnostics + ` or + :class:`ClientRawResponse` if + raw=true :rtype: list of :class:`HostingEnvironmentDiagnostics - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -642,16 +663,19 @@ def get_diagnostics_item( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`HostingEnvironmentDiagnostics + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`HostingEnvironmentDiagnostics - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/diagnostics/{diagnosticsName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'diagnosticsName': self._serialize.url("diagnostics_name", diagnostics_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -708,16 +732,19 @@ def list_metric_definitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`MetricDefinition + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`MetricDefinition - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metricdefinitions' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -782,6 +809,8 @@ def list_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetric + ` :rtype: :class:`ResourceMetricPaged ` :raises: :class:`CloudError` @@ -792,7 +821,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/metrics' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -858,6 +887,8 @@ def list_multi_role_pools( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`WorkerPoolResource + ` :rtype: :class:`WorkerPoolResourcePaged ` :raises: :class:`CloudError` @@ -868,7 +899,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -930,16 +961,19 @@ def get_multi_role_pool( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`WorkerPoolResource + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`WorkerPoolResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -996,18 +1030,21 @@ def create_or_update_multi_role_pool( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`WorkerPoolResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1096,6 +1133,8 @@ def list_multi_role_pool_instance_metric_definitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetricDefinition + ` :rtype: :class:`ResourceMetricDefinitionPaged ` :raises: :class:`CloudError` @@ -1106,7 +1145,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}/metricdefinitions' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'instance': self._serialize.url("instance", instance, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -1176,6 +1215,8 @@ def list_multi_role_pool_instance_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetric + ` :rtype: :class:`ResourceMetricPaged ` :raises: :class:`CloudError` @@ -1186,7 +1227,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/instances/{instance}metrics' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'instance': self._serialize.url("instance", instance, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -1253,6 +1294,8 @@ def list_multi_role_metric_definitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetricDefinition + ` :rtype: :class:`ResourceMetricDefinitionPaged ` :raises: :class:`CloudError` @@ -1263,7 +1306,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metricdefinitions' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1340,6 +1383,8 @@ def list_multi_role_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetric + ` :rtype: :class:`ResourceMetricPaged ` :raises: :class:`CloudError` @@ -1350,7 +1395,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/metrics' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1422,6 +1467,8 @@ def list_multi_role_pool_skus( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`SkuInfo + ` :rtype: :class:`SkuInfoPaged ` :raises: :class:`CloudError` """ @@ -1431,7 +1478,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/skus' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1493,6 +1540,8 @@ def list_multi_role_usages( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Usage + ` :rtype: :class:`UsagePaged ` :raises: :class:`CloudError` """ @@ -1502,7 +1551,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/multiRolePools/default/usages' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1564,15 +1613,17 @@ def list_operations( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: list of :class:`Operation ` + or :class:`ClientRawResponse` if + raw=true :rtype: list of :class:`Operation ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/operations' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1628,15 +1679,17 @@ def reboot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/reboot' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1685,6 +1738,8 @@ def resume( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Site + ` :rtype: :class:`SitePaged ` :raises: :class:`CloudError` """ @@ -1694,7 +1749,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/resume' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1756,6 +1811,8 @@ def list_app_service_plans( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`AppServicePlan + ` :rtype: :class:`AppServicePlanPaged ` :raises: :class:`CloudError` @@ -1766,7 +1823,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/serverfarms' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1831,6 +1888,8 @@ def list_web_apps( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Site + ` :rtype: :class:`SitePaged ` :raises: :class:`CloudError` """ @@ -1840,7 +1899,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/sites' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1904,6 +1963,8 @@ def suspend( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Site + ` :rtype: :class:`SitePaged ` :raises: :class:`CloudError` """ @@ -1913,7 +1974,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/suspend' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1981,6 +2042,8 @@ def list_usages( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`CsmUsageQuota + ` :rtype: :class:`CsmUsageQuotaPaged ` :raises: :class:`CloudError` @@ -1991,7 +2054,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/usages' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2055,6 +2118,8 @@ def list_worker_pools( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`WorkerPoolResource + ` :rtype: :class:`WorkerPoolResourcePaged ` :raises: :class:`CloudError` @@ -2065,7 +2130,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2129,16 +2194,19 @@ def get_worker_pool( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`WorkerPoolResource + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`WorkerPoolResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -2198,18 +2266,21 @@ def create_or_update_worker_pool( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`WorkerPoolResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -2301,6 +2372,8 @@ def list_worker_pool_instance_metric_definitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetricDefinition + ` :rtype: :class:`ResourceMetricDefinitionPaged ` :raises: :class:`CloudError` @@ -2311,7 +2384,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}/metricdefinitions' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), 'instance': self._serialize.url("instance", instance, 'str'), @@ -2390,6 +2463,8 @@ def list_worker_pool_instance_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetric + ` :rtype: :class:`ResourceMetricPaged ` :raises: :class:`CloudError` @@ -2400,7 +2475,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/instances/{instance}metrics' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), 'instance': self._serialize.url("instance", instance, 'str'), @@ -2470,6 +2545,8 @@ def list_web_worker_metric_definitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetricDefinition + ` :rtype: :class:`ResourceMetricDefinitionPaged ` :raises: :class:`CloudError` @@ -2480,7 +2557,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metricdefinitions' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -2556,6 +2633,8 @@ def list_web_worker_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetric + ` :rtype: :class:`ResourceMetricPaged ` :raises: :class:`CloudError` @@ -2566,7 +2645,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/metrics' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -2635,6 +2714,8 @@ def list_worker_pool_skus( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`SkuInfo + ` :rtype: :class:`SkuInfoPaged ` :raises: :class:`CloudError` """ @@ -2644,7 +2725,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/skus' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -2709,6 +2790,8 @@ def list_web_worker_usages( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Usage + ` :rtype: :class:`UsagePaged ` :raises: :class:`CloudError` """ @@ -2718,7 +2801,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/workerPools/{workerPoolName}/usages' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'workerPoolName': self._serialize.url("worker_pool_name", worker_pool_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') 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 old mode 100755 new mode 100644 index 486d849db7e6..f16b9cd3a830 --- 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 @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller -import uuid from .. import models @@ -52,6 +52,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`AppServicePlan + ` :rtype: :class:`AppServicePlanPaged ` :raises: :class:`CloudError` @@ -122,6 +124,8 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`AppServicePlan + ` :rtype: :class:`AppServicePlanPaged ` :raises: :class:`CloudError` @@ -132,7 +136,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -193,15 +197,18 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`AppServicePlan + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AppServicePlan ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -258,18 +265,21 @@ def create_or_update( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`AppServicePlan - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -354,15 +364,17 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -411,15 +423,18 @@ def list_capabilities( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: list of :class:`Capability + ` or + :class:`ClientRawResponse` if + raw=true :rtype: list of :class:`Capability ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/capabilities' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -479,16 +494,19 @@ def get_hybrid_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`HybridConnection + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`HybridConnection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), 'relayName': self._serialize.url("relay_name", relay_name, 'str'), @@ -550,15 +568,17 @@ def delete_hybrid_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), 'relayName': self._serialize.url("relay_name", relay_name, 'str'), @@ -613,16 +633,19 @@ def list_hybrid_connection_keys( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`HybridConnectionKey + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`HybridConnectionKey - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), 'relayName': self._serialize.url("relay_name", relay_name, 'str'), @@ -684,6 +707,7 @@ def list_web_apps_by_hybrid_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of str :rtype: :class:`StrPaged ` :raises: :class:`CloudError` """ @@ -693,7 +717,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/sites' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), 'relayName': self._serialize.url("relay_name", relay_name, 'str'), @@ -759,16 +783,19 @@ def get_hybrid_connection_plan_limit( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`HybridConnectionLimits + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`HybridConnectionLimits - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionPlanLimits/limit' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -824,6 +851,8 @@ def list_hybrid_connections( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`HybridConnection + ` :rtype: :class:`HybridConnectionPaged ` :raises: :class:`CloudError` @@ -834,7 +863,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/hybridConnectionRelays' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -898,6 +927,8 @@ def list_metric_defintions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetricDefinition + ` :rtype: :class:`ResourceMetricDefinitionPaged ` :raises: :class:`CloudError` @@ -908,7 +939,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metricdefinitions' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -979,6 +1010,8 @@ def list_metrics( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetric + ` :rtype: :class:`ResourceMetricPaged ` :raises: :class:`CloudError` @@ -989,7 +1022,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/metrics' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1060,15 +1093,17 @@ def restart_web_apps( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/restartSites' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1129,6 +1164,8 @@ def list_web_apps( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Site + ` :rtype: :class:`SitePaged ` :raises: :class:`CloudError` """ @@ -1138,7 +1175,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/sites' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1206,15 +1243,17 @@ def list_vnets( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: list of :class:`VnetInfo ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: list of :class:`VnetInfo ` or + :class:`ClientRawResponse` if + raw=true + :rtype: list of :class:`VnetInfo ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1272,15 +1311,17 @@ def get_vnet_from_server_farm( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetInfo ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetInfo ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetInfo ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -1342,15 +1383,17 @@ def get_vnet_gateway( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetGateway ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetGateway ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetGateway ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), @@ -1416,15 +1459,17 @@ def update_vnet_gateway( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetGateway ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetGateway ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetGateway ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), @@ -1490,15 +1535,17 @@ def list_routes_for_vnet( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: list of :class:`VnetRoute ` + or :class:`ClientRawResponse` if + raw=true :rtype: list of :class:`VnetRoute ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -1559,15 +1606,17 @@ def get_route_for_vnet( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: list of :class:`VnetRoute ` + or :class:`ClientRawResponse` if + raw=true :rtype: list of :class:`VnetRoute ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'routeName': self._serialize.url("route_name", route_name, 'str'), @@ -1631,15 +1680,17 @@ def create_or_update_vnet_route( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetRoute ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetRoute ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetRoute ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'routeName': self._serialize.url("route_name", route_name, 'str'), @@ -1705,15 +1756,17 @@ def delete_vnet_route( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'routeName': self._serialize.url("route_name", route_name, 'str'), @@ -1770,15 +1823,17 @@ def update_vnet_route( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetRoute ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetRoute ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetRoute ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/virtualNetworkConnections/{vnetName}/routes/{routeName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'routeName': self._serialize.url("route_name", route_name, 'str'), @@ -1843,15 +1898,17 @@ def reboot_worker( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/serverfarms/{name}/workers/{workerName}/reboot' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'workerName': self._serialize.url("worker_name", worker_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') diff --git a/azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py old mode 100755 new mode 100644 index 075f702df0cc..df91dd69a593 --- a/azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -46,6 +46,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Certificate + ` :rtype: :class:`CertificatePaged ` :raises: :class:`CloudError` @@ -114,6 +116,8 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Certificate + ` :rtype: :class:`CertificatePaged ` :raises: :class:`CloudError` @@ -124,7 +128,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -185,15 +189,17 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Certificate ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Certificate ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Certificate ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -253,15 +259,17 @@ def create_or_update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Certificate ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Certificate ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Certificate ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -321,15 +329,17 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -382,15 +392,17 @@ def update( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Certificate ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Certificate ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Certificate ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/certificates/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } 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 old mode 100755 new mode 100644 index f73b0aea61f4..0640bbac8cad --- 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 @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -46,6 +46,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`DeletedSite + ` :rtype: :class:`DeletedSitePaged ` :raises: :class:`CloudError` @@ -78,75 +80,6 @@ def internal_paging(next_link=None, raw=False): 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, **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.DeletedSitePaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DeletedSitePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets deleted web apps in subscription. - - Gets deleted web apps in subscription. - - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_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`. - :rtype: :class:`DeletedSitePaged - ` - :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/deletedSites' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), - '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( diff --git a/azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py old mode 100755 new mode 100644 index 65fbc6e02794..24577afcfb00 --- a/azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller -import uuid from .. import models @@ -49,10 +49,13 @@ def check_availability( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`DomainAvailablilityCheckResult + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`DomainAvailablilityCheckResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ identifier = models.NameIdentifier(name=name) @@ -113,6 +116,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Domain + ` :rtype: :class:`DomainPaged ` :raises: :class:`CloudError` """ @@ -177,10 +182,13 @@ def get_control_center_sso_request( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`DomainControlCenterSsoRequest + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`DomainControlCenterSsoRequest - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -240,6 +248,8 @@ def list_recommendations( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`NameIdentifier + ` :rtype: :class:`NameIdentifierPaged ` :raises: :class:`CloudError` @@ -313,6 +323,8 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Domain + ` :rtype: :class:`DomainPaged ` :raises: :class:`CloudError` """ @@ -322,7 +334,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -383,15 +395,17 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Domain ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Domain ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Domain ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'domainName': self._serialize.url("domain_name", domain_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -447,18 +461,21 @@ def create_or_update( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`Domain ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), - 'domainName': self._serialize.url("domain_name", domain_name, 'str', pattern='[a-zA-Z0-9][a-zA-Z0-9\.-]+'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'domainName': self._serialize.url("domain_name", domain_name, 'str', pattern=r'[a-zA-Z0-9][a-zA-Z0-9\.-]+'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -546,15 +563,17 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'domainName': self._serialize.url("domain_name", domain_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -605,6 +624,9 @@ def list_ownership_identifiers( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of + :class:`DomainOwnershipIdentifier + ` :rtype: :class:`DomainOwnershipIdentifierPaged ` :raises: :class:`CloudError` @@ -615,7 +637,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'domainName': self._serialize.url("domain_name", domain_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -679,16 +701,19 @@ def get_ownership_identifier( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`DomainOwnershipIdentifier + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`DomainOwnershipIdentifier - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'domainName': self._serialize.url("domain_name", domain_name, 'str'), 'name': self._serialize.url("name", name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -753,16 +778,19 @@ def create_or_update_ownership_identifier( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`DomainOwnershipIdentifier + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`DomainOwnershipIdentifier - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'domainName': self._serialize.url("domain_name", domain_name, 'str'), 'name': self._serialize.url("name", name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -825,15 +853,17 @@ def delete_ownership_identifier( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'domainName': self._serialize.url("domain_name", domain_name, 'str'), 'name': self._serialize.url("name", name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -891,16 +921,19 @@ def update_ownership_identifier( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`DomainOwnershipIdentifier + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`DomainOwnershipIdentifier - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DomainRegistration/domains/{domainName}/domainOwnershipIdentifiers/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'domainName': self._serialize.url("domain_name", domain_name, 'str'), 'name': self._serialize.url("name", name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') diff --git a/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py old mode 100755 new mode 100644 index e7b3f834fd8a..0918c57dbdb9 --- a/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -46,9 +46,11 @@ def get_available_stacks( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: object - :rtype: :class:`ClientRawResponse` - if raw=true + :return: object or + :class:`ClientRawResponse` if + raw=true + :rtype: object or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -88,6 +90,67 @@ def get_available_stacks( return deserialized + def list_operations( + self, custom_headers=None, raw=False, **operation_config): + """ + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of :class:`CsmOperationDescription + ` + :rtype: :class:`CsmOperationDescriptionPaged + ` + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = '/providers/Microsoft.Web/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, **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 + def get_available_stacks_on_prem( self, custom_headers=None, raw=False, **operation_config): """Get available application frameworks and their versions. @@ -99,9 +162,11 @@ def get_available_stacks_on_prem( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: object - :rtype: :class:`ClientRawResponse` - if raw=true + :return: object or + :class:`ClientRawResponse` if + raw=true + :rtype: object or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL diff --git a/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py old mode 100755 new mode 100644 index 241c70a244ba..0fdd644c4076 --- a/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -55,10 +55,13 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: list of :class:`Recommendation + ` or + :class:`ClientRawResponse` if + raw=true :rtype: list of :class:`Recommendation - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -117,9 +120,11 @@ def reset_all_filters( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -179,16 +184,19 @@ def list_history_for_web_app( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: list of :class:`Recommendation + ` or + :class:`ClientRawResponse` if + raw=true :rtype: list of :class:`Recommendation - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendationHistory' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -254,16 +262,19 @@ def list_recommended_rules_for_web_app( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: list of :class:`Recommendation + ` or + :class:`ClientRawResponse` if + raw=true :rtype: list of :class:`Recommendation - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -323,15 +334,17 @@ def disable_all_for_web_app( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/disable' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -380,15 +393,17 @@ def reset_all_filters_for_web_app( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/reset' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -442,16 +457,19 @@ def get_rule_details_by_web_app( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RecommendationRule + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`RecommendationRule - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/recommendations/{name}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'name': self._serialize.url("name", name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') 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 old mode 100755 new mode 100644 index bd9b955cdcd9..ce7232f947c0 --- 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 @@ -9,9 +9,9 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError -import uuid from .. import models @@ -46,6 +46,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`TopLevelDomain + ` :rtype: :class:`TopLevelDomainPaged ` :raises: :class:`CloudError` @@ -113,9 +115,12 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`TopLevelDomain + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`TopLevelDomain ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL @@ -183,6 +188,8 @@ def list_agreements( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`TldLegalAgreement + ` :rtype: :class:`TldLegalAgreementPaged ` :raises: :class:`CloudError` 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 old mode 100755 new mode 100644 index 1d3c7ec4015c..1e1ce764c4a0 --- a/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- +import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError from msrestazure.azure_operation import AzureOperationPoller -import uuid from .. import models @@ -47,6 +47,8 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Site + ` :rtype: :class:`SitePaged ` :raises: :class:`CloudError` """ @@ -118,6 +120,8 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Site + ` :rtype: :class:`SitePaged ` :raises: :class:`CloudError` """ @@ -127,7 +131,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -190,15 +194,17 @@ def get( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Site ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Site ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Site ` or + :class:`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='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -271,17 +277,20 @@ def create_or_update( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns :class:`Site ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AzureOperationPoller` - instance that returns :class:`Site ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`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='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -382,15 +391,17 @@ def delete( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`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='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -447,16 +458,19 @@ def analyze_custom_hostname( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`CustomHostnameAnalysisResult + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`CustomHostnameAnalysisResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/analyzeCustomHostname' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -521,9 +535,11 @@ def apply_slot_config_to_production( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) @@ -531,7 +547,7 @@ def apply_slot_config_to_production( # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/applySlotConfig' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -588,15 +604,17 @@ def backup( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`BackupItem ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`BackupItem ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`BackupItem ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backup' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -656,6 +674,8 @@ def list_backups( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`BackupItem + ` :rtype: :class:`BackupItemPaged ` :raises: :class:`CloudError` @@ -666,7 +686,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -734,15 +754,18 @@ def discover_restore( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RestoreRequest + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`RestoreRequest ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -804,15 +827,17 @@ def get_backup_status( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`BackupItem ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`BackupItem ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`BackupItem ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -871,15 +896,17 @@ def delete_backup( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -940,15 +967,17 @@ def list_backup_status_secrets( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`BackupItem ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`BackupItem ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`BackupItem ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -1014,18 +1043,21 @@ def restore( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`RestoreResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/{backupId}/restore' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -1109,6 +1141,8 @@ def list_configurations( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`SiteConfigResource + ` :rtype: :class:`SiteConfigResourcePaged ` :raises: :class:`CloudError` @@ -1119,7 +1153,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1166,7 +1200,7 @@ def internal_paging(next_link=None, raw=False): return deserialized def update_application_settings( - self, resource_group_name, name, app_settings, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): """Replaces the application settings of an app. Replaces the application settings of an app. @@ -1176,24 +1210,30 @@ def update_application_settings( :type resource_group_name: str :param name: Name of the app. :type name: str - :param app_settings: Application settings of the app. - :type app_settings: :class:`StringDictionary - ` + :param kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`StringDictionary + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`StringDictionary - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1253,16 +1293,19 @@ def list_application_settings( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`StringDictionary + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`StringDictionary - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/appsettings/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1323,16 +1366,19 @@ def update_auth_settings( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SiteAuthSettings + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SiteAuthSettings - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1392,16 +1438,19 @@ def get_auth_settings( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SiteAuthSettings + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SiteAuthSettings - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/authsettings/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1460,15 +1509,17 @@ def update_backup_configuration( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`BackupRequest ` + or :class:`ClientRawResponse` if + raw=true :rtype: :class:`BackupRequest ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1528,15 +1579,17 @@ def delete_backup_configuration( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1585,15 +1638,17 @@ def get_backup_configuration( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`BackupRequest ` + or :class:`ClientRawResponse` if + raw=true :rtype: :class:`BackupRequest ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/backup/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1634,7 +1689,7 @@ def get_backup_configuration( return deserialized def update_connection_strings( - self, resource_group_name, name, connection_strings, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): """Replaces the connection strings of an app. Replaces the connection strings of an app. @@ -1644,25 +1699,30 @@ def update_connection_strings( :type resource_group_name: str :param name: Name of the app. :type name: str - :param connection_strings: Connection strings of the app or deployment - slot. See example. - :type connection_strings: :class:`ConnectionStringDictionary - ` + :param kind: Kind of resource. + :type kind: str + :param properties: Connection strings. + :type properties: dict :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`ConnectionStringDictionary + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`ConnectionStringDictionary - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ + connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1722,16 +1782,19 @@ def list_connection_strings( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`ConnectionStringDictionary + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`ConnectionStringDictionary - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/connectionstrings/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1787,15 +1850,18 @@ def get_diagnostic_logs_configuration( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SiteLogsConfig + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SiteLogsConfig ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1855,15 +1921,18 @@ def update_diagnostic_logs_config( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SiteLogsConfig + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SiteLogsConfig ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/logs' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1908,7 +1977,7 @@ def update_diagnostic_logs_config( return deserialized def update_metadata( - self, resource_group_name, name, metadata, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): """Replaces the metadata of an app. Replaces the metadata of an app. @@ -1918,25 +1987,30 @@ def update_metadata( :type resource_group_name: str :param name: Name of the app. :type name: str - :param metadata: Edited metadata of the app or deployment slot. See - example. - :type metadata: :class:`StringDictionary - ` + :param kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`StringDictionary + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`StringDictionary - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ + metadata = models.StringDictionary(kind=kind, properties=properties) + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -1996,16 +2070,19 @@ def list_metadata( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`StringDictionary + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`StringDictionary - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/metadata/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2059,17 +2136,20 @@ def list_publishing_credentials( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns :class:`User ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AzureOperationPoller` - instance that returns :class:`User ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/publishingcredentials/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2151,15 +2231,17 @@ def update_site_push_settings( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`PushSettings ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`PushSettings ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PushSettings ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2219,15 +2301,17 @@ def list_site_push_settings( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`PushSettings ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`PushSettings ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PushSettings ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/pushsettings/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2285,16 +2369,19 @@ def list_slot_configuration_names( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SlotConfigNamesResource + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SlotConfigNamesResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2356,16 +2443,19 @@ def update_slot_configuration_names( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SlotConfigNamesResource + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SlotConfigNamesResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2427,16 +2517,19 @@ def get_configuration( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SiteConfigResource + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SiteConfigResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2496,16 +2589,19 @@ def create_or_update_configuration( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SiteConfigResource + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SiteConfigResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2569,16 +2665,19 @@ def update_configuration( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SiteConfigResource + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SiteConfigResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2640,16 +2739,19 @@ def list_configuration_snapshot_info( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: list of :class:`SiteConfigurationSnapshotInfo + ` or + :class:`ClientRawResponse` if + raw=true :rtype: list of :class:`SiteConfigurationSnapshotInfo - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2709,16 +2811,19 @@ def get_configuration_snapshot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SiteConfigResource + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SiteConfigResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -2777,15 +2882,17 @@ def recover_site_configuration_snapshot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web/snapshots/{snapshotId}/recover' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -2837,6 +2944,8 @@ def list_deployments( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Deployment + ` :rtype: :class:`DeploymentPaged ` :raises: :class:`CloudError` @@ -2847,7 +2956,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -2913,15 +3022,17 @@ def get_deployment( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Deployment ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Deployment ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Deployment ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'id': self._serialize.url("id", id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -2985,15 +3096,17 @@ def create_deployment( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Deployment ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Deployment ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Deployment ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'id': self._serialize.url("id", id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -3058,15 +3171,17 @@ def delete_deployment( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'id': self._serialize.url("id", id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -3116,6 +3231,8 @@ def list_domain_ownership_identifiers( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Identifier + ` :rtype: :class:`IdentifierPaged ` :raises: :class:`CloudError` @@ -3126,7 +3243,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -3191,15 +3308,17 @@ def get_domain_ownership_identifier( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Identifier ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Identifier ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Identifier ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -3241,7 +3360,7 @@ def get_domain_ownership_identifier( return deserialized def create_or_update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, domain_ownership_identifier_name, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. @@ -3256,24 +3375,28 @@ def create_or_update_domain_ownership_identifier( :param domain_ownership_identifier_name: Name of domain ownership identifier. :type domain_ownership_identifier_name: str - :param domain_ownership_identifier: A JSON representation of the - domain ownership properties. - :type domain_ownership_identifier: :class:`Identifier - ` + :param kind: Kind of resource. + :type kind: str + :param identifier_id: String representation of the identity. + :type identifier_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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Identifier ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Identifier ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Identifier ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ + domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -3337,15 +3460,17 @@ def delete_domain_ownership_identifier( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -3380,7 +3505,7 @@ def delete_domain_ownership_identifier( return client_raw_response def update_domain_ownership_identifier( - self, resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, domain_ownership_identifier_name, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): """Creates a domain ownership identifier for web app, or updates an existing ownership identifier. @@ -3395,24 +3520,28 @@ def update_domain_ownership_identifier( :param domain_ownership_identifier_name: Name of domain ownership identifier. :type domain_ownership_identifier_name: str - :param domain_ownership_identifier: A JSON representation of the - domain ownership properties. - :type domain_ownership_identifier: :class:`Identifier - ` + :param kind: Kind of resource. + :type kind: str + :param identifier_id: String representation of the identity. + :type identifier_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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Identifier ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Identifier ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Identifier ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ + domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) + # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -3457,110 +3586,35 @@ def update_domain_ownership_identifier( return deserialized - def list_host_name_bindings( + def get_ms_deploy_status( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get hostname bindings for an app or a deployment slot. - - Get hostname bindings for an app 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: Name of the app. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`HostNameBindingPaged - ` - :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/{name}/hostNameBindings' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - 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, **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.HostNameBindingPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def get_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """Get the named hostname binding for an app (or deployment slot, if - specified). + """Invoke the MSDeploy web app extension as pass-through API. - Get the named hostname binding for an app (or deployment slot, if - specified). + Invoke the MSDeploy web app extension as pass-through API. :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. + :param name: Name of web app :type name: str - :param host_name: Hostname in the hostname binding. - :type host_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`. - :rtype: :class:`HostNameBinding - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`MSDeployStatus + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`MSDeployStatus ` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'hostName': self._serialize.url("host_name", host_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3591,7 +3645,7 @@ def get_host_name_binding( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) + deserialized = self._deserialize('MSDeployStatus', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -3599,40 +3653,38 @@ def get_host_name_binding( return deserialized - def create_or_update_host_name_binding( - self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): - """Creates a hostname binding for an app. + 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 as pass-through API. - Creates a hostname binding for an app. + Invoke the MSDeploy web app extension as pass-through API. :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. + :param name: Name of web app :type name: str - :param host_name: Hostname in the hostname binding. - :type host_name: str - :param host_name_binding: Binding details. This is the JSON - representation of a HostNameBinding object. - :type host_name_binding: :class:`HostNameBinding - ` + :param ms_deploy: Details of MSDeploy operation + :type ms_deploy: :class:`MSDeploy ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`HostNameBinding - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: + :class:`AzureOperationPoller` + instance that returns :class:`MSDeployStatus + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'hostName': self._serialize.url("host_name", host_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3652,58 +3704,80 @@ def create_or_update_host_name_binding( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(host_name_binding, 'HostNameBinding') + 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, **operation_config) + def long_running_send(): - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) - deserialized = None + def get_long_running_status(status_link, headers=None): - if response.status_code == 200: - deserialized = self._deserialize('HostNameBinding', response) + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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 if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + response = long_running_send() + return get_long_running_output(response) - return deserialized + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) - def delete_host_name_binding( - self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): - """Deletes a hostname binding for an app. + def get_ms_deploy_log( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Invoke the MSDeploy Log web app extension as pass-through API. - Deletes a hostname binding for an app. + Invoke the MSDeploy Log web app extension as pass-through API. :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. + :param name: Name of web app :type name: str - :param host_name: Hostname in the hostname binding. - :type host_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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`MSDeployLog ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`MSDeployLog ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/extensions/MSDeploy/log' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'hostName': self._serialize.url("host_name", host_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3723,53 +3797,53 @@ def delete_host_name_binding( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) + request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200, 204]: + 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('MSDeployLog', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - def get_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Retrieves a specific Service Bus Hybrid Connection used by this Web - App. + return deserialized - Retrieves a specific Service Bus Hybrid Connection used by this Web - App. + def get_functions_admin_token( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Fetch a short lived token that can be exchanged for a master key. + + Fetch a short lived token that can be exchanged for a master key. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: The name of the web app + :param name: Name of web app :type name: str - :param namespace_name: The namespace for this hybrid connection - :type namespace_name: str - :param relay_name: The relay name for this hybrid connection - :type relay_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`. - :rtype: :class:`HybridConnection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: str or + :class:`ClientRawResponse` if + raw=true + :rtype: str or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/functions/admin/token' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), - 'relayName': self._serialize.url("relay_name", relay_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3800,7 +3874,7 @@ def get_hybrid_connection( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) + deserialized = self._deserialize('str', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -3808,116 +3882,115 @@ def get_hybrid_connection( return deserialized - def create_or_update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new Hybrid Connection using a Service Bus relay. + def list_host_name_bindings( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get hostname bindings for an app or a deployment slot. - Creates a new Hybrid Connection using a Service Bus relay. + Get hostname bindings for an app 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: The name of the web app + :param name: Name of the app. :type name: str - :param namespace_name: The namespace for this hybrid connection - :type namespace_name: str - :param relay_name: The relay name for this hybrid connection - :type relay_name: str - :param connection_envelope: The details of the hybrid connection - :type connection_envelope: :class:`HybridConnection - ` :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`. - :rtype: :class:`HybridConnection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: An iterator like instance of :class:`HostNameBinding + ` + :rtype: :class:`HostNameBindingPaged + ` :raises: :class:`CloudError` """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), - 'relayName': self._serialize.url("relay_name", relay_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) + def internal_paging(next_link=None, raw=False): - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings' + 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 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 parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') + else: + url = next_link + query_parameters = {} - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + # 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') - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) - deserialized = None + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) + return response + + # Deserialize response + deserialized = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies) if raw: - client_raw_response = ClientRawResponse(deserialized, response) + header_dict = {} + client_raw_response = models.HostNameBindingPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - def delete_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Removes a Hybrid Connection from this site. + def get_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """Get the named hostname binding for an app (or deployment slot, if + specified). - Removes a Hybrid Connection from this site. + Get the named hostname binding for an 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: The name of the web app + :param name: Name of the app. :type name: str - :param namespace_name: The namespace for this hybrid connection - :type namespace_name: str - :param relay_name: The relay name for this hybrid connection - :type relay_name: str + :param host_name: Hostname in the hostname binding. + :type host_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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`HostNameBinding + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`HostNameBinding + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), - 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -3937,54 +4010,62 @@ def delete_hybrid_connection( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) + request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200, 404]: + 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('HostNameBinding', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - def update_hybrid_connection( - self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new Hybrid Connection using a Service Bus relay. + return deserialized - Creates a new Hybrid Connection using a Service Bus relay. + def create_or_update_host_name_binding( + self, resource_group_name, name, host_name, host_name_binding, custom_headers=None, raw=False, **operation_config): + """Creates a hostname binding for an app. + + Creates a hostname binding for an app. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: The name of the web app + :param name: Name of the app. :type name: str - :param namespace_name: The namespace for this hybrid connection - :type namespace_name: str - :param relay_name: The relay name for this hybrid connection - :type relay_name: str - :param connection_envelope: The details of the hybrid connection - :type connection_envelope: :class:`HybridConnection - ` + :param host_name: Hostname in the hostname binding. + :type host_name: str + :param host_name_binding: Binding details. This is the JSON + representation of a HostNameBinding object. + :type host_name_binding: :class:`HostNameBinding + ` :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`. - :rtype: :class:`HybridConnection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`HostNameBinding + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`HostNameBinding + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), - 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4004,10 +4085,10 @@ def update_hybrid_connection( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(connection_envelope, 'HybridConnection') + body_content = self._serialize.body(host_name_binding, 'HostNameBinding') # Construct and send request - request = self._client.patch(url, query_parameters) + request = self._client.put(url, query_parameters) response = self._client.send( request, header_parameters, body_content, **operation_config) @@ -4019,7 +4100,7 @@ def update_hybrid_connection( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('HybridConnection', response) + deserialized = self._deserialize('HostNameBinding', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -4027,39 +4108,37 @@ def update_hybrid_connection( return deserialized - def list_hybrid_connection_keys( - self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): - """Gets the send key name and value for a Hybrid Connection. + def delete_host_name_binding( + self, resource_group_name, name, host_name, custom_headers=None, raw=False, **operation_config): + """Deletes a hostname binding for an app. - Gets the send key name and value for a Hybrid Connection. + Deletes a hostname binding for an app. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: The name of the web app + :param name: Name of the app. :type name: str - :param namespace_name: The namespace for this hybrid connection - :type namespace_name: str - :param relay_name: The relay name for this hybrid connection - :type relay_name: str + :param host_name: Hostname in the hostname binding. + :type host_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`. - :rtype: :class:`HybridConnectionKey - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hostNameBindings/{hostName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), - 'relayName': self._serialize.url("relay_name", relay_name, 'str'), + 'hostName': self._serialize.url("host_name", host_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4079,52 +4158,56 @@ def list_hybrid_connection_keys( 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) + request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, **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 - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('HybridConnectionKey', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - - def list_hybrid_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Retrieves all Service Bus Hybrid Connections used by this Web App. + def get_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Retrieves a specific Service Bus Hybrid Connection used by this Web + App. - Retrieves all Service Bus Hybrid Connections used by this Web App. + Retrieves a specific Service Bus Hybrid Connection used by this Web + App. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param name: The name of the web app :type name: str + :param namespace_name: The namespace for this hybrid connection + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection + :type relay_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: :class:`HybridConnection + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`HybridConnection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4163,35 +4246,45 @@ def list_hybrid_connections( return deserialized - def list_relay_service_connections( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets hybrid connections configured for an app (or deployment slot, if - specified). + def create_or_update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new Hybrid Connection using a Service Bus relay. - Gets hybrid connections configured for an app (or deployment slot, if - specified). + Creates a new Hybrid Connection using a Service Bus relay. :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. + :param name: The name of the web app :type name: str + :param namespace_name: The namespace for this hybrid connection + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection + :type relay_name: str + :param connection_envelope: The details of the hybrid connection + :type connection_envelope: :class:`HybridConnection + ` :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`. - :rtype: :class:`RelayServiceConnectionEntity - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`HybridConnection + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`HybridConnection + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4210,9 +4303,13 @@ def list_relay_service_connections( 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(connection_envelope, 'HybridConnection') + # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -4222,7 +4319,7 @@ def list_relay_service_connections( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) + deserialized = self._deserialize('HybridConnection', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -4230,36 +4327,40 @@ def list_relay_service_connections( return deserialized - def get_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """Gets a hybrid connection configuration by its name. + def delete_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Removes a Hybrid Connection from this site. - Gets a hybrid connection configuration by its name. + Removes a Hybrid Connection from this site. :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. + :param name: The name of the web app :type name: str - :param entity_name: Name of the hybrid connection. - :type entity_name: str + :param namespace_name: The namespace for this hybrid connection + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection + :type relay_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`. - :rtype: :class:`RelayServiceConnectionEntity - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4279,61 +4380,57 @@ def get_relay_service_connection( 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) + request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 404]: 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('RelayServiceConnectionEntity', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - - def create_or_update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new hybrid connection configuration (PUT), or updates an - existing one (PATCH). + def update_hybrid_connection( + self, resource_group_name, name, namespace_name, relay_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new Hybrid Connection using a Service Bus relay. - Creates a new hybrid connection configuration (PUT), or updates an - existing one (PATCH). + Creates a new Hybrid Connection using a Service Bus relay. :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. + :param name: The name of the web app :type name: str - :param entity_name: Name of the hybrid connection configuration. - :type entity_name: str - :param connection_envelope: Details of the hybrid connection - configuration. - :type connection_envelope: :class:`RelayServiceConnectionEntity - ` + :param namespace_name: The namespace for this hybrid connection + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection + :type relay_name: str + :param connection_envelope: The details of the hybrid connection + :type connection_envelope: :class:`HybridConnection + ` :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`. - :rtype: :class:`RelayServiceConnectionEntity - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`HybridConnection + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`HybridConnection + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4353,10 +4450,10 @@ def create_or_update_relay_service_connection( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') + body_content = self._serialize.body(connection_envelope, 'HybridConnection') # Construct and send request - request = self._client.put(url, query_parameters) + request = self._client.patch(url, query_parameters) response = self._client.send( request, header_parameters, body_content, **operation_config) @@ -4368,7 +4465,7 @@ def create_or_update_relay_service_connection( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) + deserialized = self._deserialize('HybridConnection', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -4376,35 +4473,42 @@ def create_or_update_relay_service_connection( return deserialized - def delete_relay_service_connection( - self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): - """Deletes a relay service connection by its name. + def list_hybrid_connection_keys( + self, resource_group_name, name, namespace_name, relay_name, custom_headers=None, raw=False, **operation_config): + """Gets the send key name and value for a Hybrid Connection. - Deletes a relay service connection by its name. + Gets the send key name and value for a Hybrid Connection. :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. + :param name: The name of the web app :type name: str - :param entity_name: Name of the hybrid connection configuration. - :type entity_name: str + :param namespace_name: The namespace for this hybrid connection + :type namespace_name: str + :param relay_name: The relay name for this hybrid connection + :type relay_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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`HybridConnectionKey + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`HybridConnectionKey + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), + 'relayName': self._serialize.url("relay_name", relay_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4424,54 +4528,55 @@ def delete_relay_service_connection( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) + request = self._client.post(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200, 404]: + 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('HybridConnectionKey', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - def update_relay_service_connection( - self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): - """Creates a new hybrid connection configuration (PUT), or updates an - existing one (PATCH). + return deserialized - Creates a new hybrid connection configuration (PUT), or updates an - existing one (PATCH). + def list_hybrid_connections( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Retrieves all Service Bus Hybrid Connections used by this Web App. + + Retrieves all Service Bus Hybrid Connections used by this Web 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. + :param name: The name of the web app :type name: str - :param entity_name: Name of the hybrid connection configuration. - :type entity_name: str - :param connection_envelope: Details of the hybrid connection - configuration. - :type connection_envelope: :class:`RelayServiceConnectionEntity - ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`RelayServiceConnectionEntity - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`HybridConnection + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`HybridConnection + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridConnectionRelays' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'entityName': self._serialize.url("entity_name", entity_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4490,13 +4595,9 @@ def update_relay_service_connection( 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(connection_envelope, 'RelayServiceConnectionEntity') - # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -4506,7 +4607,7 @@ def update_relay_service_connection( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('RelayServiceConnectionEntity', response) + deserialized = self._deserialize('HybridConnection', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -4514,11 +4615,13 @@ def update_relay_service_connection( return deserialized - def list_instance_identifiers( + def list_relay_service_connections( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets all scale-out instances of an app. + """Gets hybrid connections configured for an app (or deployment slot, if + specified). - Gets all scale-out instances of an app. + Gets hybrid connections configured for an app (or deployment slot, if + specified). :param resource_group_name: Name of the resource group to which the resource belongs. @@ -4530,198 +4633,112 @@ def list_instance_identifiers( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SiteInstancePaged - ` + :return: :class:`RelayServiceConnectionEntity + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`RelayServiceConnectionEntity + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection' + 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) - else: - url = next_link - query_parameters = {} + # 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 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, **operation_config) + # Construct and send request + request = self._client.get(url, query_parameters) + response = 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 + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - return response + deserialized = None - # Deserialize response - deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies) + if response.status_code == 200: + deserialized = self._deserialize('RelayServiceConnectionEntity', response) if raw: - header_dict = {} - client_raw_response = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - def list_instance_deployments( - self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): - """List deployments for an app, or a deployment slot, or for an instance - of a scaled-out app. + def get_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """Gets a hybrid connection configuration by its name. - List deployments for an app, or a deployment slot, or for an instance - of a scaled-out app. + Gets a hybrid connection configuration by its name. :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 instance_id: The ID of a specific scaled-out instance. This is - the value of the name property in the JSON response from "GET - api/sites/{siteName}/instances" - :type instance_id: str + :param entity_name: Name of the hybrid connection. + :type entity_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`. - :rtype: :class:`DeploymentPaged - ` + :return: :class:`RelayServiceConnectionEntity + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`RelayServiceConnectionEntity + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' + 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'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, '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 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') - 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, **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.DeploymentPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - - def get_instance_deployment( - self, resource_group_name, name, id, instance_id, custom_headers=None, raw=False, **operation_config): - """Get a deployment by its ID for an app, a specific deployment slot, - and/or a specific scaled-out instance. - - Get a deployment by its ID for an app, a specific deployment slot, - and/or a specific scaled-out instance. - - :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 id: Deployment ID. - :type id: str - :param instance_id: ID of a specific scaled-out instance. This is the - value of the name property in the JSON response from "GET - api/sites/{siteName}/instances" - :type instance_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 - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`Deployment ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'id': self._serialize.url("id", id, '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 and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -4731,7 +4748,7 @@ def get_instance_deployment( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) + deserialized = self._deserialize('RelayServiceConnectionEntity', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -4739,45 +4756,45 @@ def get_instance_deployment( return deserialized - def create_instance_deployment( - self, resource_group_name, name, id, instance_id, deployment, custom_headers=None, raw=False, **operation_config): - """Create a deployment for an app, a specific deployment slot, and/or a - specific scaled-out instance. + def create_or_update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new hybrid connection configuration (PUT), or updates an + existing one (PATCH). - Create a deployment for an app, a specific deployment slot, and/or a - specific scaled-out instance. + Creates a new hybrid connection configuration (PUT), or updates an + existing one (PATCH). :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 id: ID of an existing deployment. - :type id: str - :param instance_id: ID of a specific scaled-out instance. This is the - value of the name property in the JSON response from "GET - api/sites/{siteName}/instances" - :type instance_id: str - :param deployment: Deployment details. - :type deployment: :class:`Deployment - ` + :param entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :param connection_envelope: Details of the hybrid connection + configuration. + :type connection_envelope: :class:`RelayServiceConnectionEntity + ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Deployment ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`RelayServiceConnectionEntity + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`RelayServiceConnectionEntity + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'id': self._serialize.url("id", id, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4797,7 +4814,7 @@ def create_instance_deployment( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(deployment, 'Deployment') + body_content = self._serialize.body(connection_envelope, 'RelayServiceConnectionEntity') # Construct and send request request = self._client.put(url, query_parameters) @@ -4812,7 +4829,7 @@ def create_instance_deployment( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) + deserialized = self._deserialize('RelayServiceConnectionEntity', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -4820,42 +4837,37 @@ def create_instance_deployment( return deserialized - def delete_instance_deployment( - self, resource_group_name, name, id, instance_id, custom_headers=None, raw=False, **operation_config): - """Delete a deployment by its ID for an app, a specific deployment slot, - and/or a specific scaled-out instance. + def delete_relay_service_connection( + self, resource_group_name, name, entity_name, custom_headers=None, raw=False, **operation_config): + """Deletes a relay service connection by its name. - Delete a deployment by its ID for an app, a specific deployment slot, - and/or a specific scaled-out instance. + Deletes a relay service connection by its name. :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 id: Deployment ID. - :type id: str - :param instance_id: ID of a specific scaled-out instance. This is the - value of the name property in the JSON response from "GET - api/sites/{siteName}/instances" - :type instance_id: str + :param entity_name: Name of the hybrid connection configuration. + :type entity_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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'id': self._serialize.url("id", id, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4878,7 +4890,7 @@ def delete_instance_deployment( request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200, 204]: + if response.status_code not in [200, 404]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -4887,35 +4899,45 @@ def delete_instance_deployment( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def is_cloneable( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Shows whether an app can be cloned to another resource group or - subscription. + def update_relay_service_connection( + self, resource_group_name, name, entity_name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Creates a new hybrid connection configuration (PUT), or updates an + existing one (PATCH). - Shows whether an app can be cloned to another resource group or - subscription. + Creates a new hybrid connection configuration (PUT), or updates an + existing one (PATCH). :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 entity_name: Name of the hybrid connection configuration. + :type entity_name: str + :param connection_envelope: Details of the hybrid connection + configuration. + :type connection_envelope: :class:`RelayServiceConnectionEntity + ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SiteCloneability - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`RelayServiceConnectionEntity + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`RelayServiceConnectionEntity + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/hybridconnection/{entityName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + 'entityName': self._serialize.url("entity_name", entity_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -4934,9 +4956,13 @@ def is_cloneable( 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(connection_envelope, 'RelayServiceConnectionEntity') + # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -4946,7 +4972,7 @@ def is_cloneable( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) + deserialized = self._deserialize('RelayServiceConnectionEntity', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -4954,13 +4980,11 @@ def is_cloneable( return deserialized - def list_metric_definitions( + def list_instance_identifiers( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets all metric definitions of an app (or deployment slot, if - specified). + """Gets all scale-out instances of an app. - Gets all metric definitions of an app (or deployment slot, if - specified). + Gets all scale-out instances of an app. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -4972,17 +4996,19 @@ def list_metric_definitions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ResourceMetricDefinitionPaged - ` + :return: An iterator like instance of :class:`SiteInstance + ` + :rtype: :class:`SiteInstancePaged + ` :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/{name}/metricdefinitions' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -5019,62 +5045,58 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies) + deserialized = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.SiteInstancePaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - def list_metrics( - self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets performance metrics of an app (or deployment slot, if specified). + def list_instance_deployments( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """List deployments for an app, or a deployment slot, or for an instance + of a scaled-out app. - Gets performance metrics of an app (or deployment slot, if specified). + List deployments for an app, or a deployment slot, or for an instance + of a scaled-out 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 details: Specify "true" to include metric details in the - response. It is "false" by default. - :type details: bool - :param filter: Return only metrics specified in the filter (using - OData syntax). For example: $filter=(name.value eq 'Metric1' or - name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and - endTime eq '2014-12-31T23:59:59Z' and timeGrain eq - duration'[Hour|Minute|Day]'. - :type filter: str + :param instance_id: The ID of a specific scaled-out instance. This is + the value of the name property in the JSON response from "GET + api/sites/{siteName}/instances" + :type instance_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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ResourceMetricPaged - ` + :return: An iterator like instance of :class:`Deployment + ` + :rtype: :class:`DeploymentPaged + ` :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/{name}/metrics' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + '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 = {} - if details is not None: - query_parameters['details'] = self._serialize.query("details", details, 'bool') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -5104,54 +5126,59 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies) + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) 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. + def get_instance_deployment( + self, resource_group_name, name, id, instance_id, custom_headers=None, raw=False, **operation_config): + """Get a deployment by its ID for an app, a specific deployment slot, + and/or a specific scaled-out instance. - Restores a web app. + Get a deployment by its ID for an app, a specific deployment slot, + and/or a specific scaled-out instance. - :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 + :param name: Name of the app. :type name: str - :param migration_options: Migration migrationOptions - :type migration_options: :class:`StorageMigrationOptions - ` - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`StorageMigrationResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :param id: Deployment ID. + :type id: str + :param instance_id: ID of a specific scaled-out instance. This is the + value of the name property in the JSON response from "GET + api/sites/{siteName}/instances" + :type instance_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 + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`Deployment ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Deployment ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + 'id': self._serialize.url("id", id, '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['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -5164,83 +5191,67 @@ def migrate_storage( 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(migration_options, 'StorageMigrationOptions') - # 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) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) - if response.status_code == 200: - deserialized = self._deserialize('StorageMigrationResponse', response) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + deserialized = None - return deserialized + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) if raw: - response = long_running_send() - return get_long_running_output(response) + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + 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. + def create_instance_deployment( + self, resource_group_name, name, id, instance_id, deployment, custom_headers=None, raw=False, **operation_config): + """Create a deployment for an app, a specific deployment slot, and/or a + specific scaled-out instance. - Migrates a local (in-app) MySql database to a remote MySql database. + Create a deployment for an app, a specific deployment slot, and/or a + specific scaled-out instance. :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 + :param name: Name of the app. :type name: str - :param migration_request_envelope: MySql migration options - :type migration_request_envelope: :class:`MigrateMySqlRequest - ` + :param id: ID of an existing deployment. + :type id: str + :param instance_id: ID of a specific scaled-out instance. This is the + value of the name property in the JSON response from "GET + api/sites/{siteName}/instances" + :type instance_id: str + :param deployment: Deployment details. + :type deployment: :class:`Deployment + ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`Operation - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`Deployment ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Deployment ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + 'id': self._serialize.url("id", id, '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) @@ -5260,81 +5271,67 @@ def migrate_my_sql( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(migration_request_envelope, 'MigrateMySqlRequest') + body_content = self._serialize.body(deployment, 'Deployment') # 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) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) - if response.status_code == 200: - deserialized = self._deserialize('Operation', response) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + deserialized = None - return deserialized + if response.status_code == 200: + deserialized = self._deserialize('Deployment', response) if raw: - response = long_running_send() - return get_long_running_output(response) + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + return deserialized - def get_migrate_my_sql_status( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Returns the status of MySql in app migration, if one is active, and - whether or not MySql in app is enabled. + def delete_instance_deployment( + self, resource_group_name, name, id, instance_id, custom_headers=None, raw=False, **operation_config): + """Delete a deployment by its ID for an app, a specific deployment slot, + and/or a specific scaled-out instance. - Returns the status of MySql in app migration, if one is active, and - whether or not MySql in app is enabled. + Delete a deployment by its ID for an app, a specific deployment slot, + and/or a specific scaled-out instance. :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 + :param name: Name of the app. :type name: str + :param id: Deployment ID. + :type id: str + :param instance_id: ID of a specific scaled-out instance. This is the + value of the name property in the JSON response from "GET + api/sites/{siteName}/instances" + :type instance_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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`MigrateMySqlStatus - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/deployments/{id}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + 'id': self._serialize.url("id", id, '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) @@ -5354,58 +5351,50 @@ def get_migrate_my_sql_status( 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) + request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, **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 - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('MigrateMySqlStatus', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - - def list_network_features( - self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): - """Gets all network features used by the app (or deployment slot, if - specified). + def get_instance_ms_deploy_status( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """Invoke the MSDeploy web app extension as pass-through API. - Gets all network features used by the app (or deployment slot, if - specified). + Invoke the MSDeploy web app extension as pass-through API. :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. + :param name: Name of web app :type name: str - :param view: The type of view. This can either be "summary" or - "detailed". - :type view: str + :param instance_id: Id of web app instance + :type instance_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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`NetworkFeatures - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`MSDeployStatus + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`MSDeployStatus ` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/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='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'view': self._serialize.url("view", view, '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) @@ -5428,7 +5417,7 @@ def list_network_features( request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200, 404]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -5436,7 +5425,7 @@ def list_network_features( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) + deserialized = self._deserialize('MSDeployStatus', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -5444,50 +5433,47 @@ def list_network_features( return deserialized - def start_web_site_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """Start capturing network packets for the site. + 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 as pass-through API. - Start capturing network packets for the site. + Invoke the MSDeploy web app extension as pass-through API. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: The name of the web app. + :param name: Name of web app :type name: str - :param duration_in_seconds: The duration to keep capturing in seconds. - :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). - :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. - :type sas_url: str + :param instance_id: Id of web app instance + :type instance_id: str + :param ms_deploy: Details of MSDeploy operation + :type ms_deploy: :class:`MSDeploy ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: str - :rtype: :class:`ClientRawResponse` - if raw=true + :return: + :class:`AzureOperationPoller` + instance that returns :class:`MSDeployStatus + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/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='^[-\w\._\(\)]+[^\.]$'), + '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'), + '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 = {} - if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') - if max_frame_length is not None: - query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') - if sas_url is not None: - query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -5500,52 +5486,84 @@ def start_web_site_network_trace( 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, **operation_config) + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + # Construct and send request + def long_running_send(): - deserialized = None + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) - if response.status_code == 200: - deserialized = self._deserialize('str', response) + def get_long_running_status(status_link, headers=None): - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) - return deserialized + def get_long_running_output(response): - def stop_web_site_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Stop ongoing capturing network packets for the site. + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - Stop ongoing capturing network packets for the site. + 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 + + 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) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def get_instance_ms_deploy_log( + self, resource_group_name, name, instance_id, custom_headers=None, raw=False, **operation_config): + """Invoke the MSDeploy Log web app extension as pass-through API. + + Invoke the MSDeploy Log web app extension as pass-through API. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: The name of the web app. + :param name: Name of web app :type name: str + :param instance_id: Id of web app instance + :type instance_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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: str - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`MSDeployLog ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`MSDeployLog ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/instances/{instanceId}/extensions/MSDeploy/log' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + '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) @@ -5565,7 +5583,7 @@ def stop_web_site_network_trace( 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) + request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: @@ -5576,7 +5594,7 @@ def stop_web_site_network_trace( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('str', response) + deserialized = self._deserialize('MSDeployLog', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -5584,13 +5602,13 @@ def stop_web_site_network_trace( return deserialized - def generate_new_site_publishing_password( + def is_cloneable( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Generates a new publishing password for an app (or deployment slot, if - specified). + """Shows whether an app can be cloned to another resource group or + subscription. - Generates a new publishing password for an app (or deployment slot, if - specified). + Shows whether an app can be cloned to another resource group or + subscription. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -5602,15 +5620,19 @@ def generate_new_site_publishing_password( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`SiteCloneability + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`SiteCloneability + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/iscloneable' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -5634,47 +5656,53 @@ def generate_new_site_publishing_password( request = self._client.post(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [204]: + 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('SiteCloneability', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - def list_perf_mon_counters( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets perfmon counters for web app. + return deserialized - Gets perfmon counters for web app. + def list_metric_definitions( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets all metric definitions of an app (or deployment slot, if + specified). + + Gets all metric definitions of an 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 web app + :param name: Name of the app. :type name: str - :param filter: Return only usages/metrics specified in the filter. - Filter conforms to odata syntax. Example: $filter=(startTime eq - '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and - timeGrain eq duration'[Hour|Minute|Day]'. - :type filter: 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`. - :rtype: :class:`PerfMonResponsePaged - ` + :return: An iterator like instance of :class:`ResourceMetricDefinition + ` + :rtype: :class:`ResourceMetricDefinitionPaged + ` :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/{name}/perfcounters' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metricdefinitions' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -5682,8 +5710,6 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -5713,105 +5739,136 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies) + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - def get_site_php_error_log_flag( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets web app's event logs. + def list_metrics( + self, resource_group_name, name, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets performance metrics of an app (or deployment slot, if specified). - Gets web app's event logs. + Gets performance metrics of an 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 web app + :param name: Name of the app. :type name: str + :param details: Specify "true" to include metric details in the + response. It is "false" by default. + :type details: bool + :param filter: Return only metrics specified in the filter (using + OData syntax). For example: $filter=(name.value eq 'Metric1' or + name.value eq 'Metric2') and startTime eq '2014-01-01T00:00:00Z' and + endTime eq '2014-12-31T23:59:59Z' and timeGrain eq + duration'[Hour|Minute|Day]'. + :type filter: 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`. - :rtype: :class:`SitePhpErrorLogFlag - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: An iterator like instance of :class:`ResourceMetric + ` + :rtype: :class:`ResourceMetricPaged + ` :raises: :class:`CloudError` """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\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) + def internal_paging(next_link=None, raw=False): - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/metrics' + 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 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 parameters + query_parameters = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + else: + url = next_link + query_parameters = {} - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + # 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') - deserialized = None + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) - if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) + 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.ResourceMetricPaged(internal_paging, self._deserialize.dependencies) if raw: - client_raw_response = ClientRawResponse(deserialized, response) + header_dict = {} + client_raw_response = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - def list_premier_add_ons( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the premier add-ons of an app. + def migrate_storage( + self, subscription_name, resource_group_name, name, migration_options, custom_headers=None, raw=False, **operation_config): + """Restores a web app. - Gets the premier add-ons of an 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 the app. + :param name: Name of web app :type name: str + :param migration_options: Migration migrationOptions + :type migration_options: :class:`StorageMigrationOptions + ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`PremierAddOn ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: + :class:`AzureOperationPoller` + instance that returns :class:`StorageMigrationResponse + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migrate' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -5819,6 +5876,7 @@ def list_premier_add_ons( # Construct parameters query_parameters = {} + query_parameters['subscriptionName'] = self._serialize.query("subscription_name", subscription_name, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -5831,55 +5889,86 @@ def list_premier_add_ons( 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, **operation_config) + # Construct body + body_content = self._serialize.body(migration_options, 'StorageMigrationOptions') - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + # Construct and send request + def long_running_send(): - deserialized = None + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) + def get_long_running_status(status_link, headers=None): - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) - return deserialized + def get_long_running_output(response): - def get_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """Gets a named add-on of an app. + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - Gets a named add-on of an app. + 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 + + 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) + return AzureOperationPoller( + 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 the app. + :param name: Name of web app :type name: str - :param premier_add_on_name: Add-on name. - :type premier_add_on_name: str + :param migration_request_envelope: MySql migration options + :type migration_request_envelope: :class:`MigrateMySqlRequest + ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`PremierAddOn ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: + :class:`AzureOperationPoller` + instance that returns :class:`Operation + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -5898,59 +5987,85 @@ def get_premier_add_on( 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(migration_request_envelope, 'MigrateMySqlRequest') + # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + def long_running_send(): - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) - deserialized = None + def get_long_running_status(status_link, headers=None): - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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 if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + response = long_running_send() + return get_long_running_output(response) - return deserialized + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) - def add_premier_add_on( - self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): - """Updates a named add-on of an app. + def get_migrate_my_sql_status( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Returns the status of MySql in app migration, if one is active, and + whether or not MySql in app is enabled. - Updates a named add-on of an app. + Returns the status of MySql in app migration, if one is active, and + whether or not MySql in app is enabled. :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. + :param name: Name of web app :type name: str - :param premier_add_on_name: Add-on name. - :type premier_add_on_name: str - :param premier_add_on: A JSON representation of the edited premier - add-on. - :type premier_add_on: :class:`PremierAddOn - ` :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`. - :rtype: :class:`PremierAddOn ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`MigrateMySqlStatus + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`MigrateMySqlStatus + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/migratemysql/status' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -5969,13 +6084,9 @@ def add_premier_add_on( 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(premier_add_on, 'PremierAddOn') - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -5985,7 +6096,7 @@ def add_premier_add_on( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) + deserialized = self._deserialize('MigrateMySqlStatus', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -5993,35 +6104,42 @@ def add_premier_add_on( return deserialized - def delete_premier_add_on( - self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): - """Delete a premier add-on from an app. + def list_network_features( + self, resource_group_name, name, view, custom_headers=None, raw=False, **operation_config): + """Gets all network features used by the app (or deployment slot, if + specified). - Delete a premier add-on from an app. + Gets all network features used by the 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 premier_add_on_name: Add-on name. - :type premier_add_on_name: str + :param view: The type of view. This can either be "summary" or + "detailed". + :type view: 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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`NetworkFeatures + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`NetworkFeatures + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'view': self._serialize.url("view", view, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -6041,58 +6159,58 @@ def delete_premier_add_on( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) + request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 404]: 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('NetworkFeatures', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - def list_publishing_profile_xml_with_secrets( - self, resource_group_name, name, format=None, custom_headers=None, raw=False, callback=None, **operation_config): - """Gets the publishing profile for an app (or deployment slot, if - specified). + return deserialized - Gets the publishing profile for an app (or deployment slot, if - specified). + def start_web_site_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """Start capturing network packets for the site. + + Start capturing network packets for the site. :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. + :param name: The name of the web app. :type name: str - :param format: Name of the format. Valid values are: - FileZilla3 - WebDeploy -- default - Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' - :type format: str or :class:`PublishingProfileFormat - ` + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: 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 callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] :param operation_config: :ref:`Operation configuration overrides`. - :rtype: Generator - :rtype: :class:`ClientRawResponse` - if raw=true + :return: str or + :class:`ClientRawResponse` if + raw=true + :rtype: str or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ - publishing_profile_options = models.CsmPublishingProfileOptions(format=format) - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -6100,6 +6218,12 @@ def list_publishing_profile_xml_with_secrets( # Construct parameters query_parameters = {} + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -6112,13 +6236,9 @@ def list_publishing_profile_xml_with_secrets( 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(publishing_profile_options, 'CsmPublishingProfileOptions') - # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -6128,7 +6248,7 @@ def list_publishing_profile_xml_with_secrets( deserialized = None if response.status_code == 200: - deserialized = self._client.stream_download(response, callback) + deserialized = self._deserialize('str', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -6136,37 +6256,33 @@ 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 deleted web app. + def stop_web_site_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Stop ongoing capturing network packets for the site. - Recovers a deleted web app. + Stop ongoing capturing network packets for the site. :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 + :param name: The name of the web app. :type name: str - :param recovery_entity: Snapshot data used for web app recovery. - Snapshot information can be obtained by calling GetDeletedSites or - GetSiteSnapshots API. - :type recovery_entity: :class:`CsmSiteRecoveryEntity - ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`RecoverResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :param operation_config: :ref:`Operation configuration + overrides`. + :return: str or + :class:`ClientRawResponse` if + raw=true + :rtype: str or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -6186,60 +6302,33 @@ def recover( 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(recovery_entity, 'CsmSiteRecoveryEntity') - # 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) - - def get_long_running_status(status_link, headers=None): + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - 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 - def get_long_running_output(response): + deserialized = None - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code == 200: + deserialized = self._deserialize('str', response) - deserialized = None + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if response.status_code == 200: - deserialized = self._deserialize('RecoverResponse', response) + return deserialized - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - if raw: - response = long_running_send() - return get_long_running_output(response) - - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def reset_production_slot_config( + def generate_new_site_publishing_password( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Resets the configuration settings of the current slot if they were - previously modified by calling the API with POST. + """Generates a new publishing password for an app (or deployment slot, if + specified). - Resets the configuration settings of the current slot if they were - previously modified by calling the API with POST. + Generates a new publishing password for an app (or deployment slot, if + specified). :param resource_group_name: Name of the resource group to which the resource belongs. @@ -6251,15 +6340,17 @@ def reset_production_slot_config( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -6283,7 +6374,7 @@ def reset_production_slot_config( request = self._client.post(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -6292,11 +6383,92 @@ def reset_production_slot_config( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def get_resource_health_metadata( + def list_perf_mon_counters( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets perfmon counters for web app. + + Gets perfmon counters for web app. + + :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 filter: Return only usages/metrics specified in the filter. + Filter conforms to odata syntax. Example: $filter=(startTime eq + '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and + timeGrain eq duration'[Hour|Minute|Day]'. + :type filter: 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 :class:`PerfMonResponse + ` + :rtype: :class:`PerfMonResponsePaged + ` + :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/{name}/perfcounters' + 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 filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + 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, **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.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def get_site_php_error_log_flag( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the category of ResourceHealthMetadata to use for the given site. + """Gets web app's event logs. - Gets the category of ResourceHealthMetadata to use for the given site. + Gets web app's event logs. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -6308,16 +6480,19 @@ def get_resource_health_metadata( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ResourceHealthMetadata - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`SitePhpErrorLogFlag + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`SitePhpErrorLogFlag + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -6349,7 +6524,7 @@ def get_resource_health_metadata( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) + deserialized = self._deserialize('SitePhpErrorLogFlag', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -6357,39 +6532,33 @@ def get_resource_health_metadata( return deserialized - def restart( - self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): - """Restarts an app (or deployment slot, if specified). + def list_premier_add_ons( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the premier add-ons of an app. - Restarts an app (or deployment slot, if specified). + Gets the premier add-ons 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 soft_restart: Specify true to apply the configuration settings - and restarts the app only if necessary. By default, the API always - restarts and reprovisions the app. - :type soft_restart: bool - :param synchronous: Specify true to block until the app is restarted. - By default, it is set to false, and the API responds immediately - (asynchronous). - :type synchronous: bool :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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`PremierAddOn ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PremierAddOn ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -6397,10 +6566,6 @@ def restart( # Construct parameters query_parameters = {} - if soft_restart is not None: - query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') - if synchronous is not None: - query_parameters['synchronous'] = self._serialize.query("synchronous", synchronous, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -6414,7 +6579,7 @@ def restart( 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) + request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: @@ -6422,111 +6587,48 @@ def restart( 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 list_slots( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets an app's deployment slots. - - Gets an app's deployment slots. - - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Name of the app. - :type name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`SitePaged ` - :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/{name}/slots' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - 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, **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 + deserialized = None - # Deserialize response - deserialized = models.SitePaged(internal_paging, self._deserialize.dependencies) + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) if raw: - header_dict = {} - client_raw_response = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - def get_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the details of a web, mobile, or API app. + def get_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """Gets a named add-on of an app. - Gets the details of a web, mobile, or API app. + Gets a named add-on of an app. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param name: Name of the app. :type name: str - :param slot: Name of the deployment slot. By default, this API returns - the production slot. - :type slot: str + :param premier_add_on_name: Add-on name. + :type premier_add_on_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`. - :rtype: :class:`Site ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`PremierAddOn ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PremierAddOn ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -6557,7 +6659,7 @@ def get_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Site', response) + deserialized = self._deserialize('PremierAddOn', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -6565,34 +6667,913 @@ def get_slot( 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 - updates an existing app. + def add_premier_add_on( + self, resource_group_name, name, premier_add_on_name, premier_add_on, custom_headers=None, raw=False, **operation_config): + """Updates a named add-on of an app. - Creates a new web, mobile, or API app in an existing resource group, or - updates an existing app. + Updates a named add-on of an app. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Unique name of the app to create or update. To create or - update a deployment slot, use the {slot} parameter. + :param name: Name of the app. :type name: str - :param site_envelope: A JSON representation of the app properties. See - example. - :type site_envelope: :class:`Site ` - :param slot: Name of the deployment slot to create or update. By - default, this API attempts to create or modify the production slot. - :type slot: str - :param skip_dns_registration: If true web app hostname is not - registered with DNS on creation. This parameter is - only used for app creation - :type skip_dns_registration: bool - :param skip_custom_domain_verification: If true, custom (non - *.azurewebsites.net) domains associated with web app are not verified. - :type skip_custom_domain_verification: bool - :param force_dns_registration: If true, web app hostname is force + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param premier_add_on: A JSON representation of the edited premier + add-on. + :type premier_add_on: :class:`PremierAddOn + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`PremierAddOn ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PremierAddOn ` or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' + 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'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = 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('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_premier_add_on( + self, resource_group_name, name, premier_add_on_name, custom_headers=None, raw=False, **operation_config): + """Delete a premier add-on from an app. + + Delete a premier add-on from 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 premier_add_on_name: Add-on name. + :type premier_add_on_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: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}' + 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'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_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.delete(url, query_parameters) + response = 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 + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def list_public_certificates( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get public certificates for an app or a deployment slot. + + Get public certificates for an app 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: Name of the app. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of :class:`PublicCertificate + ` + :rtype: :class:`PublicCertificatePaged + ` + :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/{name}/publicCertificates' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + 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, **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.PublicCertificatePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def get_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Get the named public certificate for an app (or deployment slot, if + specified). + + Get the named public certificate for an 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 public_certificate_name: Public CertificateName + :type public_certificate_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: :class:`PublicCertificate + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PublicCertificate + ` or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}' + 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'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_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, **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('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_or_update_public_certificate( + self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): + """Creates a hostname binding for an app. + + Creates a hostname binding for 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 public_certificate_name: Public certificate name. + :type public_certificate_name: str + :param public_certificate: Public certificate details. This is the + JSON representation of a PublicCertificate object. + :type public_certificate: :class:`PublicCertificate + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`PublicCertificate + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PublicCertificate + ` or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}' + 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'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = 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('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Deletes a hostname binding for an app. + + Deletes a hostname binding for 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 public_certificate_name: Public Certificate Name. + :type public_certificate_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: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}' + 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'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_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.delete(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 204]: + 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 list_publishing_profile_xml_with_secrets( + self, resource_group_name, name, format=None, custom_headers=None, raw=False, callback=None, **operation_config): + """Gets the publishing profile for an app (or deployment slot, if + specified). + + Gets the publishing profile for an 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 format: Name of the format. Valid values are: + FileZilla3 + WebDeploy -- default + Ftp. Possible values include: 'FileZilla3', 'WebDeploy', 'Ftp' + :type format: str or :class:`PublishingProfileFormat + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Generator or + :class:`ClientRawResponse` if + raw=true + :rtype: Generator or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + publishing_profile_options = models.CsmPublishingProfileOptions(format=format) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(publishing_profile_options, 'CsmPublishingProfileOptions') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = 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._client.stream_download(response, callback) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def recover( + self, resource_group_name, name, recovery_entity, custom_headers=None, raw=False, **operation_config): + """Recovers a web app to a previous snapshot. + + Recovers a web app to a previous snapshot. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app + :type name: str + :param recovery_entity: Snapshot data used for web app recovery. + Snapshot information can be obtained by calling GetDeletedSites or + GetSiteSnapshots API. + :type recovery_entity: :class:`SnapshotRecoveryRequest + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns None or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(recovery_entity, 'SnapshotRecoveryRequest') + + # 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) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + 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) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def reset_production_slot_config( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Resets the configuration settings of the current slot if they were + previously modified by calling the API with POST. + + Resets the configuration settings of the current slot if they were + previously modified by calling the API with POST. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200]: + 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 restart( + self, resource_group_name, name, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): + """Restarts an app (or deployment slot, if specified). + + Restarts an 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 soft_restart: Specify true to apply the configuration settings + and restarts the app only if necessary. By default, the API always + restarts and reprovisions the app. + :type soft_restart: bool + :param synchronous: Specify true to block until the app is restarted. + By default, it is set to false, and the API responds immediately + (asynchronous). + :type synchronous: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart' + 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 soft_restart is not None: + query_parameters['softRestart'] = self._serialize.query("soft_restart", soft_restart, 'bool') + if synchronous is not None: + query_parameters['synchronous'] = self._serialize.query("synchronous", synchronous, 'bool') + 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, **operation_config) + + if response.status_code not in [200]: + 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 list_slots( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets an app's deployment slots. + + Gets an app's deployment slots. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of :class:`Site + ` + :rtype: :class:`SitePaged ` + :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/{name}/slots' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + 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, **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.SitePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SitePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def get_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the details of a web, mobile, or API app. + + Gets the details of a web, mobile, or API app. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. By default, this API returns + the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`Site ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Site ` or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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, **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('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 + updates an existing app. + + Creates a new web, mobile, or API app in an existing resource group, or + updates an existing app. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Unique name of the app to create or update. To create or + update a deployment slot, use the {slot} parameter. + :type name: str + :param site_envelope: A JSON representation of the app properties. See + example. + :type site_envelope: :class:`Site ` + :param slot: Name of the deployment slot to create or update. By + default, this API attempts to create or modify the production slot. + :type slot: str + :param skip_dns_registration: If true web app hostname is not + registered with DNS on creation. This parameter is + only used for app creation + :type skip_dns_registration: bool + :param skip_custom_domain_verification: If true, custom (non + *.azurewebsites.net) domains associated with web app are not verified. + :type skip_custom_domain_verification: bool + :param force_dns_registration: If true, web app hostname is force registered with DNS :type force_dns_registration: bool :param ttl_in_seconds: Time to live in seconds for web app's default @@ -6601,17 +7582,360 @@ def create_or_update_slot( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`Site ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: + :class:`AzureOperationPoller` + instance that returns :class:`Site ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + if skip_dns_registration is not None: + query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') + if skip_custom_domain_verification is not None: + query_parameters['skipCustomDomainVerification'] = self._serialize.query("skip_custom_domain_verification", skip_custom_domain_verification, 'bool') + if force_dns_registration is not None: + query_parameters['forceDnsRegistration'] = self._serialize.query("force_dns_registration", force_dns_registration, 'bool') + if ttl_in_seconds is not None: + query_parameters['ttlInSeconds'] = self._serialize.query("ttl_in_seconds", ttl_in_seconds, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_envelope, 'Site') + + # 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) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + 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 + + 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) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) + + def delete_slot( + self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, skip_dns_registration=None, custom_headers=None, raw=False, **operation_config): + """Deletes a web, mobile, or API app, or one of the deployment slots. + + Deletes a web, mobile, or API app, or one of the deployment slots. + + :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 to delete. + :type name: str + :param slot: Name of the deployment slot to delete. By default, the + API deletes the production slot. + :type slot: str + :param delete_metrics: If true, web app metrics are also deleted + :type delete_metrics: bool + :param delete_empty_server_farm: Specify true if the App Service plan + will be empty after app deletion and you want to delete the empty App + Service plan. By default, the empty App Service plan is not deleted. + :type delete_empty_server_farm: bool + :param skip_dns_registration: If true, DNS registration is skipped + :type skip_dns_registration: bool + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` + :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 delete_metrics is not None: + query_parameters['deleteMetrics'] = self._serialize.query("delete_metrics", delete_metrics, 'bool') + if delete_empty_server_farm is not None: + query_parameters['deleteEmptyServerFarm'] = self._serialize.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') + if skip_dns_registration is not None: + query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') + 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.delete(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 404]: + 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 analyze_custom_hostname_slot( + self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): + """Analyze a custom hostname. + + Analyze a custom hostname. + + :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 host_name: Custom hostname + :type host_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: :class:`CustomHostnameAnalysisResult + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`CustomHostnameAnalysisResult + ` or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname' + 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 host_name is not None: + query_parameters['hostName'] = self._serialize.query("host_name", host_name, '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 and send request + request = self._client.get(url, query_parameters) + response = 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('CustomHostnameAnalysisResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def apply_slot_configuration_slot( + self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): + """Applies the configuration settings from the target slot onto the + current slot. + + Applies the configuration settings from the target slot onto the + current slot. + + :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 + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) + + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig' + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) + + if response.status_code not in [200]: + 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 backup_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """Creates a backup of an app. + + Creates a backup 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 request: Backup configuration. You can use the JSON response + from the POST action as input here. + :type request: :class:`BackupRequest + ` + :param slot: Name of the deployment slot. If a slot is not specified, + the API will create a backup for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`BackupItem ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`BackupItem ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -6620,14 +7944,6 @@ def create_or_update_slot( # 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 @@ -6641,90 +7957,144 @@ def create_or_update_slot( 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') + body_content = self._serialize.body(request, 'BackupRequest') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **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 - def get_long_running_status(status_link, headers=None): + deserialized = None - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) + if response.status_code == 200: + deserialized = self._deserialize('BackupItem', response) - def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if response.status_code not in [200, 202]: + return deserialized + + def list_backups_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets existing backups of an app. + + Gets existing backups of an app. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API will get backups of the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of :class:`BackupItem + ` + :rtype: :class:`BackupItemPaged + ` + :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/{name}/slots/{slot}/backups' + 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') + + 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, **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('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 response - return deserialized + # Deserialize response + deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies) if raw: - response = long_running_send() - return get_long_running_output(response) + header_dict = {} + client_raw_response = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + return deserialized - def delete_slot( - self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=None, skip_dns_registration=None, custom_headers=None, raw=False, **operation_config): - """Deletes a web, mobile, or API app, or one of the deployment slots. + def discover_restore_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """Discovers an existing app backup that can be restored from a blob in + Azure storage. - Deletes a web, mobile, or API app, or one of the deployment slots. + Discovers an existing app backup that can be restored from a blob in + Azure storage. :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 to delete. + :param name: Name of the app. :type name: str - :param slot: Name of the deployment slot to delete. By default, the - API deletes the production slot. + :param request: A RestoreRequest object that includes Azure storage + URL and blog name for discovery of backup. + :type request: :class:`RestoreRequest + ` + :param slot: Name of the deployment slot. If a slot is not specified, + the API will perform discovery for the production slot. :type slot: str - :param delete_metrics: If true, web app metrics are also deleted - :type delete_metrics: bool - :param delete_empty_server_farm: Specify true if the App Service plan - will be empty after app deletion and you want to delete the empty App - Service plan. By default, the empty App Service plan is not deleted. - :type delete_empty_server_farm: bool - :param skip_dns_registration: If true, DNS registration is skipped - :type skip_dns_registration: bool :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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`RestoreRequest + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`RestoreRequest ` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -6733,12 +8103,6 @@ def delete_slot( # Construct parameters query_parameters = {} - if delete_metrics is not None: - query_parameters['deleteMetrics'] = self._serialize.query("delete_metrics", delete_metrics, 'bool') - if delete_empty_server_farm is not None: - query_parameters['deleteEmptyServerFarm'] = self._serialize.query("delete_empty_server_farm", delete_empty_server_farm, 'bool') - if skip_dns_registration is not None: - query_parameters['skipDnsRegistration'] = self._serialize.query("skip_dns_registration", skip_dns_registration, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -6751,51 +8115,64 @@ def delete_slot( 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.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) - if response.status_code not in [200, 404]: + 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('RestoreRequest', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - def analyze_custom_hostname_slot( - self, resource_group_name, name, slot, host_name=None, custom_headers=None, raw=False, **operation_config): - """Analyze a custom hostname. + return deserialized - Analyze a custom hostname. + def get_backup_status_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a backup of an app by its ID. + + Gets a backup of an app by its ID. :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 + :param name: Name of the app. :type name: str - :param slot: Name of web app slot. If not specified then will default - to production slot. + :param backup_id: ID of the backup. + :type backup_id: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API will get a backup of the production slot. :type slot: str - :param host_name: Custom hostname - :type host_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`. - :rtype: :class:`CustomHostnameAnalysisResult - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`BackupItem ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`BackupItem ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/analyzeCustomHostname' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -6803,8 +8180,6 @@ def analyze_custom_hostname_slot( # Construct parameters query_parameters = {} - if host_name is not None: - query_parameters['hostName'] = self._serialize.query("host_name", host_name, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -6829,7 +8204,7 @@ def analyze_custom_hostname_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('CustomHostnameAnalysisResult', response) + deserialized = self._deserialize('BackupItem', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -6837,44 +8212,40 @@ def analyze_custom_hostname_slot( return deserialized - def apply_slot_configuration_slot( - self, resource_group_name, name, slot, target_slot, preserve_vnet, custom_headers=None, raw=False, **operation_config): - """Applies the configuration settings from the target slot onto the - current slot. + def delete_backup_slot( + self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): + """Deletes a backup of an app by its ID. - Applies the configuration settings from the target slot onto the - current slot. + Deletes a backup of an app by its ID. :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. + :param backup_id: ID of the backup. + :type backup_id: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API will delete a backup of the production 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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ - slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/applySlotConfig' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -6894,15 +8265,11 @@ def apply_slot_configuration_slot( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct body - body_content = self._serialize.body(slot_swap_entity, 'CsmSlotEntity') - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 404]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -6911,39 +8278,49 @@ def apply_slot_configuration_slot( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def backup_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """Creates a backup of an app. + def list_backup_status_secrets_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + """Gets status of a web app backup that may be in progress, including + secrets associated with the backup, such as the Azure Storage SAS URL. + Also can be used to update the SAS URL for the backup if a new URL is + passed in the request body. - Creates a backup of an app. + Gets status of a web app backup that may be in progress, including + secrets associated with the backup, such as the Azure Storage SAS URL. + Also can be used to update the SAS URL for the backup if a new URL is + passed in the request body. :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. + :param name: Name of web app :type name: str - :param request: Backup configuration. You can use the JSON response - from the POST action as input here. + :param backup_id: Id of backup + :type backup_id: str + :param request: Information on backup request :type request: :class:`BackupRequest ` - :param slot: Name of the deployment slot. If a slot is not specified, - the API will create a backup for the production slot. + :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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`BackupItem ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`BackupItem ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`BackupItem ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backup' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -6987,192 +8364,230 @@ def backup_slot( return deserialized - def list_backups_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets existing backups of an app. + def restore_slot( + self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): + """Restores a specific backup to another app (or deployment slot, if + specified). - Gets existing backups of an app. + Restores a specific backup to another app (or deployment slot, if + specified). :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param name: Name of the app. :type name: str + :param backup_id: ID of the backup. + :type backup_id: str + :param request: Information on restore request + :type request: :class:`RestoreRequest + ` :param slot: Name of the deployment slot. If a slot is not specified, - the API will get backups of the production slot. + the API will restore a backup of the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`BackupItemPaged - ` + :return: + :class:`AzureOperationPoller` + instance that returns :class:`RestoreResponse + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): + # 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) - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\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 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') - else: - url = next_link - query_parameters = {} + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') - # 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 + def long_running_send(): - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( + request = self._client.post(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( request, header_parameters, **operation_config) + def get_long_running_output(response): + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - return response + deserialized = None - # Deserialize response - deserialized = models.BackupItemPaged(internal_paging, self._deserialize.dependencies) + if response.status_code == 200: + deserialized = self._deserialize('RestoreResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized if raw: - header_dict = {} - client_raw_response = models.BackupItemPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + response = long_running_send() + return get_long_running_output(response) - return deserialized + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) - def discover_restore_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """Discovers an existing app backup that can be restored from a blob in - Azure storage. + def list_configurations_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List the configurations of an app. - Discovers an existing app backup that can be restored from a blob in - Azure storage. + List the configurations of an app. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param name: Name of the app. :type name: str - :param request: A RestoreRequest object that includes Azure storage - URL and blog name for discovery of backup. - :type request: :class:`RestoreRequest - ` :param slot: Name of the deployment slot. If a slot is not specified, - the API will perform discovery for the production slot. + the API will return configuration for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`RestoreRequest ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: An iterator like instance of :class:`SiteConfigResource + ` + :rtype: :class:`SiteConfigResourcePaged + ` :raises: :class:`CloudError` """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\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) + def internal_paging(next_link=None, raw=False): - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config' + 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 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 parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') + 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.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + # Construct and send request + request = self._client.get(url, query_parameters) + response = 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 + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - deserialized = None + return response - if response.status_code == 200: - deserialized = self._deserialize('RestoreRequest', response) + # Deserialize response + deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies) if raw: - client_raw_response = ClientRawResponse(deserialized, response) + header_dict = {} + client_raw_response = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - def get_backup_status_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """Gets a backup of an app by its ID. + def update_application_settings_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the application settings of an app. - Gets a backup of an app by its ID. + Replaces the application settings 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 backup_id: ID of the backup. - :type backup_id: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will get a backup of the production slot. + the API will update the application settings for the production slot. :type slot: str + :param kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict :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`. - :rtype: :class:`BackupItem ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`StringDictionary + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`StringDictionary + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ + app_settings = models.StringDictionary(kind=kind, properties=properties) + # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -7192,9 +8607,13 @@ def get_backup_status_slot( 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(app_settings, 'StringDictionary') + # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7204,7 +8623,7 @@ def get_backup_status_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) + deserialized = self._deserialize('StringDictionary', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -7212,38 +8631,39 @@ def get_backup_status_slot( return deserialized - def delete_backup_slot( - self, resource_group_name, name, backup_id, slot, custom_headers=None, raw=False, **operation_config): - """Deletes a backup of an app by its ID. + def list_application_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the application settings of an app. - Deletes a backup of an app by its ID. + Gets the application settings 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 backup_id: ID of the backup. - :type backup_id: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will delete a backup of the production slot. + the API will get the application settings for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`StringDictionary + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`StringDictionary + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -7264,40 +8684,41 @@ def delete_backup_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) + request = self._client.post(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200, 404]: + 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(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - def list_backup_status_secrets_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - """Gets status of a web app backup that may be in progress, including - secrets associated with the backup, such as the Azure Storage SAS URL. - Also can be used to update the SAS URL for the backup if a new URL is - passed in the request body. + return deserialized - Gets status of a web app backup that may be in progress, including - secrets associated with the backup, such as the Azure Storage SAS URL. - Also can be used to update the SAS URL for the backup if a new URL is - passed in the request body. + def update_auth_settings_slot( + self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): + """Updates the Authentication / Authorization settings associated with web + app. + + Updates the Authentication / Authorization settings associated with web + app. :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 backup_id: Id of backup - :type backup_id: str - :param request: Information on backup request - :type request: :class:`BackupRequest - ` + :param site_auth_settings: Auth settings associated with web app + :type site_auth_settings: :class:`SiteAuthSettings + ` :param slot: Name of web app slot. If not specified then will default to production slot. :type slot: str @@ -7306,17 +8727,20 @@ def list_backup_status_secrets_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`BackupItem ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`SiteAuthSettings + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`SiteAuthSettings + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/list' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -7337,10 +8761,10 @@ def list_backup_status_secrets_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(request, 'BackupRequest') + body_content = self._serialize.body(site_auth_settings, 'SiteAuthSettings') # Construct and send request - request = self._client.post(url, query_parameters) + request = self._client.put(url, query_parameters) response = self._client.send( request, header_parameters, body_content, **operation_config) @@ -7352,7 +8776,7 @@ def list_backup_status_secrets_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupItem', response) + deserialized = self._deserialize('SiteAuthSettings', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -7360,44 +8784,39 @@ def list_backup_status_secrets_slot( return deserialized - def restore_slot( - self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, **operation_config): - """Restores a specific backup to another app (or deployment slot, if - specified). + def get_auth_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the Authentication/Authorization settings of an app. - Restores a specific backup to another app (or deployment slot, if - specified). + Gets the Authentication/Authorization settings 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 backup_id: ID of the backup. - :type backup_id: str - :param request: Information on restore request - :type request: :class:`RestoreRequest - ` :param slot: Name of the deployment slot. If a slot is not specified, - the API will restore a backup of the production slot. + the API will get the settings for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`RestoreResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`SiteAuthSettings + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`SiteAuthSettings + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/{backupId}/restore' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -7408,170 +8827,68 @@ def restore_slot( 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 - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - 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 - - 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) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) - - def list_configurations_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List the configurations of an app. - - List the configurations of an app. - - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Name of the app. - :type name: str - :param slot: Name of the deployment slot. If a slot is not specified, - the API will return configuration for the production slot. - :type slot: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`SiteConfigResourcePaged - ` - :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/{name}/slots/{slot}/config' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\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') - - 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') + 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, **operation_config) + # Construct and send request + request = self._client.post(url, query_parameters) + response = 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 + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - return response + deserialized = None - # Deserialize response - deserialized = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies) + if response.status_code == 200: + deserialized = self._deserialize('SiteAuthSettings', response) if raw: - header_dict = {} - client_raw_response = models.SiteConfigResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - def update_application_settings_slot( - self, resource_group_name, name, app_settings, slot, custom_headers=None, raw=False, **operation_config): - """Replaces the application settings of an app. + def update_backup_configuration_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + """Updates the backup configuration of an app. - Replaces the application settings of an app. + Updates the backup 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 app_settings: Application settings of the app. - :type app_settings: :class:`StringDictionary - ` + :param request: Edited backup configuration. + :type request: :class:`BackupRequest + ` :param slot: Name of the deployment slot. If a slot is not specified, - the API will update the application settings for the production slot. + the API will update the backup configuration for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`StringDictionary - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`BackupRequest ` + or :class:`ClientRawResponse` if + raw=true + :rtype: :class:`BackupRequest ` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -7593,7 +8910,7 @@ def update_application_settings_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(app_settings, 'StringDictionary') + body_content = self._serialize.body(request, 'BackupRequest') # Construct and send request request = self._client.put(url, query_parameters) @@ -7608,7 +8925,7 @@ def update_application_settings_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) + deserialized = self._deserialize('BackupRequest', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -7616,11 +8933,11 @@ def update_application_settings_slot( return deserialized - def list_application_settings_slot( + def delete_backup_configuration_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the application settings of an app. + """Deletes the backup configuration of an app. - Gets the application settings of an app. + Deletes the backup configuration of an app. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -7628,23 +8945,24 @@ def list_application_settings_slot( :param name: Name of the app. :type name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will get the application settings for the production slot. + the API will delete the backup configuration for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`StringDictionary - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/appsettings/list' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -7666,7 +8984,7 @@ def list_application_settings_slot( 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) + request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: @@ -7674,51 +8992,40 @@ def list_application_settings_slot( 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) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - - def update_auth_settings_slot( - self, resource_group_name, name, site_auth_settings, slot, custom_headers=None, raw=False, **operation_config): - """Updates the Authentication / Authorization settings associated with web - app. + def get_backup_configuration_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the backup configuration of an app. - Updates the Authentication / Authorization settings associated with web - app. + Gets the backup 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 web app + :param name: Name of the app. :type name: str - :param site_auth_settings: Auth settings associated with web app - :type site_auth_settings: :class:`SiteAuthSettings - ` - :param slot: Name of web app slot. If not specified then will default - to production slot. + :param slot: Name of the deployment slot. If a slot is not specified, + the API will get the backup configuration for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SiteAuthSettings - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`BackupRequest ` + or :class:`ClientRawResponse` if + raw=true + :rtype: :class:`BackupRequest ` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -7739,13 +9046,9 @@ def update_auth_settings_slot( 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_auth_settings, 'SiteAuthSettings') - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7755,7 +9058,7 @@ def update_auth_settings_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) + deserialized = self._deserialize('BackupRequest', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -7763,11 +9066,11 @@ def update_auth_settings_slot( return deserialized - def get_auth_settings_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the Authentication/Authorization settings of an app. + def update_connection_strings_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the connection strings of an app. - Gets the Authentication/Authorization settings of an app. + Replaces the connection strings of an app. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -7775,23 +9078,32 @@ def get_auth_settings_slot( :param name: Name of the app. :type name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will get the settings for the production slot. + the API will update the connection settings for the production slot. :type slot: str + :param kind: Kind of resource. + :type kind: str + :param properties: Connection strings. + :type properties: dict :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`. - :rtype: :class:`SiteAuthSettings - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`ConnectionStringDictionary + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`ConnectionStringDictionary + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ + connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) + # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/authsettings/list' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -7812,9 +9124,13 @@ def get_auth_settings_slot( 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(connection_strings, 'ConnectionStringDictionary') + # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7824,7 +9140,7 @@ def get_auth_settings_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SiteAuthSettings', response) + deserialized = self._deserialize('ConnectionStringDictionary', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -7832,37 +9148,38 @@ def get_auth_settings_slot( return deserialized - def update_backup_configuration_slot( - self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): - """Updates the backup configuration of an app. + def list_connection_strings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the connection strings of an app. - Updates the backup configuration of an app. + Gets the connection strings 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 request: Edited backup configuration. - :type request: :class:`BackupRequest - ` :param slot: Name of the deployment slot. If a slot is not specified, - the API will update the backup configuration for the production slot. + the API will get the connection settings for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`BackupRequest ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`ConnectionStringDictionary + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`ConnectionStringDictionary + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -7883,13 +9200,9 @@ def update_backup_configuration_slot( 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, 'BackupRequest') - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -7899,7 +9212,7 @@ def update_backup_configuration_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) + deserialized = self._deserialize('ConnectionStringDictionary', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -7907,11 +9220,11 @@ def update_backup_configuration_slot( return deserialized - def delete_backup_configuration_slot( + def get_diagnostic_logs_configuration_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes the backup configuration of an app. + """Gets the logging configuration of an app. - Deletes the backup configuration of an app. + Gets the logging configuration of an app. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -7919,22 +9232,25 @@ def delete_backup_configuration_slot( :param name: Name of the app. :type name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will delete the backup configuration for the production slot. + the API will get the logging configuration for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`SiteLogsConfig + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`SiteLogsConfig ` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -7956,7 +9272,7 @@ def delete_backup_configuration_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) + request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: @@ -7964,38 +9280,52 @@ def delete_backup_configuration_slot( exp.request_id = response.headers.get('x-ms-request-id') raise exp + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteLogsConfig', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - def get_backup_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the backup configuration of an app. + return deserialized - Gets the backup configuration of an app. + def update_diagnostic_logs_config_slot( + self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): + """Updates the logging configuration of an app. + + Updates the logging 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_logs_config: A SiteLogsConfig JSON object that contains + the logging configuration to change in the "properties" property. + :type site_logs_config: :class:`SiteLogsConfig + ` :param slot: Name of the deployment slot. If a slot is not specified, - the API will get the backup configuration for the production slot. + the API will update the logging configuration for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`BackupRequest ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`SiteLogsConfig + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`SiteLogsConfig ` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/backup/list' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -8016,9 +9346,13 @@ def get_backup_configuration_slot( 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_logs_config, 'SiteLogsConfig') + # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -8028,7 +9362,7 @@ def get_backup_configuration_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('BackupRequest', response) + deserialized = self._deserialize('SiteLogsConfig', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -8036,39 +9370,44 @@ def get_backup_configuration_slot( return deserialized - def update_connection_strings_slot( - self, resource_group_name, name, connection_strings, slot, custom_headers=None, raw=False, **operation_config): - """Replaces the connection strings of an app. + def update_metadata_slot( + self, resource_group_name, name, slot, kind=None, properties=None, custom_headers=None, raw=False, **operation_config): + """Replaces the metadata of an app. - Replaces the connection strings of an app. + Replaces the metadata 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 connection_strings: Connection strings of the app or deployment - slot. See example. - :type connection_strings: :class:`ConnectionStringDictionary - ` :param slot: Name of the deployment slot. If a slot is not specified, - the API will update the connection settings for the production slot. + the API will update the metadata for the production slot. :type slot: str + :param kind: Kind of resource. + :type kind: str + :param properties: Settings. + :type properties: dict :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`. - :rtype: :class:`ConnectionStringDictionary - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`StringDictionary + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`StringDictionary + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ + metadata = models.StringDictionary(kind=kind, properties=properties) + # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -8090,7 +9429,7 @@ def update_connection_strings_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(connection_strings, 'ConnectionStringDictionary') + body_content = self._serialize.body(metadata, 'StringDictionary') # Construct and send request request = self._client.put(url, query_parameters) @@ -8105,7 +9444,7 @@ def update_connection_strings_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) + deserialized = self._deserialize('StringDictionary', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -8113,11 +9452,11 @@ def update_connection_strings_slot( return deserialized - def list_connection_strings_slot( + def list_metadata_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the connection strings of an app. + """Gets the metadata of an app. - Gets the connection strings of an app. + Gets the metadata of an app. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -8125,23 +9464,26 @@ def list_connection_strings_slot( :param name: Name of the app. :type name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will get the connection settings for the production slot. + the API will get the metadata for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`ConnectionStringDictionary - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`StringDictionary + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`StringDictionary + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/connectionstrings/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='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -8174,7 +9516,7 @@ def list_connection_strings_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ConnectionStringDictionary', response) + deserialized = self._deserialize('StringDictionary', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -8182,11 +9524,11 @@ def list_connection_strings_slot( return deserialized - def get_diagnostic_logs_configuration_slot( + def list_publishing_credentials_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the logging configuration of an app. + """Gets the Git/FTP publishing credentials of an app. - Gets the logging configuration 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. @@ -8194,22 +9536,25 @@ def get_diagnostic_logs_configuration_slot( :param name: Name of the app. :type name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will get the logging configuration for the production slot. + the API will get the publishing credentials for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`SiteLogsConfig ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: + :class:`AzureOperationPoller` + instance that returns :class:`User ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' + 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='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -8231,57 +9576,81 @@ def get_diagnostic_logs_configuration_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) + def long_running_send(): - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + request = self._client.post(url, query_parameters) + return self._client.send(request, header_parameters, **operation_config) - deserialized = None + def get_long_running_status(status_link, headers=None): - if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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 if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + response = long_running_send() + return get_long_running_output(response) - return deserialized + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) - def update_diagnostic_logs_config_slot( - self, resource_group_name, name, site_logs_config, slot, custom_headers=None, raw=False, **operation_config): - """Updates the logging configuration of an app. + def update_site_push_settings_slot( + self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): + """Updates the Push settings associated with web app. - Updates the logging configuration of an app. + Updates the Push settings associated with web 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. + :param name: Name of web app :type name: str - :param site_logs_config: A SiteLogsConfig JSON object that contains - the logging configuration to change in the "properties" property. - :type site_logs_config: :class:`SiteLogsConfig - ` - :param slot: Name of the deployment slot. If a slot is not specified, - the API will update the logging configuration for the production slot. + :param push_settings: Push settings associated with web app + :type push_settings: :class:`PushSettings + ` + :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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SiteLogsConfig ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`PushSettings ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PushSettings ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/logs' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -8303,7 +9672,7 @@ def update_diagnostic_logs_config_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(site_logs_config, 'SiteLogsConfig') + body_content = self._serialize.body(push_settings, 'PushSettings') # Construct and send request request = self._client.put(url, query_parameters) @@ -8318,7 +9687,7 @@ def update_diagnostic_logs_config_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SiteLogsConfig', response) + deserialized = self._deserialize('PushSettings', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -8326,39 +9695,36 @@ def update_diagnostic_logs_config_slot( return deserialized - def update_metadata_slot( - self, resource_group_name, name, metadata, slot, custom_headers=None, raw=False, **operation_config): - """Replaces the metadata of an app. + def list_site_push_settings_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the Push settings associated with web app. - Replaces the metadata of an app. + Gets the Push settings associated with web 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. + :param name: Name of web app :type name: str - :param metadata: Edited metadata of the app or deployment slot. See - example. - :type metadata: :class:`StringDictionary - ` - :param slot: Name of the deployment slot. If a slot is not specified, - the API will update the metadata for the production slot. + :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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`StringDictionary - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`PushSettings ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PushSettings ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/metadata' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -8379,13 +9745,9 @@ def update_metadata_slot( 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(metadata, 'StringDictionary') - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -8395,7 +9757,7 @@ def update_metadata_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) + deserialized = self._deserialize('PushSettings', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -8403,11 +9765,13 @@ def update_metadata_slot( return deserialized - def list_metadata_slot( + def get_configuration_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the metadata of an app. + """Gets the configuration of an app, such as platform version and bitness, + default documents, virtual applications, Always On, etc. - Gets the metadata of an app. + Gets the configuration of an app, such as platform version and bitness, + default documents, virtual applications, Always On, etc. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -8415,23 +9779,26 @@ def list_metadata_slot( :param name: Name of the app. :type name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will get the metadata for the production slot. + the API will return configuration for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`StringDictionary - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`SiteConfigResource + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`SiteConfigResource + ` or + :class:`ClientRawResponse` :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/web' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -8453,7 +9820,7 @@ def list_metadata_slot( 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) + request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: @@ -8464,7 +9831,7 @@ def list_metadata_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('StringDictionary', response) + deserialized = self._deserialize('SiteConfigResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -8472,34 +9839,42 @@ def list_metadata_slot( return deserialized - def list_publishing_credentials_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the Git/FTP publishing credentials of an app. + def create_or_update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """Updates the configuration of an app. - Gets the Git/FTP publishing credentials of an app. + Updates the 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_config: JSON representation of a SiteConfig object. See + example. + :type site_config: :class:`SiteConfigResource + ` :param slot: Name of the deployment slot. If a slot is not specified, - the API will get the publishing credentials for the production slot. + the API will update configuration for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: - :class:`AzureOperationPoller` - instance that returns :class:`User ` - :rtype: :class:`ClientRawResponse` - if raw=true + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`SiteConfigResource + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`SiteConfigResource + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/publishingcredentials/list' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -8520,80 +9895,66 @@ def list_publishing_credentials_slot( 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 - def long_running_send(): - - request = self._client.post(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) - - def get_long_running_status(status_link, headers=None): - - request = self._client.get(status_link) - if headers: - request.headers.update(headers) - return self._client.send( - request, header_parameters, **operation_config) - - def get_long_running_output(response): - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') - deserialized = None + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) - if response.status_code == 200: - deserialized = self._deserialize('User', response) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + deserialized = None - return deserialized + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) if raw: - response = long_running_send() - return get_long_running_output(response) + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - long_running_operation_timeout = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - return AzureOperationPoller( - long_running_send, get_long_running_output, - get_long_running_status, long_running_operation_timeout) + return deserialized - def update_site_push_settings_slot( - self, resource_group_name, name, push_settings, slot, custom_headers=None, raw=False, **operation_config): - """Updates the Push settings associated with web app. + def update_configuration_slot( + self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): + """Updates the configuration of an app. - Updates the Push settings associated with web app. + Updates the 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 web app + :param name: Name of the app. :type name: str - :param push_settings: Push settings associated with web app - :type push_settings: :class:`PushSettings - ` - :param slot: Name of web app slot. If not specified then will default - to production slot. + :param site_config: JSON representation of a SiteConfig object. See + example. + :type site_config: :class:`SiteConfigResource + ` + :param slot: Name of the deployment slot. If a slot is not specified, + the API will update configuration for the production slot. :type slot: str :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`. - :rtype: :class:`PushSettings ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`SiteConfigResource + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`SiteConfigResource + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -8615,10 +9976,10 @@ def update_site_push_settings_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(push_settings, 'PushSettings') + body_content = self._serialize.body(site_config, 'SiteConfigResource') # Construct and send request - request = self._client.put(url, query_parameters) + request = self._client.patch(url, query_parameters) response = self._client.send( request, header_parameters, body_content, **operation_config) @@ -8630,7 +9991,7 @@ def update_site_push_settings_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) + deserialized = self._deserialize('SiteConfigResource', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -8638,34 +9999,40 @@ def update_site_push_settings_slot( return deserialized - def list_site_push_settings_slot( + def list_configuration_snapshot_info_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the Push settings associated with web app. + """Gets a list of web app configuration snapshots identifiers. Each + element of the list contains a timestamp and the ID of the snapshot. - Gets the Push settings associated with web app. + Gets a list of web app configuration snapshots identifiers. Each + element of the list contains a timestamp and the ID of the 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 + :param name: Name of the app. :type name: str - :param slot: Name of web app slot. If not specified then will default - to production slot. + :param slot: Name of the deployment slot. If a slot is not specified, + the API will return configuration for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`PushSettings ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: list of :class:`SiteConfigurationSnapshotInfo + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: list of :class:`SiteConfigurationSnapshotInfo + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -8687,7 +10054,7 @@ def list_site_push_settings_slot( 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) + request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: @@ -8698,7 +10065,7 @@ def list_site_push_settings_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) + deserialized = self._deserialize('[SiteConfigurationSnapshotInfo]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -8706,19 +10073,21 @@ def list_site_push_settings_slot( return deserialized - def get_configuration_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the configuration of an app, such as platform version and bitness, - default documents, virtual applications, Always On, etc. + def get_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a snapshot of the configuration of an app at a previous point in + time. - Gets the configuration of an app, such as platform version and bitness, - default documents, virtual applications, Always On, etc. + Gets a snapshot of the configuration of an app at a previous point in + time. :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 snapshot_id: The ID of the snapshot to read. + :type snapshot_id: str :param slot: Name of the deployment slot. If a slot is not specified, the API will return configuration for the production slot. :type slot: str @@ -8727,17 +10096,21 @@ def get_configuration_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SiteConfigResource + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SiteConfigResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -8777,40 +10150,40 @@ def get_configuration_slot( return deserialized - def create_or_update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """Updates the configuration of an app. + def recover_site_configuration_snapshot_slot( + self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): + """Reverts the configuration of an app to a previous snapshot. - Updates the configuration of an app. + Reverts the configuration of an 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 the app. :type name: str - :param site_config: JSON representation of a SiteConfig object. See - example. - :type site_config: :class:`SiteConfigResource - ` + :param snapshot_id: The ID of the snapshot to read. + :type snapshot_id: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will update configuration for the production slot. + the API will return configuration for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SiteConfigResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -8830,139 +10203,135 @@ def create_or_update_configuration_slot( 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_config, 'SiteConfigResource') - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [204]: 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('SiteConfigResource', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - - def update_configuration_slot( - self, resource_group_name, name, site_config, slot, custom_headers=None, raw=False, **operation_config): - """Updates the configuration of an app. + def list_deployments_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """List deployments for an app, or a deployment slot, or for an instance + of a scaled-out app. - Updates the configuration of an app. + List deployments for an app, or a deployment slot, or for an instance + of a scaled-out 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_config: JSON representation of a SiteConfig object. See - example. - :type site_config: :class:`SiteConfigResource - ` :param slot: Name of the deployment slot. If a slot is not specified, - the API will update configuration for the production slot. + the API returns deployments for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SiteConfigResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: An iterator like instance of :class:`Deployment + ` + :rtype: :class:`DeploymentPaged + ` :raises: :class:`CloudError` """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\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) + def internal_paging(next_link=None, raw=False): - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + if not next_link: + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments' + 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 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 parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - # Construct body - body_content = self._serialize.body(site_config, 'SiteConfigResource') + else: + url = next_link + query_parameters = {} - # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + # 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') - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, **operation_config) - deserialized = None + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) + return response + + # Deserialize response + deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies) if raw: - client_raw_response = ClientRawResponse(deserialized, response) + header_dict = {} + client_raw_response = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - def list_configuration_snapshot_info_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a list of web app configuration snapshots identifiers. Each - element of the list contains a timestamp and the ID of the snapshot. + def get_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """Get a deployment by its ID for an app, a specific deployment slot, + and/or a specific scaled-out instance. - Gets a list of web app configuration snapshots identifiers. Each - element of the list contains a timestamp and the ID of the snapshot. + Get a deployment by its ID for an app, a specific deployment slot, + and/or a specific scaled-out instance. :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 id: Deployment ID. + :type id: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will return configuration for the production slot. + the API gets a deployment for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: list of :class:`SiteConfigurationSnapshotInfo - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Deployment ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Deployment ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + 'id': self._serialize.url("id", id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -8994,7 +10363,7 @@ def list_configuration_snapshot_info_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[SiteConfigurationSnapshotInfo]', response) + deserialized = self._deserialize('Deployment', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -9002,41 +10371,45 @@ def list_configuration_snapshot_info_slot( return deserialized - def get_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """Gets a snapshot of the configuration of an app at a previous point in - time. + def create_deployment_slot( + self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): + """Create a deployment for an app, a specific deployment slot, and/or a + specific scaled-out instance. - Gets a snapshot of the configuration of an app at a previous point in - time. + Create a deployment for an app, a specific deployment slot, and/or a + specific scaled-out instance. :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 snapshot_id: The ID of the snapshot to read. - :type snapshot_id: str + :param id: ID of an existing deployment. + :type id: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will return configuration for the production slot. + the API creates a deployment for the production slot. :type slot: str + :param deployment: Deployment details. + :type deployment: :class:`Deployment + ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SiteConfigResource - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Deployment ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Deployment ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), + 'id': self._serialize.url("id", id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -9056,9 +10429,13 @@ def get_configuration_snapshot_slot( 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(deployment, 'Deployment') + # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -9068,7 +10445,7 @@ def get_configuration_snapshot_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) + deserialized = self._deserialize('Deployment', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -9076,38 +10453,42 @@ def get_configuration_snapshot_slot( return deserialized - def recover_site_configuration_snapshot_slot( - self, resource_group_name, name, snapshot_id, slot, custom_headers=None, raw=False, **operation_config): - """Reverts the configuration of an app to a previous snapshot. + def delete_deployment_slot( + self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): + """Delete a deployment by its ID for an app, a specific deployment slot, + and/or a specific scaled-out instance. - Reverts the configuration of an app to a previous snapshot. + Delete a deployment by its ID for an app, a specific deployment slot, + and/or a specific scaled-out instance. :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 snapshot_id: The ID of the snapshot to read. - :type snapshot_id: str + :param id: Deployment ID. + :type id: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will return configuration for the production slot. + the API deletes a deployment for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/web/snapshots/{snapshotId}/recover' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'snapshotId': self._serialize.url("snapshot_id", snapshot_id, 'str'), + 'id': self._serialize.url("id", id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -9128,10 +10509,10 @@ def recover_site_configuration_snapshot_slot( 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) + request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -9140,13 +10521,11 @@ def recover_site_configuration_snapshot_slot( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def list_deployments_slot( + def list_domain_ownership_identifiers_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """List deployments for an app, or a deployment slot, or for an instance - of a scaled-out app. + """Lists ownership identifiers for domain associated with web app. - List deployments for an app, or a deployment slot, or for an instance - of a scaled-out app. + Lists ownership identifiers for domain associated with web app. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -9154,24 +10533,26 @@ def list_deployments_slot( :param name: Name of the app. :type name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API returns deployments for the production slot. + the API will delete the binding for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`DeploymentPaged - ` + :return: An iterator like instance of :class:`Identifier + ` + :rtype: :class:`IdentifierPaged + ` :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/{name}/slots/{slot}/deployments' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -9209,49 +10590,50 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.DeploymentPaged(internal_paging, self._deserialize.dependencies) + deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.DeploymentPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - def get_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """Get a deployment by its ID for an app, a specific deployment slot, - and/or a specific scaled-out instance. + def get_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """Get domain ownership identifier for web app. - Get a deployment by its ID for an app, a specific deployment slot, - and/or a specific scaled-out instance. + Get domain ownership identifier for web 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 id: Deployment ID. - :type id: str + :param domain_ownership_identifier_name: Name of domain ownership + identifier. + :type domain_ownership_identifier_name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API gets a deployment for the production slot. + the API will delete the binding for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Deployment ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Identifier ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Identifier ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'id': self._serialize.url("id", id, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -9283,7 +10665,7 @@ def get_deployment_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) + deserialized = self._deserialize('Identifier', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -9291,43 +10673,49 @@ def get_deployment_slot( return deserialized - def create_deployment_slot( - self, resource_group_name, name, id, slot, deployment, custom_headers=None, raw=False, **operation_config): - """Create a deployment for an app, a specific deployment slot, and/or a - specific scaled-out instance. + def create_or_update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): + """Creates a domain ownership identifier for web app, or updates an + existing ownership identifier. - Create a deployment for an app, a specific deployment slot, and/or a - specific scaled-out instance. + Creates a domain ownership identifier for web app, or updates an + existing ownership identifier. :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 id: ID of an existing deployment. - :type id: str + :param domain_ownership_identifier_name: Name of domain ownership + identifier. + :type domain_ownership_identifier_name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API creates a deployment for the production slot. + the API will delete the binding for the production slot. :type slot: str - :param deployment: Deployment details. - :type deployment: :class:`Deployment - ` + :param kind: Kind of resource. + :type kind: str + :param identifier_id: String representation of the identity. + :type identifier_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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Deployment ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Identifier ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Identifier ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ + domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) + # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'id': self._serialize.url("id", id, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -9348,7 +10736,7 @@ def create_deployment_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(deployment, 'Deployment') + body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') # Construct and send request request = self._client.put(url, query_parameters) @@ -9363,7 +10751,7 @@ def create_deployment_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) + deserialized = self._deserialize('Identifier', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -9371,40 +10759,41 @@ def create_deployment_slot( return deserialized - def delete_deployment_slot( - self, resource_group_name, name, id, slot, custom_headers=None, raw=False, **operation_config): - """Delete a deployment by its ID for an app, a specific deployment slot, - and/or a specific scaled-out instance. + def delete_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): + """Deletes a domain ownership identifier for a web app. - Delete a deployment by its ID for an app, a specific deployment slot, - and/or a specific scaled-out instance. + Deletes a domain ownership identifier for a web 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 id: Deployment ID. - :type id: str + :param domain_ownership_identifier_name: Name of domain ownership + identifier. + :type domain_ownership_identifier_name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API deletes a deployment for the production slot. + the API will delete the binding for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'id': self._serialize.url("id", id, 'str'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -9437,115 +10826,124 @@ def delete_deployment_slot( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def list_domain_ownership_identifiers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Lists ownership identifiers for domain associated with web app. + def update_domain_ownership_identifier_slot( + self, resource_group_name, name, domain_ownership_identifier_name, slot, kind=None, identifier_id=None, custom_headers=None, raw=False, **operation_config): + """Creates a domain ownership identifier for web app, or updates an + existing ownership identifier. - Lists ownership identifiers for domain associated with web app. + Creates a domain ownership identifier for web app, or updates an + existing ownership identifier. :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 domain_ownership_identifier_name: Name of domain ownership + identifier. + :type domain_ownership_identifier_name: str :param slot: Name of the deployment slot. If a slot is not specified, the API will delete the binding for the production slot. :type slot: str + :param kind: Kind of resource. + :type kind: str + :param identifier_id: String representation of the identity. + :type identifier_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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`IdentifierPaged - ` + :return: :class:`Identifier ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Identifier ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): + domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) - if not next_link: - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\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 URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + 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'), + 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_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 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 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(domain_ownership_identifier, 'Identifier') - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, **operation_config) + # Construct and send request + request = self._client.patch(url, query_parameters) + response = 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 + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp - return response + deserialized = None - # Deserialize response - deserialized = models.IdentifierPaged(internal_paging, self._deserialize.dependencies) + if response.status_code == 200: + deserialized = self._deserialize('Identifier', response) if raw: - header_dict = {} - client_raw_response = models.IdentifierPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - def get_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """Get domain ownership identifier for web app. + def get_ms_deploy_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Invoke the MSDeploy web app extension as pass-through API. - Get domain ownership identifier for web app. + Invoke the MSDeploy web app extension as pass-through API. :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. + :param name: Name of web app :type name: str - :param domain_ownership_identifier_name: Name of domain ownership - identifier. - :type domain_ownership_identifier_name: str - :param slot: Name of the deployment slot. If a slot is not specified, - the API will delete the binding for the production slot. + :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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Identifier ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`MSDeployStatus + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`MSDeployStatus ` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -9577,7 +10975,7 @@ def get_domain_ownership_identifier_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) + deserialized = self._deserialize('MSDeployStatus', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -9585,45 +10983,41 @@ def get_domain_ownership_identifier_slot( return deserialized - def create_or_update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers=None, raw=False, **operation_config): - """Creates a domain ownership identifier for web app, or updates an - existing ownership identifier. + 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 as pass-through API. - Creates a domain ownership identifier for web app, or updates an - existing ownership identifier. + Invoke the MSDeploy web app extension as pass-through API. :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. + :param name: Name of web app :type name: str - :param domain_ownership_identifier_name: Name of domain ownership - identifier. - :type domain_ownership_identifier_name: str - :param domain_ownership_identifier: A JSON representation of the - domain ownership properties. - :type domain_ownership_identifier: :class:`Identifier - ` - :param slot: Name of the deployment slot. If a slot is not specified, - the API will delete the binding for the production slot. + :param slot: Name of web app slot. If not specified then will default + to production slot. :type slot: str + :param ms_deploy: Details of MSDeploy operation + :type ms_deploy: :class:`MSDeploy ` :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :rtype: :class:`Identifier ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: + :class:`AzureOperationPoller` + instance that returns :class:`MSDeployStatus + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -9644,62 +11038,83 @@ def create_or_update_domain_ownership_identifier_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(domain_ownership_identifier, 'Identifier') + 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, **operation_config) + def long_running_send(): - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) - deserialized = None + def get_long_running_status(status_link, headers=None): - if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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 if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + response = long_running_send() + return get_long_running_output(response) - return deserialized + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) - def delete_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, slot, custom_headers=None, raw=False, **operation_config): - """Deletes a domain ownership identifier for a web app. + def get_ms_deploy_log_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Invoke the MSDeploy Log web app extension as pass-through API. - Deletes a domain ownership identifier for a web app. + Invoke the MSDeploy Log web app extension as pass-through API. :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. + :param name: Name of web app :type name: str - :param domain_ownership_identifier_name: Name of domain ownership - identifier. - :type domain_ownership_identifier_name: str - :param slot: Name of the deployment slot. If a slot is not specified, - the API will delete the binding for the production slot. + :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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`MSDeployLog ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`MSDeployLog ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/extensions/MSDeploy/log' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -9720,57 +11135,56 @@ def delete_domain_ownership_identifier_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) + request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200, 204]: + 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('MSDeployLog', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - def update_domain_ownership_identifier_slot( - self, resource_group_name, name, domain_ownership_identifier_name, domain_ownership_identifier, slot, custom_headers=None, raw=False, **operation_config): - """Creates a domain ownership identifier for web app, or updates an - existing ownership identifier. + return deserialized - Creates a domain ownership identifier for web app, or updates an - existing ownership identifier. + def get_functions_admin_token_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Fetch a short lived token that can be exchanged for a master key. + + Fetch a short lived token that can be exchanged for a master key. :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. + :param name: Name of web app :type name: str - :param domain_ownership_identifier_name: Name of domain ownership - identifier. - :type domain_ownership_identifier_name: str - :param domain_ownership_identifier: A JSON representation of the - domain ownership properties. - :type domain_ownership_identifier: :class:`Identifier - ` - :param slot: Name of the deployment slot. If a slot is not specified, - the API will delete the binding for the production slot. + :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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Identifier ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: str or + :class:`ClientRawResponse` if + raw=true + :rtype: str or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/domainOwnershipIdentifiers/{domainOwnershipIdentifierName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/functions/admin/token' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'domainOwnershipIdentifierName': self._serialize.url("domain_ownership_identifier_name", domain_ownership_identifier_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -9790,13 +11204,9 @@ def update_domain_ownership_identifier_slot( 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(domain_ownership_identifier, 'Identifier') - # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, **operation_config) + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -9806,7 +11216,7 @@ def update_domain_ownership_identifier_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Identifier', response) + deserialized = self._deserialize('str', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -9833,6 +11243,8 @@ def list_host_name_bindings_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`HostNameBinding + ` :rtype: :class:`HostNameBindingPaged ` :raises: :class:`CloudError` @@ -9843,7 +11255,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -9913,16 +11325,19 @@ def get_host_name_binding_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`HostNameBinding + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`HostNameBinding - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'hostName': self._serialize.url("host_name", host_name, 'str'), @@ -9989,16 +11404,19 @@ def create_or_update_host_name_binding_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`HostNameBinding + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`HostNameBinding - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'hostName': self._serialize.url("host_name", host_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), @@ -10065,15 +11483,17 @@ def delete_host_name_binding_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hostNameBindings/{hostName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'hostName': self._serialize.url("host_name", host_name, 'str'), @@ -10132,16 +11552,19 @@ def get_hybrid_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`HybridConnection + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`HybridConnection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), 'relayName': self._serialize.url("relay_name", relay_name, 'str'), @@ -10209,16 +11632,19 @@ def create_or_update_hybrid_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`HybridConnection + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`HybridConnection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), 'relayName': self._serialize.url("relay_name", relay_name, 'str'), @@ -10287,15 +11713,17 @@ def delete_hybrid_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), 'relayName': self._serialize.url("relay_name", relay_name, 'str'), @@ -10356,16 +11784,19 @@ def update_hybrid_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`HybridConnection + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`HybridConnection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), 'relayName': self._serialize.url("relay_name", relay_name, 'str'), @@ -10434,16 +11865,19 @@ def list_hybrid_connection_keys_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`HybridConnectionKey + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`HybridConnectionKey - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionNamespaces/{namespaceName}/relays/{relayName}/listKeys' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'namespaceName': self._serialize.url("namespace_name", namespace_name, 'str'), 'relayName': self._serialize.url("relay_name", relay_name, 'str'), @@ -10504,16 +11938,19 @@ def list_hybrid_connections_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`HybridConnection + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`HybridConnection - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridConnectionRelays' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -10575,16 +12012,19 @@ def list_relay_service_connections_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RelayServiceConnectionEntity + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`RelayServiceConnectionEntity - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -10646,16 +12086,19 @@ def get_relay_service_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RelayServiceConnectionEntity + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`RelayServiceConnectionEntity - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'entityName': self._serialize.url("entity_name", entity_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), @@ -10725,16 +12168,19 @@ def create_or_update_relay_service_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RelayServiceConnectionEntity + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`RelayServiceConnectionEntity - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'entityName': self._serialize.url("entity_name", entity_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), @@ -10801,15 +12247,17 @@ def delete_relay_service_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'entityName': self._serialize.url("entity_name", entity_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), @@ -10872,16 +12320,19 @@ def update_relay_service_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`RelayServiceConnectionEntity + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`RelayServiceConnectionEntity - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/hybridconnection/{entityName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'entityName': self._serialize.url("entity_name", entity_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), @@ -10946,6 +12397,8 @@ def list_instance_identifiers_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`SiteInstance + ` :rtype: :class:`SiteInstancePaged ` :raises: :class:`CloudError` @@ -10956,7 +12409,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -11028,6 +12481,8 @@ def list_instance_deployments_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Deployment + ` :rtype: :class:`DeploymentPaged ` :raises: :class:`CloudError` @@ -11038,7 +12493,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), @@ -11113,15 +12568,17 @@ def get_instance_deployment_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Deployment ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Deployment ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Deployment ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'id': self._serialize.url("id", id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), @@ -11194,15 +12651,17 @@ def create_instance_deployment_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`Deployment ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`Deployment ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`Deployment ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'id': self._serialize.url("id", id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), @@ -11233,60 +12692,306 @@ def create_instance_deployment_slot( response = 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 + 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('Deployment', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def delete_instance_deployment_slot( + self, resource_group_name, name, id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Delete a deployment by its ID for an app, a specific deployment slot, + and/or a specific scaled-out instance. + + Delete a deployment by its ID for an app, a specific deployment slot, + and/or a specific scaled-out instance. + + :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 id: Deployment ID. + :type id: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API deletes a deployment for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the + value of the name property in the JSON response from "GET + api/sites/{siteName}/instances" + :type instance_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 + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' + 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'), + 'id': self._serialize.url("id", id, '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 and send request + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, **operation_config) + + if response.status_code not in [200, 204]: + 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 get_instance_ms_deploy_status_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Invoke the MSDeploy web app extension as pass-through API. + + Invoke the MSDeploy web app extension as pass-through API. + + :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 instance_id: Id of web app instance + :type instance_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 + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`MSDeployStatus + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`MSDeployStatus ` + or :class:`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 and send request + request = self._client.get(url, query_parameters) + response = 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('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation_slot( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + """Invoke the MSDeploy web app extension as pass-through API. + + Invoke the MSDeploy web app extension as pass-through API. + + :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 instance_id: Id of web app instance + :type instance_id: str + :param ms_deploy: Details of MSDeploy operation + :type ms_deploy: :class:`MSDeploy ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns :class:`MSDeployStatus + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # 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 + def long_running_send(): + + request = self._client.put(url, query_parameters) + return self._client.send( + request, header_parameters, body_content, **operation_config) + + def get_long_running_status(status_link, headers=None): + + request = self._client.get(status_link) + if headers: + request.headers.update(headers) + return self._client.send( + request, header_parameters, **operation_config) + + def get_long_running_output(response): + + 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 - deserialized = None + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) - if response.status_code == 200: - deserialized = self._deserialize('Deployment', response) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + response = long_running_send() + return get_long_running_output(response) - return deserialized + long_running_operation_timeout = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + return AzureOperationPoller( + long_running_send, get_long_running_output, + get_long_running_status, long_running_operation_timeout) - def delete_instance_deployment_slot( - self, resource_group_name, name, id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Delete a deployment by its ID for an app, a specific deployment slot, - and/or a specific scaled-out instance. + def get_instance_ms_deploy_log_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Invoke the MSDeploy Log web app extension as pass-through API. - Delete a deployment by its ID for an app, a specific deployment slot, - and/or a specific scaled-out instance. + Invoke the MSDeploy Log web app extension as pass-through API. :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. + :param name: Name of web app :type name: str - :param id: Deployment ID. - :type id: str - :param slot: Name of the deployment slot. If a slot is not specified, - the API deletes a deployment for the production slot. + :param slot: Name of web app slot. If not specified then will default + to production slot. :type slot: str - :param instance_id: ID of a specific scaled-out instance. This is the - value of the name property in the JSON response from "GET - api/sites/{siteName}/instances" + :param instance_id: Id of web app instance :type instance_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 :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`MSDeployLog ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`MSDeployLog ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/deployments/{id}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'id': self._serialize.url("id", id, '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') @@ -11308,18 +13013,25 @@ def delete_instance_deployment_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) + request = self._client.get(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [200, 204]: + 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('MSDeployLog', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response + return deserialized + def is_cloneable_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): """Shows whether an app can be cloned to another resource group or @@ -11341,16 +13053,19 @@ def is_cloneable_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SiteCloneability + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SiteCloneability - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -11412,6 +13127,8 @@ def list_metric_definitions_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetricDefinition + ` :rtype: :class:`ResourceMetricDefinitionPaged ` :raises: :class:`CloudError` @@ -11422,7 +13139,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -11497,6 +13214,8 @@ def list_metrics_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`ResourceMetric + ` :rtype: :class:`ResourceMetricPaged ` :raises: :class:`CloudError` @@ -11507,7 +13226,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -11578,16 +13297,19 @@ def get_migrate_my_sql_status_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`MigrateMySqlStatus + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`MigrateMySqlStatus - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -11652,16 +13374,19 @@ def list_network_features_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`NetworkFeatures + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`NetworkFeatures - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'view': self._serialize.url("view", view, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), @@ -11727,15 +13452,17 @@ def start_web_site_network_trace_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: str - :rtype: :class:`ClientRawResponse` - if raw=true + :return: str or + :class:`ClientRawResponse` if + raw=true + :rtype: str or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -11800,15 +13527,17 @@ def stop_web_site_network_trace_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: str - :rtype: :class:`ClientRawResponse` - if raw=true + :return: str or + :class:`ClientRawResponse` if + raw=true + :rtype: str or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -11870,15 +13599,17 @@ def generate_new_site_publishing_password_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/newpassword' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -11924,7 +13655,7 @@ def list_perf_mon_counters_slot( :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. **** CURRENTLY UNUSED ***** + to production slot. :type slot: str :param filter: Return only usages/metrics specified in the filter. Filter conforms to odata syntax. Example: $filter=(startTime eq @@ -11936,6 +13667,8 @@ def list_perf_mon_counters_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`PerfMonResponse + ` :rtype: :class:`PerfMonResponsePaged ` :raises: :class:`CloudError` @@ -11946,7 +13679,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/perfcounters' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -11985,46 +13718,269 @@ def internal_paging(next_link=None, raw=False): return response - # Deserialize response - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies) + # Deserialize response + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + + def get_site_php_error_log_flag_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets web app's event logs. + + Gets web app's event logs. + + :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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`SitePhpErrorLogFlag + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`SitePhpErrorLogFlag + ` or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging' + 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.get(url, query_parameters) + response = 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('SitePhpErrorLogFlag', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def list_premier_add_ons_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the premier add-ons of an app. + + Gets the premier add-ons of an app. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API will get the premier add-ons for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`PremierAddOn ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PremierAddOn ` or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons' + 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.get(url, query_parameters) + response = 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('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def get_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a named add-on of an app. + + Gets a named add-on 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 premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API will get the named add-on for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`PremierAddOn ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PremierAddOn ` or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + # Construct URL + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' + 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'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_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, **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('PremierAddOn', response) if raw: - header_dict = {} - client_raw_response = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - def get_site_php_error_log_flag_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets web app's event logs. + def add_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): + """Updates a named add-on of an app. - Gets web app's event logs. + Updates a named add-on 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 web app + :param name: Name of the app. :type name: str - :param slot: Name of web app slot. If not specified then will default - to production slot. + :param premier_add_on_name: Add-on name. + :type premier_add_on_name: str + :param premier_add_on: A JSON representation of the edited premier + add-on. + :type premier_add_on: :class:`PremierAddOn + ` + :param slot: Name of the deployment slot. If a slot is not specified, + the API will update the named add-on for the production slot. :type slot: str :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`. - :rtype: :class:`SitePhpErrorLogFlag - ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`PremierAddOn ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PremierAddOn ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/phplogging' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -12044,9 +14000,13 @@ def get_site_php_error_log_flag_slot( 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(premier_add_on, 'PremierAddOn') + # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -12056,7 +14016,7 @@ def get_site_php_error_log_flag_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SitePhpErrorLogFlag', response) + deserialized = self._deserialize('PremierAddOn', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -12064,35 +14024,40 @@ def get_site_php_error_log_flag_slot( return deserialized - def list_premier_add_ons_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the premier add-ons of an app. + def delete_premier_add_on_slot( + self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): + """Delete a premier add-on from an app. - Gets the premier add-ons of an app. + Delete a premier add-on from 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 premier_add_on_name: Add-on name. + :type premier_add_on_name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will get the premier add-ons for the production slot. + the API will delete the named add-on for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`PremierAddOn ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), + 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -12113,7 +14078,7 @@ def list_premier_add_ons_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) + request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) if response.status_code not in [200]: @@ -12121,50 +14086,127 @@ def list_premier_add_ons_slot( exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) + def list_public_certificates_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Get public certificates for an app or a deployment slot. + + Get public certificates for an app 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: Name of the app. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API gets hostname bindings for the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of :class:`PublicCertificate + ` + :rtype: :class:`PublicCertificatePaged + ` + :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/{name}/slots/{slot}/publicCertificates' + 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') + + 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, **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.PublicCertificatePaged(internal_paging, self._deserialize.dependencies) if raw: - client_raw_response = ClientRawResponse(deserialized, response) + header_dict = {} + client_raw_response = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - def get_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """Gets a named add-on of an app. + def get_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Get the named public certificate for an app (or deployment slot, if + specified). - Gets a named add-on of an app. + Get the named public certificate for an 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 premier_add_on_name: Add-on name. - :type premier_add_on_name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will get the named add-on for the production slot. + the API the named binding for the production slot. :type slot: str + :param public_certificate_name: Public CertificateName + :type public_certificate_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`. - :rtype: :class:`PremierAddOn ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`PublicCertificate + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PublicCertificate + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -12195,7 +14237,7 @@ def get_premier_add_on_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) + deserialized = self._deserialize('PublicCertificate', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -12203,42 +14245,46 @@ def get_premier_add_on_slot( return deserialized - def add_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, premier_add_on, slot, custom_headers=None, raw=False, **operation_config): - """Updates a named add-on of an app. + def create_or_update_public_certificate_slot( + self, resource_group_name, name, public_certificate_name, public_certificate, slot, custom_headers=None, raw=False, **operation_config): + """Creates a hostname binding for an app. - Updates a named add-on of an app. + Creates a hostname binding for 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 premier_add_on_name: Add-on name. - :type premier_add_on_name: str - :param premier_add_on: A JSON representation of the edited premier - add-on. - :type premier_add_on: :class:`PremierAddOn - ` + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :param public_certificate: Public certificate details. This is the + JSON representation of a PublicCertificate object. + :type public_certificate: :class:`PublicCertificate + ` :param slot: Name of the deployment slot. If a slot is not specified, - the API will update the named add-on for the production slot. + the API will create a binding for the production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`PremierAddOn ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`PublicCertificate + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`PublicCertificate + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -12259,7 +14305,7 @@ def add_premier_add_on_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(premier_add_on, 'PremierAddOn') + body_content = self._serialize.body(public_certificate, 'PublicCertificate') # Construct and send request request = self._client.put(url, query_parameters) @@ -12274,7 +14320,7 @@ def add_premier_add_on_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) + deserialized = self._deserialize('PublicCertificate', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -12282,39 +14328,41 @@ def add_premier_add_on_slot( return deserialized - def delete_premier_add_on_slot( - self, resource_group_name, name, premier_add_on_name, slot, custom_headers=None, raw=False, **operation_config): - """Delete a premier add-on from an app. + def delete_public_certificate_slot( + self, resource_group_name, name, slot, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Deletes a hostname binding for an app. - Delete a premier add-on from an app. + Deletes a hostname binding for 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 premier_add_on_name: Add-on name. - :type premier_add_on_name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will delete the named add-on for the production slot. + the API will delete the binding for the production slot. :type slot: str + :param public_certificate_name: Public Certificate Name. + :type public_certificate_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`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}' + url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publicCertificates/{publicCertificateName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), - 'premierAddOnName': self._serialize.url("premier_add_on_name", premier_add_on_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -12337,7 +14385,7 @@ def delete_premier_add_on_slot( request = self._client.delete(url, query_parameters) response = self._client.send(request, header_parameters, **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 @@ -12378,9 +14426,11 @@ def list_publishing_profile_xml_with_secrets_slot( :type callback: Callable[Bytes, response=None] :param operation_config: :ref:`Operation configuration overrides`. - :rtype: Generator - :rtype: :class:`ClientRawResponse` - if raw=true + :return: Generator or + :class:`ClientRawResponse` if + raw=true + :rtype: Generator or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ publishing_profile_options = models.CsmPublishingProfileOptions(format=format) @@ -12388,7 +14438,7 @@ def list_publishing_profile_xml_with_secrets_slot( # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -12435,9 +14485,9 @@ def list_publishing_profile_xml_with_secrets_slot( def recover_slot( self, resource_group_name, name, recovery_entity, slot, custom_headers=None, raw=False, **operation_config): - """Recovers a deleted web app. + """Recovers a web app to a previous snapshot. - Recovers a deleted web app. + Recovers a web app to a previous snapshot. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -12447,26 +14497,28 @@ def recover_slot( :param recovery_entity: Snapshot data used for web app recovery. Snapshot information can be obtained by calling GetDeletedSites or GetSiteSnapshots API. - :type recovery_entity: :class:`CsmSiteRecoveryEntity - ` + :type recovery_entity: :class:`SnapshotRecoveryRequest + ` :param slot: Name of web app slot. If not specified then will default to production slot. :type slot: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns None or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AzureOperationPoller` - instance that returns :class:`RecoverResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -12488,7 +14540,7 @@ def recover_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(recovery_entity, 'CsmSiteRecoveryEntity') + body_content = self._serialize.body(recovery_entity, 'SnapshotRecoveryRequest') # Construct and send request def long_running_send(): @@ -12507,22 +14559,15 @@ def get_long_running_status(status_link, headers=None): def get_long_running_output(response): - if response.status_code not in [200]: + if response.status_code not in [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('RecoverResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - if raw: response = long_running_send() return get_long_running_output(response) @@ -12555,15 +14600,17 @@ def reset_slot_configuration_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -12597,75 +14644,6 @@ def reset_slot_configuration_slot( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def get_resource_health_metadata_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the category of ResourceHealthMetadata to use for the given site. - - Gets the category of ResourceHealthMetadata to use for the given site. - - :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 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`. - :rtype: :class:`ResourceHealthMetadata - ` - :rtype: :class:`ClientRawResponse` - if raw=true - :raises: :class:`CloudError` - """ - # Construct URL - url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata' - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\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.get(url, query_parameters) - response = 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('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - def restart_slot( self, resource_group_name, name, slot, soft_restart=None, synchronous=None, custom_headers=None, raw=False, **operation_config): """Restarts an app (or deployment slot, if specified). @@ -12693,15 +14671,17 @@ def restart_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -12763,6 +14743,8 @@ def list_slot_differences_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`SlotDifference + ` :rtype: :class:`SlotDifferencePaged ` :raises: :class:`CloudError` @@ -12775,7 +14757,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsdiffs' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -12847,11 +14829,14 @@ def swap_slot_slot( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns None or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) @@ -12859,7 +14844,7 @@ def swap_slot_slot( # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/slotsswap' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -12938,6 +14923,8 @@ def list_snapshots_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Snapshot + ` :rtype: :class:`SnapshotPaged ` :raises: :class:`CloudError` """ @@ -12947,7 +14934,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -13014,16 +15001,19 @@ def get_source_control_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SiteSourceControl + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SiteSourceControl - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`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='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -13086,18 +15076,21 @@ def create_or_update_source_control_slot( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`SiteSourceControl - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -13187,15 +15180,17 @@ def delete_source_control_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`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='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -13248,15 +15243,17 @@ def start_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -13309,15 +15306,17 @@ def stop_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -13370,15 +15369,17 @@ def sync_repository_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sync' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -13403,7 +15404,7 @@ def sync_repository_slot( request = self._client.post(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -13431,15 +15432,17 @@ def sync_function_triggers_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/syncfunctiontriggers' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -13500,6 +15503,8 @@ def list_usages_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`CsmUsageQuota + ` :rtype: :class:`CsmUsageQuotaPaged ` :raises: :class:`CloudError` @@ -13510,7 +15515,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/usages' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -13578,15 +15583,17 @@ def list_vnet_connections_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: list of :class:`VnetInfo ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: list of :class:`VnetInfo ` or + :class:`ClientRawResponse` if + raw=true + :rtype: list of :class:`VnetInfo ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') @@ -13650,15 +15657,17 @@ def get_vnet_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetInfo ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetInfo ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetInfo ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), @@ -13727,15 +15736,17 @@ def create_or_update_vnet_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetInfo ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetInfo ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetInfo ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), @@ -13804,15 +15815,17 @@ def delete_vnet_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), @@ -13874,15 +15887,17 @@ def update_vnet_connection_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetInfo ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetInfo ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetInfo ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), @@ -13952,15 +15967,17 @@ def get_vnet_connection_gateway_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetGateway ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetGateway ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetGateway ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), @@ -14034,15 +16051,17 @@ def create_or_update_vnet_connection_gateway_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetGateway ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetGateway ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetGateway ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), @@ -14120,15 +16139,17 @@ def update_vnet_connection_gateway_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetGateway ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetGateway ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetGateway ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), @@ -14196,6 +16217,8 @@ def list_slot_differences_from_production( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`SlotDifference + ` :rtype: :class:`SlotDifferencePaged ` :raises: :class:`CloudError` @@ -14208,7 +16231,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsdiffs' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -14276,11 +16299,14 @@ def swap_slot_with_production( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :return: + :class:`AzureOperationPoller` + instance that returns None or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`AzureOperationPoller` - instance that returns None - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) @@ -14288,7 +16314,7 @@ def swap_slot_with_production( # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slotsswap' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -14364,6 +16390,8 @@ def list_snapshots( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`Snapshot + ` :rtype: :class:`SnapshotPaged ` :raises: :class:`CloudError` """ @@ -14373,7 +16401,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -14435,16 +16463,19 @@ def get_source_control( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SiteSourceControl + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`SiteSourceControl - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -14502,18 +16533,21 @@ def create_or_update_source_control( :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :rtype: + :return: :class:`AzureOperationPoller` instance that returns :class:`SiteSourceControl - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: + :class:`AzureOperationPoller` + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -14598,15 +16632,17 @@ def delete_source_control( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sourcecontrols/web' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -14655,15 +16691,17 @@ def start( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -14712,15 +16750,17 @@ def stop( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -14769,15 +16809,17 @@ def sync_repository( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/sync' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -14801,7 +16843,7 @@ def sync_repository( request = self._client.post(url, query_parameters) response = self._client.send(request, header_parameters, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -14826,15 +16868,17 @@ def sync_function_triggers( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/syncfunctiontriggers' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -14891,6 +16935,8 @@ def list_usages( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`CsmUsageQuota + ` :rtype: :class:`CsmUsageQuotaPaged ` :raises: :class:`CloudError` @@ -14901,7 +16947,7 @@ def internal_paging(next_link=None, raw=False): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/usages' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -14965,15 +17011,17 @@ def list_vnet_connections( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: list of :class:`VnetInfo ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: list of :class:`VnetInfo ` or + :class:`ClientRawResponse` if + raw=true + :rtype: list of :class:`VnetInfo ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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') } @@ -15033,15 +17081,17 @@ def get_vnet_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetInfo ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetInfo ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetInfo ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -15106,15 +17156,17 @@ def create_or_update_vnet_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetInfo ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetInfo ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetInfo ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -15179,15 +17231,17 @@ def delete_vnet_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -15245,15 +17299,17 @@ def update_vnet_connection( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetInfo ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetInfo ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetInfo ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -15319,15 +17375,17 @@ def get_vnet_connection_gateway( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetGateway ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetGateway ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetGateway ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), @@ -15396,15 +17454,17 @@ def create_or_update_vnet_connection_gateway( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetGateway ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetGateway ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetGateway ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), @@ -15477,15 +17537,17 @@ def update_vnet_connection_gateway( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`VnetGateway ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`VnetGateway ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetGateway ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/virtualNetworkConnections/{vnetName}/gateways/{gatewayName}' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + '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'), 'vnetName': self._serialize.url("vnet_name", vnet_name, 'str'), 'gatewayName': self._serialize.url("gateway_name", gateway_name, 'str'), diff --git a/azure-mgmt-web/azure/mgmt/web/version.py b/azure-mgmt-web/azure/mgmt/web/version.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 index 2a1be9de2863..a3dbc7890b9c --- 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,15 +18,15 @@ from msrestazure.azure_operation import AzureOperationPoller import uuid from .operations.app_service_certificate_orders_operations import AppServiceCertificateOrdersOperations -from .operations.app_service_environments_operations import AppServiceEnvironmentsOperations -from .operations.app_service_plans_operations import AppServicePlansOperations -from .operations.certificates_operations import CertificatesOperations from .operations.domains_operations import DomainsOperations -from .operations.recommendations_operations import RecommendationsOperations from .operations.top_level_domains_operations import TopLevelDomainsOperations -from .operations.web_apps_operations import WebAppsOperations +from .operations.certificates_operations import CertificatesOperations from .operations.deleted_web_apps_operations import DeletedWebAppsOperations from .operations.provider_operations import ProviderOperations +from .operations.recommendations_operations import RecommendationsOperations +from .operations.web_apps_operations import WebAppsOperations +from .operations.app_service_environments_operations import AppServiceEnvironmentsOperations +from .operations.app_service_plans_operations import AppServicePlansOperations from . import models @@ -66,31 +66,31 @@ def __init__( class WebSiteManagementClient(object): - """Composite Swagger for WebSite Management Client + """WebSite Management Client :ivar config: Configuration for client. :vartype config: WebSiteManagementClientConfiguration :ivar app_service_certificate_orders: AppServiceCertificateOrders operations - :vartype app_service_certificate_orders: .operations.AppServiceCertificateOrdersOperations - :ivar app_service_environments: AppServiceEnvironments operations - :vartype app_service_environments: .operations.AppServiceEnvironmentsOperations - :ivar app_service_plans: AppServicePlans operations - :vartype app_service_plans: .operations.AppServicePlansOperations - :ivar certificates: Certificates operations - :vartype certificates: .operations.CertificatesOperations + :vartype app_service_certificate_orders: azure.mgmt.web.operations.AppServiceCertificateOrdersOperations :ivar domains: Domains operations - :vartype domains: .operations.DomainsOperations - :ivar recommendations: Recommendations operations - :vartype recommendations: .operations.RecommendationsOperations + :vartype domains: azure.mgmt.web.operations.DomainsOperations :ivar top_level_domains: TopLevelDomains operations - :vartype top_level_domains: .operations.TopLevelDomainsOperations - :ivar web_apps: WebApps operations - :vartype web_apps: .operations.WebAppsOperations + :vartype top_level_domains: azure.mgmt.web.operations.TopLevelDomainsOperations + :ivar certificates: Certificates operations + :vartype certificates: azure.mgmt.web.operations.CertificatesOperations :ivar deleted_web_apps: DeletedWebApps operations - :vartype deleted_web_apps: .operations.DeletedWebAppsOperations + :vartype deleted_web_apps: azure.mgmt.web.operations.DeletedWebAppsOperations :ivar provider: Provider operations - :vartype provider: .operations.ProviderOperations + :vartype provider: azure.mgmt.web.operations.ProviderOperations + :ivar recommendations: Recommendations operations + :vartype recommendations: azure.mgmt.web.operations.RecommendationsOperations + :ivar web_apps: WebApps operations + :vartype web_apps: azure.mgmt.web.operations.WebAppsOperations + :ivar app_service_environments: AppServiceEnvironments operations + :vartype app_service_environments: azure.mgmt.web.operations.AppServiceEnvironmentsOperations + :ivar app_service_plans: AppServicePlans operations + :vartype app_service_plans: azure.mgmt.web.operations.AppServicePlansOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -113,23 +113,23 @@ def __init__( self.app_service_certificate_orders = AppServiceCertificateOrdersOperations( self._client, self.config, self._serialize, self._deserialize) - self.app_service_environments = AppServiceEnvironmentsOperations( + self.domains = DomainsOperations( self._client, self.config, self._serialize, self._deserialize) - self.app_service_plans = AppServicePlansOperations( + self.top_level_domains = TopLevelDomainsOperations( self._client, self.config, self._serialize, self._deserialize) self.certificates = CertificatesOperations( self._client, self.config, self._serialize, self._deserialize) - self.domains = DomainsOperations( + self.deleted_web_apps = DeletedWebAppsOperations( self._client, self.config, self._serialize, self._deserialize) - self.recommendations = RecommendationsOperations( + self.provider = ProviderOperations( self._client, self.config, self._serialize, self._deserialize) - self.top_level_domains = TopLevelDomainsOperations( + self.recommendations = RecommendationsOperations( self._client, self.config, self._serialize, self._deserialize) self.web_apps = WebAppsOperations( self._client, self.config, self._serialize, self._deserialize) - self.deleted_web_apps = DeletedWebAppsOperations( + self.app_service_environments = AppServiceEnvironmentsOperations( self._client, self.config, self._serialize, self._deserialize) - self.provider = ProviderOperations( + self.app_service_plans = AppServicePlansOperations( self._client, self.config, self._serialize, self._deserialize) def get_publishing_user( @@ -143,9 +143,11 @@ def get_publishing_user( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`User ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`User ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`User ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -200,9 +202,11 @@ def update_publishing_user( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`User ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`User ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`User ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -259,6 +263,8 @@ def list_source_controls( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`SourceControl + ` :rtype: :class:`SourceControlPaged ` :raises: :class:`CloudError` @@ -327,9 +333,11 @@ def update_source_control( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`SourceControl ` + or :class:`ClientRawResponse` if + raw=true :rtype: :class:`SourceControl ` - :rtype: :class:`ClientRawResponse` - if raw=true + or :class:`ClientRawResponse` :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -398,10 +406,13 @@ def check_name_availability( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`ResourceNameAvailability + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`ResourceNameAvailability - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) @@ -471,6 +482,8 @@ def list_geo_regions( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`GeoRegion + ` :rtype: :class:`GeoRegionPaged ` :raises: :class:`CloudError` """ @@ -541,6 +554,8 @@ def list_premier_add_on_offers( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: An iterator like instance of :class:`PremierAddOnOffer + ` :rtype: :class:`PremierAddOnOfferPaged ` :raises: :class:`CloudError` @@ -608,9 +623,11 @@ def list_skus( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: :class:`SkuInfos ` - :rtype: :class:`ClientRawResponse` - if raw=true + :return: :class:`SkuInfos ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`SkuInfos ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -656,6 +673,77 @@ def list_skus( return deserialized + def verify_hosting_environment_vnet( + self, parameters, custom_headers=None, raw=False, **operation_config): + """Verifies if this VNET is compatible with an App Service Environment. + + Verifies if this VNET is compatible with an App Service Environment by + analyzing the Network Security Group rules. + + :param parameters: VNET information + :type parameters: :class:`VnetParameters + ` + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: :class:`VnetValidationFailureDetails + ` or + :class:`ClientRawResponse` if + raw=true + :rtype: :class:`VnetValidationFailureDetails + ` or + :class:`ClientRawResponse` + :raises: :class:`CloudError` + """ + api_version = "2016-03-01" + + # Construct URL + url = '/subscriptions/{subscriptionId}/providers/Microsoft.Web/verifyHostingEnvironmentVnet' + path_format_arguments = { + '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("api_version", 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(parameters, 'VnetParameters') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = 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('VnetValidationFailureDetails', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + def move( self, resource_group_name, target_resource_group=None, resources=None, custom_headers=None, raw=False, **operation_config): """Move resources between resource groups. @@ -674,9 +762,11 @@ def move( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) @@ -686,7 +776,7 @@ def move( # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/moveResources' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -739,10 +829,13 @@ def validate( deserialized response :param operation_config: :ref:`Operation configuration overrides`. + :return: :class:`ValidateResponse + ` or + :class:`ClientRawResponse` if + raw=true :rtype: :class:`ValidateResponse - ` - :rtype: :class:`ClientRawResponse` - if raw=true + ` or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ api_version = "2016-03-01" @@ -750,7 +843,7 @@ def validate( # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/validate' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -811,9 +904,11 @@ def validate_move( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :rtype: None - :rtype: :class:`ClientRawResponse` - if raw=true + :return: None or + :class:`ClientRawResponse` if + raw=true + :rtype: None or + :class:`ClientRawResponse` :raises: :class:`CloudError` """ move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) @@ -823,7 +918,7 @@ def validate_move( # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/validateMoveResources' path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern='^[-\w\._\(\)]+[^\.]$'), + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) diff --git a/azure-mgmt-web/build.json b/azure-mgmt-web/build.json index 5376fce22092..abdcd99e0bec 100644 --- a/azure-mgmt-web/build.json +++ b/azure-mgmt-web/build.json @@ -1,5 +1 @@ -{ - "autorest": "1.0.1-20170425-2300-nightly", - "date": "2017-04-26T22:48:42Z", - "version": "0.32.0" -} \ No newline at end of file +{"autorest": "1.2.2", "date": "2017-08-30T23:28:01Z", "version": ""} \ No newline at end of file