diff --git a/azure-mgmt-web/azure/mgmt/web/models/__init__.py b/azure-mgmt-web/azure/mgmt/web/models/__init__.py index 3e8d506ff635..06759925efc3 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/__init__.py +++ b/azure-mgmt-web/azure/mgmt/web/models/__init__.py @@ -26,10 +26,8 @@ from .vnet_info_py3 import VnetInfo from .vnet_gateway_py3 import VnetGateway from .user_py3 import User - from .snapshot_recovery_target_py3 import SnapshotRecoveryTarget - from .snapshot_recovery_request_py3 import SnapshotRecoveryRequest + from .snapshot_py3 import Snapshot from .resource_metric_availability_py3 import ResourceMetricAvailability - from .resource_metric_name_py3 import ResourceMetricName from .resource_metric_definition_py3 import ResourceMetricDefinition from .push_settings_py3 import PushSettings from .identifier_py3 import Identifier @@ -67,7 +65,11 @@ from .sku_description_py3 import SkuDescription from .app_service_plan_py3 import AppServicePlan from .resource_py3 import Resource + from .default_error_response_error_details_item_py3 import DefaultErrorResponseErrorDetailsItem + from .default_error_response_error_py3 import DefaultErrorResponseError + from .default_error_response_py3 import DefaultErrorResponse, DefaultErrorResponseException from .name_identifier_py3 import NameIdentifier + from .log_specification_py3 import LogSpecification from .metric_availability_py3 import MetricAvailability from .dimension_py3 import Dimension from .metric_specification_py3 import MetricSpecification @@ -85,7 +87,6 @@ from .domain_ownership_identifier_py3 import DomainOwnershipIdentifier from .domain_patch_resource_py3 import DomainPatchResource from .domain_recommendation_search_parameters_py3 import DomainRecommendationSearchParameters - from .error_response_py3 import ErrorResponse, ErrorResponseException from .tld_legal_agreement_py3 import TldLegalAgreement from .top_level_domain_py3 import TopLevelDomain from .top_level_domain_agreement_option_py3 import TopLevelDomainAgreementOption @@ -99,16 +100,14 @@ from .app_service_environment_py3 import AppServiceEnvironment from .localizable_string_py3 import LocalizableString from .csm_usage_quota_py3 import CsmUsageQuota + from .deleted_site_py3 import DeletedSite from .error_entity_py3 import ErrorEntity - from .default_error_response_error_details_item_py3 import DefaultErrorResponseErrorDetailsItem - from .default_error_response_error_py3 import DefaultErrorResponseError - from .default_error_response_py3 import DefaultErrorResponse, DefaultErrorResponseException from .operation_py3 import Operation + from .resource_metric_name_py3 import ResourceMetricName from .resource_metric_property_py3 import ResourceMetricProperty from .resource_metric_value_py3 import ResourceMetricValue from .resource_metric_py3 import ResourceMetric from .web_app_collection_py3 import WebAppCollection - from .deleted_site_py3 import DeletedSite from .solution_py3 import Solution from .detector_abnormal_time_period_py3 import DetectorAbnormalTimePeriod from .abnormal_time_period_py3 import AbnormalTimePeriod @@ -133,7 +132,6 @@ from .application_stack_py3 import ApplicationStack from .recommendation_py3 import Recommendation from .recommendation_rule_py3 import RecommendationRule - from .resource_health_metadata_py3 import ResourceHealthMetadata from .billing_meter_py3 import BillingMeter from .csm_move_resource_envelope_py3 import CsmMoveResourceEnvelope from .geo_region_py3 import GeoRegion @@ -166,6 +164,7 @@ from .csm_publishing_profile_options_py3 import CsmPublishingProfileOptions from .csm_slot_entity_py3 import CsmSlotEntity from .custom_hostname_analysis_result_py3 import CustomHostnameAnalysisResult + from .deleted_app_restore_request_py3 import DeletedAppRestoreRequest from .deployment_py3 import Deployment from .enabled_config_py3 import EnabledConfig from .file_system_http_logs_config_py3 import FileSystemHttpLogsConfig @@ -185,12 +184,15 @@ from .perf_mon_set_py3 import PerfMonSet from .perf_mon_response_py3 import PerfMonResponse from .premier_add_on_py3 import PremierAddOn + from .premier_add_on_patch_resource_py3 import PremierAddOnPatchResource + from .private_access_subnet_py3 import PrivateAccessSubnet + from .private_access_virtual_network_py3 import PrivateAccessVirtualNetwork + from .private_access_py3 import PrivateAccess from .process_thread_info_py3 import ProcessThreadInfo from .process_module_info_py3 import ProcessModuleInfo from .process_info_py3 import ProcessInfo from .public_certificate_py3 import PublicCertificate from .restore_request_py3 import RestoreRequest - from .restore_response_py3 import RestoreResponse from .site_auth_settings_py3 import SiteAuthSettings from .site_cloneability_criterion_py3 import SiteCloneabilityCriterion from .site_cloneability_py3 import SiteCloneability @@ -204,10 +206,12 @@ from .site_source_control_py3 import SiteSourceControl from .slot_config_names_resource_py3 import SlotConfigNamesResource from .slot_difference_py3 import SlotDifference - from .snapshot_py3 import Snapshot + from .snapshot_recovery_source_py3 import SnapshotRecoverySource + from .snapshot_restore_request_py3 import SnapshotRestoreRequest from .storage_migration_options_py3 import StorageMigrationOptions from .storage_migration_response_py3 import StorageMigrationResponse from .string_dictionary_py3 import StringDictionary + from .swift_virtual_network_py3 import SwiftVirtualNetwork from .triggered_job_run_py3 import TriggeredJobRun from .triggered_job_history_py3 import TriggeredJobHistory from .triggered_web_job_py3 import TriggeredWebJob @@ -240,10 +244,8 @@ from .vnet_info import VnetInfo from .vnet_gateway import VnetGateway from .user import User - from .snapshot_recovery_target import SnapshotRecoveryTarget - from .snapshot_recovery_request import SnapshotRecoveryRequest + from .snapshot import Snapshot from .resource_metric_availability import ResourceMetricAvailability - from .resource_metric_name import ResourceMetricName from .resource_metric_definition import ResourceMetricDefinition from .push_settings import PushSettings from .identifier import Identifier @@ -281,7 +283,11 @@ from .sku_description import SkuDescription from .app_service_plan import AppServicePlan from .resource import Resource + from .default_error_response_error_details_item import DefaultErrorResponseErrorDetailsItem + from .default_error_response_error import DefaultErrorResponseError + from .default_error_response import DefaultErrorResponse, DefaultErrorResponseException from .name_identifier import NameIdentifier + from .log_specification import LogSpecification from .metric_availability import MetricAvailability from .dimension import Dimension from .metric_specification import MetricSpecification @@ -299,7 +305,6 @@ from .domain_ownership_identifier import DomainOwnershipIdentifier from .domain_patch_resource import DomainPatchResource from .domain_recommendation_search_parameters import DomainRecommendationSearchParameters - from .error_response import ErrorResponse, ErrorResponseException from .tld_legal_agreement import TldLegalAgreement from .top_level_domain import TopLevelDomain from .top_level_domain_agreement_option import TopLevelDomainAgreementOption @@ -313,16 +318,14 @@ from .app_service_environment import AppServiceEnvironment from .localizable_string import LocalizableString from .csm_usage_quota import CsmUsageQuota + from .deleted_site import DeletedSite from .error_entity import ErrorEntity - from .default_error_response_error_details_item import DefaultErrorResponseErrorDetailsItem - from .default_error_response_error import DefaultErrorResponseError - from .default_error_response import DefaultErrorResponse, DefaultErrorResponseException from .operation import Operation + from .resource_metric_name import ResourceMetricName from .resource_metric_property import ResourceMetricProperty from .resource_metric_value import ResourceMetricValue from .resource_metric import ResourceMetric from .web_app_collection import WebAppCollection - from .deleted_site import DeletedSite from .solution import Solution from .detector_abnormal_time_period import DetectorAbnormalTimePeriod from .abnormal_time_period import AbnormalTimePeriod @@ -347,7 +350,6 @@ from .application_stack import ApplicationStack from .recommendation import Recommendation from .recommendation_rule import RecommendationRule - from .resource_health_metadata import ResourceHealthMetadata from .billing_meter import BillingMeter from .csm_move_resource_envelope import CsmMoveResourceEnvelope from .geo_region import GeoRegion @@ -380,6 +382,7 @@ from .csm_publishing_profile_options import CsmPublishingProfileOptions from .csm_slot_entity import CsmSlotEntity from .custom_hostname_analysis_result import CustomHostnameAnalysisResult + from .deleted_app_restore_request import DeletedAppRestoreRequest from .deployment import Deployment from .enabled_config import EnabledConfig from .file_system_http_logs_config import FileSystemHttpLogsConfig @@ -399,12 +402,15 @@ from .perf_mon_set import PerfMonSet from .perf_mon_response import PerfMonResponse from .premier_add_on import PremierAddOn + from .premier_add_on_patch_resource import PremierAddOnPatchResource + from .private_access_subnet import PrivateAccessSubnet + from .private_access_virtual_network import PrivateAccessVirtualNetwork + from .private_access import PrivateAccess from .process_thread_info import ProcessThreadInfo from .process_module_info import ProcessModuleInfo from .process_info import ProcessInfo from .public_certificate import PublicCertificate from .restore_request import RestoreRequest - from .restore_response import RestoreResponse from .site_auth_settings import SiteAuthSettings from .site_cloneability_criterion import SiteCloneabilityCriterion from .site_cloneability import SiteCloneability @@ -418,10 +424,12 @@ from .site_source_control import SiteSourceControl from .slot_config_names_resource import SlotConfigNamesResource from .slot_difference import SlotDifference - from .snapshot import Snapshot + from .snapshot_recovery_source import SnapshotRecoverySource + from .snapshot_restore_request import SnapshotRestoreRequest from .storage_migration_options import StorageMigrationOptions from .storage_migration_response import StorageMigrationResponse from .string_dictionary import StringDictionary + from .swift_virtual_network import SwiftVirtualNetwork from .triggered_job_run import TriggeredJobRun from .triggered_job_history import TriggeredJobHistory from .triggered_web_job import TriggeredWebJob @@ -453,12 +461,11 @@ from .detector_definition_paged import DetectorDefinitionPaged from .application_stack_paged import ApplicationStackPaged from .recommendation_paged import RecommendationPaged -from .resource_health_metadata_paged import ResourceHealthMetadataPaged from .source_control_paged import SourceControlPaged +from .billing_meter_paged import BillingMeterPaged from .geo_region_paged import GeoRegionPaged from .identifier_paged import IdentifierPaged from .premier_add_on_offer_paged import PremierAddOnOfferPaged -from .billing_meter_paged import BillingMeterPaged from .site_paged import SitePaged from .backup_item_paged import BackupItemPaged from .site_config_resource_paged import SiteConfigResourcePaged @@ -498,12 +505,14 @@ CertificateOrderActionType, RouteType, ManagedServiceIdentityType, + IpFilterTag, AutoHealActionType, ConnectionStringType, ScmType, ManagedPipelineMode, SiteLoadBalancing, SupportedTlsVersions, + FtpsState, SslState, HostType, UsageState, @@ -535,7 +544,6 @@ BackupItemStatus, DatabaseType, FrequencyUnit, - BackupRestoreOperationType, ContinuousWebJobStatus, WebJobType, PublishingProfileFormat, @@ -544,6 +552,7 @@ MSDeployProvisioningState, MySqlMigrationType, PublicCertificateLocation, + BackupRestoreOperationType, UnauthenticatedClientAction, BuiltInAuthenticationProvider, CloneAbilityResult, @@ -569,10 +578,8 @@ 'VnetInfo', 'VnetGateway', 'User', - 'SnapshotRecoveryTarget', - 'SnapshotRecoveryRequest', + 'Snapshot', 'ResourceMetricAvailability', - 'ResourceMetricName', 'ResourceMetricDefinition', 'PushSettings', 'Identifier', @@ -610,7 +617,11 @@ 'SkuDescription', 'AppServicePlan', 'Resource', + 'DefaultErrorResponseErrorDetailsItem', + 'DefaultErrorResponseError', + 'DefaultErrorResponse', 'DefaultErrorResponseException', 'NameIdentifier', + 'LogSpecification', 'MetricAvailability', 'Dimension', 'MetricSpecification', @@ -628,7 +639,6 @@ 'DomainOwnershipIdentifier', 'DomainPatchResource', 'DomainRecommendationSearchParameters', - 'ErrorResponse', 'ErrorResponseException', 'TldLegalAgreement', 'TopLevelDomain', 'TopLevelDomainAgreementOption', @@ -642,16 +652,14 @@ 'AppServiceEnvironment', 'LocalizableString', 'CsmUsageQuota', + 'DeletedSite', 'ErrorEntity', - 'DefaultErrorResponseErrorDetailsItem', - 'DefaultErrorResponseError', - 'DefaultErrorResponse', 'DefaultErrorResponseException', 'Operation', + 'ResourceMetricName', 'ResourceMetricProperty', 'ResourceMetricValue', 'ResourceMetric', 'WebAppCollection', - 'DeletedSite', 'Solution', 'DetectorAbnormalTimePeriod', 'AbnormalTimePeriod', @@ -676,7 +684,6 @@ 'ApplicationStack', 'Recommendation', 'RecommendationRule', - 'ResourceHealthMetadata', 'BillingMeter', 'CsmMoveResourceEnvelope', 'GeoRegion', @@ -709,6 +716,7 @@ 'CsmPublishingProfileOptions', 'CsmSlotEntity', 'CustomHostnameAnalysisResult', + 'DeletedAppRestoreRequest', 'Deployment', 'EnabledConfig', 'FileSystemHttpLogsConfig', @@ -728,12 +736,15 @@ 'PerfMonSet', 'PerfMonResponse', 'PremierAddOn', + 'PremierAddOnPatchResource', + 'PrivateAccessSubnet', + 'PrivateAccessVirtualNetwork', + 'PrivateAccess', 'ProcessThreadInfo', 'ProcessModuleInfo', 'ProcessInfo', 'PublicCertificate', 'RestoreRequest', - 'RestoreResponse', 'SiteAuthSettings', 'SiteCloneabilityCriterion', 'SiteCloneability', @@ -747,10 +758,12 @@ 'SiteSourceControl', 'SlotConfigNamesResource', 'SlotDifference', - 'Snapshot', + 'SnapshotRecoverySource', + 'SnapshotRestoreRequest', 'StorageMigrationOptions', 'StorageMigrationResponse', 'StringDictionary', + 'SwiftVirtualNetwork', 'TriggeredJobRun', 'TriggeredJobHistory', 'TriggeredWebJob', @@ -782,12 +795,11 @@ 'DetectorDefinitionPaged', 'ApplicationStackPaged', 'RecommendationPaged', - 'ResourceHealthMetadataPaged', 'SourceControlPaged', + 'BillingMeterPaged', 'GeoRegionPaged', 'IdentifierPaged', 'PremierAddOnOfferPaged', - 'BillingMeterPaged', 'SitePaged', 'BackupItemPaged', 'SiteConfigResourcePaged', @@ -826,12 +838,14 @@ 'CertificateOrderActionType', 'RouteType', 'ManagedServiceIdentityType', + 'IpFilterTag', 'AutoHealActionType', 'ConnectionStringType', 'ScmType', 'ManagedPipelineMode', 'SiteLoadBalancing', 'SupportedTlsVersions', + 'FtpsState', 'SslState', 'HostType', 'UsageState', @@ -863,7 +877,6 @@ 'BackupItemStatus', 'DatabaseType', 'FrequencyUnit', - 'BackupRestoreOperationType', 'ContinuousWebJobStatus', 'WebJobType', 'PublishingProfileFormat', @@ -872,6 +885,7 @@ 'MSDeployProvisioningState', 'MySqlMigrationType', 'PublicCertificateLocation', + 'BackupRestoreOperationType', 'UnauthenticatedClientAction', 'BuiltInAuthenticationProvider', 'CloneAbilityResult', diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment.py index 0188bc2cf194..357c0b6d603f 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment.py @@ -126,6 +126,15 @@ class AppServiceEnvironment(Model): :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on ASE db :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str """ _validation = { @@ -189,6 +198,9 @@ class AppServiceEnvironment(Model): 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, } def __init__(self, **kwargs): @@ -229,3 +241,6 @@ def __init__(self, **kwargs): self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', None) self.cluster_settings = kwargs.get('cluster_settings', None) self.user_whitelisted_ip_ranges = kwargs.get('user_whitelisted_ip_ranges', None) + self.has_linux_workers = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_patch_resource.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_patch_resource.py index d64026258130..4a4f9b8a267d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_patch_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_patch_resource.py @@ -135,6 +135,15 @@ class AppServiceEnvironmentPatchResource(ProxyOnlyResource): :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on ASE db :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str """ _validation = { @@ -205,6 +214,9 @@ class AppServiceEnvironmentPatchResource(ProxyOnlyResource): 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', 'type': 'bool'}, 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'properties.hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, } def __init__(self, **kwargs): @@ -245,3 +257,6 @@ def __init__(self, **kwargs): self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', None) self.cluster_settings = kwargs.get('cluster_settings', None) self.user_whitelisted_ip_ranges = kwargs.get('user_whitelisted_ip_ranges', None) + self.has_linux_workers = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_patch_resource_py3.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_patch_resource_py3.py index a2a18b0fd543..f017aff5069e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_patch_resource_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_patch_resource_py3.py @@ -135,6 +135,15 @@ class AppServiceEnvironmentPatchResource(ProxyOnlyResource): :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on ASE db :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str """ _validation = { @@ -205,9 +214,12 @@ class AppServiceEnvironmentPatchResource(ProxyOnlyResource): 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', 'type': 'bool'}, 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'properties.hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, } - def __init__(self, *, app_service_environment_patch_resource_name: str, location: str, virtual_network, worker_pools, kind: str=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: + def __init__(self, *, app_service_environment_patch_resource_name: str, location: str, virtual_network, worker_pools, kind: str=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: super(AppServiceEnvironmentPatchResource, self).__init__(kind=kind, **kwargs) self.app_service_environment_patch_resource_name = app_service_environment_patch_resource_name self.location = location @@ -245,3 +257,6 @@ def __init__(self, *, app_service_environment_patch_resource_name: str, location self.dynamic_cache_enabled = dynamic_cache_enabled self.cluster_settings = cluster_settings self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_py3.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_py3.py index fd0968e50c29..7445b370c96d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_py3.py @@ -126,6 +126,15 @@ class AppServiceEnvironment(Model): :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on ASE db :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str """ _validation = { @@ -189,9 +198,12 @@ class AppServiceEnvironment(Model): 'dynamic_cache_enabled': {'key': 'dynamicCacheEnabled', 'type': 'bool'}, 'cluster_settings': {'key': 'clusterSettings', 'type': '[NameValuePair]'}, 'user_whitelisted_ip_ranges': {'key': 'userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'sslCertKeyVaultSecretName', 'type': 'str'}, } - def __init__(self, *, name: str, location: str, virtual_network, worker_pools, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: + def __init__(self, *, name: str, location: str, virtual_network, worker_pools, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: super(AppServiceEnvironment, self).__init__(**kwargs) self.name = name self.location = location @@ -229,3 +241,6 @@ def __init__(self, *, name: str, location: str, virtual_network, worker_pools, v self.dynamic_cache_enabled = dynamic_cache_enabled self.cluster_settings = cluster_settings self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource.py index c51a186cb590..5f48a8459372 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource.py @@ -139,6 +139,15 @@ class AppServiceEnvironmentResource(Resource): :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on ASE db :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str """ _validation = { @@ -212,6 +221,9 @@ class AppServiceEnvironmentResource(Resource): 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', 'type': 'bool'}, 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'properties.hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, } def __init__(self, **kwargs): @@ -252,3 +264,6 @@ def __init__(self, **kwargs): self.dynamic_cache_enabled = kwargs.get('dynamic_cache_enabled', None) self.cluster_settings = kwargs.get('cluster_settings', None) self.user_whitelisted_ip_ranges = kwargs.get('user_whitelisted_ip_ranges', None) + self.has_linux_workers = kwargs.get('has_linux_workers', None) + self.ssl_cert_key_vault_id = kwargs.get('ssl_cert_key_vault_id', None) + self.ssl_cert_key_vault_secret_name = kwargs.get('ssl_cert_key_vault_secret_name', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource_py3.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource_py3.py index bcefe1f2fa7f..5ae07af3ea8b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_environment_resource_py3.py @@ -139,6 +139,15 @@ class AppServiceEnvironmentResource(Resource): :param user_whitelisted_ip_ranges: User added ip ranges to whitelist on ASE db :type user_whitelisted_ip_ranges: list[str] + :param has_linux_workers: Flag that displays whether an ASE has linux + workers or not + :type has_linux_workers: bool + :param ssl_cert_key_vault_id: Key Vault ID for ILB App Service Environment + default SSL certificate + :type ssl_cert_key_vault_id: str + :param ssl_cert_key_vault_secret_name: Key Vault Secret Name for ILB App + Service Environment default SSL certificate + :type ssl_cert_key_vault_secret_name: str """ _validation = { @@ -212,9 +221,12 @@ class AppServiceEnvironmentResource(Resource): 'dynamic_cache_enabled': {'key': 'properties.dynamicCacheEnabled', 'type': 'bool'}, 'cluster_settings': {'key': 'properties.clusterSettings', 'type': '[NameValuePair]'}, 'user_whitelisted_ip_ranges': {'key': 'properties.userWhitelistedIpRanges', 'type': '[str]'}, + 'has_linux_workers': {'key': 'properties.hasLinuxWorkers', 'type': 'bool'}, + 'ssl_cert_key_vault_id': {'key': 'properties.sslCertKeyVaultId', 'type': 'str'}, + 'ssl_cert_key_vault_secret_name': {'key': 'properties.sslCertKeyVaultSecretName', 'type': 'str'}, } - def __init__(self, *, location: str, app_service_environment_resource_name: str, app_service_environment_resource_location: str, virtual_network, worker_pools, kind: str=None, tags=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, **kwargs) -> None: + def __init__(self, *, location: str, app_service_environment_resource_name: str, app_service_environment_resource_location: str, virtual_network, worker_pools, kind: str=None, tags=None, vnet_name: str=None, vnet_resource_group_name: str=None, vnet_subnet_name: str=None, internal_load_balancing_mode=None, multi_size: str=None, multi_role_count: int=None, ipssl_address_count: int=None, dns_suffix: str=None, network_access_control_list=None, front_end_scale_factor: int=None, api_management_account_id: str=None, suspended: bool=None, dynamic_cache_enabled: bool=None, cluster_settings=None, user_whitelisted_ip_ranges=None, has_linux_workers: bool=None, ssl_cert_key_vault_id: str=None, ssl_cert_key_vault_secret_name: str=None, **kwargs) -> None: super(AppServiceEnvironmentResource, self).__init__(kind=kind, location=location, tags=tags, **kwargs) self.app_service_environment_resource_name = app_service_environment_resource_name self.app_service_environment_resource_location = app_service_environment_resource_location @@ -252,3 +264,6 @@ def __init__(self, *, location: str, app_service_environment_resource_name: str, self.dynamic_cache_enabled = dynamic_cache_enabled self.cluster_settings = cluster_settings self.user_whitelisted_ip_ranges = user_whitelisted_ip_ranges + self.has_linux_workers = has_linux_workers + self.ssl_cert_key_vault_id = ssl_cert_key_vault_id + self.ssl_cert_key_vault_secret_name = ssl_cert_key_vault_secret_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan.py index 3f7258ef8712..964fa959409c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan.py @@ -32,8 +32,6 @@ class AppServicePlan(Resource): :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] - :param app_service_plan_name: Required. Name for the App Service plan. - :type app_service_plan_name: str :param worker_tier_name: Target worker tier assigned to the App Service plan. :type worker_tier_name: str @@ -66,11 +64,17 @@ class AppServicePlan(Resource): :param spot_expiration_time: The time when the server farm expires. Valid only if it is a spot server farm. :type spot_expiration_time: datetime + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime :ivar resource_group: Resource group of the App Service plan. :vartype resource_group: str :param reserved: If Linux app service plan true, false otherwise. Default value: False . :type reserved: bool + :param is_xenon: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :type is_xenon: bool :param target_worker_count: Scaling worker count. :type target_worker_count: int :param target_worker_size_id: Scaling worker size ID. @@ -89,7 +93,6 @@ class AppServicePlan(Resource): 'name': {'readonly': True}, 'location': {'required': True}, 'type': {'readonly': True}, - 'app_service_plan_name': {'required': True}, 'status': {'readonly': True}, 'subscription': {'readonly': True}, 'maximum_number_of_workers': {'readonly': True}, @@ -106,7 +109,6 @@ class AppServicePlan(Resource): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, 'subscription': {'key': 'properties.subscription', 'type': 'str'}, @@ -118,8 +120,10 @@ class AppServicePlan(Resource): 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'free_offer_expiration_time': {'key': 'properties.freeOfferExpirationTime', 'type': 'iso-8601'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, @@ -128,7 +132,6 @@ class AppServicePlan(Resource): def __init__(self, **kwargs): super(AppServicePlan, self).__init__(**kwargs) - self.app_service_plan_name = kwargs.get('app_service_plan_name', None) self.worker_tier_name = kwargs.get('worker_tier_name', None) self.status = None self.subscription = None @@ -140,8 +143,10 @@ def __init__(self, **kwargs): self.number_of_sites = None self.is_spot = kwargs.get('is_spot', None) self.spot_expiration_time = kwargs.get('spot_expiration_time', None) + self.free_offer_expiration_time = kwargs.get('free_offer_expiration_time', None) self.resource_group = None self.reserved = kwargs.get('reserved', False) + self.is_xenon = kwargs.get('is_xenon', False) self.target_worker_count = kwargs.get('target_worker_count', None) self.target_worker_size_id = kwargs.get('target_worker_size_id', None) self.provisioning_state = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource.py index f7bee7ea7449..f1ee1e51c04c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource.py @@ -18,8 +18,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id. :vartype id: str :ivar name: Resource Name. @@ -28,9 +26,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param app_service_plan_patch_resource_name: Required. Name for the App - Service plan. - :type app_service_plan_patch_resource_name: str :param worker_tier_name: Target worker tier assigned to the App Service plan. :type worker_tier_name: str @@ -63,11 +58,17 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :param spot_expiration_time: The time when the server farm expires. Valid only if it is a spot server farm. :type spot_expiration_time: datetime + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime :ivar resource_group: Resource group of the App Service plan. :vartype resource_group: str :param reserved: If Linux app service plan true, false otherwise. Default value: False . :type reserved: bool + :param is_xenon: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :type is_xenon: bool :param target_worker_count: Scaling worker count. :type target_worker_count: int :param target_worker_size_id: Scaling worker size ID. @@ -83,7 +84,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'app_service_plan_patch_resource_name': {'required': True}, 'status': {'readonly': True}, 'subscription': {'readonly': True}, 'maximum_number_of_workers': {'readonly': True}, @@ -98,7 +98,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'app_service_plan_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, 'subscription': {'key': 'properties.subscription', 'type': 'str'}, @@ -110,8 +109,10 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'free_offer_expiration_time': {'key': 'properties.freeOfferExpirationTime', 'type': 'iso-8601'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, @@ -119,7 +120,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): def __init__(self, **kwargs): super(AppServicePlanPatchResource, self).__init__(**kwargs) - self.app_service_plan_patch_resource_name = kwargs.get('app_service_plan_patch_resource_name', None) self.worker_tier_name = kwargs.get('worker_tier_name', None) self.status = None self.subscription = None @@ -131,8 +131,10 @@ def __init__(self, **kwargs): self.number_of_sites = None self.is_spot = kwargs.get('is_spot', None) self.spot_expiration_time = kwargs.get('spot_expiration_time', None) + self.free_offer_expiration_time = kwargs.get('free_offer_expiration_time', None) self.resource_group = None self.reserved = kwargs.get('reserved', False) + self.is_xenon = kwargs.get('is_xenon', False) self.target_worker_count = kwargs.get('target_worker_count', None) self.target_worker_size_id = kwargs.get('target_worker_size_id', None) self.provisioning_state = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource_py3.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource_py3.py index 4703daa63be4..10d555ee877c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource_py3.py @@ -18,8 +18,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - :ivar id: Resource Id. :vartype id: str :ivar name: Resource Name. @@ -28,9 +26,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param app_service_plan_patch_resource_name: Required. Name for the App - Service plan. - :type app_service_plan_patch_resource_name: str :param worker_tier_name: Target worker tier assigned to the App Service plan. :type worker_tier_name: str @@ -63,11 +58,17 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :param spot_expiration_time: The time when the server farm expires. Valid only if it is a spot server farm. :type spot_expiration_time: datetime + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime :ivar resource_group: Resource group of the App Service plan. :vartype resource_group: str :param reserved: If Linux app service plan true, false otherwise. Default value: False . :type reserved: bool + :param is_xenon: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :type is_xenon: bool :param target_worker_count: Scaling worker count. :type target_worker_count: int :param target_worker_size_id: Scaling worker size ID. @@ -83,7 +84,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'app_service_plan_patch_resource_name': {'required': True}, 'status': {'readonly': True}, 'subscription': {'readonly': True}, 'maximum_number_of_workers': {'readonly': True}, @@ -98,7 +98,6 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'app_service_plan_patch_resource_name': {'key': 'properties.name', 'type': 'str'}, 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, 'subscription': {'key': 'properties.subscription', 'type': 'str'}, @@ -110,16 +109,17 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'free_offer_expiration_time': {'key': 'properties.freeOfferExpirationTime', 'type': 'iso-8601'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, } - def __init__(self, *, app_service_plan_patch_resource_name: str, kind: str=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: super(AppServicePlanPatchResource, self).__init__(kind=kind, **kwargs) - self.app_service_plan_patch_resource_name = app_service_plan_patch_resource_name self.worker_tier_name = worker_tier_name self.status = None self.subscription = None @@ -131,8 +131,10 @@ def __init__(self, *, app_service_plan_patch_resource_name: str, kind: str=None, self.number_of_sites = None self.is_spot = is_spot self.spot_expiration_time = spot_expiration_time + self.free_offer_expiration_time = free_offer_expiration_time self.resource_group = None self.reserved = reserved + self.is_xenon = is_xenon self.target_worker_count = target_worker_count self.target_worker_size_id = target_worker_size_id self.provisioning_state = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_py3.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_py3.py index dd8ff1f5e490..5ce4203df04f 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_py3.py @@ -32,8 +32,6 @@ class AppServicePlan(Resource): :vartype type: str :param tags: Resource tags. :type tags: dict[str, str] - :param app_service_plan_name: Required. Name for the App Service plan. - :type app_service_plan_name: str :param worker_tier_name: Target worker tier assigned to the App Service plan. :type worker_tier_name: str @@ -66,11 +64,17 @@ class AppServicePlan(Resource): :param spot_expiration_time: The time when the server farm expires. Valid only if it is a spot server farm. :type spot_expiration_time: datetime + :param free_offer_expiration_time: The time when the server farm free + offer expires. + :type free_offer_expiration_time: datetime :ivar resource_group: Resource group of the App Service plan. :vartype resource_group: str :param reserved: If Linux app service plan true, false otherwise. Default value: False . :type reserved: bool + :param is_xenon: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :type is_xenon: bool :param target_worker_count: Scaling worker count. :type target_worker_count: int :param target_worker_size_id: Scaling worker size ID. @@ -89,7 +93,6 @@ class AppServicePlan(Resource): 'name': {'readonly': True}, 'location': {'required': True}, 'type': {'readonly': True}, - 'app_service_plan_name': {'required': True}, 'status': {'readonly': True}, 'subscription': {'readonly': True}, 'maximum_number_of_workers': {'readonly': True}, @@ -106,7 +109,6 @@ class AppServicePlan(Resource): 'location': {'key': 'location', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, - 'app_service_plan_name': {'key': 'properties.name', 'type': 'str'}, 'worker_tier_name': {'key': 'properties.workerTierName', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'StatusOptions'}, 'subscription': {'key': 'properties.subscription', 'type': 'str'}, @@ -118,17 +120,18 @@ class AppServicePlan(Resource): 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, + 'free_offer_expiration_time': {'key': 'properties.freeOfferExpirationTime', 'type': 'iso-8601'}, 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, 'sku': {'key': 'sku', 'type': 'SkuDescription'}, } - def __init__(self, *, location: str, app_service_plan_name: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, reserved: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: + def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) - self.app_service_plan_name = app_service_plan_name self.worker_tier_name = worker_tier_name self.status = None self.subscription = None @@ -140,8 +143,10 @@ def __init__(self, *, location: str, app_service_plan_name: str, kind: str=None, self.number_of_sites = None self.is_spot = is_spot self.spot_expiration_time = spot_expiration_time + self.free_offer_expiration_time = free_offer_expiration_time self.resource_group = None self.reserved = reserved + self.is_xenon = is_xenon self.target_worker_count = target_worker_count self.target_worker_size_id = target_worker_size_id self.provisioning_state = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/backup_request.py b/azure-mgmt-web/azure/mgmt/web/models/backup_request.py index 9eeb28e28cf0..8d7f6e58cbb3 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/backup_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/backup_request.py @@ -28,8 +28,6 @@ class BackupRequest(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param backup_request_name: Required. Name of the backup. - :type backup_request_name: str :param enabled: True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled. :type enabled: bool @@ -40,17 +38,12 @@ class BackupRequest(ProxyOnlyResource): :type backup_schedule: ~azure.mgmt.web.models.BackupSchedule :param databases: Databases included in the backup. :type databases: list[~azure.mgmt.web.models.DatabaseBackupSetting] - :param backup_request_type: Type of the backup. Possible values include: - 'Default', 'Clone', 'Relocation', 'Snapshot' - :type backup_request_type: str or - ~azure.mgmt.web.models.BackupRestoreOperationType """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'backup_request_name': {'required': True}, 'storage_account_url': {'required': True}, } @@ -59,19 +52,15 @@ class BackupRequest(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'backup_request_name': {'key': 'properties.name', 'type': 'str'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, 'backup_schedule': {'key': 'properties.backupSchedule', 'type': 'BackupSchedule'}, 'databases': {'key': 'properties.databases', 'type': '[DatabaseBackupSetting]'}, - 'backup_request_type': {'key': 'properties.type', 'type': 'BackupRestoreOperationType'}, } def __init__(self, **kwargs): super(BackupRequest, self).__init__(**kwargs) - self.backup_request_name = kwargs.get('backup_request_name', None) self.enabled = kwargs.get('enabled', None) self.storage_account_url = kwargs.get('storage_account_url', None) self.backup_schedule = kwargs.get('backup_schedule', None) self.databases = kwargs.get('databases', None) - self.backup_request_type = kwargs.get('backup_request_type', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/backup_request_py3.py b/azure-mgmt-web/azure/mgmt/web/models/backup_request_py3.py index b7ffa99ef06e..ce7a46fe117f 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/backup_request_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/backup_request_py3.py @@ -28,8 +28,6 @@ class BackupRequest(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param backup_request_name: Required. Name of the backup. - :type backup_request_name: str :param enabled: True if the backup schedule is enabled (must be included in that case), false if the backup schedule should be disabled. :type enabled: bool @@ -40,17 +38,12 @@ class BackupRequest(ProxyOnlyResource): :type backup_schedule: ~azure.mgmt.web.models.BackupSchedule :param databases: Databases included in the backup. :type databases: list[~azure.mgmt.web.models.DatabaseBackupSetting] - :param backup_request_type: Type of the backup. Possible values include: - 'Default', 'Clone', 'Relocation', 'Snapshot' - :type backup_request_type: str or - ~azure.mgmt.web.models.BackupRestoreOperationType """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'backup_request_name': {'required': True}, 'storage_account_url': {'required': True}, } @@ -59,19 +52,15 @@ class BackupRequest(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'backup_request_name': {'key': 'properties.name', 'type': 'str'}, 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, 'storage_account_url': {'key': 'properties.storageAccountUrl', 'type': 'str'}, 'backup_schedule': {'key': 'properties.backupSchedule', 'type': 'BackupSchedule'}, 'databases': {'key': 'properties.databases', 'type': '[DatabaseBackupSetting]'}, - 'backup_request_type': {'key': 'properties.type', 'type': 'BackupRestoreOperationType'}, } - def __init__(self, *, backup_request_name: str, storage_account_url: str, kind: str=None, enabled: bool=None, backup_schedule=None, databases=None, backup_request_type=None, **kwargs) -> None: + def __init__(self, *, storage_account_url: str, kind: str=None, enabled: bool=None, backup_schedule=None, databases=None, **kwargs) -> None: super(BackupRequest, self).__init__(kind=kind, **kwargs) - self.backup_request_name = backup_request_name self.enabled = enabled self.storage_account_url = storage_account_url self.backup_schedule = backup_schedule self.databases = databases - self.backup_request_type = backup_request_type diff --git a/azure-mgmt-web/azure/mgmt/web/models/billing_meter.py b/azure-mgmt-web/azure/mgmt/web/models/billing_meter.py index e83d0a976d74..580c168f394a 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/billing_meter.py +++ b/azure-mgmt-web/azure/mgmt/web/models/billing_meter.py @@ -35,8 +35,10 @@ class BillingMeter(ProxyOnlyResource): :type short_name: str :param friendly_name: Friendly name of the meter :type friendly_name: str - :param resource_type: App Service resource type meter used for + :param resource_type: App Service ResourceType meter used for :type resource_type: str + :param os_type: App Service OS type meter used for + :type os_type: str """ _validation = { @@ -55,6 +57,7 @@ class BillingMeter(ProxyOnlyResource): 'short_name': {'key': 'properties.shortName', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, } def __init__(self, **kwargs): @@ -64,3 +67,4 @@ def __init__(self, **kwargs): self.short_name = kwargs.get('short_name', None) self.friendly_name = kwargs.get('friendly_name', None) self.resource_type = kwargs.get('resource_type', None) + self.os_type = kwargs.get('os_type', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/billing_meter_py3.py b/azure-mgmt-web/azure/mgmt/web/models/billing_meter_py3.py index 665932586dee..4d44fbd9f2df 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/billing_meter_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/billing_meter_py3.py @@ -35,8 +35,10 @@ class BillingMeter(ProxyOnlyResource): :type short_name: str :param friendly_name: Friendly name of the meter :type friendly_name: str - :param resource_type: App Service resource type meter used for + :param resource_type: App Service ResourceType meter used for :type resource_type: str + :param os_type: App Service OS type meter used for + :type os_type: str """ _validation = { @@ -55,12 +57,14 @@ class BillingMeter(ProxyOnlyResource): 'short_name': {'key': 'properties.shortName', 'type': 'str'}, 'friendly_name': {'key': 'properties.friendlyName', 'type': 'str'}, 'resource_type': {'key': 'properties.resourceType', 'type': 'str'}, + 'os_type': {'key': 'properties.osType', 'type': 'str'}, } - def __init__(self, *, kind: str=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, meter_id: str=None, billing_location: str=None, short_name: str=None, friendly_name: str=None, resource_type: str=None, os_type: str=None, **kwargs) -> None: super(BillingMeter, self).__init__(kind=kind, **kwargs) self.meter_id = meter_id self.billing_location = billing_location self.short_name = short_name self.friendly_name = friendly_name self.resource_type = resource_type + self.os_type = os_type diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate.py b/azure-mgmt-web/azure/mgmt/web/models/certificate.py index bdf7ba410ff1..bd2c25e366d8 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate.py @@ -76,8 +76,6 @@ class Certificate(Resource): 'Unknown' :vartype key_vault_secret_status: str or ~azure.mgmt.web.models.KeyVaultSecretStatus - :ivar geo_region: Region of the certificate. - :vartype geo_region: str :param server_farm_id: Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". @@ -103,7 +101,6 @@ class Certificate(Resource): 'public_key_hash': {'readonly': True}, 'hosting_environment_profile': {'readonly': True}, 'key_vault_secret_status': {'readonly': True}, - 'geo_region': {'readonly': True}, } _attribute_map = { @@ -131,7 +128,6 @@ class Certificate(Resource): 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, 'key_vault_secret_status': {'key': 'properties.keyVaultSecretStatus', 'type': 'KeyVaultSecretStatus'}, - 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, } @@ -155,5 +151,4 @@ def __init__(self, **kwargs): self.key_vault_id = kwargs.get('key_vault_id', None) self.key_vault_secret_name = kwargs.get('key_vault_secret_name', None) self.key_vault_secret_status = None - self.geo_region = None self.server_farm_id = kwargs.get('server_farm_id', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action.py b/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action.py index 90b968f54f3f..2331dd37d7f8 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action.py @@ -26,22 +26,24 @@ class CertificateOrderAction(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param certificate_order_action_type: Action type. Possible values - include: 'CertificateIssued', 'CertificateOrderCanceled', + :ivar action_type: Action type. Possible values include: + 'CertificateIssued', 'CertificateOrderCanceled', 'CertificateOrderCreated', 'CertificateRevoked', 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired', 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown' - :type certificate_order_action_type: str or + :vartype action_type: str or ~azure.mgmt.web.models.CertificateOrderActionType - :param created_at: Time at which the certificate action was performed. - :type created_at: datetime + :ivar created_at: Time at which the certificate action was performed. + :vartype created_at: datetime """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'action_type': {'readonly': True}, + 'created_at': {'readonly': True}, } _attribute_map = { @@ -49,11 +51,11 @@ class CertificateOrderAction(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'certificate_order_action_type': {'key': 'properties.type', 'type': 'CertificateOrderActionType'}, + 'action_type': {'key': 'properties.actionType', 'type': 'CertificateOrderActionType'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, } def __init__(self, **kwargs): super(CertificateOrderAction, self).__init__(**kwargs) - self.certificate_order_action_type = kwargs.get('certificate_order_action_type', None) - self.created_at = kwargs.get('created_at', None) + self.action_type = None + self.created_at = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action_py3.py b/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action_py3.py index 775fdbd427db..d6bc846e4ab1 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate_order_action_py3.py @@ -26,22 +26,24 @@ class CertificateOrderAction(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param certificate_order_action_type: Action type. Possible values - include: 'CertificateIssued', 'CertificateOrderCanceled', + :ivar action_type: Action type. Possible values include: + 'CertificateIssued', 'CertificateOrderCanceled', 'CertificateOrderCreated', 'CertificateRevoked', 'DomainValidationComplete', 'FraudDetected', 'OrgNameChange', 'OrgValidationComplete', 'SanDrop', 'FraudCleared', 'CertificateExpired', 'CertificateExpirationWarning', 'FraudDocumentationRequired', 'Unknown' - :type certificate_order_action_type: str or + :vartype action_type: str or ~azure.mgmt.web.models.CertificateOrderActionType - :param created_at: Time at which the certificate action was performed. - :type created_at: datetime + :ivar created_at: Time at which the certificate action was performed. + :vartype created_at: datetime """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'action_type': {'readonly': True}, + 'created_at': {'readonly': True}, } _attribute_map = { @@ -49,11 +51,11 @@ class CertificateOrderAction(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'certificate_order_action_type': {'key': 'properties.type', 'type': 'CertificateOrderActionType'}, + 'action_type': {'key': 'properties.actionType', 'type': 'CertificateOrderActionType'}, 'created_at': {'key': 'properties.createdAt', 'type': 'iso-8601'}, } - def __init__(self, *, kind: str=None, certificate_order_action_type=None, created_at=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, **kwargs) -> None: super(CertificateOrderAction, self).__init__(kind=kind, **kwargs) - self.certificate_order_action_type = certificate_order_action_type - self.created_at = created_at + self.action_type = None + self.created_at = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate_patch_resource.py b/azure-mgmt-web/azure/mgmt/web/models/certificate_patch_resource.py index 9ea811e73399..00640f893069 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate_patch_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate_patch_resource.py @@ -72,8 +72,6 @@ class CertificatePatchResource(ProxyOnlyResource): 'Unknown' :vartype key_vault_secret_status: str or ~azure.mgmt.web.models.KeyVaultSecretStatus - :ivar geo_region: Region of the certificate. - :vartype geo_region: str :param server_farm_id: Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". @@ -98,7 +96,6 @@ class CertificatePatchResource(ProxyOnlyResource): 'public_key_hash': {'readonly': True}, 'hosting_environment_profile': {'readonly': True}, 'key_vault_secret_status': {'readonly': True}, - 'geo_region': {'readonly': True}, } _attribute_map = { @@ -124,7 +121,6 @@ class CertificatePatchResource(ProxyOnlyResource): 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, 'key_vault_secret_status': {'key': 'properties.keyVaultSecretStatus', 'type': 'KeyVaultSecretStatus'}, - 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, } @@ -148,5 +144,4 @@ def __init__(self, **kwargs): self.key_vault_id = kwargs.get('key_vault_id', None) self.key_vault_secret_name = kwargs.get('key_vault_secret_name', None) self.key_vault_secret_status = None - self.geo_region = None self.server_farm_id = kwargs.get('server_farm_id', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate_patch_resource_py3.py b/azure-mgmt-web/azure/mgmt/web/models/certificate_patch_resource_py3.py index b583592cbe24..afe00d21362b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate_patch_resource_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate_patch_resource_py3.py @@ -72,8 +72,6 @@ class CertificatePatchResource(ProxyOnlyResource): 'Unknown' :vartype key_vault_secret_status: str or ~azure.mgmt.web.models.KeyVaultSecretStatus - :ivar geo_region: Region of the certificate. - :vartype geo_region: str :param server_farm_id: Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". @@ -98,7 +96,6 @@ class CertificatePatchResource(ProxyOnlyResource): 'public_key_hash': {'readonly': True}, 'hosting_environment_profile': {'readonly': True}, 'key_vault_secret_status': {'readonly': True}, - 'geo_region': {'readonly': True}, } _attribute_map = { @@ -124,7 +121,6 @@ class CertificatePatchResource(ProxyOnlyResource): 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, 'key_vault_secret_status': {'key': 'properties.keyVaultSecretStatus', 'type': 'KeyVaultSecretStatus'}, - 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, } @@ -148,5 +144,4 @@ def __init__(self, *, password: str, kind: str=None, host_names=None, pfx_blob: self.key_vault_id = key_vault_id self.key_vault_secret_name = key_vault_secret_name self.key_vault_secret_status = None - self.geo_region = None self.server_farm_id = server_farm_id diff --git a/azure-mgmt-web/azure/mgmt/web/models/certificate_py3.py b/azure-mgmt-web/azure/mgmt/web/models/certificate_py3.py index e3878b9bf774..e18577a8f98c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/certificate_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/certificate_py3.py @@ -76,8 +76,6 @@ class Certificate(Resource): 'Unknown' :vartype key_vault_secret_status: str or ~azure.mgmt.web.models.KeyVaultSecretStatus - :ivar geo_region: Region of the certificate. - :vartype geo_region: str :param server_farm_id: Resource ID of the associated App Service plan, formatted as: "/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}". @@ -103,7 +101,6 @@ class Certificate(Resource): 'public_key_hash': {'readonly': True}, 'hosting_environment_profile': {'readonly': True}, 'key_vault_secret_status': {'readonly': True}, - 'geo_region': {'readonly': True}, } _attribute_map = { @@ -131,7 +128,6 @@ class Certificate(Resource): 'key_vault_id': {'key': 'properties.keyVaultId', 'type': 'str'}, 'key_vault_secret_name': {'key': 'properties.keyVaultSecretName', 'type': 'str'}, 'key_vault_secret_status': {'key': 'properties.keyVaultSecretStatus', 'type': 'KeyVaultSecretStatus'}, - 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, } @@ -155,5 +151,4 @@ def __init__(self, *, location: str, password: str, kind: str=None, tags=None, h self.key_vault_id = key_vault_id self.key_vault_secret_name = key_vault_secret_name self.key_vault_secret_status = None - self.geo_region = None self.server_farm_id = server_farm_id diff --git a/azure-mgmt-web/azure/mgmt/web/models/cloning_info.py b/azure-mgmt-web/azure/mgmt/web/models/cloning_info.py index 233f7df1599c..8402c4680845 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/cloning_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/cloning_info.py @@ -55,9 +55,6 @@ class CloningInfo(Model): create. This is only needed if Traffic Manager profile does not already exist. :type traffic_manager_profile_name: str - :param ignore_quotas: true if quotas should be ignored; - otherwise, false. - :type ignore_quotas: bool """ _validation = { @@ -75,7 +72,6 @@ class CloningInfo(Model): 'configure_load_balancing': {'key': 'configureLoadBalancing', 'type': 'bool'}, 'traffic_manager_profile_id': {'key': 'trafficManagerProfileId', 'type': 'str'}, 'traffic_manager_profile_name': {'key': 'trafficManagerProfileName', 'type': 'str'}, - 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -90,4 +86,3 @@ def __init__(self, **kwargs): self.configure_load_balancing = kwargs.get('configure_load_balancing', None) self.traffic_manager_profile_id = kwargs.get('traffic_manager_profile_id', None) self.traffic_manager_profile_name = kwargs.get('traffic_manager_profile_name', None) - self.ignore_quotas = kwargs.get('ignore_quotas', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/cloning_info_py3.py b/azure-mgmt-web/azure/mgmt/web/models/cloning_info_py3.py index 2540e9b3dd8f..1fbc28e74499 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/cloning_info_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/cloning_info_py3.py @@ -55,9 +55,6 @@ class CloningInfo(Model): create. This is only needed if Traffic Manager profile does not already exist. :type traffic_manager_profile_name: str - :param ignore_quotas: true if quotas should be ignored; - otherwise, false. - :type ignore_quotas: bool """ _validation = { @@ -75,10 +72,9 @@ class CloningInfo(Model): 'configure_load_balancing': {'key': 'configureLoadBalancing', 'type': 'bool'}, 'traffic_manager_profile_id': {'key': 'trafficManagerProfileId', 'type': 'str'}, 'traffic_manager_profile_name': {'key': 'trafficManagerProfileName', 'type': 'str'}, - 'ignore_quotas': {'key': 'ignoreQuotas', 'type': 'bool'}, } - def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, ignore_quotas: bool=None, **kwargs) -> None: + def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrite: bool=None, clone_custom_host_names: bool=None, clone_source_control: bool=None, hosting_environment: str=None, app_settings_overrides=None, configure_load_balancing: bool=None, traffic_manager_profile_id: str=None, traffic_manager_profile_name: str=None, **kwargs) -> None: super(CloningInfo, self).__init__(**kwargs) self.correlation_id = correlation_id self.overwrite = overwrite @@ -90,4 +86,3 @@ def __init__(self, *, source_web_app_id: str, correlation_id: str=None, overwrit self.configure_load_balancing = configure_load_balancing self.traffic_manager_profile_id = traffic_manager_profile_id self.traffic_manager_profile_name = traffic_manager_profile_name - self.ignore_quotas = ignore_quotas diff --git a/azure-mgmt-web/azure/mgmt/web/models/continuous_web_job.py b/azure-mgmt-web/azure/mgmt/web/models/continuous_web_job.py index 5e3e2d22cce5..fa05a6d53c26 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/continuous_web_job.py +++ b/azure-mgmt-web/azure/mgmt/web/models/continuous_web_job.py @@ -33,18 +33,15 @@ class ContinuousWebJob(ProxyOnlyResource): :type detailed_status: str :param log_url: Log URL. :type log_url: str - :ivar continuous_web_job_name: Job name. Used as job identifier in ARM - resource URI. - :vartype continuous_web_job_name: str :param run_command: Run command. :type run_command: str :param url: Job URL. :type url: str :param extra_info_url: Extra Info URL. :type extra_info_url: str - :param job_type: Job type. Possible values include: 'Continuous', + :param web_job_type: Job type. Possible values include: 'Continuous', 'Triggered' - :type job_type: str or ~azure.mgmt.web.models.WebJobType + :type web_job_type: str or ~azure.mgmt.web.models.WebJobType :param error: Error information. :type error: str :param using_sdk: Using SDK? @@ -57,7 +54,6 @@ class ContinuousWebJob(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'continuous_web_job_name': {'readonly': True}, } _attribute_map = { @@ -66,15 +62,14 @@ class ContinuousWebJob(ProxyOnlyResource): 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'ContinuousWebJobStatus'}, - 'detailed_status': {'key': 'properties.detailedStatus', 'type': 'str'}, - 'log_url': {'key': 'properties.logUrl', 'type': 'str'}, - 'continuous_web_job_name': {'key': 'properties.name', 'type': 'str'}, - 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, + 'detailed_status': {'key': 'properties.detailed_status', 'type': 'str'}, + 'log_url': {'key': 'properties.log_url', 'type': 'str'}, + 'run_command': {'key': 'properties.run_command', 'type': 'str'}, 'url': {'key': 'properties.url', 'type': 'str'}, - 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, - 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, + 'extra_info_url': {'key': 'properties.extra_info_url', 'type': 'str'}, + 'web_job_type': {'key': 'properties.web_job_type', 'type': 'WebJobType'}, 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': '{object}'}, } @@ -83,11 +78,10 @@ def __init__(self, **kwargs): self.status = kwargs.get('status', None) self.detailed_status = kwargs.get('detailed_status', None) self.log_url = kwargs.get('log_url', None) - self.continuous_web_job_name = None self.run_command = kwargs.get('run_command', None) self.url = kwargs.get('url', None) self.extra_info_url = kwargs.get('extra_info_url', None) - self.job_type = kwargs.get('job_type', None) + self.web_job_type = kwargs.get('web_job_type', None) self.error = kwargs.get('error', None) self.using_sdk = kwargs.get('using_sdk', None) self.settings = kwargs.get('settings', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/continuous_web_job_py3.py b/azure-mgmt-web/azure/mgmt/web/models/continuous_web_job_py3.py index 8124a7dc494f..4dcc908c916a 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/continuous_web_job_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/continuous_web_job_py3.py @@ -33,18 +33,15 @@ class ContinuousWebJob(ProxyOnlyResource): :type detailed_status: str :param log_url: Log URL. :type log_url: str - :ivar continuous_web_job_name: Job name. Used as job identifier in ARM - resource URI. - :vartype continuous_web_job_name: str :param run_command: Run command. :type run_command: str :param url: Job URL. :type url: str :param extra_info_url: Extra Info URL. :type extra_info_url: str - :param job_type: Job type. Possible values include: 'Continuous', + :param web_job_type: Job type. Possible values include: 'Continuous', 'Triggered' - :type job_type: str or ~azure.mgmt.web.models.WebJobType + :type web_job_type: str or ~azure.mgmt.web.models.WebJobType :param error: Error information. :type error: str :param using_sdk: Using SDK? @@ -57,7 +54,6 @@ class ContinuousWebJob(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'continuous_web_job_name': {'readonly': True}, } _attribute_map = { @@ -66,28 +62,26 @@ class ContinuousWebJob(ProxyOnlyResource): 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'ContinuousWebJobStatus'}, - 'detailed_status': {'key': 'properties.detailedStatus', 'type': 'str'}, - 'log_url': {'key': 'properties.logUrl', 'type': 'str'}, - 'continuous_web_job_name': {'key': 'properties.name', 'type': 'str'}, - 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, + 'detailed_status': {'key': 'properties.detailed_status', 'type': 'str'}, + 'log_url': {'key': 'properties.log_url', 'type': 'str'}, + 'run_command': {'key': 'properties.run_command', 'type': 'str'}, 'url': {'key': 'properties.url', 'type': 'str'}, - 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, - 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, + 'extra_info_url': {'key': 'properties.extra_info_url', 'type': 'str'}, + 'web_job_type': {'key': 'properties.web_job_type', 'type': 'WebJobType'}, 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': '{object}'}, } - def __init__(self, *, kind: str=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, status=None, detailed_status: str=None, log_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: super(ContinuousWebJob, self).__init__(kind=kind, **kwargs) self.status = status self.detailed_status = detailed_status self.log_url = log_url - self.continuous_web_job_name = None self.run_command = run_command self.url = url self.extra_info_url = extra_info_url - self.job_type = job_type + self.web_job_type = web_job_type self.error = error self.using_sdk = using_sdk self.settings = settings diff --git a/azure-mgmt-web/azure/mgmt/web/models/deleted_app_restore_request.py b/azure-mgmt-web/azure/mgmt/web/models/deleted_app_restore_request.py new file mode 100644 index 000000000000..0fe0f903f66d --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/deleted_app_restore_request.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 DeletedAppRestoreRequest(ProxyOnlyResource): + """Details about restoring 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 + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param deleted_site_id: ARM resource ID of the deleted app. Example: + /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId} + :type deleted_site_id: str + :param recover_configuration: If true, deleted site configuration, in + addition to content, will be restored. + :type recover_configuration: bool + :param snapshot_time: Point in time to restore the deleted app from, + formatted as a DateTime string. + If unspecified, default value is the time that the app was deleted. + :type snapshot_time: 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'}, + 'deleted_site_id': {'key': 'properties.deletedSiteId', 'type': 'str'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'snapshot_time': {'key': 'properties.snapshotTime', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DeletedAppRestoreRequest, self).__init__(**kwargs) + self.deleted_site_id = kwargs.get('deleted_site_id', None) + self.recover_configuration = kwargs.get('recover_configuration', None) + self.snapshot_time = kwargs.get('snapshot_time', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/deleted_app_restore_request_py3.py b/azure-mgmt-web/azure/mgmt/web/models/deleted_app_restore_request_py3.py new file mode 100644 index 000000000000..69ca457e864b --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/deleted_app_restore_request_py3.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_py3 import ProxyOnlyResource + + +class DeletedAppRestoreRequest(ProxyOnlyResource): + """Details about restoring 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 + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param deleted_site_id: ARM resource ID of the deleted app. Example: + /subscriptions/{subId}/providers/Microsoft.Web/deletedSites/{deletedSiteId} + :type deleted_site_id: str + :param recover_configuration: If true, deleted site configuration, in + addition to content, will be restored. + :type recover_configuration: bool + :param snapshot_time: Point in time to restore the deleted app from, + formatted as a DateTime string. + If unspecified, default value is the time that the app was deleted. + :type snapshot_time: 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'}, + 'deleted_site_id': {'key': 'properties.deletedSiteId', 'type': 'str'}, + 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, + 'snapshot_time': {'key': 'properties.snapshotTime', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, **kwargs) -> None: + super(DeletedAppRestoreRequest, self).__init__(kind=kind, **kwargs) + self.deleted_site_id = deleted_site_id + self.recover_configuration = recover_configuration + self.snapshot_time = snapshot_time diff --git a/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py b/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py index 5aa094a18f0e..b93573234957 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py @@ -18,42 +18,43 @@ class DeletedSite(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param id: Numeric id for the deleted site - :type id: int + :ivar deleted_site_id: Numeric id for the deleted site + :vartype deleted_site_id: int :ivar deleted_timestamp: Time in UTC when the app was deleted. :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 name: Name of the deleted site - :vartype name: str + :ivar deleted_site_name: Name of the deleted site + :vartype deleted_site_name: str :ivar slot: Slot of the deleted site :vartype slot: str """ _validation = { + 'deleted_site_id': {'readonly': True}, 'deleted_timestamp': {'readonly': True}, 'subscription': {'readonly': True}, 'resource_group': {'readonly': True}, - 'name': {'readonly': True}, + 'deleted_site_name': {'readonly': True}, 'slot': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'int'}, + 'deleted_site_id': {'key': 'deletedSiteId', 'type': 'int'}, 'deleted_timestamp': {'key': 'deletedTimestamp', 'type': 'str'}, 'subscription': {'key': 'subscription', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + 'deleted_site_name': {'key': 'deletedSiteName', 'type': 'str'}, 'slot': {'key': 'slot', 'type': 'str'}, } def __init__(self, **kwargs): super(DeletedSite, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + self.deleted_site_id = None self.deleted_timestamp = None self.subscription = None self.resource_group = None - self.name = None + self.deleted_site_name = None self.slot = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/deleted_site_py3.py b/azure-mgmt-web/azure/mgmt/web/models/deleted_site_py3.py index a6d712ebec38..f014d769c5dc 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/deleted_site_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deleted_site_py3.py @@ -18,42 +18,43 @@ class DeletedSite(Model): Variables are only populated by the server, and will be ignored when sending a request. - :param id: Numeric id for the deleted site - :type id: int + :ivar deleted_site_id: Numeric id for the deleted site + :vartype deleted_site_id: int :ivar deleted_timestamp: Time in UTC when the app was deleted. :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 name: Name of the deleted site - :vartype name: str + :ivar deleted_site_name: Name of the deleted site + :vartype deleted_site_name: str :ivar slot: Slot of the deleted site :vartype slot: str """ _validation = { + 'deleted_site_id': {'readonly': True}, 'deleted_timestamp': {'readonly': True}, 'subscription': {'readonly': True}, 'resource_group': {'readonly': True}, - 'name': {'readonly': True}, + 'deleted_site_name': {'readonly': True}, 'slot': {'readonly': True}, } _attribute_map = { - 'id': {'key': 'id', 'type': 'int'}, + 'deleted_site_id': {'key': 'deletedSiteId', 'type': 'int'}, 'deleted_timestamp': {'key': 'deletedTimestamp', 'type': 'str'}, 'subscription': {'key': 'subscription', 'type': 'str'}, 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, + 'deleted_site_name': {'key': 'deletedSiteName', 'type': 'str'}, 'slot': {'key': 'slot', 'type': 'str'}, } - def __init__(self, *, id: int=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(DeletedSite, self).__init__(**kwargs) - self.id = id + self.deleted_site_id = None self.deleted_timestamp = None self.subscription = None self.resource_group = None - self.name = None + self.deleted_site_name = None self.slot = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/deployment.py b/azure-mgmt-web/azure/mgmt/web/models/deployment.py index c6ab92e0e999..75a3a6e26b9e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/deployment.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deployment.py @@ -26,8 +26,6 @@ class Deployment(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param deployment_id: Identifier for deployment. - :type deployment_id: str :param status: Deployment status. :type status: int :param message: Details about deployment status. @@ -60,21 +58,19 @@ class Deployment(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'deployment_id': {'key': 'properties.id', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'int'}, 'message': {'key': 'properties.message', 'type': 'str'}, 'author': {'key': 'properties.author', 'type': 'str'}, 'deployer': {'key': 'properties.deployer', 'type': 'str'}, - 'author_email': {'key': 'properties.authorEmail', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'author_email': {'key': 'properties.author_email', 'type': 'str'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.end_time', 'type': 'iso-8601'}, 'active': {'key': 'properties.active', 'type': 'bool'}, 'details': {'key': 'properties.details', 'type': 'str'}, } def __init__(self, **kwargs): super(Deployment, self).__init__(**kwargs) - self.deployment_id = kwargs.get('deployment_id', None) self.status = kwargs.get('status', None) self.message = kwargs.get('message', None) self.author = kwargs.get('author', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/deployment_py3.py b/azure-mgmt-web/azure/mgmt/web/models/deployment_py3.py index d5f75d46699f..abc4448dc021 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/deployment_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deployment_py3.py @@ -26,8 +26,6 @@ class Deployment(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param deployment_id: Identifier for deployment. - :type deployment_id: str :param status: Deployment status. :type status: int :param message: Details about deployment status. @@ -60,21 +58,19 @@ class Deployment(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'deployment_id': {'key': 'properties.id', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'int'}, 'message': {'key': 'properties.message', 'type': 'str'}, 'author': {'key': 'properties.author', 'type': 'str'}, 'deployer': {'key': 'properties.deployer', 'type': 'str'}, - 'author_email': {'key': 'properties.authorEmail', 'type': 'str'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'author_email': {'key': 'properties.author_email', 'type': 'str'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.end_time', 'type': 'iso-8601'}, 'active': {'key': 'properties.active', 'type': 'bool'}, 'details': {'key': 'properties.details', 'type': 'str'}, } - def __init__(self, *, kind: str=None, deployment_id: str=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, status: int=None, message: str=None, author: str=None, deployer: str=None, author_email: str=None, start_time=None, end_time=None, active: bool=None, details: str=None, **kwargs) -> None: super(Deployment, self).__init__(kind=kind, **kwargs) - self.deployment_id = deployment_id self.status = status self.message = message self.author = author diff --git a/azure-mgmt-web/azure/mgmt/web/models/error_response.py b/azure-mgmt-web/azure/mgmt/web/models/error_response.py deleted file mode 100644 index e20829bcf7b2..000000000000 --- a/azure-mgmt-web/azure/mgmt/web/models/error_response.py +++ /dev/null @@ -1,45 +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 -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error Response. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ErrorResponse, self).__init__(**kwargs) - self.code = kwargs.get('code', None) - self.message = kwargs.get('message', None) - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-web/azure/mgmt/web/models/error_response_py3.py b/azure-mgmt-web/azure/mgmt/web/models/error_response_py3.py deleted file mode 100644 index 1b2f05f1d4d6..000000000000 --- a/azure-mgmt-web/azure/mgmt/web/models/error_response_py3.py +++ /dev/null @@ -1,45 +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 -from msrest.exceptions import HttpOperationError - - -class ErrorResponse(Model): - """Error Response. - - :param code: Error code. - :type code: str - :param message: Error message indicating why the operation failed. - :type message: str - """ - - _attribute_map = { - 'code': {'key': 'code', 'type': 'str'}, - 'message': {'key': 'message', 'type': 'str'}, - } - - def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: - super(ErrorResponse, self).__init__(**kwargs) - self.code = code - self.message = message - - -class ErrorResponseException(HttpOperationError): - """Server responsed with exception of type: 'ErrorResponse'. - - :param deserialize: A deserializer - :param response: Server response to be deserialized. - """ - - def __init__(self, deserialize, response, *args): - - super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-web/azure/mgmt/web/models/function_envelope.py b/azure-mgmt-web/azure/mgmt/web/models/function_envelope.py index 6e19dd9fb439..94725f15457b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/function_envelope.py +++ b/azure-mgmt-web/azure/mgmt/web/models/function_envelope.py @@ -26,10 +26,8 @@ class FunctionEnvelope(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :ivar function_envelope_name: Function name. - :vartype function_envelope_name: str - :ivar function_app_id: Function App ID. - :vartype function_app_id: str + :param function_app_id: Function App ID. + :type function_app_id: str :param script_root_path_href: Script root path URI. :type script_root_path_href: str :param script_href: Script URI. @@ -52,8 +50,6 @@ class FunctionEnvelope(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'function_envelope_name': {'readonly': True}, - 'function_app_id': {'readonly': True}, } _attribute_map = { @@ -61,22 +57,20 @@ class FunctionEnvelope(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'function_envelope_name': {'key': 'properties.name', 'type': 'str'}, - 'function_app_id': {'key': 'properties.functionAppId', 'type': 'str'}, - 'script_root_path_href': {'key': 'properties.scriptRootPathHref', 'type': 'str'}, - 'script_href': {'key': 'properties.scriptHref', 'type': 'str'}, - 'config_href': {'key': 'properties.configHref', 'type': 'str'}, - 'secrets_file_href': {'key': 'properties.secretsFileHref', 'type': 'str'}, + 'function_app_id': {'key': 'properties.function_app_id', 'type': 'str'}, + 'script_root_path_href': {'key': 'properties.script_root_path_href', 'type': 'str'}, + 'script_href': {'key': 'properties.script_href', 'type': 'str'}, + 'config_href': {'key': 'properties.config_href', 'type': 'str'}, + 'secrets_file_href': {'key': 'properties.secrets_file_href', 'type': 'str'}, 'href': {'key': 'properties.href', 'type': 'str'}, 'config': {'key': 'properties.config', 'type': 'object'}, 'files': {'key': 'properties.files', 'type': '{str}'}, - 'test_data': {'key': 'properties.testData', 'type': 'str'}, + 'test_data': {'key': 'properties.test_data', 'type': 'str'}, } def __init__(self, **kwargs): super(FunctionEnvelope, self).__init__(**kwargs) - self.function_envelope_name = None - self.function_app_id = None + self.function_app_id = kwargs.get('function_app_id', None) self.script_root_path_href = kwargs.get('script_root_path_href', None) self.script_href = kwargs.get('script_href', None) self.config_href = kwargs.get('config_href', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/function_envelope_py3.py b/azure-mgmt-web/azure/mgmt/web/models/function_envelope_py3.py index 2386521c5fa8..4cc49ab6b0aa 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/function_envelope_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/function_envelope_py3.py @@ -26,10 +26,8 @@ class FunctionEnvelope(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :ivar function_envelope_name: Function name. - :vartype function_envelope_name: str - :ivar function_app_id: Function App ID. - :vartype function_app_id: str + :param function_app_id: Function App ID. + :type function_app_id: str :param script_root_path_href: Script root path URI. :type script_root_path_href: str :param script_href: Script URI. @@ -52,8 +50,6 @@ class FunctionEnvelope(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'function_envelope_name': {'readonly': True}, - 'function_app_id': {'readonly': True}, } _attribute_map = { @@ -61,22 +57,20 @@ class FunctionEnvelope(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'function_envelope_name': {'key': 'properties.name', 'type': 'str'}, - 'function_app_id': {'key': 'properties.functionAppId', 'type': 'str'}, - 'script_root_path_href': {'key': 'properties.scriptRootPathHref', 'type': 'str'}, - 'script_href': {'key': 'properties.scriptHref', 'type': 'str'}, - 'config_href': {'key': 'properties.configHref', 'type': 'str'}, - 'secrets_file_href': {'key': 'properties.secretsFileHref', 'type': 'str'}, + 'function_app_id': {'key': 'properties.function_app_id', 'type': 'str'}, + 'script_root_path_href': {'key': 'properties.script_root_path_href', 'type': 'str'}, + 'script_href': {'key': 'properties.script_href', 'type': 'str'}, + 'config_href': {'key': 'properties.config_href', 'type': 'str'}, + 'secrets_file_href': {'key': 'properties.secrets_file_href', 'type': 'str'}, 'href': {'key': 'properties.href', 'type': 'str'}, 'config': {'key': 'properties.config', 'type': 'object'}, 'files': {'key': 'properties.files', 'type': '{str}'}, - 'test_data': {'key': 'properties.testData', 'type': 'str'}, + 'test_data': {'key': 'properties.test_data', 'type': 'str'}, } - def __init__(self, *, kind: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, function_app_id: str=None, script_root_path_href: str=None, script_href: str=None, config_href: str=None, secrets_file_href: str=None, href: str=None, config=None, files=None, test_data: str=None, **kwargs) -> None: super(FunctionEnvelope, self).__init__(kind=kind, **kwargs) - self.function_envelope_name = None - self.function_app_id = None + self.function_app_id = function_app_id self.script_root_path_href = script_root_path_href self.script_href = script_href self.config_href = config_href diff --git a/azure-mgmt-web/azure/mgmt/web/models/function_secrets.py b/azure-mgmt-web/azure/mgmt/web/models/function_secrets.py index 6f0746e1e7c8..aab991c49289 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/function_secrets.py +++ b/azure-mgmt-web/azure/mgmt/web/models/function_secrets.py @@ -44,7 +44,7 @@ class FunctionSecrets(ProxyOnlyResource): 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'key': {'key': 'properties.key', 'type': 'str'}, - 'trigger_url': {'key': 'properties.triggerUrl', 'type': 'str'}, + 'trigger_url': {'key': 'properties.trigger_url', 'type': 'str'}, } def __init__(self, **kwargs): diff --git a/azure-mgmt-web/azure/mgmt/web/models/function_secrets_py3.py b/azure-mgmt-web/azure/mgmt/web/models/function_secrets_py3.py index 6b351eae0cbe..e559db2773b6 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/function_secrets_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/function_secrets_py3.py @@ -44,7 +44,7 @@ class FunctionSecrets(ProxyOnlyResource): 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'key': {'key': 'properties.key', 'type': 'str'}, - 'trigger_url': {'key': 'properties.triggerUrl', 'type': 'str'}, + 'trigger_url': {'key': 'properties.trigger_url', 'type': 'str'}, } def __init__(self, *, kind: str=None, key: str=None, trigger_url: str=None, **kwargs) -> None: diff --git a/azure-mgmt-web/azure/mgmt/web/models/geo_region.py b/azure-mgmt-web/azure/mgmt/web/models/geo_region.py index c59c3987e0f5..2bc435a404a8 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/geo_region.py +++ b/azure-mgmt-web/azure/mgmt/web/models/geo_region.py @@ -26,8 +26,6 @@ class GeoRegion(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :ivar geo_region_name: Region name. - :vartype geo_region_name: str :ivar description: Region description. :vartype description: str :ivar display_name: Display name for region. @@ -38,7 +36,6 @@ class GeoRegion(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'geo_region_name': {'readonly': True}, 'description': {'readonly': True}, 'display_name': {'readonly': True}, } @@ -48,13 +45,11 @@ class GeoRegion(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', '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, **kwargs): super(GeoRegion, self).__init__(**kwargs) - self.geo_region_name = None self.description = None self.display_name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/geo_region_py3.py b/azure-mgmt-web/azure/mgmt/web/models/geo_region_py3.py index 2729ae2b843d..774b350eb460 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/geo_region_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/geo_region_py3.py @@ -26,8 +26,6 @@ class GeoRegion(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :ivar geo_region_name: Region name. - :vartype geo_region_name: str :ivar description: Region description. :vartype description: str :ivar display_name: Display name for region. @@ -38,7 +36,6 @@ class GeoRegion(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'geo_region_name': {'readonly': True}, 'description': {'readonly': True}, 'display_name': {'readonly': True}, } @@ -48,13 +45,11 @@ class GeoRegion(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', '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, *, kind: str=None, **kwargs) -> None: super(GeoRegion, self).__init__(kind=kind, **kwargs) - self.geo_region_name = None self.description = None self.display_name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/ip_security_restriction.py b/azure-mgmt-web/azure/mgmt/web/models/ip_security_restriction.py index 5a1b16ba64d4..d74f523c3fe7 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/ip_security_restriction.py +++ b/azure-mgmt-web/azure/mgmt/web/models/ip_security_restriction.py @@ -19,10 +19,25 @@ class IpSecurityRestriction(Model): :param ip_address: Required. IP address the security restriction is valid for. + It can be in form of pure ipv4 address (required SubnetMask property) or + CIDR notation such as ipv4/mask (leading bit match). For CIDR, + SubnetMask property must not be specified. :type ip_address: str :param subnet_mask: Subnet mask for the range of IP addresses the restriction is valid for. :type subnet_mask: str + :param action: Allow or Deny access for this IP range. + :type action: str + :param tag: Defines what this IP filter will be used for. This is to + support IP filtering on proxies. Possible values include: 'Default', + 'XffProxy' + :type tag: str or ~azure.mgmt.web.models.IpFilterTag + :param priority: Priority of IP restriction rule. + :type priority: int + :param name: IP restriction rule name. + :type name: str + :param description: IP restriction rule description. + :type description: str """ _validation = { @@ -32,9 +47,19 @@ class IpSecurityRestriction(Model): _attribute_map = { 'ip_address': {'key': 'ipAddress', 'type': 'str'}, 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'IpFilterTag'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } def __init__(self, **kwargs): super(IpSecurityRestriction, self).__init__(**kwargs) self.ip_address = kwargs.get('ip_address', None) self.subnet_mask = kwargs.get('subnet_mask', None) + self.action = kwargs.get('action', None) + self.tag = kwargs.get('tag', None) + self.priority = kwargs.get('priority', None) + self.name = kwargs.get('name', None) + self.description = kwargs.get('description', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/ip_security_restriction_py3.py b/azure-mgmt-web/azure/mgmt/web/models/ip_security_restriction_py3.py index 1abf651f9978..a494599a9ba0 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/ip_security_restriction_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/ip_security_restriction_py3.py @@ -19,10 +19,25 @@ class IpSecurityRestriction(Model): :param ip_address: Required. IP address the security restriction is valid for. + It can be in form of pure ipv4 address (required SubnetMask property) or + CIDR notation such as ipv4/mask (leading bit match). For CIDR, + SubnetMask property must not be specified. :type ip_address: str :param subnet_mask: Subnet mask for the range of IP addresses the restriction is valid for. :type subnet_mask: str + :param action: Allow or Deny access for this IP range. + :type action: str + :param tag: Defines what this IP filter will be used for. This is to + support IP filtering on proxies. Possible values include: 'Default', + 'XffProxy' + :type tag: str or ~azure.mgmt.web.models.IpFilterTag + :param priority: Priority of IP restriction rule. + :type priority: int + :param name: IP restriction rule name. + :type name: str + :param description: IP restriction rule description. + :type description: str """ _validation = { @@ -32,9 +47,19 @@ class IpSecurityRestriction(Model): _attribute_map = { 'ip_address': {'key': 'ipAddress', 'type': 'str'}, 'subnet_mask': {'key': 'subnetMask', 'type': 'str'}, + 'action': {'key': 'action', 'type': 'str'}, + 'tag': {'key': 'tag', 'type': 'IpFilterTag'}, + 'priority': {'key': 'priority', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, *, ip_address: str, subnet_mask: str=None, **kwargs) -> None: + def __init__(self, *, ip_address: str, subnet_mask: str=None, action: str=None, tag=None, priority: int=None, name: str=None, description: str=None, **kwargs) -> None: super(IpSecurityRestriction, self).__init__(**kwargs) self.ip_address = ip_address self.subnet_mask = subnet_mask + self.action = action + self.tag = tag + self.priority = priority + self.name = name + self.description = description diff --git a/azure-mgmt-web/azure/mgmt/web/models/log_specification.py b/azure-mgmt-web/azure/mgmt/web/models/log_specification.py new file mode 100644 index 000000000000..77ec75c5496a --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/log_specification.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 LogSpecification(Model): + """Log Definition of a single resource metric. + + :param name: + :type name: str + :param display_name: + :type display_name: str + :param blob_duration: + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LogSpecification, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display_name = kwargs.get('display_name', None) + self.blob_duration = kwargs.get('blob_duration', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/log_specification_py3.py b/azure-mgmt-web/azure/mgmt/web/models/log_specification_py3.py new file mode 100644 index 000000000000..8c9ae74d7f86 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/log_specification_py3.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 LogSpecification(Model): + """Log Definition of a single resource metric. + + :param name: + :type name: str + :param display_name: + :type display_name: str + :param blob_duration: + :type blob_duration: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'blob_duration': {'key': 'blobDuration', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, display_name: str=None, blob_duration: str=None, **kwargs) -> None: + super(LogSpecification, self).__init__(**kwargs) + self.name = name + self.display_name = display_name + self.blob_duration = blob_duration diff --git a/azure-mgmt-web/azure/mgmt/web/models/managed_service_identity.py b/azure-mgmt-web/azure/mgmt/web/models/managed_service_identity.py index 3b89a39c5cc1..d9f06eedc9e5 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/managed_service_identity.py +++ b/azure-mgmt-web/azure/mgmt/web/models/managed_service_identity.py @@ -19,12 +19,14 @@ class ManagedServiceIdentity(Model): sending a request. :param type: Type of managed service identity. Possible values include: - 'SystemAssigned' + 'SystemAssigned', 'UserAssigned' :type type: str or ~azure.mgmt.web.models.ManagedServiceIdentityType :ivar tenant_id: Tenant of managed service identity. :vartype tenant_id: str :ivar principal_id: Principal Id of managed service identity. :vartype principal_id: str + :param identity_ids: Array of UserAssigned managed service identities. + :type identity_ids: list[str] """ _validation = { @@ -36,6 +38,7 @@ class ManagedServiceIdentity(Model): 'type': {'key': 'type', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -43,3 +46,4 @@ def __init__(self, **kwargs): self.type = kwargs.get('type', None) self.tenant_id = None self.principal_id = None + self.identity_ids = kwargs.get('identity_ids', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/managed_service_identity_py3.py b/azure-mgmt-web/azure/mgmt/web/models/managed_service_identity_py3.py index c174551d8f8f..ae59c0b21029 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/managed_service_identity_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/managed_service_identity_py3.py @@ -19,12 +19,14 @@ class ManagedServiceIdentity(Model): sending a request. :param type: Type of managed service identity. Possible values include: - 'SystemAssigned' + 'SystemAssigned', 'UserAssigned' :type type: str or ~azure.mgmt.web.models.ManagedServiceIdentityType :ivar tenant_id: Tenant of managed service identity. :vartype tenant_id: str :ivar principal_id: Principal Id of managed service identity. :vartype principal_id: str + :param identity_ids: Array of UserAssigned managed service identities. + :type identity_ids: list[str] """ _validation = { @@ -36,10 +38,12 @@ class ManagedServiceIdentity(Model): 'type': {'key': 'type', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'identity_ids': {'key': 'identityIds', 'type': '[str]'}, } - def __init__(self, *, type=None, **kwargs) -> None: + def __init__(self, *, type=None, identity_ids=None, **kwargs) -> None: super(ManagedServiceIdentity, self).__init__(**kwargs) self.type = type self.tenant_id = None self.principal_id = None + self.identity_ids = identity_ids diff --git a/azure-mgmt-web/azure/mgmt/web/models/metric_definition.py b/azure-mgmt-web/azure/mgmt/web/models/metric_definition.py index 2c9c99bbc3c7..5dbd639fe069 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/metric_definition.py +++ b/azure-mgmt-web/azure/mgmt/web/models/metric_definition.py @@ -26,8 +26,6 @@ class MetricDefinition(ProxyOnlyResource): :type kind: str :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. :vartype unit: str :ivar primary_aggregation_type: Primary aggregation type. @@ -44,7 +42,6 @@ class MetricDefinition(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'metric_definition_name': {'readonly': True}, 'unit': {'readonly': True}, 'primary_aggregation_type': {'readonly': True}, 'metric_availabilities': {'readonly': True}, @@ -56,7 +53,6 @@ class MetricDefinition(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'metric_definition_name': {'key': 'properties.name', 'type': 'str'}, 'unit': {'key': 'properties.unit', 'type': 'str'}, 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[MetricAvailabilily]'}, @@ -65,7 +61,6 @@ class MetricDefinition(ProxyOnlyResource): def __init__(self, **kwargs): super(MetricDefinition, self).__init__(**kwargs) - self.metric_definition_name = None self.unit = None self.primary_aggregation_type = None self.metric_availabilities = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/metric_definition_py3.py b/azure-mgmt-web/azure/mgmt/web/models/metric_definition_py3.py index b5cdff7d4618..0771757d742d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/metric_definition_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/metric_definition_py3.py @@ -26,8 +26,6 @@ class MetricDefinition(ProxyOnlyResource): :type kind: str :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. :vartype unit: str :ivar primary_aggregation_type: Primary aggregation type. @@ -44,7 +42,6 @@ class MetricDefinition(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'metric_definition_name': {'readonly': True}, 'unit': {'readonly': True}, 'primary_aggregation_type': {'readonly': True}, 'metric_availabilities': {'readonly': True}, @@ -56,7 +53,6 @@ class MetricDefinition(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'metric_definition_name': {'key': 'properties.name', 'type': 'str'}, 'unit': {'key': 'properties.unit', 'type': 'str'}, 'primary_aggregation_type': {'key': 'properties.primaryAggregationType', 'type': 'str'}, 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[MetricAvailabilily]'}, @@ -65,7 +61,6 @@ class MetricDefinition(ProxyOnlyResource): def __init__(self, *, kind: str=None, **kwargs) -> None: super(MetricDefinition, self).__init__(kind=kind, **kwargs) - self.metric_definition_name = None self.unit = None self.primary_aggregation_type = None self.metric_availabilities = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample.py b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample.py index 59350baef1e9..83a1d71f9571 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample.py +++ b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample.py @@ -21,15 +21,12 @@ 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, **kwargs): @@ -37,4 +34,3 @@ def __init__(self, **kwargs): self.time = kwargs.get('time', None) self.instance_name = kwargs.get('instance_name', None) self.value = kwargs.get('value', None) - self.core_count = kwargs.get('core_count', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample_py3.py b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample_py3.py index ecd677f263f1..106ee15ca2fd 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/perf_mon_sample_py3.py @@ -21,20 +21,16 @@ 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: str=None, value: float=None, core_count: int=None, **kwargs) -> None: + def __init__(self, *, time=None, instance_name: str=None, value: float=None, **kwargs) -> None: super(PerfMonSample, self).__init__(**kwargs) 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/premier_add_on.py b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on.py index 443ae16d40e1..e04bf6d23140 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on.py +++ b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on.py @@ -38,12 +38,6 @@ class PremierAddOn(Resource): :type product: str :param vendor: Premier add on Vendor. :type vendor: str - :param premier_add_on_name: Premier add on Name. - :type premier_add_on_name: str - :param premier_add_on_location: Premier add on Location. - :type premier_add_on_location: str - :param premier_add_on_tags: Premier add on Tags. - :type premier_add_on_tags: dict[str, str] :param marketplace_publisher: Premier add on Marketplace publisher. :type marketplace_publisher: str :param marketplace_offer: Premier add on Marketplace offer. @@ -67,9 +61,6 @@ class PremierAddOn(Resource): 'sku': {'key': 'properties.sku', 'type': 'str'}, 'product': {'key': 'properties.product', 'type': 'str'}, 'vendor': {'key': 'properties.vendor', 'type': 'str'}, - 'premier_add_on_name': {'key': 'properties.name', 'type': 'str'}, - 'premier_add_on_location': {'key': 'properties.location', 'type': 'str'}, - 'premier_add_on_tags': {'key': 'properties.tags', 'type': '{str}'}, 'marketplace_publisher': {'key': 'properties.marketplacePublisher', 'type': 'str'}, 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, } @@ -79,8 +70,5 @@ def __init__(self, **kwargs): self.sku = kwargs.get('sku', None) self.product = kwargs.get('product', None) self.vendor = kwargs.get('vendor', None) - self.premier_add_on_name = kwargs.get('premier_add_on_name', None) - self.premier_add_on_location = kwargs.get('premier_add_on_location', None) - self.premier_add_on_tags = kwargs.get('premier_add_on_tags', None) self.marketplace_publisher = kwargs.get('marketplace_publisher', None) self.marketplace_offer = kwargs.get('marketplace_offer', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer.py b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer.py index cbd4e54f5a91..d2cbd4494680 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer.py +++ b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer.py @@ -32,8 +32,6 @@ class PremierAddOnOffer(ProxyOnlyResource): :type product: str :param vendor: Premier add on offer Vendor. :type vendor: str - :param premier_add_on_offer_name: Premier add on offer Name. - :type premier_add_on_offer_name: str :param promo_code_required: true if promotion code is required; otherwise, false. :type promo_code_required: bool @@ -68,7 +66,6 @@ class PremierAddOnOffer(ProxyOnlyResource): 'sku': {'key': 'properties.sku', 'type': 'str'}, 'product': {'key': 'properties.product', 'type': 'str'}, 'vendor': {'key': 'properties.vendor', 'type': 'str'}, - 'premier_add_on_offer_name': {'key': 'properties.name', 'type': 'str'}, 'promo_code_required': {'key': 'properties.promoCodeRequired', 'type': 'bool'}, 'quota': {'key': 'properties.quota', 'type': 'int'}, 'web_hosting_plan_restrictions': {'key': 'properties.webHostingPlanRestrictions', 'type': 'AppServicePlanRestrictions'}, @@ -83,7 +80,6 @@ def __init__(self, **kwargs): self.sku = kwargs.get('sku', None) self.product = kwargs.get('product', None) self.vendor = kwargs.get('vendor', None) - self.premier_add_on_offer_name = kwargs.get('premier_add_on_offer_name', None) self.promo_code_required = kwargs.get('promo_code_required', None) self.quota = kwargs.get('quota', None) self.web_hosting_plan_restrictions = kwargs.get('web_hosting_plan_restrictions', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer_py3.py b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer_py3.py index 277e9f04c4b9..b32044596b64 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_offer_py3.py @@ -32,8 +32,6 @@ class PremierAddOnOffer(ProxyOnlyResource): :type product: str :param vendor: Premier add on offer Vendor. :type vendor: str - :param premier_add_on_offer_name: Premier add on offer Name. - :type premier_add_on_offer_name: str :param promo_code_required: true if promotion code is required; otherwise, false. :type promo_code_required: bool @@ -68,7 +66,6 @@ class PremierAddOnOffer(ProxyOnlyResource): 'sku': {'key': 'properties.sku', 'type': 'str'}, 'product': {'key': 'properties.product', 'type': 'str'}, 'vendor': {'key': 'properties.vendor', 'type': 'str'}, - 'premier_add_on_offer_name': {'key': 'properties.name', 'type': 'str'}, 'promo_code_required': {'key': 'properties.promoCodeRequired', 'type': 'bool'}, 'quota': {'key': 'properties.quota', 'type': 'int'}, 'web_hosting_plan_restrictions': {'key': 'properties.webHostingPlanRestrictions', 'type': 'AppServicePlanRestrictions'}, @@ -78,12 +75,11 @@ class PremierAddOnOffer(ProxyOnlyResource): 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, } - def __init__(self, *, kind: str=None, sku: str=None, product: str=None, vendor: str=None, premier_add_on_offer_name: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, sku: str=None, product: str=None, vendor: str=None, promo_code_required: bool=None, quota: int=None, web_hosting_plan_restrictions=None, privacy_policy_url: str=None, legal_terms_url: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: super(PremierAddOnOffer, self).__init__(kind=kind, **kwargs) self.sku = sku self.product = product self.vendor = vendor - self.premier_add_on_offer_name = premier_add_on_offer_name self.promo_code_required = promo_code_required self.quota = quota self.web_hosting_plan_restrictions = web_hosting_plan_restrictions diff --git a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_patch_resource.py b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_patch_resource.py new file mode 100644 index 000000000000..2365c7546578 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_patch_resource.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource import ProxyOnlyResource + + +class PremierAddOnPatchResource(ProxyOnlyResource): + """ARM resource for a PremierAddOn. + + 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 sku: Premier add on SKU. + :type sku: str + :param product: Premier add on Product. + :type product: str + :param vendor: Premier add on Vendor. + :type vendor: str + :param marketplace_publisher: Premier add on Marketplace publisher. + :type marketplace_publisher: str + :param marketplace_offer: Premier add on Marketplace offer. + :type marketplace_offer: 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'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'vendor': {'key': 'properties.vendor', 'type': 'str'}, + 'marketplace_publisher': {'key': 'properties.marketplacePublisher', 'type': 'str'}, + 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PremierAddOnPatchResource, self).__init__(**kwargs) + self.sku = kwargs.get('sku', None) + self.product = kwargs.get('product', None) + self.vendor = kwargs.get('vendor', None) + self.marketplace_publisher = kwargs.get('marketplace_publisher', None) + self.marketplace_offer = kwargs.get('marketplace_offer', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_patch_resource_py3.py b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_patch_resource_py3.py new file mode 100644 index 000000000000..7f3ef23a46e0 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_patch_resource_py3.py @@ -0,0 +1,65 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource_py3 import ProxyOnlyResource + + +class PremierAddOnPatchResource(ProxyOnlyResource): + """ARM resource for a PremierAddOn. + + 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 sku: Premier add on SKU. + :type sku: str + :param product: Premier add on Product. + :type product: str + :param vendor: Premier add on Vendor. + :type vendor: str + :param marketplace_publisher: Premier add on Marketplace publisher. + :type marketplace_publisher: str + :param marketplace_offer: Premier add on Marketplace offer. + :type marketplace_offer: 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'}, + 'sku': {'key': 'properties.sku', 'type': 'str'}, + 'product': {'key': 'properties.product', 'type': 'str'}, + 'vendor': {'key': 'properties.vendor', 'type': 'str'}, + 'marketplace_publisher': {'key': 'properties.marketplacePublisher', 'type': 'str'}, + 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, + } + + def __init__(self, *, kind: str=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + super(PremierAddOnPatchResource, self).__init__(kind=kind, **kwargs) + self.sku = sku + self.product = product + self.vendor = vendor + self.marketplace_publisher = marketplace_publisher + self.marketplace_offer = marketplace_offer diff --git a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_py3.py b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_py3.py index fa6aceeea48c..e52675f59da8 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/premier_add_on_py3.py @@ -38,12 +38,6 @@ class PremierAddOn(Resource): :type product: str :param vendor: Premier add on Vendor. :type vendor: str - :param premier_add_on_name: Premier add on Name. - :type premier_add_on_name: str - :param premier_add_on_location: Premier add on Location. - :type premier_add_on_location: str - :param premier_add_on_tags: Premier add on Tags. - :type premier_add_on_tags: dict[str, str] :param marketplace_publisher: Premier add on Marketplace publisher. :type marketplace_publisher: str :param marketplace_offer: Premier add on Marketplace offer. @@ -67,20 +61,14 @@ class PremierAddOn(Resource): 'sku': {'key': 'properties.sku', 'type': 'str'}, 'product': {'key': 'properties.product', 'type': 'str'}, 'vendor': {'key': 'properties.vendor', 'type': 'str'}, - 'premier_add_on_name': {'key': 'properties.name', 'type': 'str'}, - 'premier_add_on_location': {'key': 'properties.location', 'type': 'str'}, - 'premier_add_on_tags': {'key': 'properties.tags', 'type': '{str}'}, 'marketplace_publisher': {'key': 'properties.marketplacePublisher', 'type': 'str'}, 'marketplace_offer': {'key': 'properties.marketplaceOffer', 'type': 'str'}, } - def __init__(self, *, location: str, kind: str=None, tags=None, sku: str=None, product: str=None, vendor: str=None, premier_add_on_name: str=None, premier_add_on_location: str=None, premier_add_on_tags=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: + def __init__(self, *, location: str, kind: str=None, tags=None, sku: str=None, product: str=None, vendor: str=None, marketplace_publisher: str=None, marketplace_offer: str=None, **kwargs) -> None: super(PremierAddOn, self).__init__(kind=kind, location=location, tags=tags, **kwargs) self.sku = sku self.product = product self.vendor = vendor - self.premier_add_on_name = premier_add_on_name - self.premier_add_on_location = premier_add_on_location - self.premier_add_on_tags = premier_add_on_tags self.marketplace_publisher = marketplace_publisher self.marketplace_offer = marketplace_offer diff --git a/azure-mgmt-web/azure/mgmt/web/models/restore_response.py b/azure-mgmt-web/azure/mgmt/web/models/private_access.py similarity index 62% rename from azure-mgmt-web/azure/mgmt/web/models/restore_response.py rename to azure-mgmt-web/azure/mgmt/web/models/private_access.py index 2650a39c521b..09aa73f722dc 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/restore_response.py +++ b/azure-mgmt-web/azure/mgmt/web/models/private_access.py @@ -12,8 +12,8 @@ from .proxy_only_resource import ProxyOnlyResource -class RestoreResponse(ProxyOnlyResource): - """Response for an app restore request. +class PrivateAccess(ProxyOnlyResource): + """Description of the parameters of Private Access for a Web Site. Variables are only populated by the server, and will be ignored when sending a request. @@ -26,16 +26,18 @@ class RestoreResponse(ProxyOnlyResource): :type kind: str :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 + :param enabled: Whether private access is enabled or not. + :type enabled: bool + :param virtual_networks: The Virtual Networks (and subnets) allowed to + access the site privately. + :type virtual_networks: + list[~azure.mgmt.web.models.PrivateAccessVirtualNetwork] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'operation_id': {'readonly': True}, } _attribute_map = { @@ -43,9 +45,11 @@ class RestoreResponse(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'virtual_networks': {'key': 'properties.virtualNetworks', 'type': '[PrivateAccessVirtualNetwork]'}, } def __init__(self, **kwargs): - super(RestoreResponse, self).__init__(**kwargs) - self.operation_id = None + super(PrivateAccess, self).__init__(**kwargs) + self.enabled = kwargs.get('enabled', None) + self.virtual_networks = kwargs.get('virtual_networks', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/restore_response_py3.py b/azure-mgmt-web/azure/mgmt/web/models/private_access_py3.py similarity index 59% rename from azure-mgmt-web/azure/mgmt/web/models/restore_response_py3.py rename to azure-mgmt-web/azure/mgmt/web/models/private_access_py3.py index 0e9c36e7c2a5..44dfced0920b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/restore_response_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/private_access_py3.py @@ -12,8 +12,8 @@ from .proxy_only_resource_py3 import ProxyOnlyResource -class RestoreResponse(ProxyOnlyResource): - """Response for an app restore request. +class PrivateAccess(ProxyOnlyResource): + """Description of the parameters of Private Access for a Web Site. Variables are only populated by the server, and will be ignored when sending a request. @@ -26,16 +26,18 @@ class RestoreResponse(ProxyOnlyResource): :type kind: str :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 + :param enabled: Whether private access is enabled or not. + :type enabled: bool + :param virtual_networks: The Virtual Networks (and subnets) allowed to + access the site privately. + :type virtual_networks: + list[~azure.mgmt.web.models.PrivateAccessVirtualNetwork] """ _validation = { 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'operation_id': {'readonly': True}, } _attribute_map = { @@ -43,9 +45,11 @@ class RestoreResponse(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'operation_id': {'key': 'properties.operationId', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'bool'}, + 'virtual_networks': {'key': 'properties.virtualNetworks', 'type': '[PrivateAccessVirtualNetwork]'}, } - def __init__(self, *, kind: str=None, **kwargs) -> None: - super(RestoreResponse, self).__init__(kind=kind, **kwargs) - self.operation_id = None + def __init__(self, *, kind: str=None, enabled: bool=None, virtual_networks=None, **kwargs) -> None: + super(PrivateAccess, self).__init__(kind=kind, **kwargs) + self.enabled = enabled + self.virtual_networks = virtual_networks diff --git a/azure-mgmt-web/azure/mgmt/web/models/private_access_subnet.py b/azure-mgmt-web/azure/mgmt/web/models/private_access_subnet.py new file mode 100644 index 000000000000..7107b2414157 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/private_access_subnet.py @@ -0,0 +1,33 @@ +# 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 PrivateAccessSubnet(Model): + """Description of a Virtual Network subnet that is useable for private site + access. + + :param name: The name of the subnet. + :type name: str + :param key: The key (ID) of the subnet. + :type key: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(PrivateAccessSubnet, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.key = kwargs.get('key', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/private_access_subnet_py3.py b/azure-mgmt-web/azure/mgmt/web/models/private_access_subnet_py3.py new file mode 100644 index 000000000000..c232743ce98e --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/private_access_subnet_py3.py @@ -0,0 +1,33 @@ +# 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 PrivateAccessSubnet(Model): + """Description of a Virtual Network subnet that is useable for private site + access. + + :param name: The name of the subnet. + :type name: str + :param key: The key (ID) of the subnet. + :type key: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, key: int=None, **kwargs) -> None: + super(PrivateAccessSubnet, self).__init__(**kwargs) + self.name = name + self.key = key diff --git a/azure-mgmt-web/azure/mgmt/web/models/private_access_virtual_network.py b/azure-mgmt-web/azure/mgmt/web/models/private_access_virtual_network.py new file mode 100644 index 000000000000..c9b0fa5d54dd --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/private_access_virtual_network.py @@ -0,0 +1,42 @@ +# 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 PrivateAccessVirtualNetwork(Model): + """Description of a Virtual Network that is useable for private site access. + + :param name: The name of the Virtual Network. + :type name: str + :param key: The key (ID) of the Virtual Network. + :type key: int + :param resource_id: The ARM uri of the Virtual Network + :type resource_id: str + :param subnets: A List of subnets that access is allowed to on this + Virtual Network. An empty array (but not null) is interpreted to mean that + all subnets are allowed within this Virtual Network. + :type subnets: list[~azure.mgmt.web.models.PrivateAccessSubnet] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'int'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'subnets': {'key': 'subnets', 'type': '[PrivateAccessSubnet]'}, + } + + def __init__(self, **kwargs): + super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.key = kwargs.get('key', None) + self.resource_id = kwargs.get('resource_id', None) + self.subnets = kwargs.get('subnets', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/private_access_virtual_network_py3.py b/azure-mgmt-web/azure/mgmt/web/models/private_access_virtual_network_py3.py new file mode 100644 index 000000000000..62b1bdfc91b9 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/private_access_virtual_network_py3.py @@ -0,0 +1,42 @@ +# 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 PrivateAccessVirtualNetwork(Model): + """Description of a Virtual Network that is useable for private site access. + + :param name: The name of the Virtual Network. + :type name: str + :param key: The key (ID) of the Virtual Network. + :type key: int + :param resource_id: The ARM uri of the Virtual Network + :type resource_id: str + :param subnets: A List of subnets that access is allowed to on this + Virtual Network. An empty array (but not null) is interpreted to mean that + all subnets are allowed within this Virtual Network. + :type subnets: list[~azure.mgmt.web.models.PrivateAccessSubnet] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'int'}, + 'resource_id': {'key': 'resourceId', 'type': 'str'}, + 'subnets': {'key': 'subnets', 'type': '[PrivateAccessSubnet]'}, + } + + def __init__(self, *, name: str=None, key: int=None, resource_id: str=None, subnets=None, **kwargs) -> None: + super(PrivateAccessVirtualNetwork, self).__init__(**kwargs) + self.name = name + self.key = key + self.resource_id = resource_id + self.subnets = subnets diff --git a/azure-mgmt-web/azure/mgmt/web/models/process_info.py b/azure-mgmt-web/azure/mgmt/web/models/process_info.py index 51cdae331682..8b2d416b7c1f 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/process_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/process_info.py @@ -26,14 +26,14 @@ class ProcessInfo(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param process_info_id: ARM Identifier for deployment. - :type process_info_id: int - :param process_info_name: Deployment name. - :type process_info_name: str + :ivar identifier: ARM Identifier for deployment. + :vartype identifier: int + :param deployment_name: Deployment name. + :type deployment_name: str :param href: HRef URI. :type href: str - :param mini_dump: Minidump URI. - :type mini_dump: str + :param minidump: Minidump URI. + :type minidump: str :param is_profile_running: Is profile running? :type is_profile_running: bool :param is_iis_profile_running: Is the IIS Profile running? @@ -64,38 +64,38 @@ class ProcessInfo(ProxyOnlyResource): :type thread_count: int :param start_time: Start time. :type start_time: datetime - :param total_processor_time: Total CPU time. - :type total_processor_time: str - :param user_processor_time: User CPU time. - :type user_processor_time: str - :param privileged_processor_time: Privileged CPU time. - :type privileged_processor_time: str - :param working_set64: Working set. - :type working_set64: long - :param peak_working_set64: Peak working set. - :type peak_working_set64: long - :param private_memory_size64: Private memory size. - :type private_memory_size64: long - :param virtual_memory_size64: Virtual memory size. - :type virtual_memory_size64: long - :param peak_virtual_memory_size64: Peak virtual memory usage. - :type peak_virtual_memory_size64: long - :param paged_system_memory_size64: Paged system memory. - :type paged_system_memory_size64: long - :param nonpaged_system_memory_size64: Non-paged system memory. - :type nonpaged_system_memory_size64: long - :param paged_memory_size64: Paged memory. - :type paged_memory_size64: long - :param peak_paged_memory_size64: Peak paged memory. - :type peak_paged_memory_size64: long + :param total_cpu_time: Total CPU time. + :type total_cpu_time: str + :param user_cpu_time: User CPU time. + :type user_cpu_time: str + :param privileged_cpu_time: Privileged CPU time. + :type privileged_cpu_time: str + :param working_set: Working set. + :type working_set: long + :param peak_working_set: Peak working set. + :type peak_working_set: long + :param private_memory: Private memory size. + :type private_memory: long + :param virtual_memory: Virtual memory size. + :type virtual_memory: long + :param peak_virtual_memory: Peak virtual memory usage. + :type peak_virtual_memory: long + :param paged_system_memory: Paged system memory. + :type paged_system_memory: long + :param non_paged_system_memory: Non-paged system memory. + :type non_paged_system_memory: long + :param paged_memory: Paged memory. + :type paged_memory: long + :param peak_paged_memory: Peak paged memory. + :type peak_paged_memory: long :param time_stamp: Time stamp. :type time_stamp: datetime :param environment_variables: List of environment variables. :type environment_variables: dict[str, str] :param is_scm_site: Is this the SCM site? :type is_scm_site: bool - :param is_web_job: Is this a Web Job? - :type is_web_job: bool + :param is_webjob: Is this a Web Job? + :type is_webjob: bool :param description: Description of process. :type description: str """ @@ -104,6 +104,7 @@ class ProcessInfo(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'identifier': {'readonly': True}, } _attribute_map = { @@ -111,50 +112,50 @@ class ProcessInfo(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'process_info_id': {'key': 'properties.id', 'type': 'int'}, - 'process_info_name': {'key': 'properties.name', 'type': 'str'}, + 'identifier': {'key': 'properties.identifier', 'type': 'int'}, + 'deployment_name': {'key': 'properties.deployment_name', 'type': 'str'}, 'href': {'key': 'properties.href', 'type': 'str'}, - 'mini_dump': {'key': 'properties.miniDump', 'type': 'str'}, - 'is_profile_running': {'key': 'properties.isProfileRunning', 'type': 'bool'}, - 'is_iis_profile_running': {'key': 'properties.isIisProfileRunning', 'type': 'bool'}, - 'iis_profile_timeout_in_seconds': {'key': 'properties.iisProfileTimeoutInSeconds', 'type': 'float'}, + 'minidump': {'key': 'properties.minidump', 'type': 'str'}, + 'is_profile_running': {'key': 'properties.is_profile_running', 'type': 'bool'}, + 'is_iis_profile_running': {'key': 'properties.is_iis_profile_running', 'type': 'bool'}, + 'iis_profile_timeout_in_seconds': {'key': 'properties.iis_profile_timeout_in_seconds', 'type': 'float'}, 'parent': {'key': 'properties.parent', 'type': 'str'}, 'children': {'key': 'properties.children', 'type': '[str]'}, 'threads': {'key': 'properties.threads', 'type': '[ProcessThreadInfo]'}, - 'open_file_handles': {'key': 'properties.openFileHandles', 'type': '[str]'}, + 'open_file_handles': {'key': 'properties.open_file_handles', 'type': '[str]'}, 'modules': {'key': 'properties.modules', 'type': '[ProcessModuleInfo]'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, - 'command_line': {'key': 'properties.commandLine', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'handle_count': {'key': 'properties.handleCount', 'type': 'int'}, - 'module_count': {'key': 'properties.moduleCount', 'type': 'int'}, - 'thread_count': {'key': 'properties.threadCount', 'type': 'int'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'total_processor_time': {'key': 'properties.totalProcessorTime', 'type': 'str'}, - 'user_processor_time': {'key': 'properties.userProcessorTime', 'type': 'str'}, - 'privileged_processor_time': {'key': 'properties.privilegedProcessorTime', 'type': 'str'}, - 'working_set64': {'key': 'properties.workingSet64', 'type': 'long'}, - 'peak_working_set64': {'key': 'properties.peakWorkingSet64', 'type': 'long'}, - 'private_memory_size64': {'key': 'properties.privateMemorySize64', 'type': 'long'}, - 'virtual_memory_size64': {'key': 'properties.virtualMemorySize64', 'type': 'long'}, - 'peak_virtual_memory_size64': {'key': 'properties.peakVirtualMemorySize64', 'type': 'long'}, - 'paged_system_memory_size64': {'key': 'properties.pagedSystemMemorySize64', 'type': 'long'}, - 'nonpaged_system_memory_size64': {'key': 'properties.nonpagedSystemMemorySize64', 'type': 'long'}, - 'paged_memory_size64': {'key': 'properties.pagedMemorySize64', 'type': 'long'}, - 'peak_paged_memory_size64': {'key': 'properties.peakPagedMemorySize64', 'type': 'long'}, - 'time_stamp': {'key': 'properties.timeStamp', 'type': 'iso-8601'}, - 'environment_variables': {'key': 'properties.environmentVariables', 'type': '{str}'}, - 'is_scm_site': {'key': 'properties.isScmSite', 'type': 'bool'}, - 'is_web_job': {'key': 'properties.isWebJob', 'type': 'bool'}, + 'file_name': {'key': 'properties.file_name', 'type': 'str'}, + 'command_line': {'key': 'properties.command_line', 'type': 'str'}, + 'user_name': {'key': 'properties.user_name', 'type': 'str'}, + 'handle_count': {'key': 'properties.handle_count', 'type': 'int'}, + 'module_count': {'key': 'properties.module_count', 'type': 'int'}, + 'thread_count': {'key': 'properties.thread_count', 'type': 'int'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'total_cpu_time': {'key': 'properties.total_cpu_time', 'type': 'str'}, + 'user_cpu_time': {'key': 'properties.user_cpu_time', 'type': 'str'}, + 'privileged_cpu_time': {'key': 'properties.privileged_cpu_time', 'type': 'str'}, + 'working_set': {'key': 'properties.working_set', 'type': 'long'}, + 'peak_working_set': {'key': 'properties.peak_working_set', 'type': 'long'}, + 'private_memory': {'key': 'properties.private_memory', 'type': 'long'}, + 'virtual_memory': {'key': 'properties.virtual_memory', 'type': 'long'}, + 'peak_virtual_memory': {'key': 'properties.peak_virtual_memory', 'type': 'long'}, + 'paged_system_memory': {'key': 'properties.paged_system_memory', 'type': 'long'}, + 'non_paged_system_memory': {'key': 'properties.non_paged_system_memory', 'type': 'long'}, + 'paged_memory': {'key': 'properties.paged_memory', 'type': 'long'}, + 'peak_paged_memory': {'key': 'properties.peak_paged_memory', 'type': 'long'}, + 'time_stamp': {'key': 'properties.time_stamp', 'type': 'iso-8601'}, + 'environment_variables': {'key': 'properties.environment_variables', 'type': '{str}'}, + 'is_scm_site': {'key': 'properties.is_scm_site', 'type': 'bool'}, + 'is_webjob': {'key': 'properties.is_webjob', 'type': 'bool'}, 'description': {'key': 'properties.description', 'type': 'str'}, } def __init__(self, **kwargs): super(ProcessInfo, self).__init__(**kwargs) - self.process_info_id = kwargs.get('process_info_id', None) - self.process_info_name = kwargs.get('process_info_name', None) + self.identifier = None + self.deployment_name = kwargs.get('deployment_name', None) self.href = kwargs.get('href', None) - self.mini_dump = kwargs.get('mini_dump', None) + self.minidump = kwargs.get('minidump', None) self.is_profile_running = kwargs.get('is_profile_running', None) self.is_iis_profile_running = kwargs.get('is_iis_profile_running', None) self.iis_profile_timeout_in_seconds = kwargs.get('iis_profile_timeout_in_seconds', None) @@ -170,20 +171,20 @@ def __init__(self, **kwargs): self.module_count = kwargs.get('module_count', None) self.thread_count = kwargs.get('thread_count', None) self.start_time = kwargs.get('start_time', None) - self.total_processor_time = kwargs.get('total_processor_time', None) - self.user_processor_time = kwargs.get('user_processor_time', None) - self.privileged_processor_time = kwargs.get('privileged_processor_time', None) - self.working_set64 = kwargs.get('working_set64', None) - self.peak_working_set64 = kwargs.get('peak_working_set64', None) - self.private_memory_size64 = kwargs.get('private_memory_size64', None) - self.virtual_memory_size64 = kwargs.get('virtual_memory_size64', None) - self.peak_virtual_memory_size64 = kwargs.get('peak_virtual_memory_size64', None) - self.paged_system_memory_size64 = kwargs.get('paged_system_memory_size64', None) - self.nonpaged_system_memory_size64 = kwargs.get('nonpaged_system_memory_size64', None) - self.paged_memory_size64 = kwargs.get('paged_memory_size64', None) - self.peak_paged_memory_size64 = kwargs.get('peak_paged_memory_size64', None) + self.total_cpu_time = kwargs.get('total_cpu_time', None) + self.user_cpu_time = kwargs.get('user_cpu_time', None) + self.privileged_cpu_time = kwargs.get('privileged_cpu_time', None) + self.working_set = kwargs.get('working_set', None) + self.peak_working_set = kwargs.get('peak_working_set', None) + self.private_memory = kwargs.get('private_memory', None) + self.virtual_memory = kwargs.get('virtual_memory', None) + self.peak_virtual_memory = kwargs.get('peak_virtual_memory', None) + self.paged_system_memory = kwargs.get('paged_system_memory', None) + self.non_paged_system_memory = kwargs.get('non_paged_system_memory', None) + self.paged_memory = kwargs.get('paged_memory', None) + self.peak_paged_memory = kwargs.get('peak_paged_memory', None) self.time_stamp = kwargs.get('time_stamp', None) self.environment_variables = kwargs.get('environment_variables', None) self.is_scm_site = kwargs.get('is_scm_site', None) - self.is_web_job = kwargs.get('is_web_job', None) + self.is_webjob = kwargs.get('is_webjob', None) self.description = kwargs.get('description', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/process_info_py3.py b/azure-mgmt-web/azure/mgmt/web/models/process_info_py3.py index 5dc0bc8591c0..5b22a5a7e35a 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/process_info_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/process_info_py3.py @@ -26,14 +26,14 @@ class ProcessInfo(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param process_info_id: ARM Identifier for deployment. - :type process_info_id: int - :param process_info_name: Deployment name. - :type process_info_name: str + :ivar identifier: ARM Identifier for deployment. + :vartype identifier: int + :param deployment_name: Deployment name. + :type deployment_name: str :param href: HRef URI. :type href: str - :param mini_dump: Minidump URI. - :type mini_dump: str + :param minidump: Minidump URI. + :type minidump: str :param is_profile_running: Is profile running? :type is_profile_running: bool :param is_iis_profile_running: Is the IIS Profile running? @@ -64,38 +64,38 @@ class ProcessInfo(ProxyOnlyResource): :type thread_count: int :param start_time: Start time. :type start_time: datetime - :param total_processor_time: Total CPU time. - :type total_processor_time: str - :param user_processor_time: User CPU time. - :type user_processor_time: str - :param privileged_processor_time: Privileged CPU time. - :type privileged_processor_time: str - :param working_set64: Working set. - :type working_set64: long - :param peak_working_set64: Peak working set. - :type peak_working_set64: long - :param private_memory_size64: Private memory size. - :type private_memory_size64: long - :param virtual_memory_size64: Virtual memory size. - :type virtual_memory_size64: long - :param peak_virtual_memory_size64: Peak virtual memory usage. - :type peak_virtual_memory_size64: long - :param paged_system_memory_size64: Paged system memory. - :type paged_system_memory_size64: long - :param nonpaged_system_memory_size64: Non-paged system memory. - :type nonpaged_system_memory_size64: long - :param paged_memory_size64: Paged memory. - :type paged_memory_size64: long - :param peak_paged_memory_size64: Peak paged memory. - :type peak_paged_memory_size64: long + :param total_cpu_time: Total CPU time. + :type total_cpu_time: str + :param user_cpu_time: User CPU time. + :type user_cpu_time: str + :param privileged_cpu_time: Privileged CPU time. + :type privileged_cpu_time: str + :param working_set: Working set. + :type working_set: long + :param peak_working_set: Peak working set. + :type peak_working_set: long + :param private_memory: Private memory size. + :type private_memory: long + :param virtual_memory: Virtual memory size. + :type virtual_memory: long + :param peak_virtual_memory: Peak virtual memory usage. + :type peak_virtual_memory: long + :param paged_system_memory: Paged system memory. + :type paged_system_memory: long + :param non_paged_system_memory: Non-paged system memory. + :type non_paged_system_memory: long + :param paged_memory: Paged memory. + :type paged_memory: long + :param peak_paged_memory: Peak paged memory. + :type peak_paged_memory: long :param time_stamp: Time stamp. :type time_stamp: datetime :param environment_variables: List of environment variables. :type environment_variables: dict[str, str] :param is_scm_site: Is this the SCM site? :type is_scm_site: bool - :param is_web_job: Is this a Web Job? - :type is_web_job: bool + :param is_webjob: Is this a Web Job? + :type is_webjob: bool :param description: Description of process. :type description: str """ @@ -104,6 +104,7 @@ class ProcessInfo(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'identifier': {'readonly': True}, } _attribute_map = { @@ -111,50 +112,50 @@ class ProcessInfo(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'process_info_id': {'key': 'properties.id', 'type': 'int'}, - 'process_info_name': {'key': 'properties.name', 'type': 'str'}, + 'identifier': {'key': 'properties.identifier', 'type': 'int'}, + 'deployment_name': {'key': 'properties.deployment_name', 'type': 'str'}, 'href': {'key': 'properties.href', 'type': 'str'}, - 'mini_dump': {'key': 'properties.miniDump', 'type': 'str'}, - 'is_profile_running': {'key': 'properties.isProfileRunning', 'type': 'bool'}, - 'is_iis_profile_running': {'key': 'properties.isIisProfileRunning', 'type': 'bool'}, - 'iis_profile_timeout_in_seconds': {'key': 'properties.iisProfileTimeoutInSeconds', 'type': 'float'}, + 'minidump': {'key': 'properties.minidump', 'type': 'str'}, + 'is_profile_running': {'key': 'properties.is_profile_running', 'type': 'bool'}, + 'is_iis_profile_running': {'key': 'properties.is_iis_profile_running', 'type': 'bool'}, + 'iis_profile_timeout_in_seconds': {'key': 'properties.iis_profile_timeout_in_seconds', 'type': 'float'}, 'parent': {'key': 'properties.parent', 'type': 'str'}, 'children': {'key': 'properties.children', 'type': '[str]'}, 'threads': {'key': 'properties.threads', 'type': '[ProcessThreadInfo]'}, - 'open_file_handles': {'key': 'properties.openFileHandles', 'type': '[str]'}, + 'open_file_handles': {'key': 'properties.open_file_handles', 'type': '[str]'}, 'modules': {'key': 'properties.modules', 'type': '[ProcessModuleInfo]'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, - 'command_line': {'key': 'properties.commandLine', 'type': 'str'}, - 'user_name': {'key': 'properties.userName', 'type': 'str'}, - 'handle_count': {'key': 'properties.handleCount', 'type': 'int'}, - 'module_count': {'key': 'properties.moduleCount', 'type': 'int'}, - 'thread_count': {'key': 'properties.threadCount', 'type': 'int'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'total_processor_time': {'key': 'properties.totalProcessorTime', 'type': 'str'}, - 'user_processor_time': {'key': 'properties.userProcessorTime', 'type': 'str'}, - 'privileged_processor_time': {'key': 'properties.privilegedProcessorTime', 'type': 'str'}, - 'working_set64': {'key': 'properties.workingSet64', 'type': 'long'}, - 'peak_working_set64': {'key': 'properties.peakWorkingSet64', 'type': 'long'}, - 'private_memory_size64': {'key': 'properties.privateMemorySize64', 'type': 'long'}, - 'virtual_memory_size64': {'key': 'properties.virtualMemorySize64', 'type': 'long'}, - 'peak_virtual_memory_size64': {'key': 'properties.peakVirtualMemorySize64', 'type': 'long'}, - 'paged_system_memory_size64': {'key': 'properties.pagedSystemMemorySize64', 'type': 'long'}, - 'nonpaged_system_memory_size64': {'key': 'properties.nonpagedSystemMemorySize64', 'type': 'long'}, - 'paged_memory_size64': {'key': 'properties.pagedMemorySize64', 'type': 'long'}, - 'peak_paged_memory_size64': {'key': 'properties.peakPagedMemorySize64', 'type': 'long'}, - 'time_stamp': {'key': 'properties.timeStamp', 'type': 'iso-8601'}, - 'environment_variables': {'key': 'properties.environmentVariables', 'type': '{str}'}, - 'is_scm_site': {'key': 'properties.isScmSite', 'type': 'bool'}, - 'is_web_job': {'key': 'properties.isWebJob', 'type': 'bool'}, + 'file_name': {'key': 'properties.file_name', 'type': 'str'}, + 'command_line': {'key': 'properties.command_line', 'type': 'str'}, + 'user_name': {'key': 'properties.user_name', 'type': 'str'}, + 'handle_count': {'key': 'properties.handle_count', 'type': 'int'}, + 'module_count': {'key': 'properties.module_count', 'type': 'int'}, + 'thread_count': {'key': 'properties.thread_count', 'type': 'int'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'total_cpu_time': {'key': 'properties.total_cpu_time', 'type': 'str'}, + 'user_cpu_time': {'key': 'properties.user_cpu_time', 'type': 'str'}, + 'privileged_cpu_time': {'key': 'properties.privileged_cpu_time', 'type': 'str'}, + 'working_set': {'key': 'properties.working_set', 'type': 'long'}, + 'peak_working_set': {'key': 'properties.peak_working_set', 'type': 'long'}, + 'private_memory': {'key': 'properties.private_memory', 'type': 'long'}, + 'virtual_memory': {'key': 'properties.virtual_memory', 'type': 'long'}, + 'peak_virtual_memory': {'key': 'properties.peak_virtual_memory', 'type': 'long'}, + 'paged_system_memory': {'key': 'properties.paged_system_memory', 'type': 'long'}, + 'non_paged_system_memory': {'key': 'properties.non_paged_system_memory', 'type': 'long'}, + 'paged_memory': {'key': 'properties.paged_memory', 'type': 'long'}, + 'peak_paged_memory': {'key': 'properties.peak_paged_memory', 'type': 'long'}, + 'time_stamp': {'key': 'properties.time_stamp', 'type': 'iso-8601'}, + 'environment_variables': {'key': 'properties.environment_variables', 'type': '{str}'}, + 'is_scm_site': {'key': 'properties.is_scm_site', 'type': 'bool'}, + 'is_webjob': {'key': 'properties.is_webjob', 'type': 'bool'}, 'description': {'key': 'properties.description', 'type': 'str'}, } - def __init__(self, *, kind: str=None, process_info_id: int=None, process_info_name: str=None, href: str=None, mini_dump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, privileged_processor_time: str=None, working_set64: int=None, peak_working_set64: int=None, private_memory_size64: int=None, virtual_memory_size64: int=None, peak_virtual_memory_size64: int=None, paged_system_memory_size64: int=None, nonpaged_system_memory_size64: int=None, paged_memory_size64: int=None, peak_paged_memory_size64: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_web_job: bool=None, description: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, deployment_name: str=None, href: str=None, minidump: str=None, is_profile_running: bool=None, is_iis_profile_running: bool=None, iis_profile_timeout_in_seconds: float=None, parent: str=None, children=None, threads=None, open_file_handles=None, modules=None, file_name: str=None, command_line: str=None, user_name: str=None, handle_count: int=None, module_count: int=None, thread_count: int=None, start_time=None, total_cpu_time: str=None, user_cpu_time: str=None, privileged_cpu_time: str=None, working_set: int=None, peak_working_set: int=None, private_memory: int=None, virtual_memory: int=None, peak_virtual_memory: int=None, paged_system_memory: int=None, non_paged_system_memory: int=None, paged_memory: int=None, peak_paged_memory: int=None, time_stamp=None, environment_variables=None, is_scm_site: bool=None, is_webjob: bool=None, description: str=None, **kwargs) -> None: super(ProcessInfo, self).__init__(kind=kind, **kwargs) - self.process_info_id = process_info_id - self.process_info_name = process_info_name + self.identifier = None + self.deployment_name = deployment_name self.href = href - self.mini_dump = mini_dump + self.minidump = minidump self.is_profile_running = is_profile_running self.is_iis_profile_running = is_iis_profile_running self.iis_profile_timeout_in_seconds = iis_profile_timeout_in_seconds @@ -170,20 +171,20 @@ def __init__(self, *, kind: str=None, process_info_id: int=None, process_info_na self.module_count = module_count self.thread_count = thread_count self.start_time = start_time - self.total_processor_time = total_processor_time - self.user_processor_time = user_processor_time - self.privileged_processor_time = privileged_processor_time - self.working_set64 = working_set64 - self.peak_working_set64 = peak_working_set64 - self.private_memory_size64 = private_memory_size64 - self.virtual_memory_size64 = virtual_memory_size64 - self.peak_virtual_memory_size64 = peak_virtual_memory_size64 - self.paged_system_memory_size64 = paged_system_memory_size64 - self.nonpaged_system_memory_size64 = nonpaged_system_memory_size64 - self.paged_memory_size64 = paged_memory_size64 - self.peak_paged_memory_size64 = peak_paged_memory_size64 + self.total_cpu_time = total_cpu_time + self.user_cpu_time = user_cpu_time + self.privileged_cpu_time = privileged_cpu_time + self.working_set = working_set + self.peak_working_set = peak_working_set + self.private_memory = private_memory + self.virtual_memory = virtual_memory + self.peak_virtual_memory = peak_virtual_memory + self.paged_system_memory = paged_system_memory + self.non_paged_system_memory = non_paged_system_memory + self.paged_memory = paged_memory + self.peak_paged_memory = peak_paged_memory self.time_stamp = time_stamp self.environment_variables = environment_variables self.is_scm_site = is_scm_site - self.is_web_job = is_web_job + self.is_webjob = is_webjob self.description = description diff --git a/azure-mgmt-web/azure/mgmt/web/models/process_module_info.py b/azure-mgmt-web/azure/mgmt/web/models/process_module_info.py index 5a53481499e7..f57e5396f6dd 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/process_module_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/process_module_info.py @@ -62,16 +62,16 @@ class ProcessModuleInfo(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'base_address': {'key': 'properties.baseAddress', 'type': 'str'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'base_address': {'key': 'properties.base_address', 'type': 'str'}, + 'file_name': {'key': 'properties.file_name', 'type': 'str'}, 'href': {'key': 'properties.href', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'module_memory_size': {'key': 'properties.moduleMemorySize', 'type': 'int'}, - 'file_version': {'key': 'properties.fileVersion', 'type': 'str'}, - 'file_description': {'key': 'properties.fileDescription', 'type': 'str'}, + 'file_path': {'key': 'properties.file_path', 'type': 'str'}, + 'module_memory_size': {'key': 'properties.module_memory_size', 'type': 'int'}, + 'file_version': {'key': 'properties.file_version', 'type': 'str'}, + 'file_description': {'key': 'properties.file_description', 'type': 'str'}, 'product': {'key': 'properties.product', 'type': 'str'}, - 'product_version': {'key': 'properties.productVersion', 'type': 'str'}, - 'is_debug': {'key': 'properties.isDebug', 'type': 'bool'}, + 'product_version': {'key': 'properties.product_version', 'type': 'str'}, + 'is_debug': {'key': 'properties.is_debug', 'type': 'bool'}, 'language': {'key': 'properties.language', 'type': 'str'}, } diff --git a/azure-mgmt-web/azure/mgmt/web/models/process_module_info_py3.py b/azure-mgmt-web/azure/mgmt/web/models/process_module_info_py3.py index 35f0cd3d9571..458d7777a922 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/process_module_info_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/process_module_info_py3.py @@ -62,16 +62,16 @@ class ProcessModuleInfo(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'base_address': {'key': 'properties.baseAddress', 'type': 'str'}, - 'file_name': {'key': 'properties.fileName', 'type': 'str'}, + 'base_address': {'key': 'properties.base_address', 'type': 'str'}, + 'file_name': {'key': 'properties.file_name', 'type': 'str'}, 'href': {'key': 'properties.href', 'type': 'str'}, - 'file_path': {'key': 'properties.filePath', 'type': 'str'}, - 'module_memory_size': {'key': 'properties.moduleMemorySize', 'type': 'int'}, - 'file_version': {'key': 'properties.fileVersion', 'type': 'str'}, - 'file_description': {'key': 'properties.fileDescription', 'type': 'str'}, + 'file_path': {'key': 'properties.file_path', 'type': 'str'}, + 'module_memory_size': {'key': 'properties.module_memory_size', 'type': 'int'}, + 'file_version': {'key': 'properties.file_version', 'type': 'str'}, + 'file_description': {'key': 'properties.file_description', 'type': 'str'}, 'product': {'key': 'properties.product', 'type': 'str'}, - 'product_version': {'key': 'properties.productVersion', 'type': 'str'}, - 'is_debug': {'key': 'properties.isDebug', 'type': 'bool'}, + 'product_version': {'key': 'properties.product_version', 'type': 'str'}, + 'is_debug': {'key': 'properties.is_debug', 'type': 'bool'}, 'language': {'key': 'properties.language', 'type': 'str'}, } diff --git a/azure-mgmt-web/azure/mgmt/web/models/process_thread_info.py b/azure-mgmt-web/azure/mgmt/web/models/process_thread_info.py index ca254312f6c1..fa19e32d621c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/process_thread_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/process_thread_info.py @@ -26,8 +26,8 @@ class ProcessThreadInfo(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param process_thread_info_id: ARM Identifier for deployment. - :type process_thread_info_id: int + :ivar identifier: Site extension ID. + :vartype identifier: int :param href: HRef URI. :type href: str :param process: Process URI. @@ -58,6 +58,7 @@ class ProcessThreadInfo(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'identifier': {'readonly': True}, } _attribute_map = { @@ -65,24 +66,24 @@ class ProcessThreadInfo(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'process_thread_info_id': {'key': 'properties.id', 'type': 'int'}, + 'identifier': {'key': 'properties.identifier', 'type': 'int'}, 'href': {'key': 'properties.href', 'type': 'str'}, 'process': {'key': 'properties.process', 'type': 'str'}, - 'start_address': {'key': 'properties.startAddress', 'type': 'str'}, - 'current_priority': {'key': 'properties.currentPriority', 'type': 'int'}, - 'priority_level': {'key': 'properties.priorityLevel', 'type': 'str'}, - 'base_priority': {'key': 'properties.basePriority', 'type': 'int'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'total_processor_time': {'key': 'properties.totalProcessorTime', 'type': 'str'}, - 'user_processor_time': {'key': 'properties.userProcessorTime', 'type': 'str'}, - 'priviledged_processor_time': {'key': 'properties.priviledgedProcessorTime', 'type': 'str'}, + 'start_address': {'key': 'properties.start_address', 'type': 'str'}, + 'current_priority': {'key': 'properties.current_priority', 'type': 'int'}, + 'priority_level': {'key': 'properties.priority_level', 'type': 'str'}, + 'base_priority': {'key': 'properties.base_priority', 'type': 'int'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'total_processor_time': {'key': 'properties.total_processor_time', 'type': 'str'}, + 'user_processor_time': {'key': 'properties.user_processor_time', 'type': 'str'}, + 'priviledged_processor_time': {'key': 'properties.priviledged_processor_time', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, - 'wait_reason': {'key': 'properties.waitReason', 'type': 'str'}, + 'wait_reason': {'key': 'properties.wait_reason', 'type': 'str'}, } def __init__(self, **kwargs): super(ProcessThreadInfo, self).__init__(**kwargs) - self.process_thread_info_id = kwargs.get('process_thread_info_id', None) + self.identifier = None self.href = kwargs.get('href', None) self.process = kwargs.get('process', None) self.start_address = kwargs.get('start_address', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/process_thread_info_py3.py b/azure-mgmt-web/azure/mgmt/web/models/process_thread_info_py3.py index 89c943f54419..573193cc1855 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/process_thread_info_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/process_thread_info_py3.py @@ -26,8 +26,8 @@ class ProcessThreadInfo(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param process_thread_info_id: ARM Identifier for deployment. - :type process_thread_info_id: int + :ivar identifier: Site extension ID. + :vartype identifier: int :param href: HRef URI. :type href: str :param process: Process URI. @@ -58,6 +58,7 @@ class ProcessThreadInfo(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'identifier': {'readonly': True}, } _attribute_map = { @@ -65,24 +66,24 @@ class ProcessThreadInfo(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'process_thread_info_id': {'key': 'properties.id', 'type': 'int'}, + 'identifier': {'key': 'properties.identifier', 'type': 'int'}, 'href': {'key': 'properties.href', 'type': 'str'}, 'process': {'key': 'properties.process', 'type': 'str'}, - 'start_address': {'key': 'properties.startAddress', 'type': 'str'}, - 'current_priority': {'key': 'properties.currentPriority', 'type': 'int'}, - 'priority_level': {'key': 'properties.priorityLevel', 'type': 'str'}, - 'base_priority': {'key': 'properties.basePriority', 'type': 'int'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'total_processor_time': {'key': 'properties.totalProcessorTime', 'type': 'str'}, - 'user_processor_time': {'key': 'properties.userProcessorTime', 'type': 'str'}, - 'priviledged_processor_time': {'key': 'properties.priviledgedProcessorTime', 'type': 'str'}, + 'start_address': {'key': 'properties.start_address', 'type': 'str'}, + 'current_priority': {'key': 'properties.current_priority', 'type': 'int'}, + 'priority_level': {'key': 'properties.priority_level', 'type': 'str'}, + 'base_priority': {'key': 'properties.base_priority', 'type': 'int'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'total_processor_time': {'key': 'properties.total_processor_time', 'type': 'str'}, + 'user_processor_time': {'key': 'properties.user_processor_time', 'type': 'str'}, + 'priviledged_processor_time': {'key': 'properties.priviledged_processor_time', 'type': 'str'}, 'state': {'key': 'properties.state', 'type': 'str'}, - 'wait_reason': {'key': 'properties.waitReason', 'type': 'str'}, + 'wait_reason': {'key': 'properties.wait_reason', 'type': 'str'}, } - def __init__(self, *, kind: str=None, process_thread_info_id: int=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, priviledged_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, href: str=None, process: str=None, start_address: str=None, current_priority: int=None, priority_level: str=None, base_priority: int=None, start_time=None, total_processor_time: str=None, user_processor_time: str=None, priviledged_processor_time: str=None, state: str=None, wait_reason: str=None, **kwargs) -> None: super(ProcessThreadInfo, self).__init__(kind=kind, **kwargs) - self.process_thread_info_id = process_thread_info_id + self.identifier = None self.href = href self.process = process self.start_address = start_address diff --git a/azure-mgmt-web/azure/mgmt/web/models/recommendation.py b/azure-mgmt-web/azure/mgmt/web/models/recommendation.py index 060828030b7f..05e942d4c9dc 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/recommendation.py +++ b/azure-mgmt-web/azure/mgmt/web/models/recommendation.py @@ -51,11 +51,17 @@ class Recommendation(ProxyOnlyResource): :param channels: List of channels that this recommendation can apply. Possible values include: 'Notification', 'Api', 'Email', 'Webhook', 'All' :type channels: str or ~azure.mgmt.web.models.Channels - :param tags: The list of category tags that this recommendation belongs - to. - :type tags: list[str] + :ivar category_tags: The list of category tags that this recommendation + belongs to. + :vartype category_tags: list[str] :param action_name: Name of action recommended by this object. :type action_name: str + :param enabled: True if this recommendation is still valid (i.e. + "actionable"). False if it is invalid. + :type enabled: int + :param states: The list of states of this recommendation. If it's null + then it shoud be considered "Active". + :type states: list[str] :param start_time: The beginning time in UTC of a range that the recommendation refers to. :type start_time: datetime @@ -89,6 +95,7 @@ class Recommendation(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'category_tags': {'readonly': True}, } _attribute_map = { @@ -105,8 +112,10 @@ class Recommendation(ProxyOnlyResource): 'message': {'key': 'properties.message', 'type': 'str'}, 'level': {'key': 'properties.level', 'type': 'NotificationLevel'}, 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'category_tags': {'key': 'properties.categoryTags', 'type': '[str]'}, 'action_name': {'key': 'properties.actionName', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'int'}, + 'states': {'key': 'properties.states', 'type': '[str]'}, 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, 'next_notification_time': {'key': 'properties.nextNotificationTime', 'type': 'iso-8601'}, @@ -130,8 +139,10 @@ def __init__(self, **kwargs): self.message = kwargs.get('message', None) self.level = kwargs.get('level', None) self.channels = kwargs.get('channels', None) - self.tags = kwargs.get('tags', None) + self.category_tags = None self.action_name = kwargs.get('action_name', None) + self.enabled = kwargs.get('enabled', None) + self.states = kwargs.get('states', None) self.start_time = kwargs.get('start_time', None) self.end_time = kwargs.get('end_time', None) self.next_notification_time = kwargs.get('next_notification_time', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/recommendation_py3.py b/azure-mgmt-web/azure/mgmt/web/models/recommendation_py3.py index 5eca6b18103c..02241485d2d1 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/recommendation_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/recommendation_py3.py @@ -51,11 +51,17 @@ class Recommendation(ProxyOnlyResource): :param channels: List of channels that this recommendation can apply. Possible values include: 'Notification', 'Api', 'Email', 'Webhook', 'All' :type channels: str or ~azure.mgmt.web.models.Channels - :param tags: The list of category tags that this recommendation belongs - to. - :type tags: list[str] + :ivar category_tags: The list of category tags that this recommendation + belongs to. + :vartype category_tags: list[str] :param action_name: Name of action recommended by this object. :type action_name: str + :param enabled: True if this recommendation is still valid (i.e. + "actionable"). False if it is invalid. + :type enabled: int + :param states: The list of states of this recommendation. If it's null + then it shoud be considered "Active". + :type states: list[str] :param start_time: The beginning time in UTC of a range that the recommendation refers to. :type start_time: datetime @@ -89,6 +95,7 @@ class Recommendation(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'category_tags': {'readonly': True}, } _attribute_map = { @@ -105,8 +112,10 @@ class Recommendation(ProxyOnlyResource): 'message': {'key': 'properties.message', 'type': 'str'}, 'level': {'key': 'properties.level', 'type': 'NotificationLevel'}, 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'category_tags': {'key': 'properties.categoryTags', 'type': '[str]'}, 'action_name': {'key': 'properties.actionName', 'type': 'str'}, + 'enabled': {'key': 'properties.enabled', 'type': 'int'}, + 'states': {'key': 'properties.states', 'type': '[str]'}, 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, 'next_notification_time': {'key': 'properties.nextNotificationTime', 'type': 'iso-8601'}, @@ -119,7 +128,7 @@ class Recommendation(ProxyOnlyResource): 'forward_link': {'key': 'properties.forwardLink', 'type': 'str'}, } - def __init__(self, *, kind: str=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, tags=None, action_name: str=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, creation_time=None, recommendation_id: str=None, resource_id: str=None, resource_scope=None, rule_name: str=None, display_name: str=None, message: str=None, level=None, channels=None, action_name: str=None, enabled: int=None, states=None, start_time=None, end_time=None, next_notification_time=None, notification_expiration_time=None, notified_time=None, score: float=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: super(Recommendation, self).__init__(kind=kind, **kwargs) self.creation_time = creation_time self.recommendation_id = recommendation_id @@ -130,8 +139,10 @@ def __init__(self, *, kind: str=None, creation_time=None, recommendation_id: str self.message = message self.level = level self.channels = channels - self.tags = tags + self.category_tags = None self.action_name = action_name + self.enabled = enabled + self.states = states self.start_time = start_time self.end_time = end_time self.next_notification_time = next_notification_time diff --git a/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule.py b/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule.py index 09d8a19b874f..75df7b4a8508 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule.py +++ b/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule.py @@ -27,8 +27,8 @@ class RecommendationRule(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param recommendation_rule_name: Unique name of the rule. - :type recommendation_rule_name: str + :param recommendation_name: Unique name of the rule. + :type recommendation_name: str :param display_name: UI friendly name of the rule. :type display_name: str :param message: Localized name of the rule (Good for UI). @@ -49,8 +49,9 @@ class RecommendationRule(ProxyOnlyResource): :param channels: List of available channels that this rule applies. Possible values include: 'Notification', 'Api', 'Email', 'Webhook', 'All' :type channels: str or ~azure.mgmt.web.models.Channels - :param tags: An array of category tags that the rule contains. - :type tags: list[str] + :ivar category_tags: The list of category tags that this recommendation + rule belongs to. + :vartype category_tags: list[str] :param is_dynamic: True if this is associated with a dynamically added rule :type is_dynamic: bool @@ -69,6 +70,7 @@ class RecommendationRule(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'category_tags': {'readonly': True}, } _attribute_map = { @@ -76,7 +78,7 @@ class RecommendationRule(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'recommendation_rule_name': {'key': 'properties.name', 'type': 'str'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'message': {'key': 'properties.message', 'type': 'str'}, 'recommendation_id': {'key': 'properties.recommendationId', 'type': 'str'}, @@ -84,7 +86,7 @@ class RecommendationRule(ProxyOnlyResource): 'action_name': {'key': 'properties.actionName', 'type': 'str'}, 'level': {'key': 'properties.level', 'type': 'NotificationLevel'}, 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'category_tags': {'key': 'properties.categoryTags', 'type': '[str]'}, 'is_dynamic': {'key': 'properties.isDynamic', 'type': 'bool'}, 'extension_name': {'key': 'properties.extensionName', 'type': 'str'}, 'blade_name': {'key': 'properties.bladeName', 'type': 'str'}, @@ -93,7 +95,7 @@ class RecommendationRule(ProxyOnlyResource): def __init__(self, **kwargs): super(RecommendationRule, self).__init__(**kwargs) - self.recommendation_rule_name = kwargs.get('recommendation_rule_name', None) + self.recommendation_name = kwargs.get('recommendation_name', None) self.display_name = kwargs.get('display_name', None) self.message = kwargs.get('message', None) self.recommendation_id = kwargs.get('recommendation_id', None) @@ -101,7 +103,7 @@ def __init__(self, **kwargs): self.action_name = kwargs.get('action_name', None) self.level = kwargs.get('level', None) self.channels = kwargs.get('channels', None) - self.tags = kwargs.get('tags', None) + self.category_tags = None self.is_dynamic = kwargs.get('is_dynamic', None) self.extension_name = kwargs.get('extension_name', None) self.blade_name = kwargs.get('blade_name', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule_py3.py b/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule_py3.py index 544c7d2e3cad..2626ea719e72 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/recommendation_rule_py3.py @@ -27,8 +27,8 @@ class RecommendationRule(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param recommendation_rule_name: Unique name of the rule. - :type recommendation_rule_name: str + :param recommendation_name: Unique name of the rule. + :type recommendation_name: str :param display_name: UI friendly name of the rule. :type display_name: str :param message: Localized name of the rule (Good for UI). @@ -49,8 +49,9 @@ class RecommendationRule(ProxyOnlyResource): :param channels: List of available channels that this rule applies. Possible values include: 'Notification', 'Api', 'Email', 'Webhook', 'All' :type channels: str or ~azure.mgmt.web.models.Channels - :param tags: An array of category tags that the rule contains. - :type tags: list[str] + :ivar category_tags: The list of category tags that this recommendation + rule belongs to. + :vartype category_tags: list[str] :param is_dynamic: True if this is associated with a dynamically added rule :type is_dynamic: bool @@ -69,6 +70,7 @@ class RecommendationRule(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, + 'category_tags': {'readonly': True}, } _attribute_map = { @@ -76,7 +78,7 @@ class RecommendationRule(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'recommendation_rule_name': {'key': 'properties.name', 'type': 'str'}, + 'recommendation_name': {'key': 'properties.recommendationName', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, 'message': {'key': 'properties.message', 'type': 'str'}, 'recommendation_id': {'key': 'properties.recommendationId', 'type': 'str'}, @@ -84,16 +86,16 @@ class RecommendationRule(ProxyOnlyResource): 'action_name': {'key': 'properties.actionName', 'type': 'str'}, 'level': {'key': 'properties.level', 'type': 'NotificationLevel'}, 'channels': {'key': 'properties.channels', 'type': 'Channels'}, - 'tags': {'key': 'properties.tags', 'type': '[str]'}, + 'category_tags': {'key': 'properties.categoryTags', 'type': '[str]'}, 'is_dynamic': {'key': 'properties.isDynamic', 'type': 'bool'}, 'extension_name': {'key': 'properties.extensionName', 'type': 'str'}, 'blade_name': {'key': 'properties.bladeName', 'type': 'str'}, 'forward_link': {'key': 'properties.forwardLink', 'type': 'str'}, } - def __init__(self, *, kind: str=None, recommendation_rule_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, tags=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, recommendation_name: str=None, display_name: str=None, message: str=None, recommendation_id: str=None, description: str=None, action_name: str=None, level=None, channels=None, is_dynamic: bool=None, extension_name: str=None, blade_name: str=None, forward_link: str=None, **kwargs) -> None: super(RecommendationRule, self).__init__(kind=kind, **kwargs) - self.recommendation_rule_name = recommendation_rule_name + self.recommendation_name = recommendation_name self.display_name = display_name self.message = message self.recommendation_id = recommendation_id @@ -101,7 +103,7 @@ def __init__(self, *, kind: str=None, recommendation_rule_name: str=None, displa self.action_name = action_name self.level = level self.channels = channels - self.tags = tags + self.category_tags = None self.is_dynamic = is_dynamic self.extension_name = extension_name self.blade_name = blade_name diff --git a/azure-mgmt-web/azure/mgmt/web/models/rendering.py b/azure-mgmt-web/azure/mgmt/web/models/rendering.py index 3cf7f498121e..e2327cb854ef 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/rendering.py +++ b/azure-mgmt-web/azure/mgmt/web/models/rendering.py @@ -15,9 +15,9 @@ class Rendering(Model): """Instructions for rendering the data. - :param rendering_type: Rendering Type. Possible values include: 'NoGraph', - 'Table', 'TimeSeries', 'TimeSeriesPerInstance' - :type rendering_type: str or ~azure.mgmt.web.models.RenderingType + :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', + 'TimeSeries', 'TimeSeriesPerInstance' + :type type: str or ~azure.mgmt.web.models.RenderingType :param title: Title of data :type title: str :param description: Description of the data that will help it be @@ -26,13 +26,13 @@ class Rendering(Model): """ _attribute_map = { - 'rendering_type': {'key': 'renderingType', 'type': 'RenderingType'}, + 'type': {'key': 'type', 'type': 'RenderingType'}, 'title': {'key': 'title', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, } def __init__(self, **kwargs): super(Rendering, self).__init__(**kwargs) - self.rendering_type = kwargs.get('rendering_type', None) + self.type = kwargs.get('type', None) self.title = kwargs.get('title', None) self.description = kwargs.get('description', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/rendering_py3.py b/azure-mgmt-web/azure/mgmt/web/models/rendering_py3.py index df9a5069f91f..7b2a87cf5a00 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/rendering_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/rendering_py3.py @@ -15,9 +15,9 @@ class Rendering(Model): """Instructions for rendering the data. - :param rendering_type: Rendering Type. Possible values include: 'NoGraph', - 'Table', 'TimeSeries', 'TimeSeriesPerInstance' - :type rendering_type: str or ~azure.mgmt.web.models.RenderingType + :param type: Rendering Type. Possible values include: 'NoGraph', 'Table', + 'TimeSeries', 'TimeSeriesPerInstance' + :type type: str or ~azure.mgmt.web.models.RenderingType :param title: Title of data :type title: str :param description: Description of the data that will help it be @@ -26,13 +26,13 @@ class Rendering(Model): """ _attribute_map = { - 'rendering_type': {'key': 'renderingType', 'type': 'RenderingType'}, + 'type': {'key': 'type', 'type': 'RenderingType'}, 'title': {'key': 'title', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, } - def __init__(self, *, rendering_type=None, title: str=None, description: str=None, **kwargs) -> None: + def __init__(self, *, type=None, title: str=None, description: str=None, **kwargs) -> None: super(Rendering, self).__init__(**kwargs) - self.rendering_type = rendering_type + self.type = type self.title = title self.description = description diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata_paged.py b/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata_paged.py deleted file mode 100644 index 45c9b8c4945b..000000000000 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata_paged.py +++ /dev/null @@ -1,27 +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.paging import Paged - - -class ResourceHealthMetadataPaged(Paged): - """ - A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} - } - - def __init__(self, *args, **kwargs): - - super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition.py b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition.py index 4e0a78f03d0a..fa01c3611c5d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition.py @@ -26,9 +26,6 @@ class ResourceMetricDefinition(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :ivar resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: - ~azure.mgmt.web.models.ResourceMetricName :ivar unit: Unit of the metric. :vartype unit: str :ivar primary_aggregation_type: Primary aggregation type. @@ -39,8 +36,6 @@ class ResourceMetricDefinition(ProxyOnlyResource): list[~azure.mgmt.web.models.ResourceMetricAvailability] :ivar resource_uri: Resource URI. :vartype resource_uri: str - :ivar resource_metric_definition_id: Resource ID. - :vartype resource_metric_definition_id: str :ivar properties: Resource metric definition properties. :vartype properties: dict[str, str] """ @@ -49,12 +44,10 @@ class ResourceMetricDefinition(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'resource_metric_definition_name': {'readonly': True}, 'unit': {'readonly': True}, 'primary_aggregation_type': {'readonly': True}, 'metric_availabilities': {'readonly': True}, 'resource_uri': {'readonly': True}, - 'resource_metric_definition_id': {'readonly': True}, 'properties': {'readonly': True}, } @@ -63,21 +56,17 @@ class ResourceMetricDefinition(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', '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'}, 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[ResourceMetricAvailability]'}, 'resource_uri': {'key': 'properties.resourceUri', 'type': 'str'}, - 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, 'properties': {'key': 'properties.properties', 'type': '{str}'}, } def __init__(self, **kwargs): super(ResourceMetricDefinition, self).__init__(**kwargs) - self.resource_metric_definition_name = None self.unit = None self.primary_aggregation_type = None self.metric_availabilities = None self.resource_uri = None - self.resource_metric_definition_id = None self.properties = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition_py3.py b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition_py3.py index 1e1e1f05de9f..bde300209a34 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_metric_definition_py3.py @@ -26,9 +26,6 @@ class ResourceMetricDefinition(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :ivar resource_metric_definition_name: Name of the metric. - :vartype resource_metric_definition_name: - ~azure.mgmt.web.models.ResourceMetricName :ivar unit: Unit of the metric. :vartype unit: str :ivar primary_aggregation_type: Primary aggregation type. @@ -39,8 +36,6 @@ class ResourceMetricDefinition(ProxyOnlyResource): list[~azure.mgmt.web.models.ResourceMetricAvailability] :ivar resource_uri: Resource URI. :vartype resource_uri: str - :ivar resource_metric_definition_id: Resource ID. - :vartype resource_metric_definition_id: str :ivar properties: Resource metric definition properties. :vartype properties: dict[str, str] """ @@ -49,12 +44,10 @@ class ResourceMetricDefinition(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'resource_metric_definition_name': {'readonly': True}, 'unit': {'readonly': True}, 'primary_aggregation_type': {'readonly': True}, 'metric_availabilities': {'readonly': True}, 'resource_uri': {'readonly': True}, - 'resource_metric_definition_id': {'readonly': True}, 'properties': {'readonly': True}, } @@ -63,21 +56,17 @@ class ResourceMetricDefinition(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', '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'}, 'metric_availabilities': {'key': 'properties.metricAvailabilities', 'type': '[ResourceMetricAvailability]'}, 'resource_uri': {'key': 'properties.resourceUri', 'type': 'str'}, - 'resource_metric_definition_id': {'key': 'properties.id', 'type': 'str'}, 'properties': {'key': 'properties.properties', 'type': '{str}'}, } def __init__(self, *, kind: str=None, **kwargs) -> None: super(ResourceMetricDefinition, self).__init__(kind=kind, **kwargs) - self.resource_metric_definition_name = None self.unit = None self.primary_aggregation_type = None self.metric_availabilities = None self.resource_uri = None - self.resource_metric_definition_id = None self.properties = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/restore_request.py b/azure-mgmt-web/azure/mgmt/web/models/restore_request.py index 6ffd33cc679b..8decaf97ba5e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/restore_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/restore_request.py @@ -54,7 +54,7 @@ class RestoreRequest(ProxyOnlyResource): site. :type app_service_plan: str :param operation_type: Operation type. Possible values include: 'Default', - 'Clone', 'Relocation', 'Snapshot'. Default value: "Default" . + 'Clone', 'Relocation', 'Snapshot', 'CloudFS'. Default value: "Default" . :type operation_type: str or ~azure.mgmt.web.models.BackupRestoreOperationType :param adjust_connection_strings: true if diff --git a/azure-mgmt-web/azure/mgmt/web/models/restore_request_py3.py b/azure-mgmt-web/azure/mgmt/web/models/restore_request_py3.py index 402362b48610..33d11d7c2eef 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/restore_request_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/restore_request_py3.py @@ -54,7 +54,7 @@ class RestoreRequest(ProxyOnlyResource): site. :type app_service_plan: str :param operation_type: Operation type. Possible values include: 'Default', - 'Clone', 'Relocation', 'Snapshot'. Default value: "Default" . + 'Clone', 'Relocation', 'Snapshot', 'CloudFS'. Default value: "Default" . :type operation_type: str or ~azure.mgmt.web.models.BackupRestoreOperationType :param adjust_connection_strings: true if diff --git a/azure-mgmt-web/azure/mgmt/web/models/service_specification.py b/azure-mgmt-web/azure/mgmt/web/models/service_specification.py index fe2efb3d6d84..f0a1c80fe7ae 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/service_specification.py +++ b/azure-mgmt-web/azure/mgmt/web/models/service_specification.py @@ -18,12 +18,16 @@ class ServiceSpecification(Model): :param metric_specifications: :type metric_specifications: list[~azure.mgmt.web.models.MetricSpecification] + :param log_specifications: + :type log_specifications: list[~azure.mgmt.web.models.LogSpecification] """ _attribute_map = { 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, } def __init__(self, **kwargs): super(ServiceSpecification, self).__init__(**kwargs) self.metric_specifications = kwargs.get('metric_specifications', None) + self.log_specifications = kwargs.get('log_specifications', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/service_specification_py3.py b/azure-mgmt-web/azure/mgmt/web/models/service_specification_py3.py index ea5fcf80b034..9845f59148e5 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/service_specification_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/service_specification_py3.py @@ -18,12 +18,16 @@ class ServiceSpecification(Model): :param metric_specifications: :type metric_specifications: list[~azure.mgmt.web.models.MetricSpecification] + :param log_specifications: + :type log_specifications: list[~azure.mgmt.web.models.LogSpecification] """ _attribute_map = { 'metric_specifications': {'key': 'metricSpecifications', 'type': '[MetricSpecification]'}, + 'log_specifications': {'key': 'logSpecifications', 'type': '[LogSpecification]'}, } - def __init__(self, *, metric_specifications=None, **kwargs) -> None: + def __init__(self, *, metric_specifications=None, log_specifications=None, **kwargs) -> None: super(ServiceSpecification, self).__init__(**kwargs) self.metric_specifications = metric_specifications + self.log_specifications = log_specifications diff --git a/azure-mgmt-web/azure/mgmt/web/models/site.py b/azure-mgmt-web/azure/mgmt/web/models/site.py index 177c71de2077..f244ac523067 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site.py @@ -64,6 +64,8 @@ class Site(Resource): :param reserved: true if reserved; otherwise, false. Default value: False . :type reserved: bool + :param is_xenon: Hyper-V sandbox. Default value: False . + :type is_xenon: bool :ivar last_modified_time_utc: Last time the app was modified, in UTC. Read-only. :vartype last_modified_time_utc: datetime @@ -119,9 +121,6 @@ class Site(Resource): :param cloning_info: If specified during app creation, the app is cloned from a source app. :type cloning_info: ~azure.mgmt.web.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: ~azure.mgmt.web.models.SnapshotRecoveryRequest :ivar resource_group: Name of the resource group the app belongs to. Read-only. :vartype resource_group: str @@ -181,6 +180,7 @@ class Site(Resource): 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', '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]'}, @@ -197,7 +197,6 @@ 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'}, @@ -218,6 +217,7 @@ def __init__(self, **kwargs): self.host_name_ssl_states = kwargs.get('host_name_ssl_states', None) self.server_farm_id = kwargs.get('server_farm_id', None) self.reserved = kwargs.get('reserved', False) + self.is_xenon = kwargs.get('is_xenon', False) self.last_modified_time_utc = None self.site_config = kwargs.get('site_config', None) self.traffic_manager_host_names = None @@ -234,7 +234,6 @@ def __init__(self, **kwargs): self.suspended_till = None self.max_number_of_workers = None self.cloning_info = kwargs.get('cloning_info', None) - self.snapshot_info = kwargs.get('snapshot_info', None) self.resource_group = None self.is_default_container = None self.default_host_name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings.py b/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings.py index 7418c31642f2..c280193927e4 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings.py @@ -90,6 +90,9 @@ class SiteAuthSettings(ProxyOnlyResource): More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html :type issuer: str + :param validate_issuer: Gets a value indicating whether the issuer should + be a valid HTTPS url and be validated as such. + :type validate_issuer: bool :param allowed_audiences: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. Note that the ClientID value is @@ -188,6 +191,7 @@ class SiteAuthSettings(ProxyOnlyResource): 'client_id': {'key': 'properties.clientId', 'type': 'str'}, 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, 'issuer': {'key': 'properties.issuer', 'type': 'str'}, + 'validate_issuer': {'key': 'properties.validateIssuer', 'type': 'bool'}, 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, 'additional_login_params': {'key': 'properties.additionalLoginParams', 'type': '[str]'}, 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, @@ -215,6 +219,7 @@ def __init__(self, **kwargs): self.client_id = kwargs.get('client_id', None) self.client_secret = kwargs.get('client_secret', None) self.issuer = kwargs.get('issuer', None) + self.validate_issuer = kwargs.get('validate_issuer', None) self.allowed_audiences = kwargs.get('allowed_audiences', None) self.additional_login_params = kwargs.get('additional_login_params', None) self.google_client_id = kwargs.get('google_client_id', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings_py3.py b/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings_py3.py index 9e832491c6d3..b2b246e30079 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_auth_settings_py3.py @@ -90,6 +90,9 @@ class SiteAuthSettings(ProxyOnlyResource): More information on OpenID Connect Discovery: http://openid.net/specs/openid-connect-discovery-1_0.html :type issuer: str + :param validate_issuer: Gets a value indicating whether the issuer should + be a valid HTTPS url and be validated as such. + :type validate_issuer: bool :param allowed_audiences: Allowed audience values to consider when validating JWTs issued by Azure Active Directory. Note that the ClientID value is @@ -188,6 +191,7 @@ class SiteAuthSettings(ProxyOnlyResource): 'client_id': {'key': 'properties.clientId', 'type': 'str'}, 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, 'issuer': {'key': 'properties.issuer', 'type': 'str'}, + 'validate_issuer': {'key': 'properties.validateIssuer', 'type': 'bool'}, 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, 'additional_login_params': {'key': 'properties.additionalLoginParams', 'type': '[str]'}, 'google_client_id': {'key': 'properties.googleClientId', 'type': 'str'}, @@ -203,7 +207,7 @@ class SiteAuthSettings(ProxyOnlyResource): 'microsoft_account_oauth_scopes': {'key': 'properties.microsoftAccountOAuthScopes', 'type': '[str]'}, } - def __init__(self, *, kind: str=None, enabled: bool=None, runtime_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, issuer: str=None, allowed_audiences=None, additional_login_params=None, google_client_id: str=None, google_client_secret: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_oauth_scopes=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, enabled: bool=None, runtime_version: str=None, unauthenticated_client_action=None, token_store_enabled: bool=None, allowed_external_redirect_urls=None, default_provider=None, token_refresh_extension_hours: float=None, client_id: str=None, client_secret: str=None, issuer: str=None, validate_issuer: bool=None, allowed_audiences=None, additional_login_params=None, google_client_id: str=None, google_client_secret: str=None, google_oauth_scopes=None, facebook_app_id: str=None, facebook_app_secret: str=None, facebook_oauth_scopes=None, twitter_consumer_key: str=None, twitter_consumer_secret: str=None, microsoft_account_client_id: str=None, microsoft_account_client_secret: str=None, microsoft_account_oauth_scopes=None, **kwargs) -> None: super(SiteAuthSettings, self).__init__(kind=kind, **kwargs) self.enabled = enabled self.runtime_version = runtime_version @@ -215,6 +219,7 @@ def __init__(self, *, kind: str=None, enabled: bool=None, runtime_version: str=N self.client_id = client_id self.client_secret = client_secret self.issuer = issuer + self.validate_issuer = validate_issuer self.allowed_audiences = allowed_audiences self.additional_login_params = additional_login_params self.google_client_id = google_client_id diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_config.py b/azure-mgmt-web/azure/mgmt/web/models/site_config.py index b598addfbdc0..34156a60e078 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config.py @@ -33,6 +33,8 @@ class SiteConfig(Model): :type node_version: str :param linux_fx_version: Linux App Framework and version :type linux_fx_version: str + :param windows_fx_version: Xenon App Framework and version + :type windows_fx_version: str :param request_tracing_enabled: true if request tracing is enabled; otherwise, false. :type request_tracing_enabled: bool @@ -120,6 +122,10 @@ class SiteConfig(Model): :param local_my_sql_enabled: true to enable local MySQL; otherwise, false. Default value: False . :type local_my_sql_enabled: bool + :param managed_service_identity_id: Managed Service Identity Id + :type managed_service_identity_id: int + :param x_managed_service_identity_id: Explicit Managed Service Identity Id + :type x_managed_service_identity_id: int :param ip_security_restrictions: IP security restrictions. :type ip_security_restrictions: list[~azure.mgmt.web.models.IpSecurityRestriction] @@ -130,10 +136,17 @@ class SiteConfig(Model): TLS required for SSL requests. Possible values include: '1.0', '1.1', '1.2' :type min_tls_version: str or ~azure.mgmt.web.models.SupportedTlsVersions + :param ftps_state: State of FTP / FTPS service. Possible values include: + 'AllAllowed', 'FtpsOnly', 'Disabled' + :type ftps_state: str or ~azure.mgmt.web.models.FtpsState + :param reserved_instance_count: Number of reserved instances. + This setting only applies to the Consumption Plan + :type reserved_instance_count: int """ _validation = { 'machine_key': {'readonly': True}, + 'reserved_instance_count': {'maximum': 10, 'minimum': 0}, } _attribute_map = { @@ -144,6 +157,7 @@ class SiteConfig(Model): 'python_version': {'key': 'pythonVersion', 'type': 'str'}, 'node_version': {'key': 'nodeVersion', 'type': 'str'}, 'linux_fx_version': {'key': 'linuxFxVersion', 'type': 'str'}, + 'windows_fx_version': {'key': 'windowsFxVersion', 'type': 'str'}, 'request_tracing_enabled': {'key': 'requestTracingEnabled', 'type': 'bool'}, 'request_tracing_expiration_time': {'key': 'requestTracingExpirationTime', 'type': 'iso-8601'}, 'remote_debugging_enabled': {'key': 'remoteDebuggingEnabled', 'type': 'bool'}, @@ -179,9 +193,13 @@ class SiteConfig(Model): 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'managed_service_identity_id': {'key': 'managedServiceIdentityId', 'type': 'int'}, + 'x_managed_service_identity_id': {'key': 'xManagedServiceIdentityId', 'type': 'int'}, 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, + 'reserved_instance_count': {'key': 'reservedInstanceCount', 'type': 'int'}, } def __init__(self, **kwargs): @@ -193,6 +211,7 @@ def __init__(self, **kwargs): self.python_version = kwargs.get('python_version', None) self.node_version = kwargs.get('node_version', None) self.linux_fx_version = kwargs.get('linux_fx_version', None) + self.windows_fx_version = kwargs.get('windows_fx_version', None) self.request_tracing_enabled = kwargs.get('request_tracing_enabled', None) self.request_tracing_expiration_time = kwargs.get('request_tracing_expiration_time', None) self.remote_debugging_enabled = kwargs.get('remote_debugging_enabled', None) @@ -228,6 +247,10 @@ def __init__(self, **kwargs): self.api_definition = kwargs.get('api_definition', None) self.auto_swap_slot_name = kwargs.get('auto_swap_slot_name', None) self.local_my_sql_enabled = kwargs.get('local_my_sql_enabled', False) + self.managed_service_identity_id = kwargs.get('managed_service_identity_id', None) + self.x_managed_service_identity_id = kwargs.get('x_managed_service_identity_id', None) self.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) self.http20_enabled = kwargs.get('http20_enabled', True) self.min_tls_version = kwargs.get('min_tls_version', None) + self.ftps_state = kwargs.get('ftps_state', None) + self.reserved_instance_count = kwargs.get('reserved_instance_count', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_config_py3.py b/azure-mgmt-web/azure/mgmt/web/models/site_config_py3.py index fad1c217018c..85f59f15a970 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_config_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config_py3.py @@ -33,6 +33,8 @@ class SiteConfig(Model): :type node_version: str :param linux_fx_version: Linux App Framework and version :type linux_fx_version: str + :param windows_fx_version: Xenon App Framework and version + :type windows_fx_version: str :param request_tracing_enabled: true if request tracing is enabled; otherwise, false. :type request_tracing_enabled: bool @@ -120,6 +122,10 @@ class SiteConfig(Model): :param local_my_sql_enabled: true to enable local MySQL; otherwise, false. Default value: False . :type local_my_sql_enabled: bool + :param managed_service_identity_id: Managed Service Identity Id + :type managed_service_identity_id: int + :param x_managed_service_identity_id: Explicit Managed Service Identity Id + :type x_managed_service_identity_id: int :param ip_security_restrictions: IP security restrictions. :type ip_security_restrictions: list[~azure.mgmt.web.models.IpSecurityRestriction] @@ -130,10 +136,17 @@ class SiteConfig(Model): TLS required for SSL requests. Possible values include: '1.0', '1.1', '1.2' :type min_tls_version: str or ~azure.mgmt.web.models.SupportedTlsVersions + :param ftps_state: State of FTP / FTPS service. Possible values include: + 'AllAllowed', 'FtpsOnly', 'Disabled' + :type ftps_state: str or ~azure.mgmt.web.models.FtpsState + :param reserved_instance_count: Number of reserved instances. + This setting only applies to the Consumption Plan + :type reserved_instance_count: int """ _validation = { 'machine_key': {'readonly': True}, + 'reserved_instance_count': {'maximum': 10, 'minimum': 0}, } _attribute_map = { @@ -144,6 +157,7 @@ class SiteConfig(Model): 'python_version': {'key': 'pythonVersion', 'type': 'str'}, 'node_version': {'key': 'nodeVersion', 'type': 'str'}, 'linux_fx_version': {'key': 'linuxFxVersion', 'type': 'str'}, + 'windows_fx_version': {'key': 'windowsFxVersion', 'type': 'str'}, 'request_tracing_enabled': {'key': 'requestTracingEnabled', 'type': 'bool'}, 'request_tracing_expiration_time': {'key': 'requestTracingExpirationTime', 'type': 'iso-8601'}, 'remote_debugging_enabled': {'key': 'remoteDebuggingEnabled', 'type': 'bool'}, @@ -179,12 +193,16 @@ class SiteConfig(Model): 'api_definition': {'key': 'apiDefinition', 'type': 'ApiDefinitionInfo'}, 'auto_swap_slot_name': {'key': 'autoSwapSlotName', 'type': 'str'}, 'local_my_sql_enabled': {'key': 'localMySqlEnabled', 'type': 'bool'}, + 'managed_service_identity_id': {'key': 'managedServiceIdentityId', 'type': 'int'}, + 'x_managed_service_identity_id': {'key': 'xManagedServiceIdentityId', 'type': 'int'}, 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, + 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, + 'reserved_instance_count': {'key': 'reservedInstanceCount', 'type': 'int'}, } - def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: super(SiteConfig, self).__init__(**kwargs) self.number_of_workers = number_of_workers self.default_documents = default_documents @@ -193,6 +211,7 @@ def __init__(self, *, number_of_workers: int=None, default_documents=None, net_f self.python_version = python_version self.node_version = node_version self.linux_fx_version = linux_fx_version + self.windows_fx_version = windows_fx_version self.request_tracing_enabled = request_tracing_enabled self.request_tracing_expiration_time = request_tracing_expiration_time self.remote_debugging_enabled = remote_debugging_enabled @@ -228,6 +247,10 @@ def __init__(self, *, number_of_workers: int=None, default_documents=None, net_f self.api_definition = api_definition self.auto_swap_slot_name = auto_swap_slot_name self.local_my_sql_enabled = local_my_sql_enabled + self.managed_service_identity_id = managed_service_identity_id + self.x_managed_service_identity_id = x_managed_service_identity_id self.ip_security_restrictions = ip_security_restrictions self.http20_enabled = http20_enabled self.min_tls_version = min_tls_version + self.ftps_state = ftps_state + self.reserved_instance_count = reserved_instance_count diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_config_resource.py b/azure-mgmt-web/azure/mgmt/web/models/site_config_resource.py index 2023ff28665e..bf1b5fd08b4e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_config_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config_resource.py @@ -41,6 +41,8 @@ class SiteConfigResource(ProxyOnlyResource): :type node_version: str :param linux_fx_version: Linux App Framework and version :type linux_fx_version: str + :param windows_fx_version: Xenon App Framework and version + :type windows_fx_version: str :param request_tracing_enabled: true if request tracing is enabled; otherwise, false. :type request_tracing_enabled: bool @@ -128,6 +130,10 @@ class SiteConfigResource(ProxyOnlyResource): :param local_my_sql_enabled: true to enable local MySQL; otherwise, false. Default value: False . :type local_my_sql_enabled: bool + :param managed_service_identity_id: Managed Service Identity Id + :type managed_service_identity_id: int + :param x_managed_service_identity_id: Explicit Managed Service Identity Id + :type x_managed_service_identity_id: int :param ip_security_restrictions: IP security restrictions. :type ip_security_restrictions: list[~azure.mgmt.web.models.IpSecurityRestriction] @@ -138,6 +144,12 @@ class SiteConfigResource(ProxyOnlyResource): TLS required for SSL requests. Possible values include: '1.0', '1.1', '1.2' :type min_tls_version: str or ~azure.mgmt.web.models.SupportedTlsVersions + :param ftps_state: State of FTP / FTPS service. Possible values include: + 'AllAllowed', 'FtpsOnly', 'Disabled' + :type ftps_state: str or ~azure.mgmt.web.models.FtpsState + :param reserved_instance_count: Number of reserved instances. + This setting only applies to the Consumption Plan + :type reserved_instance_count: int """ _validation = { @@ -145,6 +157,7 @@ class SiteConfigResource(ProxyOnlyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'machine_key': {'readonly': True}, + 'reserved_instance_count': {'maximum': 10, 'minimum': 0}, } _attribute_map = { @@ -159,6 +172,7 @@ class SiteConfigResource(ProxyOnlyResource): 'python_version': {'key': 'properties.pythonVersion', 'type': 'str'}, 'node_version': {'key': 'properties.nodeVersion', 'type': 'str'}, 'linux_fx_version': {'key': 'properties.linuxFxVersion', 'type': 'str'}, + 'windows_fx_version': {'key': 'properties.windowsFxVersion', 'type': 'str'}, 'request_tracing_enabled': {'key': 'properties.requestTracingEnabled', 'type': 'bool'}, 'request_tracing_expiration_time': {'key': 'properties.requestTracingExpirationTime', 'type': 'iso-8601'}, 'remote_debugging_enabled': {'key': 'properties.remoteDebuggingEnabled', 'type': 'bool'}, @@ -194,9 +208,13 @@ class SiteConfigResource(ProxyOnlyResource): 'api_definition': {'key': 'properties.apiDefinition', 'type': 'ApiDefinitionInfo'}, 'auto_swap_slot_name': {'key': 'properties.autoSwapSlotName', 'type': 'str'}, 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + 'managed_service_identity_id': {'key': 'properties.managedServiceIdentityId', 'type': 'int'}, + 'x_managed_service_identity_id': {'key': 'properties.xManagedServiceIdentityId', 'type': 'int'}, 'ip_security_restrictions': {'key': 'properties.ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, 'http20_enabled': {'key': 'properties.http20Enabled', 'type': 'bool'}, 'min_tls_version': {'key': 'properties.minTlsVersion', 'type': 'str'}, + 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, + 'reserved_instance_count': {'key': 'properties.reservedInstanceCount', 'type': 'int'}, } def __init__(self, **kwargs): @@ -208,6 +226,7 @@ def __init__(self, **kwargs): self.python_version = kwargs.get('python_version', None) self.node_version = kwargs.get('node_version', None) self.linux_fx_version = kwargs.get('linux_fx_version', None) + self.windows_fx_version = kwargs.get('windows_fx_version', None) self.request_tracing_enabled = kwargs.get('request_tracing_enabled', None) self.request_tracing_expiration_time = kwargs.get('request_tracing_expiration_time', None) self.remote_debugging_enabled = kwargs.get('remote_debugging_enabled', None) @@ -243,6 +262,10 @@ def __init__(self, **kwargs): self.api_definition = kwargs.get('api_definition', None) self.auto_swap_slot_name = kwargs.get('auto_swap_slot_name', None) self.local_my_sql_enabled = kwargs.get('local_my_sql_enabled', False) + self.managed_service_identity_id = kwargs.get('managed_service_identity_id', None) + self.x_managed_service_identity_id = kwargs.get('x_managed_service_identity_id', None) self.ip_security_restrictions = kwargs.get('ip_security_restrictions', None) self.http20_enabled = kwargs.get('http20_enabled', True) self.min_tls_version = kwargs.get('min_tls_version', None) + self.ftps_state = kwargs.get('ftps_state', None) + self.reserved_instance_count = kwargs.get('reserved_instance_count', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_config_resource_py3.py b/azure-mgmt-web/azure/mgmt/web/models/site_config_resource_py3.py index 97437aea7fcd..6d9e30ad6f7c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_config_resource_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config_resource_py3.py @@ -41,6 +41,8 @@ class SiteConfigResource(ProxyOnlyResource): :type node_version: str :param linux_fx_version: Linux App Framework and version :type linux_fx_version: str + :param windows_fx_version: Xenon App Framework and version + :type windows_fx_version: str :param request_tracing_enabled: true if request tracing is enabled; otherwise, false. :type request_tracing_enabled: bool @@ -128,6 +130,10 @@ class SiteConfigResource(ProxyOnlyResource): :param local_my_sql_enabled: true to enable local MySQL; otherwise, false. Default value: False . :type local_my_sql_enabled: bool + :param managed_service_identity_id: Managed Service Identity Id + :type managed_service_identity_id: int + :param x_managed_service_identity_id: Explicit Managed Service Identity Id + :type x_managed_service_identity_id: int :param ip_security_restrictions: IP security restrictions. :type ip_security_restrictions: list[~azure.mgmt.web.models.IpSecurityRestriction] @@ -138,6 +144,12 @@ class SiteConfigResource(ProxyOnlyResource): TLS required for SSL requests. Possible values include: '1.0', '1.1', '1.2' :type min_tls_version: str or ~azure.mgmt.web.models.SupportedTlsVersions + :param ftps_state: State of FTP / FTPS service. Possible values include: + 'AllAllowed', 'FtpsOnly', 'Disabled' + :type ftps_state: str or ~azure.mgmt.web.models.FtpsState + :param reserved_instance_count: Number of reserved instances. + This setting only applies to the Consumption Plan + :type reserved_instance_count: int """ _validation = { @@ -145,6 +157,7 @@ class SiteConfigResource(ProxyOnlyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'machine_key': {'readonly': True}, + 'reserved_instance_count': {'maximum': 10, 'minimum': 0}, } _attribute_map = { @@ -159,6 +172,7 @@ class SiteConfigResource(ProxyOnlyResource): 'python_version': {'key': 'properties.pythonVersion', 'type': 'str'}, 'node_version': {'key': 'properties.nodeVersion', 'type': 'str'}, 'linux_fx_version': {'key': 'properties.linuxFxVersion', 'type': 'str'}, + 'windows_fx_version': {'key': 'properties.windowsFxVersion', 'type': 'str'}, 'request_tracing_enabled': {'key': 'properties.requestTracingEnabled', 'type': 'bool'}, 'request_tracing_expiration_time': {'key': 'properties.requestTracingExpirationTime', 'type': 'iso-8601'}, 'remote_debugging_enabled': {'key': 'properties.remoteDebuggingEnabled', 'type': 'bool'}, @@ -194,12 +208,16 @@ class SiteConfigResource(ProxyOnlyResource): 'api_definition': {'key': 'properties.apiDefinition', 'type': 'ApiDefinitionInfo'}, 'auto_swap_slot_name': {'key': 'properties.autoSwapSlotName', 'type': 'str'}, 'local_my_sql_enabled': {'key': 'properties.localMySqlEnabled', 'type': 'bool'}, + 'managed_service_identity_id': {'key': 'properties.managedServiceIdentityId', 'type': 'int'}, + 'x_managed_service_identity_id': {'key': 'properties.xManagedServiceIdentityId', 'type': 'int'}, 'ip_security_restrictions': {'key': 'properties.ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, 'http20_enabled': {'key': 'properties.http20Enabled', 'type': 'bool'}, 'min_tls_version': {'key': 'properties.minTlsVersion', 'type': 'str'}, + 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, + 'reserved_instance_count': {'key': 'properties.reservedInstanceCount', 'type': 'int'}, } - def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: super(SiteConfigResource, self).__init__(kind=kind, **kwargs) self.number_of_workers = number_of_workers self.default_documents = default_documents @@ -208,6 +226,7 @@ def __init__(self, *, kind: str=None, number_of_workers: int=None, default_docum self.python_version = python_version self.node_version = node_version self.linux_fx_version = linux_fx_version + self.windows_fx_version = windows_fx_version self.request_tracing_enabled = request_tracing_enabled self.request_tracing_expiration_time = request_tracing_expiration_time self.remote_debugging_enabled = remote_debugging_enabled @@ -243,6 +262,10 @@ def __init__(self, *, kind: str=None, number_of_workers: int=None, default_docum self.api_definition = api_definition self.auto_swap_slot_name = auto_swap_slot_name self.local_my_sql_enabled = local_my_sql_enabled + self.managed_service_identity_id = managed_service_identity_id + self.x_managed_service_identity_id = x_managed_service_identity_id self.ip_security_restrictions = ip_security_restrictions self.http20_enabled = http20_enabled self.min_tls_version = min_tls_version + self.ftps_state = ftps_state + self.reserved_instance_count = reserved_instance_count 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 index 3e73e8b95d20..75c2e76208dd 100644 --- 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 @@ -28,8 +28,8 @@ class SiteConfigurationSnapshotInfo(ProxyOnlyResource): :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 - :vartype site_configuration_snapshot_info_id: int + :ivar snapshot_id: The id of the snapshot + :vartype snapshot_id: int """ _validation = { @@ -37,7 +37,7 @@ class SiteConfigurationSnapshotInfo(ProxyOnlyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'time': {'readonly': True}, - 'site_configuration_snapshot_info_id': {'readonly': True}, + 'snapshot_id': {'readonly': True}, } _attribute_map = { @@ -46,10 +46,10 @@ class SiteConfigurationSnapshotInfo(ProxyOnlyResource): 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'time': {'key': 'properties.time', 'type': 'iso-8601'}, - 'site_configuration_snapshot_info_id': {'key': 'properties.id', 'type': 'int'}, + 'snapshot_id': {'key': 'properties.snapshotId', 'type': 'int'}, } def __init__(self, **kwargs): super(SiteConfigurationSnapshotInfo, self).__init__(**kwargs) self.time = None - self.site_configuration_snapshot_info_id = None + self.snapshot_id = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_configuration_snapshot_info_py3.py b/azure-mgmt-web/azure/mgmt/web/models/site_configuration_snapshot_info_py3.py index 1f6ecef24754..e43d434c2d75 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_configuration_snapshot_info_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_configuration_snapshot_info_py3.py @@ -28,8 +28,8 @@ class SiteConfigurationSnapshotInfo(ProxyOnlyResource): :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 - :vartype site_configuration_snapshot_info_id: int + :ivar snapshot_id: The id of the snapshot + :vartype snapshot_id: int """ _validation = { @@ -37,7 +37,7 @@ class SiteConfigurationSnapshotInfo(ProxyOnlyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'time': {'readonly': True}, - 'site_configuration_snapshot_info_id': {'readonly': True}, + 'snapshot_id': {'readonly': True}, } _attribute_map = { @@ -46,10 +46,10 @@ class SiteConfigurationSnapshotInfo(ProxyOnlyResource): 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'time': {'key': 'properties.time', 'type': 'iso-8601'}, - 'site_configuration_snapshot_info_id': {'key': 'properties.id', 'type': 'int'}, + 'snapshot_id': {'key': 'properties.snapshotId', 'type': 'int'}, } def __init__(self, *, kind: str=None, **kwargs) -> None: super(SiteConfigurationSnapshotInfo, self).__init__(kind=kind, **kwargs) self.time = None - self.site_configuration_snapshot_info_id = None + self.snapshot_id = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_extension_info.py b/azure-mgmt-web/azure/mgmt/web/models/site_extension_info.py index d00ab6c3dbfe..2084a3facb71 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_extension_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_extension_info.py @@ -26,14 +26,13 @@ class SiteExtensionInfo(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param site_extension_info_id: Site extension ID. - :type site_extension_info_id: str - :param title: Site extension title. + :param extension_id: Site extension ID. + :type extension_id: str + :param title: :type title: str - :param site_extension_info_type: Site extension type. Possible values - include: 'Gallery', 'WebRoot' - :type site_extension_info_type: str or - ~azure.mgmt.web.models.SiteExtensionType + :param extension_type: Site extension type. Possible values include: + 'Gallery', 'WebRoot' + :type extension_type: str or ~azure.mgmt.web.models.SiteExtensionType :param summary: Summary description. :type summary: str :param description: Detailed description. @@ -52,8 +51,8 @@ class SiteExtensionInfo(ProxyOnlyResource): :type feed_url: str :param authors: List of authors. :type authors: list[str] - :param installation_args: Installer command line parameters. - :type installation_args: str + :param installer_command_line_params: Installer command line parameters. + :type installer_command_line_params: str :param published_date_time: Published timestamp. :type published_date_time: datetime :param download_count: Count of downloads. @@ -82,33 +81,33 @@ class SiteExtensionInfo(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'site_extension_info_id': {'key': 'properties.id', 'type': 'str'}, + 'extension_id': {'key': 'properties.extension_id', 'type': 'str'}, 'title': {'key': 'properties.title', 'type': 'str'}, - 'site_extension_info_type': {'key': 'properties.type', 'type': 'SiteExtensionType'}, + 'extension_type': {'key': 'properties.extension_type', 'type': 'SiteExtensionType'}, 'summary': {'key': 'properties.summary', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'version': {'key': 'properties.version', 'type': 'str'}, - 'extension_url': {'key': 'properties.extensionUrl', 'type': 'str'}, - 'project_url': {'key': 'properties.projectUrl', 'type': 'str'}, - 'icon_url': {'key': 'properties.iconUrl', 'type': 'str'}, - 'license_url': {'key': 'properties.licenseUrl', 'type': 'str'}, - 'feed_url': {'key': 'properties.feedUrl', 'type': 'str'}, + 'extension_url': {'key': 'properties.extension_url', 'type': 'str'}, + 'project_url': {'key': 'properties.project_url', 'type': 'str'}, + 'icon_url': {'key': 'properties.icon_url', 'type': 'str'}, + 'license_url': {'key': 'properties.license_url', 'type': 'str'}, + 'feed_url': {'key': 'properties.feed_url', 'type': 'str'}, 'authors': {'key': 'properties.authors', 'type': '[str]'}, - 'installation_args': {'key': 'properties.installationArgs', 'type': 'str'}, - 'published_date_time': {'key': 'properties.publishedDateTime', 'type': 'iso-8601'}, - 'download_count': {'key': 'properties.downloadCount', 'type': 'int'}, - 'local_is_latest_version': {'key': 'properties.localIsLatestVersion', 'type': 'bool'}, - 'local_path': {'key': 'properties.localPath', 'type': 'str'}, - 'installed_date_time': {'key': 'properties.installedDateTime', 'type': 'iso-8601'}, + 'installer_command_line_params': {'key': 'properties.installer_command_line_params', 'type': 'str'}, + 'published_date_time': {'key': 'properties.published_date_time', 'type': 'iso-8601'}, + 'download_count': {'key': 'properties.download_count', 'type': 'int'}, + 'local_is_latest_version': {'key': 'properties.local_is_latest_version', 'type': 'bool'}, + 'local_path': {'key': 'properties.local_path', 'type': 'str'}, + 'installed_date_time': {'key': 'properties.installed_date_time', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'comment': {'key': 'properties.comment', 'type': 'str'}, } def __init__(self, **kwargs): super(SiteExtensionInfo, self).__init__(**kwargs) - self.site_extension_info_id = kwargs.get('site_extension_info_id', None) + self.extension_id = kwargs.get('extension_id', None) self.title = kwargs.get('title', None) - self.site_extension_info_type = kwargs.get('site_extension_info_type', None) + self.extension_type = kwargs.get('extension_type', None) self.summary = kwargs.get('summary', None) self.description = kwargs.get('description', None) self.version = kwargs.get('version', None) @@ -118,7 +117,7 @@ def __init__(self, **kwargs): self.license_url = kwargs.get('license_url', None) self.feed_url = kwargs.get('feed_url', None) self.authors = kwargs.get('authors', None) - self.installation_args = kwargs.get('installation_args', None) + self.installer_command_line_params = kwargs.get('installer_command_line_params', None) self.published_date_time = kwargs.get('published_date_time', None) self.download_count = kwargs.get('download_count', None) self.local_is_latest_version = kwargs.get('local_is_latest_version', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_extension_info_py3.py b/azure-mgmt-web/azure/mgmt/web/models/site_extension_info_py3.py index e8e9736cfd05..b4bb23a9631f 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_extension_info_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_extension_info_py3.py @@ -26,14 +26,13 @@ class SiteExtensionInfo(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param site_extension_info_id: Site extension ID. - :type site_extension_info_id: str - :param title: Site extension title. + :param extension_id: Site extension ID. + :type extension_id: str + :param title: :type title: str - :param site_extension_info_type: Site extension type. Possible values - include: 'Gallery', 'WebRoot' - :type site_extension_info_type: str or - ~azure.mgmt.web.models.SiteExtensionType + :param extension_type: Site extension type. Possible values include: + 'Gallery', 'WebRoot' + :type extension_type: str or ~azure.mgmt.web.models.SiteExtensionType :param summary: Summary description. :type summary: str :param description: Detailed description. @@ -52,8 +51,8 @@ class SiteExtensionInfo(ProxyOnlyResource): :type feed_url: str :param authors: List of authors. :type authors: list[str] - :param installation_args: Installer command line parameters. - :type installation_args: str + :param installer_command_line_params: Installer command line parameters. + :type installer_command_line_params: str :param published_date_time: Published timestamp. :type published_date_time: datetime :param download_count: Count of downloads. @@ -82,33 +81,33 @@ class SiteExtensionInfo(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'site_extension_info_id': {'key': 'properties.id', 'type': 'str'}, + 'extension_id': {'key': 'properties.extension_id', 'type': 'str'}, 'title': {'key': 'properties.title', 'type': 'str'}, - 'site_extension_info_type': {'key': 'properties.type', 'type': 'SiteExtensionType'}, + 'extension_type': {'key': 'properties.extension_type', 'type': 'SiteExtensionType'}, 'summary': {'key': 'properties.summary', 'type': 'str'}, 'description': {'key': 'properties.description', 'type': 'str'}, 'version': {'key': 'properties.version', 'type': 'str'}, - 'extension_url': {'key': 'properties.extensionUrl', 'type': 'str'}, - 'project_url': {'key': 'properties.projectUrl', 'type': 'str'}, - 'icon_url': {'key': 'properties.iconUrl', 'type': 'str'}, - 'license_url': {'key': 'properties.licenseUrl', 'type': 'str'}, - 'feed_url': {'key': 'properties.feedUrl', 'type': 'str'}, + 'extension_url': {'key': 'properties.extension_url', 'type': 'str'}, + 'project_url': {'key': 'properties.project_url', 'type': 'str'}, + 'icon_url': {'key': 'properties.icon_url', 'type': 'str'}, + 'license_url': {'key': 'properties.license_url', 'type': 'str'}, + 'feed_url': {'key': 'properties.feed_url', 'type': 'str'}, 'authors': {'key': 'properties.authors', 'type': '[str]'}, - 'installation_args': {'key': 'properties.installationArgs', 'type': 'str'}, - 'published_date_time': {'key': 'properties.publishedDateTime', 'type': 'iso-8601'}, - 'download_count': {'key': 'properties.downloadCount', 'type': 'int'}, - 'local_is_latest_version': {'key': 'properties.localIsLatestVersion', 'type': 'bool'}, - 'local_path': {'key': 'properties.localPath', 'type': 'str'}, - 'installed_date_time': {'key': 'properties.installedDateTime', 'type': 'iso-8601'}, + 'installer_command_line_params': {'key': 'properties.installer_command_line_params', 'type': 'str'}, + 'published_date_time': {'key': 'properties.published_date_time', 'type': 'iso-8601'}, + 'download_count': {'key': 'properties.download_count', 'type': 'int'}, + 'local_is_latest_version': {'key': 'properties.local_is_latest_version', 'type': 'bool'}, + 'local_path': {'key': 'properties.local_path', 'type': 'str'}, + 'installed_date_time': {'key': 'properties.installed_date_time', 'type': 'iso-8601'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'comment': {'key': 'properties.comment', 'type': 'str'}, } - def __init__(self, *, kind: str=None, site_extension_info_id: str=None, title: str=None, site_extension_info_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installation_args: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, extension_id: str=None, title: str=None, extension_type=None, summary: str=None, description: str=None, version: str=None, extension_url: str=None, project_url: str=None, icon_url: str=None, license_url: str=None, feed_url: str=None, authors=None, installer_command_line_params: str=None, published_date_time=None, download_count: int=None, local_is_latest_version: bool=None, local_path: str=None, installed_date_time=None, provisioning_state: str=None, comment: str=None, **kwargs) -> None: super(SiteExtensionInfo, self).__init__(kind=kind, **kwargs) - self.site_extension_info_id = site_extension_info_id + self.extension_id = extension_id self.title = title - self.site_extension_info_type = site_extension_info_type + self.extension_type = extension_type self.summary = summary self.description = description self.version = version @@ -118,7 +117,7 @@ def __init__(self, *, kind: str=None, site_extension_info_id: str=None, title: s self.license_url = license_url self.feed_url = feed_url self.authors = authors - self.installation_args = installation_args + self.installer_command_line_params = installer_command_line_params self.published_date_time = published_date_time self.download_count = download_count self.local_is_latest_version = local_is_latest_version diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_instance.py b/azure-mgmt-web/azure/mgmt/web/models/site_instance.py index fa25964c4357..708d731a2e67 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_instance.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_instance.py @@ -42,7 +42,7 @@ class SiteInstance(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'site_instance_name': {'key': 'properties.name', 'type': 'str'}, + 'site_instance_name': {'key': 'properties.siteInstanceName', 'type': 'str'}, } def __init__(self, **kwargs): diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_instance_py3.py b/azure-mgmt-web/azure/mgmt/web/models/site_instance_py3.py index 49bedfee2116..d6a93ac4600e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_instance_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_instance_py3.py @@ -42,7 +42,7 @@ class SiteInstance(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'site_instance_name': {'key': 'properties.name', 'type': 'str'}, + 'site_instance_name': {'key': 'properties.siteInstanceName', 'type': 'str'}, } def __init__(self, *, kind: str=None, **kwargs) -> None: diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource.py b/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource.py index 029f78ffa8dc..291bbff47844 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource.py @@ -58,6 +58,8 @@ class SitePatchResource(ProxyOnlyResource): :param reserved: true if reserved; otherwise, false. Default value: False . :type reserved: bool + :param is_xenon: Hyper-V sandbox. Default value: False . + :type is_xenon: bool :ivar last_modified_time_utc: Last time the app was modified, in UTC. Read-only. :vartype last_modified_time_utc: datetime @@ -113,9 +115,6 @@ class SitePatchResource(ProxyOnlyResource): :param cloning_info: If specified during app creation, the app is cloned from a source app. :type cloning_info: ~azure.mgmt.web.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: ~azure.mgmt.web.models.SnapshotRecoveryRequest :ivar resource_group: Name of the resource group the app belongs to. Read-only. :vartype resource_group: str @@ -170,6 +169,7 @@ class SitePatchResource(ProxyOnlyResource): 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', '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]'}, @@ -186,7 +186,6 @@ class SitePatchResource(ProxyOnlyResource): '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'}, @@ -206,6 +205,7 @@ def __init__(self, **kwargs): self.host_name_ssl_states = kwargs.get('host_name_ssl_states', None) self.server_farm_id = kwargs.get('server_farm_id', None) self.reserved = kwargs.get('reserved', False) + self.is_xenon = kwargs.get('is_xenon', False) self.last_modified_time_utc = None self.site_config = kwargs.get('site_config', None) self.traffic_manager_host_names = None @@ -222,7 +222,6 @@ def __init__(self, **kwargs): self.suspended_till = None self.max_number_of_workers = None self.cloning_info = kwargs.get('cloning_info', None) - self.snapshot_info = kwargs.get('snapshot_info', None) self.resource_group = None self.is_default_container = None self.default_host_name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource_py3.py b/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource_py3.py index 9f66719d0271..f3e23f94d291 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource_py3.py @@ -58,6 +58,8 @@ class SitePatchResource(ProxyOnlyResource): :param reserved: true if reserved; otherwise, false. Default value: False . :type reserved: bool + :param is_xenon: Hyper-V sandbox. Default value: False . + :type is_xenon: bool :ivar last_modified_time_utc: Last time the app was modified, in UTC. Read-only. :vartype last_modified_time_utc: datetime @@ -113,9 +115,6 @@ class SitePatchResource(ProxyOnlyResource): :param cloning_info: If specified during app creation, the app is cloned from a source app. :type cloning_info: ~azure.mgmt.web.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: ~azure.mgmt.web.models.SnapshotRecoveryRequest :ivar resource_group: Name of the resource group the app belongs to. Read-only. :vartype resource_group: str @@ -170,6 +169,7 @@ class SitePatchResource(ProxyOnlyResource): 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', '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]'}, @@ -186,7 +186,6 @@ class SitePatchResource(ProxyOnlyResource): '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'}, @@ -194,7 +193,7 @@ class SitePatchResource(ProxyOnlyResource): 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, } - def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, **kwargs) -> None: super(SitePatchResource, self).__init__(kind=kind, **kwargs) self.state = None self.host_names = None @@ -206,6 +205,7 @@ def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=N self.host_name_ssl_states = host_name_ssl_states self.server_farm_id = server_farm_id self.reserved = reserved + self.is_xenon = is_xenon self.last_modified_time_utc = None self.site_config = site_config self.traffic_manager_host_names = None @@ -222,7 +222,6 @@ def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=N 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 diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_py3.py b/azure-mgmt-web/azure/mgmt/web/models/site_py3.py index 64901a32b37a..3fb9e61bdede 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_py3.py @@ -64,6 +64,8 @@ class Site(Resource): :param reserved: true if reserved; otherwise, false. Default value: False . :type reserved: bool + :param is_xenon: Hyper-V sandbox. Default value: False . + :type is_xenon: bool :ivar last_modified_time_utc: Last time the app was modified, in UTC. Read-only. :vartype last_modified_time_utc: datetime @@ -119,9 +121,6 @@ class Site(Resource): :param cloning_info: If specified during app creation, the app is cloned from a source app. :type cloning_info: ~azure.mgmt.web.models.CloningInfo - :param snapshot_info: If specified during app creation, the app is created - from a previous snapshot. - :type snapshot_info: ~azure.mgmt.web.models.SnapshotRecoveryRequest :ivar resource_group: Name of the resource group the app belongs to. Read-only. :vartype resource_group: str @@ -181,6 +180,7 @@ class Site(Resource): 'host_name_ssl_states': {'key': 'properties.hostNameSslStates', 'type': '[HostNameSslState]'}, 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, + 'is_xenon': {'key': 'properties.isXenon', '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]'}, @@ -197,7 +197,6 @@ 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'}, @@ -206,7 +205,7 @@ class Site(Resource): 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, } - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, snapshot_info=None, https_only: bool=None, identity=None, **kwargs) -> None: + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, identity=None, **kwargs) -> None: super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) self.state = None self.host_names = None @@ -218,6 +217,7 @@ def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=No self.host_name_ssl_states = host_name_ssl_states self.server_farm_id = server_farm_id self.reserved = reserved + self.is_xenon = is_xenon self.last_modified_time_utc = None self.site_config = site_config self.traffic_manager_host_names = None @@ -234,7 +234,6 @@ def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=No 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 diff --git a/azure-mgmt-web/azure/mgmt/web/models/slot_difference.py b/azure-mgmt-web/azure/mgmt/web/models/slot_difference.py index cc203a46d259..26b9c0e541b0 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/slot_difference.py +++ b/azure-mgmt-web/azure/mgmt/web/models/slot_difference.py @@ -26,9 +26,8 @@ class SlotDifference(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :ivar slot_difference_type: Type of the difference: Information, Warning - or Error. - :vartype slot_difference_type: str + :ivar level: Level of the difference: Information, Warning or Error. + :vartype level: str :ivar setting_type: The type of the setting: General, AppSetting or ConnectionString. :vartype setting_type: str @@ -49,7 +48,7 @@ class SlotDifference(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'slot_difference_type': {'readonly': True}, + 'level': {'readonly': True}, 'setting_type': {'readonly': True}, 'diff_rule': {'readonly': True}, 'setting_name': {'readonly': True}, @@ -63,7 +62,7 @@ class SlotDifference(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'slot_difference_type': {'key': 'properties.type', 'type': 'str'}, + 'level': {'key': 'properties.level', 'type': 'str'}, 'setting_type': {'key': 'properties.settingType', 'type': 'str'}, 'diff_rule': {'key': 'properties.diffRule', 'type': 'str'}, 'setting_name': {'key': 'properties.settingName', 'type': 'str'}, @@ -74,7 +73,7 @@ class SlotDifference(ProxyOnlyResource): def __init__(self, **kwargs): super(SlotDifference, self).__init__(**kwargs) - self.slot_difference_type = None + self.level = None self.setting_type = None self.diff_rule = None self.setting_name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/slot_difference_py3.py b/azure-mgmt-web/azure/mgmt/web/models/slot_difference_py3.py index 943d958637f1..e2cb4e6fc1c5 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/slot_difference_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/slot_difference_py3.py @@ -26,9 +26,8 @@ class SlotDifference(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :ivar slot_difference_type: Type of the difference: Information, Warning - or Error. - :vartype slot_difference_type: str + :ivar level: Level of the difference: Information, Warning or Error. + :vartype level: str :ivar setting_type: The type of the setting: General, AppSetting or ConnectionString. :vartype setting_type: str @@ -49,7 +48,7 @@ class SlotDifference(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'slot_difference_type': {'readonly': True}, + 'level': {'readonly': True}, 'setting_type': {'readonly': True}, 'diff_rule': {'readonly': True}, 'setting_name': {'readonly': True}, @@ -63,7 +62,7 @@ class SlotDifference(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'slot_difference_type': {'key': 'properties.type', 'type': 'str'}, + 'level': {'key': 'properties.level', 'type': 'str'}, 'setting_type': {'key': 'properties.settingType', 'type': 'str'}, 'diff_rule': {'key': 'properties.diffRule', 'type': 'str'}, 'setting_name': {'key': 'properties.settingName', 'type': 'str'}, @@ -74,7 +73,7 @@ class SlotDifference(ProxyOnlyResource): def __init__(self, *, kind: str=None, **kwargs) -> None: super(SlotDifference, self).__init__(kind=kind, **kwargs) - self.slot_difference_type = None + self.level = None self.setting_type = None self.diff_rule = None self.setting_name = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_target.py b/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_source.py similarity index 79% rename from azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_target.py rename to azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_source.py index 38f3c267bc68..94034c76d0ed 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_target.py +++ b/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_source.py @@ -12,13 +12,13 @@ from msrest.serialization import Model -class SnapshotRecoveryTarget(Model): - """Specifies the web app that snapshot contents will be written to. +class SnapshotRecoverySource(Model): + """Specifies the web app that snapshot contents will be retrieved from. - :param location: Geographical location of the target web app, e.g. + :param location: Geographical location of the source web app, e.g. SouthEastAsia, SouthCentralUS :type location: str - :param id: ARM resource ID of the target app. + :param id: ARM resource ID of the source 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} @@ -32,6 +32,6 @@ class SnapshotRecoveryTarget(Model): } def __init__(self, **kwargs): - super(SnapshotRecoveryTarget, self).__init__(**kwargs) + super(SnapshotRecoverySource, self).__init__(**kwargs) self.location = kwargs.get('location', None) self.id = kwargs.get('id', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_target_py3.py b/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_source_py3.py similarity index 79% rename from azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_target_py3.py rename to azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_source_py3.py index 07035487add4..bfb6ee873dae 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_target_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_source_py3.py @@ -12,13 +12,13 @@ from msrest.serialization import Model -class SnapshotRecoveryTarget(Model): - """Specifies the web app that snapshot contents will be written to. +class SnapshotRecoverySource(Model): + """Specifies the web app that snapshot contents will be retrieved from. - :param location: Geographical location of the target web app, e.g. + :param location: Geographical location of the source web app, e.g. SouthEastAsia, SouthCentralUS :type location: str - :param id: ARM resource ID of the target app. + :param id: ARM resource ID of the source 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} @@ -32,6 +32,6 @@ class SnapshotRecoveryTarget(Model): } def __init__(self, *, location: str=None, id: str=None, **kwargs) -> None: - super(SnapshotRecoveryTarget, self).__init__(**kwargs) + super(SnapshotRecoverySource, self).__init__(**kwargs) self.location = location self.id = id diff --git a/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_request.py b/azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request.py similarity index 76% rename from azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_request.py rename to azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request.py index 73f8ff371733..ef65405d81ab 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request.py @@ -12,7 +12,7 @@ from .proxy_only_resource import ProxyOnlyResource -class SnapshotRecoveryRequest(ProxyOnlyResource): +class SnapshotRestoreRequest(ProxyOnlyResource): """Details about app recovery operation. Variables are only populated by the server, and will be ignored when @@ -28,14 +28,15 @@ class SnapshotRecoveryRequest(ProxyOnlyResource): :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. + :param snapshot_time: Point in time in which the app restore should be + done, 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: ~azure.mgmt.web.models.SnapshotRecoveryTarget - :param overwrite: Required. If true the recovery operation - can overwrite source app; otherwise, false. + :param recovery_source: Optional. Specifies the web app that snapshot + contents will be retrieved from. + If empty, the targeted web app will be used as the source. + :type recovery_source: ~azure.mgmt.web.models.SnapshotRecoverySource + :param overwrite: Required. If true the restore operation can + overwrite source app; otherwise, false. :type overwrite: bool :param recover_configuration: If true, site configuration, in addition to content, will be reverted. @@ -59,16 +60,16 @@ class SnapshotRecoveryRequest(ProxyOnlyResource): 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'snapshot_time': {'key': 'properties.snapshotTime', 'type': 'str'}, - 'recovery_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'recovery_source': {'key': 'properties.recoverySource', 'type': 'SnapshotRecoverySource'}, '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, **kwargs): - super(SnapshotRecoveryRequest, self).__init__(**kwargs) + super(SnapshotRestoreRequest, self).__init__(**kwargs) self.snapshot_time = kwargs.get('snapshot_time', None) - self.recovery_target = kwargs.get('recovery_target', None) + self.recovery_source = kwargs.get('recovery_source', None) self.overwrite = kwargs.get('overwrite', None) self.recover_configuration = kwargs.get('recover_configuration', None) self.ignore_conflicting_host_names = kwargs.get('ignore_conflicting_host_names', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_request_py3.py b/azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request_py3.py similarity index 75% rename from azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_request_py3.py rename to azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request_py3.py index ef077653b9b7..e32f278bc028 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/snapshot_recovery_request_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request_py3.py @@ -12,7 +12,7 @@ from .proxy_only_resource_py3 import ProxyOnlyResource -class SnapshotRecoveryRequest(ProxyOnlyResource): +class SnapshotRestoreRequest(ProxyOnlyResource): """Details about app recovery operation. Variables are only populated by the server, and will be ignored when @@ -28,14 +28,15 @@ class SnapshotRecoveryRequest(ProxyOnlyResource): :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. + :param snapshot_time: Point in time in which the app restore should be + done, 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: ~azure.mgmt.web.models.SnapshotRecoveryTarget - :param overwrite: Required. If true the recovery operation - can overwrite source app; otherwise, false. + :param recovery_source: Optional. Specifies the web app that snapshot + contents will be retrieved from. + If empty, the targeted web app will be used as the source. + :type recovery_source: ~azure.mgmt.web.models.SnapshotRecoverySource + :param overwrite: Required. If true the restore operation can + overwrite source app; otherwise, false. :type overwrite: bool :param recover_configuration: If true, site configuration, in addition to content, will be reverted. @@ -59,16 +60,16 @@ class SnapshotRecoveryRequest(ProxyOnlyResource): 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'snapshot_time': {'key': 'properties.snapshotTime', 'type': 'str'}, - 'recovery_target': {'key': 'properties.recoveryTarget', 'type': 'SnapshotRecoveryTarget'}, + 'recovery_source': {'key': 'properties.recoverySource', 'type': 'SnapshotRecoverySource'}, '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, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_target=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, **kwargs) -> None: - super(SnapshotRecoveryRequest, self).__init__(kind=kind, **kwargs) + def __init__(self, *, overwrite: bool, kind: str=None, snapshot_time: str=None, recovery_source=None, recover_configuration: bool=None, ignore_conflicting_host_names: bool=None, **kwargs) -> None: + super(SnapshotRestoreRequest, self).__init__(kind=kind, **kwargs) self.snapshot_time = snapshot_time - self.recovery_target = recovery_target + self.recovery_source = recovery_source 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/source_control.py b/azure-mgmt-web/azure/mgmt/web/models/source_control.py index 6f018d16e3f0..b6897f5cd8f7 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/source_control.py +++ b/azure-mgmt-web/azure/mgmt/web/models/source_control.py @@ -26,8 +26,6 @@ class SourceControl(ProxyOnlyResource): :type kind: str :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. :type token: str :param token_secret: OAuth access token secret. @@ -49,7 +47,6 @@ class SourceControl(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'source_control_name': {'key': 'properties.name', 'type': 'str'}, 'token': {'key': 'properties.token', 'type': 'str'}, 'token_secret': {'key': 'properties.tokenSecret', 'type': 'str'}, 'refresh_token': {'key': 'properties.refreshToken', 'type': 'str'}, @@ -58,7 +55,6 @@ class SourceControl(ProxyOnlyResource): def __init__(self, **kwargs): super(SourceControl, self).__init__(**kwargs) - self.source_control_name = kwargs.get('source_control_name', None) self.token = kwargs.get('token', None) self.token_secret = kwargs.get('token_secret', None) self.refresh_token = kwargs.get('refresh_token', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/source_control_py3.py b/azure-mgmt-web/azure/mgmt/web/models/source_control_py3.py index 4b160caa147a..be9ec85d95b1 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/source_control_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/source_control_py3.py @@ -26,8 +26,6 @@ class SourceControl(ProxyOnlyResource): :type kind: str :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. :type token: str :param token_secret: OAuth access token secret. @@ -49,16 +47,14 @@ class SourceControl(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'source_control_name': {'key': 'properties.name', 'type': 'str'}, 'token': {'key': 'properties.token', 'type': 'str'}, 'token_secret': {'key': 'properties.tokenSecret', 'type': 'str'}, 'refresh_token': {'key': 'properties.refreshToken', 'type': 'str'}, 'expiration_time': {'key': 'properties.expirationTime', 'type': 'iso-8601'}, } - def __init__(self, *, kind: str=None, source_control_name: str=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, token: str=None, token_secret: str=None, refresh_token: str=None, expiration_time=None, **kwargs) -> None: super(SourceControl, self).__init__(kind=kind, **kwargs) - self.source_control_name = source_control_name self.token = token self.token_secret = token_secret self.refresh_token = refresh_token diff --git a/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity.py b/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity.py index bb62863d4176..0366dae90070 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity.py +++ b/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity.py @@ -29,7 +29,7 @@ class StampCapacity(Model): 'Shared', 'Dedicated', 'Dynamic' :type compute_mode: str or ~azure.mgmt.web.models.ComputeModeOptions :param worker_size: Size of the machines. Possible values include: - 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3' + 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'Default' :type worker_size: str or ~azure.mgmt.web.models.WorkerSizeOptions :param worker_size_id: Size ID of machines: 0 - Small @@ -45,6 +45,8 @@ class StampCapacity(Model): :type is_applicable_for_all_compute_modes: bool :param site_mode: Shared or Dedicated. :type site_mode: str + :param is_linux: Is this a linux stamp capacity + :type is_linux: bool """ _attribute_map = { @@ -58,6 +60,7 @@ class StampCapacity(Model): 'exclude_from_capacity_allocation': {'key': 'excludeFromCapacityAllocation', 'type': 'bool'}, 'is_applicable_for_all_compute_modes': {'key': 'isApplicableForAllComputeModes', 'type': 'bool'}, 'site_mode': {'key': 'siteMode', 'type': 'str'}, + 'is_linux': {'key': 'isLinux', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -72,3 +75,4 @@ def __init__(self, **kwargs): self.exclude_from_capacity_allocation = kwargs.get('exclude_from_capacity_allocation', None) self.is_applicable_for_all_compute_modes = kwargs.get('is_applicable_for_all_compute_modes', None) self.site_mode = kwargs.get('site_mode', None) + self.is_linux = kwargs.get('is_linux', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity_py3.py b/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity_py3.py index f9135aa4057c..2b0bd5ade14e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/stamp_capacity_py3.py @@ -29,7 +29,7 @@ class StampCapacity(Model): 'Shared', 'Dedicated', 'Dynamic' :type compute_mode: str or ~azure.mgmt.web.models.ComputeModeOptions :param worker_size: Size of the machines. Possible values include: - 'Default', 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3' + 'Small', 'Medium', 'Large', 'D1', 'D2', 'D3', 'Default' :type worker_size: str or ~azure.mgmt.web.models.WorkerSizeOptions :param worker_size_id: Size ID of machines: 0 - Small @@ -45,6 +45,8 @@ class StampCapacity(Model): :type is_applicable_for_all_compute_modes: bool :param site_mode: Shared or Dedicated. :type site_mode: str + :param is_linux: Is this a linux stamp capacity + :type is_linux: bool """ _attribute_map = { @@ -58,9 +60,10 @@ class StampCapacity(Model): 'exclude_from_capacity_allocation': {'key': 'excludeFromCapacityAllocation', 'type': 'bool'}, 'is_applicable_for_all_compute_modes': {'key': 'isApplicableForAllComputeModes', 'type': 'bool'}, 'site_mode': {'key': 'siteMode', 'type': 'str'}, + 'is_linux': {'key': 'isLinux', 'type': 'bool'}, } - def __init__(self, *, name: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, **kwargs) -> None: + def __init__(self, *, name: str=None, available_capacity: int=None, total_capacity: int=None, unit: str=None, compute_mode=None, worker_size=None, worker_size_id: int=None, exclude_from_capacity_allocation: bool=None, is_applicable_for_all_compute_modes: bool=None, site_mode: str=None, is_linux: bool=None, **kwargs) -> None: super(StampCapacity, self).__init__(**kwargs) self.name = name self.available_capacity = available_capacity @@ -72,3 +75,4 @@ def __init__(self, *, name: str=None, available_capacity: int=None, total_capaci self.exclude_from_capacity_allocation = exclude_from_capacity_allocation self.is_applicable_for_all_compute_modes = is_applicable_for_all_compute_modes self.site_mode = site_mode + self.is_linux = is_linux diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata.py b/azure-mgmt-web/azure/mgmt/web/models/swift_virtual_network.py similarity index 56% rename from azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata.py rename to azure-mgmt-web/azure/mgmt/web/models/swift_virtual_network.py index 0c6c14f68dc4..a4ee784810b8 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata.py +++ b/azure-mgmt-web/azure/mgmt/web/models/swift_virtual_network.py @@ -12,8 +12,9 @@ from .proxy_only_resource import ProxyOnlyResource -class ResourceHealthMetadata(ProxyOnlyResource): - """Used for getting ResourceHealthCheck settings. +class SwiftVirtualNetwork(ProxyOnlyResource): + """Swift Virtual Network Contract. This is used to enable the new Swift way of + doing virtual network integration. Variables are only populated by the server, and will be ignored when sending a request. @@ -26,11 +27,13 @@ class ResourceHealthMetadata(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: 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 + :param subnet_resource_id: The Virtual Network subnet's resource ID. This + is the subnet that this Web App will join. This subnet must have a + delegation to Microsoft.Web/serverFarms defined first. + :type subnet_resource_id: str + :param swift_supported: A flag that specifies if the scale unit this Web + App is on supports Swift integration. + :type swift_supported: bool """ _validation = { @@ -44,11 +47,11 @@ class ResourceHealthMetadata(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'signal_availability': {'key': 'properties.signalAvailability', 'type': 'bool'}, + 'subnet_resource_id': {'key': 'properties.subnetResourceId', 'type': 'str'}, + 'swift_supported': {'key': 'properties.swiftSupported', 'type': 'bool'}, } def __init__(self, **kwargs): - super(ResourceHealthMetadata, self).__init__(**kwargs) - self.category = kwargs.get('category', None) - self.signal_availability = kwargs.get('signal_availability', None) + super(SwiftVirtualNetwork, self).__init__(**kwargs) + self.subnet_resource_id = kwargs.get('subnet_resource_id', None) + self.swift_supported = kwargs.get('swift_supported', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata_py3.py b/azure-mgmt-web/azure/mgmt/web/models/swift_virtual_network_py3.py similarity index 54% rename from azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata_py3.py rename to azure-mgmt-web/azure/mgmt/web/models/swift_virtual_network_py3.py index 1e151f270086..30c7551eef50 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/swift_virtual_network_py3.py @@ -12,8 +12,9 @@ from .proxy_only_resource_py3 import ProxyOnlyResource -class ResourceHealthMetadata(ProxyOnlyResource): - """Used for getting ResourceHealthCheck settings. +class SwiftVirtualNetwork(ProxyOnlyResource): + """Swift Virtual Network Contract. This is used to enable the new Swift way of + doing virtual network integration. Variables are only populated by the server, and will be ignored when sending a request. @@ -26,11 +27,13 @@ class ResourceHealthMetadata(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: 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 + :param subnet_resource_id: The Virtual Network subnet's resource ID. This + is the subnet that this Web App will join. This subnet must have a + delegation to Microsoft.Web/serverFarms defined first. + :type subnet_resource_id: str + :param swift_supported: A flag that specifies if the scale unit this Web + App is on supports Swift integration. + :type swift_supported: bool """ _validation = { @@ -44,11 +47,11 @@ class ResourceHealthMetadata(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'category': {'key': 'properties.category', 'type': 'str'}, - 'signal_availability': {'key': 'properties.signalAvailability', 'type': 'bool'}, + 'subnet_resource_id': {'key': 'properties.subnetResourceId', 'type': 'str'}, + 'swift_supported': {'key': 'properties.swiftSupported', 'type': 'bool'}, } - def __init__(self, *, kind: str=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: - super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) - self.category = category - self.signal_availability = signal_availability + def __init__(self, *, kind: str=None, subnet_resource_id: str=None, swift_supported: bool=None, **kwargs) -> None: + super(SwiftVirtualNetwork, self).__init__(kind=kind, **kwargs) + self.subnet_resource_id = subnet_resource_id + self.swift_supported = swift_supported 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 index cdd7cbd07acd..a7d255ea8ecd 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/top_level_domain.py +++ b/azure-mgmt-web/azure/mgmt/web/models/top_level_domain.py @@ -26,8 +26,6 @@ class TopLevelDomain(ProxyOnlyResource): :type kind: str :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 domain privacy; otherwise, false. :type privacy: bool @@ -37,7 +35,6 @@ class TopLevelDomain(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'domain_name': {'readonly': True}, } _attribute_map = { @@ -45,11 +42,9 @@ class TopLevelDomain(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'domain_name': {'key': 'properties.name', 'type': 'str'}, 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, } def __init__(self, **kwargs): super(TopLevelDomain, self).__init__(**kwargs) - self.domain_name = None self.privacy = kwargs.get('privacy', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/top_level_domain_py3.py b/azure-mgmt-web/azure/mgmt/web/models/top_level_domain_py3.py index 4d76becde767..4af488b1730a 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/top_level_domain_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/top_level_domain_py3.py @@ -26,8 +26,6 @@ class TopLevelDomain(ProxyOnlyResource): :type kind: str :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 domain privacy; otherwise, false. :type privacy: bool @@ -37,7 +35,6 @@ class TopLevelDomain(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'domain_name': {'readonly': True}, } _attribute_map = { @@ -45,11 +42,9 @@ class TopLevelDomain(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'domain_name': {'key': 'properties.name', 'type': 'str'}, 'privacy': {'key': 'properties.privacy', 'type': 'bool'}, } def __init__(self, *, kind: str=None, privacy: bool=None, **kwargs) -> None: super(TopLevelDomain, self).__init__(kind=kind, **kwargs) - self.domain_name = None self.privacy = privacy diff --git a/azure-mgmt-web/azure/mgmt/web/models/triggered_job_history.py b/azure-mgmt-web/azure/mgmt/web/models/triggered_job_history.py index 4bd86dd9efe2..0e585f4b9c8d 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/triggered_job_history.py +++ b/azure-mgmt-web/azure/mgmt/web/models/triggered_job_history.py @@ -27,8 +27,8 @@ class TriggeredJobHistory(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param triggered_job_runs: List of triggered web job runs. - :type triggered_job_runs: list[~azure.mgmt.web.models.TriggeredJobRun] + :param runs: List of triggered web job runs. + :type runs: list[~azure.mgmt.web.models.TriggeredJobRun] """ _validation = { @@ -42,9 +42,9 @@ class TriggeredJobHistory(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'triggered_job_runs': {'key': 'properties.triggeredJobRuns', 'type': '[TriggeredJobRun]'}, + 'runs': {'key': 'properties.runs', 'type': '[TriggeredJobRun]'}, } def __init__(self, **kwargs): super(TriggeredJobHistory, self).__init__(**kwargs) - self.triggered_job_runs = kwargs.get('triggered_job_runs', None) + self.runs = kwargs.get('runs', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/triggered_job_history_py3.py b/azure-mgmt-web/azure/mgmt/web/models/triggered_job_history_py3.py index 404156b42f0d..e5da0604cde4 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/triggered_job_history_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/triggered_job_history_py3.py @@ -27,8 +27,8 @@ class TriggeredJobHistory(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param triggered_job_runs: List of triggered web job runs. - :type triggered_job_runs: list[~azure.mgmt.web.models.TriggeredJobRun] + :param runs: List of triggered web job runs. + :type runs: list[~azure.mgmt.web.models.TriggeredJobRun] """ _validation = { @@ -42,9 +42,9 @@ class TriggeredJobHistory(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'triggered_job_runs': {'key': 'properties.triggeredJobRuns', 'type': '[TriggeredJobRun]'}, + 'runs': {'key': 'properties.runs', 'type': '[TriggeredJobRun]'}, } - def __init__(self, *, kind: str=None, triggered_job_runs=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, runs=None, **kwargs) -> None: super(TriggeredJobHistory, self).__init__(kind=kind, **kwargs) - self.triggered_job_runs = triggered_job_runs + self.runs = runs diff --git a/azure-mgmt-web/azure/mgmt/web/models/triggered_job_run.py b/azure-mgmt-web/azure/mgmt/web/models/triggered_job_run.py index e0d3653c3690..1caecf94e018 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/triggered_job_run.py +++ b/azure-mgmt-web/azure/mgmt/web/models/triggered_job_run.py @@ -26,10 +26,10 @@ class TriggeredJobRun(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param triggered_job_run_id: Job ID. - :type triggered_job_run_id: str - :ivar triggered_job_run_name: Job name. - :vartype triggered_job_run_name: str + :param web_job_id: Job ID. + :type web_job_id: str + :param web_job_name: Job name. + :type web_job_name: str :param status: Job status. Possible values include: 'Success', 'Failed', 'Error' :type status: str or ~azure.mgmt.web.models.TriggeredWebJobStatus @@ -55,7 +55,6 @@ class TriggeredJobRun(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'triggered_job_run_name': {'readonly': True}, } _attribute_map = { @@ -63,23 +62,23 @@ class TriggeredJobRun(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'triggered_job_run_id': {'key': 'properties.id', 'type': 'str'}, - 'triggered_job_run_name': {'key': 'properties.name', 'type': 'str'}, + 'web_job_id': {'key': 'properties.web_job_id', 'type': 'str'}, + 'web_job_name': {'key': 'properties.web_job_name', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'TriggeredWebJobStatus'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.end_time', 'type': 'iso-8601'}, 'duration': {'key': 'properties.duration', 'type': 'str'}, - 'output_url': {'key': 'properties.outputUrl', 'type': 'str'}, - 'error_url': {'key': 'properties.errorUrl', 'type': 'str'}, + 'output_url': {'key': 'properties.output_url', 'type': 'str'}, + 'error_url': {'key': 'properties.error_url', 'type': 'str'}, 'url': {'key': 'properties.url', 'type': 'str'}, - 'job_name': {'key': 'properties.jobName', 'type': 'str'}, + 'job_name': {'key': 'properties.job_name', 'type': 'str'}, 'trigger': {'key': 'properties.trigger', 'type': 'str'}, } def __init__(self, **kwargs): super(TriggeredJobRun, self).__init__(**kwargs) - self.triggered_job_run_id = kwargs.get('triggered_job_run_id', None) - self.triggered_job_run_name = None + self.web_job_id = kwargs.get('web_job_id', None) + self.web_job_name = kwargs.get('web_job_name', None) self.status = kwargs.get('status', None) self.start_time = kwargs.get('start_time', None) self.end_time = kwargs.get('end_time', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/triggered_job_run_py3.py b/azure-mgmt-web/azure/mgmt/web/models/triggered_job_run_py3.py index 631559f3102f..e939a2017f08 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/triggered_job_run_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/triggered_job_run_py3.py @@ -26,10 +26,10 @@ class TriggeredJobRun(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param triggered_job_run_id: Job ID. - :type triggered_job_run_id: str - :ivar triggered_job_run_name: Job name. - :vartype triggered_job_run_name: str + :param web_job_id: Job ID. + :type web_job_id: str + :param web_job_name: Job name. + :type web_job_name: str :param status: Job status. Possible values include: 'Success', 'Failed', 'Error' :type status: str or ~azure.mgmt.web.models.TriggeredWebJobStatus @@ -55,7 +55,6 @@ class TriggeredJobRun(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'triggered_job_run_name': {'readonly': True}, } _attribute_map = { @@ -63,23 +62,23 @@ class TriggeredJobRun(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'triggered_job_run_id': {'key': 'properties.id', 'type': 'str'}, - 'triggered_job_run_name': {'key': 'properties.name', 'type': 'str'}, + 'web_job_id': {'key': 'properties.web_job_id', 'type': 'str'}, + 'web_job_name': {'key': 'properties.web_job_name', 'type': 'str'}, 'status': {'key': 'properties.status', 'type': 'TriggeredWebJobStatus'}, - 'start_time': {'key': 'properties.startTime', 'type': 'iso-8601'}, - 'end_time': {'key': 'properties.endTime', 'type': 'iso-8601'}, + 'start_time': {'key': 'properties.start_time', 'type': 'iso-8601'}, + 'end_time': {'key': 'properties.end_time', 'type': 'iso-8601'}, 'duration': {'key': 'properties.duration', 'type': 'str'}, - 'output_url': {'key': 'properties.outputUrl', 'type': 'str'}, - 'error_url': {'key': 'properties.errorUrl', 'type': 'str'}, + 'output_url': {'key': 'properties.output_url', 'type': 'str'}, + 'error_url': {'key': 'properties.error_url', 'type': 'str'}, 'url': {'key': 'properties.url', 'type': 'str'}, - 'job_name': {'key': 'properties.jobName', 'type': 'str'}, + 'job_name': {'key': 'properties.job_name', 'type': 'str'}, 'trigger': {'key': 'properties.trigger', 'type': 'str'}, } - def __init__(self, *, kind: str=None, triggered_job_run_id: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, web_job_id: str=None, web_job_name: str=None, status=None, start_time=None, end_time=None, duration: str=None, output_url: str=None, error_url: str=None, url: str=None, job_name: str=None, trigger: str=None, **kwargs) -> None: super(TriggeredJobRun, self).__init__(kind=kind, **kwargs) - self.triggered_job_run_id = triggered_job_run_id - self.triggered_job_run_name = None + self.web_job_id = web_job_id + self.web_job_name = web_job_name self.status = status self.start_time = start_time self.end_time = end_time diff --git a/azure-mgmt-web/azure/mgmt/web/models/triggered_web_job.py b/azure-mgmt-web/azure/mgmt/web/models/triggered_web_job.py index f3a58d01e26c..7c5bf24dbff4 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/triggered_web_job.py +++ b/azure-mgmt-web/azure/mgmt/web/models/triggered_web_job.py @@ -32,18 +32,15 @@ class TriggeredWebJob(ProxyOnlyResource): :type history_url: str :param scheduler_logs_url: Scheduler Logs URL. :type scheduler_logs_url: str - :ivar triggered_web_job_name: Job name. Used as job identifier in ARM - resource URI. - :vartype triggered_web_job_name: str :param run_command: Run command. :type run_command: str :param url: Job URL. :type url: str :param extra_info_url: Extra Info URL. :type extra_info_url: str - :param job_type: Job type. Possible values include: 'Continuous', + :param web_job_type: Job type. Possible values include: 'Continuous', 'Triggered' - :type job_type: str or ~azure.mgmt.web.models.WebJobType + :type web_job_type: str or ~azure.mgmt.web.models.WebJobType :param error: Error information. :type error: str :param using_sdk: Using SDK? @@ -56,7 +53,6 @@ class TriggeredWebJob(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'triggered_web_job_name': {'readonly': True}, } _attribute_map = { @@ -64,16 +60,15 @@ class TriggeredWebJob(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'latest_run': {'key': 'properties.latestRun', 'type': 'TriggeredJobRun'}, - 'history_url': {'key': 'properties.historyUrl', 'type': 'str'}, - 'scheduler_logs_url': {'key': 'properties.schedulerLogsUrl', 'type': 'str'}, - 'triggered_web_job_name': {'key': 'properties.name', 'type': 'str'}, - 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, + 'latest_run': {'key': 'properties.latest_run', 'type': 'TriggeredJobRun'}, + 'history_url': {'key': 'properties.history_url', 'type': 'str'}, + 'scheduler_logs_url': {'key': 'properties.scheduler_logs_url', 'type': 'str'}, + 'run_command': {'key': 'properties.run_command', 'type': 'str'}, 'url': {'key': 'properties.url', 'type': 'str'}, - 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, - 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, + 'extra_info_url': {'key': 'properties.extra_info_url', 'type': 'str'}, + 'web_job_type': {'key': 'properties.web_job_type', 'type': 'WebJobType'}, 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': '{object}'}, } @@ -82,11 +77,10 @@ def __init__(self, **kwargs): self.latest_run = kwargs.get('latest_run', None) self.history_url = kwargs.get('history_url', None) self.scheduler_logs_url = kwargs.get('scheduler_logs_url', None) - self.triggered_web_job_name = None self.run_command = kwargs.get('run_command', None) self.url = kwargs.get('url', None) self.extra_info_url = kwargs.get('extra_info_url', None) - self.job_type = kwargs.get('job_type', None) + self.web_job_type = kwargs.get('web_job_type', None) self.error = kwargs.get('error', None) self.using_sdk = kwargs.get('using_sdk', None) self.settings = kwargs.get('settings', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/triggered_web_job_py3.py b/azure-mgmt-web/azure/mgmt/web/models/triggered_web_job_py3.py index c3fc83e4a1df..3701608eafe0 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/triggered_web_job_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/triggered_web_job_py3.py @@ -32,18 +32,15 @@ class TriggeredWebJob(ProxyOnlyResource): :type history_url: str :param scheduler_logs_url: Scheduler Logs URL. :type scheduler_logs_url: str - :ivar triggered_web_job_name: Job name. Used as job identifier in ARM - resource URI. - :vartype triggered_web_job_name: str :param run_command: Run command. :type run_command: str :param url: Job URL. :type url: str :param extra_info_url: Extra Info URL. :type extra_info_url: str - :param job_type: Job type. Possible values include: 'Continuous', + :param web_job_type: Job type. Possible values include: 'Continuous', 'Triggered' - :type job_type: str or ~azure.mgmt.web.models.WebJobType + :type web_job_type: str or ~azure.mgmt.web.models.WebJobType :param error: Error information. :type error: str :param using_sdk: Using SDK? @@ -56,7 +53,6 @@ class TriggeredWebJob(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'triggered_web_job_name': {'readonly': True}, } _attribute_map = { @@ -64,29 +60,27 @@ class TriggeredWebJob(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'latest_run': {'key': 'properties.latestRun', 'type': 'TriggeredJobRun'}, - 'history_url': {'key': 'properties.historyUrl', 'type': 'str'}, - 'scheduler_logs_url': {'key': 'properties.schedulerLogsUrl', 'type': 'str'}, - 'triggered_web_job_name': {'key': 'properties.name', 'type': 'str'}, - 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, + 'latest_run': {'key': 'properties.latest_run', 'type': 'TriggeredJobRun'}, + 'history_url': {'key': 'properties.history_url', 'type': 'str'}, + 'scheduler_logs_url': {'key': 'properties.scheduler_logs_url', 'type': 'str'}, + 'run_command': {'key': 'properties.run_command', 'type': 'str'}, 'url': {'key': 'properties.url', 'type': 'str'}, - 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, - 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, + 'extra_info_url': {'key': 'properties.extra_info_url', 'type': 'str'}, + 'web_job_type': {'key': 'properties.web_job_type', 'type': 'WebJobType'}, 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': '{object}'}, } - def __init__(self, *, kind: str=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, latest_run=None, history_url: str=None, scheduler_logs_url: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: super(TriggeredWebJob, self).__init__(kind=kind, **kwargs) self.latest_run = latest_run self.history_url = history_url self.scheduler_logs_url = scheduler_logs_url - self.triggered_web_job_name = None self.run_command = run_command self.url = url self.extra_info_url = extra_info_url - self.job_type = job_type + self.web_job_type = web_job_type self.error = error self.using_sdk = using_sdk self.settings = settings diff --git a/azure-mgmt-web/azure/mgmt/web/models/usage.py b/azure-mgmt-web/azure/mgmt/web/models/usage.py index 8cc6e379603e..54f3cc94538c 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/usage.py +++ b/azure-mgmt-web/azure/mgmt/web/models/usage.py @@ -28,8 +28,6 @@ class Usage(ProxyOnlyResource): :vartype type: str :ivar display_name: Friendly name shown in the UI. :vartype display_name: str - :ivar usage_name: Name of the quota. - :vartype usage_name: str :ivar resource_name: Name of the quota resource. :vartype resource_name: str :ivar unit: Units of measurement for the quota resource. @@ -52,7 +50,6 @@ class Usage(ProxyOnlyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'display_name': {'readonly': True}, - 'usage_name': {'readonly': True}, 'resource_name': {'readonly': True}, 'unit': {'readonly': True}, 'current_value': {'readonly': True}, @@ -68,7 +65,6 @@ class Usage(ProxyOnlyResource): 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'usage_name': {'key': 'properties.name', 'type': 'str'}, 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, 'unit': {'key': 'properties.unit', 'type': 'str'}, 'current_value': {'key': 'properties.currentValue', 'type': 'long'}, @@ -81,7 +77,6 @@ class Usage(ProxyOnlyResource): def __init__(self, **kwargs): super(Usage, self).__init__(**kwargs) self.display_name = None - self.usage_name = None self.resource_name = None self.unit = None self.current_value = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/usage_py3.py b/azure-mgmt-web/azure/mgmt/web/models/usage_py3.py index 90497208ad04..81c94d115bd8 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/usage_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/usage_py3.py @@ -28,8 +28,6 @@ class Usage(ProxyOnlyResource): :vartype type: str :ivar display_name: Friendly name shown in the UI. :vartype display_name: str - :ivar usage_name: Name of the quota. - :vartype usage_name: str :ivar resource_name: Name of the quota resource. :vartype resource_name: str :ivar unit: Units of measurement for the quota resource. @@ -52,7 +50,6 @@ class Usage(ProxyOnlyResource): 'name': {'readonly': True}, 'type': {'readonly': True}, 'display_name': {'readonly': True}, - 'usage_name': {'readonly': True}, 'resource_name': {'readonly': True}, 'unit': {'readonly': True}, 'current_value': {'readonly': True}, @@ -68,7 +65,6 @@ class Usage(ProxyOnlyResource): 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, 'display_name': {'key': 'properties.displayName', 'type': 'str'}, - 'usage_name': {'key': 'properties.name', 'type': 'str'}, 'resource_name': {'key': 'properties.resourceName', 'type': 'str'}, 'unit': {'key': 'properties.unit', 'type': 'str'}, 'current_value': {'key': 'properties.currentValue', 'type': 'long'}, @@ -81,7 +77,6 @@ class Usage(ProxyOnlyResource): def __init__(self, *, kind: str=None, **kwargs) -> None: super(Usage, self).__init__(kind=kind, **kwargs) self.display_name = None - self.usage_name = None self.resource_name = None self.unit = None self.current_value = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/user.py b/azure-mgmt-web/azure/mgmt/web/models/user.py index d34af225db0b..548b51584a9e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/user.py +++ b/azure-mgmt-web/azure/mgmt/web/models/user.py @@ -28,8 +28,6 @@ class User(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param user_name: Username - :type user_name: str :param publishing_user_name: Required. Username used for publishing. :type publishing_user_name: str :param publishing_password: Password used for publishing. @@ -39,6 +37,8 @@ class User(ProxyOnlyResource): :param publishing_password_hash_salt: Password hash salt used for publishing. :type publishing_password_hash_salt: str + :param scm_uri: Url of SCM site. + :type scm_uri: str """ _validation = { @@ -53,17 +53,17 @@ class User(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.name', 'type': 'str'}, 'publishing_user_name': {'key': 'properties.publishingUserName', 'type': 'str'}, 'publishing_password': {'key': 'properties.publishingPassword', 'type': 'str'}, 'publishing_password_hash': {'key': 'properties.publishingPasswordHash', 'type': 'str'}, 'publishing_password_hash_salt': {'key': 'properties.publishingPasswordHashSalt', 'type': 'str'}, + 'scm_uri': {'key': 'properties.scmUri', 'type': 'str'}, } def __init__(self, **kwargs): super(User, self).__init__(**kwargs) - self.user_name = kwargs.get('user_name', None) self.publishing_user_name = kwargs.get('publishing_user_name', None) self.publishing_password = kwargs.get('publishing_password', None) self.publishing_password_hash = kwargs.get('publishing_password_hash', None) self.publishing_password_hash_salt = kwargs.get('publishing_password_hash_salt', None) + self.scm_uri = kwargs.get('scm_uri', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/user_py3.py b/azure-mgmt-web/azure/mgmt/web/models/user_py3.py index 78fc453a89e0..6f57069f740b 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/user_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/user_py3.py @@ -28,8 +28,6 @@ class User(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :param user_name: Username - :type user_name: str :param publishing_user_name: Required. Username used for publishing. :type publishing_user_name: str :param publishing_password: Password used for publishing. @@ -39,6 +37,8 @@ class User(ProxyOnlyResource): :param publishing_password_hash_salt: Password hash salt used for publishing. :type publishing_password_hash_salt: str + :param scm_uri: Url of SCM site. + :type scm_uri: str """ _validation = { @@ -53,17 +53,17 @@ class User(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'user_name': {'key': 'properties.name', 'type': 'str'}, 'publishing_user_name': {'key': 'properties.publishingUserName', 'type': 'str'}, 'publishing_password': {'key': 'properties.publishingPassword', 'type': 'str'}, 'publishing_password_hash': {'key': 'properties.publishingPasswordHash', 'type': 'str'}, 'publishing_password_hash_salt': {'key': 'properties.publishingPasswordHashSalt', 'type': 'str'}, + 'scm_uri': {'key': 'properties.scmUri', 'type': 'str'}, } - def __init__(self, *, publishing_user_name: str, kind: str=None, user_name: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, **kwargs) -> None: + def __init__(self, *, publishing_user_name: str, kind: str=None, publishing_password: str=None, publishing_password_hash: str=None, publishing_password_hash_salt: str=None, scm_uri: str=None, **kwargs) -> None: super(User, self).__init__(kind=kind, **kwargs) - self.user_name = user_name self.publishing_user_name = publishing_user_name self.publishing_password = publishing_password self.publishing_password_hash = publishing_password_hash self.publishing_password_hash_salt = publishing_password_hash_salt + self.scm_uri = scm_uri diff --git a/azure-mgmt-web/azure/mgmt/web/models/validate_request.py b/azure-mgmt-web/azure/mgmt/web/models/validate_request.py index 472cbbc7612b..6d1deca2bc5e 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/validate_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/validate_request.py @@ -40,6 +40,9 @@ class ValidateRequest(Model): :param hosting_environment: Name of App Service Environment where app or App Service plan should be created. :type hosting_environment: str + :param is_xenon: true if App Service plan is running as a + windows container + :type is_xenon: bool """ _validation = { @@ -59,6 +62,7 @@ class ValidateRequest(Model): 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, 'capacity': {'key': 'properties.capacity', 'type': 'int'}, 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -72,3 +76,4 @@ def __init__(self, **kwargs): self.is_spot = kwargs.get('is_spot', None) self.capacity = kwargs.get('capacity', None) self.hosting_environment = kwargs.get('hosting_environment', None) + self.is_xenon = kwargs.get('is_xenon', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/validate_request_py3.py b/azure-mgmt-web/azure/mgmt/web/models/validate_request_py3.py index 711a94575335..848236c53bd2 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/validate_request_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/validate_request_py3.py @@ -40,6 +40,9 @@ class ValidateRequest(Model): :param hosting_environment: Name of App Service Environment where app or App Service plan should be created. :type hosting_environment: str + :param is_xenon: true if App Service plan is running as a + windows container + :type is_xenon: bool """ _validation = { @@ -59,9 +62,10 @@ class ValidateRequest(Model): 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, 'capacity': {'key': 'properties.capacity', 'type': 'int'}, 'hosting_environment': {'key': 'properties.hostingEnvironment', 'type': 'str'}, + 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, } - def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, **kwargs) -> None: + def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, sku_name: str=None, need_linux_workers: bool=None, is_spot: bool=None, capacity: int=None, hosting_environment: str=None, is_xenon: bool=None, **kwargs) -> None: super(ValidateRequest, self).__init__(**kwargs) self.name = name self.type = type @@ -72,3 +76,4 @@ def __init__(self, *, name: str, type, location: str, server_farm_id: str=None, self.is_spot = is_spot self.capacity = capacity self.hosting_environment = hosting_environment + self.is_xenon = is_xenon diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_route.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_route.py index 43a33b9d117e..8e0158098ceb 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/vnet_route.py +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_route.py @@ -27,9 +27,6 @@ class VnetRoute(ProxyOnlyResource): :type kind: str :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 :param start_address: The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified. @@ -58,7 +55,6 @@ class VnetRoute(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', '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'}, @@ -66,7 +62,6 @@ class VnetRoute(ProxyOnlyResource): def __init__(self, **kwargs): super(VnetRoute, self).__init__(**kwargs) - self.vnet_route_name = kwargs.get('vnet_route_name', None) self.start_address = kwargs.get('start_address', None) self.end_address = kwargs.get('end_address', None) self.route_type = kwargs.get('route_type', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_route_py3.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_route_py3.py index 9412206ce11b..1816fa5834c9 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/vnet_route_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_route_py3.py @@ -27,9 +27,6 @@ class VnetRoute(ProxyOnlyResource): :type kind: str :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 :param start_address: The starting address for this route. This may also include a CIDR notation, in which case the end address must not be specified. @@ -58,15 +55,13 @@ class VnetRoute(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', '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, *, kind: str=None, vnet_route_name: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, start_address: str=None, end_address: str=None, route_type=None, **kwargs) -> None: super(VnetRoute, self).__init__(kind=kind, **kwargs) - self.vnet_route_name = vnet_route_name self.start_address = start_address self.end_address = end_address self.route_type = route_type diff --git a/azure-mgmt-web/azure/mgmt/web/models/web_job.py b/azure-mgmt-web/azure/mgmt/web/models/web_job.py index 5454d02ccbe7..d162868885d3 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/web_job.py +++ b/azure-mgmt-web/azure/mgmt/web/models/web_job.py @@ -26,17 +26,15 @@ class WebJob(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :ivar web_job_name: Job name. Used as job identifier in ARM resource URI. - :vartype web_job_name: str :param run_command: Run command. :type run_command: str :param url: Job URL. :type url: str :param extra_info_url: Extra Info URL. :type extra_info_url: str - :param job_type: Job type. Possible values include: 'Continuous', + :param web_job_type: Job type. Possible values include: 'Continuous', 'Triggered' - :type job_type: str or ~azure.mgmt.web.models.WebJobType + :type web_job_type: str or ~azure.mgmt.web.models.WebJobType :param error: Error information. :type error: str :param using_sdk: Using SDK? @@ -49,7 +47,6 @@ class WebJob(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'web_job_name': {'readonly': True}, } _attribute_map = { @@ -57,23 +54,21 @@ class WebJob(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'web_job_name': {'key': 'properties.name', 'type': 'str'}, - 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, + 'run_command': {'key': 'properties.run_command', 'type': 'str'}, 'url': {'key': 'properties.url', 'type': 'str'}, - 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, - 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, + 'extra_info_url': {'key': 'properties.extra_info_url', 'type': 'str'}, + 'web_job_type': {'key': 'properties.web_job_type', 'type': 'WebJobType'}, 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': '{object}'}, } def __init__(self, **kwargs): super(WebJob, self).__init__(**kwargs) - self.web_job_name = None self.run_command = kwargs.get('run_command', None) self.url = kwargs.get('url', None) self.extra_info_url = kwargs.get('extra_info_url', None) - self.job_type = kwargs.get('job_type', None) + self.web_job_type = kwargs.get('web_job_type', None) self.error = kwargs.get('error', None) self.using_sdk = kwargs.get('using_sdk', None) self.settings = kwargs.get('settings', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/web_job_py3.py b/azure-mgmt-web/azure/mgmt/web/models/web_job_py3.py index ce5d939e01a8..47bb10e340b6 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/web_job_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/web_job_py3.py @@ -26,17 +26,15 @@ class WebJob(ProxyOnlyResource): :type kind: str :ivar type: Resource type. :vartype type: str - :ivar web_job_name: Job name. Used as job identifier in ARM resource URI. - :vartype web_job_name: str :param run_command: Run command. :type run_command: str :param url: Job URL. :type url: str :param extra_info_url: Extra Info URL. :type extra_info_url: str - :param job_type: Job type. Possible values include: 'Continuous', + :param web_job_type: Job type. Possible values include: 'Continuous', 'Triggered' - :type job_type: str or ~azure.mgmt.web.models.WebJobType + :type web_job_type: str or ~azure.mgmt.web.models.WebJobType :param error: Error information. :type error: str :param using_sdk: Using SDK? @@ -49,7 +47,6 @@ class WebJob(ProxyOnlyResource): 'id': {'readonly': True}, 'name': {'readonly': True}, 'type': {'readonly': True}, - 'web_job_name': {'readonly': True}, } _attribute_map = { @@ -57,23 +54,21 @@ class WebJob(ProxyOnlyResource): 'name': {'key': 'name', 'type': 'str'}, 'kind': {'key': 'kind', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'web_job_name': {'key': 'properties.name', 'type': 'str'}, - 'run_command': {'key': 'properties.runCommand', 'type': 'str'}, + 'run_command': {'key': 'properties.run_command', 'type': 'str'}, 'url': {'key': 'properties.url', 'type': 'str'}, - 'extra_info_url': {'key': 'properties.extraInfoUrl', 'type': 'str'}, - 'job_type': {'key': 'properties.jobType', 'type': 'WebJobType'}, + 'extra_info_url': {'key': 'properties.extra_info_url', 'type': 'str'}, + 'web_job_type': {'key': 'properties.web_job_type', 'type': 'WebJobType'}, 'error': {'key': 'properties.error', 'type': 'str'}, - 'using_sdk': {'key': 'properties.usingSdk', 'type': 'bool'}, + 'using_sdk': {'key': 'properties.using_sdk', 'type': 'bool'}, 'settings': {'key': 'properties.settings', 'type': '{object}'}, } - def __init__(self, *, kind: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, run_command: str=None, url: str=None, extra_info_url: str=None, web_job_type=None, error: str=None, using_sdk: bool=None, settings=None, **kwargs) -> None: super(WebJob, self).__init__(kind=kind, **kwargs) - self.web_job_name = None self.run_command = run_command self.url = url self.extra_info_url = extra_info_url - self.job_type = job_type + self.web_job_type = web_job_type self.error = error self.using_sdk = using_sdk self.settings = settings diff --git a/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py b/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py index bfaeda5eb909..087cf3dfcdd2 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py +++ b/azure-mgmt-web/azure/mgmt/web/models/web_site_management_client_enums.py @@ -84,6 +84,13 @@ class RouteType(str, Enum): class ManagedServiceIdentityType(str, Enum): system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + + +class IpFilterTag(str, Enum): + + default = "Default" + xff_proxy = "XffProxy" class AutoHealActionType(str, Enum): @@ -147,6 +154,13 @@ class SupportedTlsVersions(str, Enum): one_full_stop_two = "1.2" +class FtpsState(str, Enum): + + all_allowed = "AllAllowed" + ftps_only = "FtpsOnly" + disabled = "Disabled" + + class SslState(str, Enum): disabled = "Disabled" @@ -259,13 +273,13 @@ class ComputeModeOptions(str, Enum): class WorkerSizeOptions(str, Enum): - default = "Default" small = "Small" medium = "Medium" large = "Large" d1 = "D1" d2 = "D2" d3 = "D3" + default = "Default" class AccessControlEntryAction(str, Enum): @@ -405,14 +419,6 @@ class FrequencyUnit(str, Enum): hour = "Hour" -class BackupRestoreOperationType(str, Enum): - - default = "Default" - clone = "Clone" - relocation = "Relocation" - snapshot = "Snapshot" - - class ContinuousWebJobStatus(str, Enum): initializing = "Initializing" @@ -471,6 +477,15 @@ class PublicCertificateLocation(str, Enum): unknown = "Unknown" +class BackupRestoreOperationType(str, Enum): + + default = "Default" + clone = "Clone" + relocation = "Relocation" + snapshot = "Snapshot" + cloud_fs = "CloudFS" + + class UnauthenticatedClientAction(str, Enum): redirect_to_login_page = "RedirectToLoginPage" @@ -513,6 +528,6 @@ class SkuName(str, Enum): basic = "Basic" standard = "Standard" premium = "Premium" - premium_v2 = "PremiumV2" dynamic = "Dynamic" isolated = "Isolated" + premium_v2 = "PremiumV2" diff --git a/azure-mgmt-web/azure/mgmt/web/operations/__init__.py b/azure-mgmt-web/azure/mgmt/web/operations/__init__.py index 5ceaac0d94eb..93d9712f46bd 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/__init__.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/__init__.py @@ -19,8 +19,6 @@ from .diagnostics_operations import DiagnosticsOperations from .provider_operations import ProviderOperations from .recommendations_operations import RecommendationsOperations -from .resource_health_metadata_operations import ResourceHealthMetadataOperations -from .billing_meters_operations import BillingMetersOperations from .web_apps_operations import WebAppsOperations from .app_service_environments_operations import AppServiceEnvironmentsOperations from .app_service_plans_operations import AppServicePlansOperations @@ -36,8 +34,6 @@ 'DiagnosticsOperations', 'ProviderOperations', 'RecommendationsOperations', - 'ResourceHealthMetadataOperations', - 'BillingMetersOperations', '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 index 756f74b6c1e5..24d43ce7eb3d 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/app_service_certificate_orders_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/app_service_certificate_orders_operations.py @@ -25,7 +25,7 @@ class AppServiceCertificateOrdersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2015-08-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-08-01" + self.api_version = "2018-02-01" self.config = config @@ -53,7 +53,8 @@ def list( :return: An iterator like instance of AppServiceCertificateOrder :rtype: ~azure.mgmt.web.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.models.AppServiceCertificateOrder] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -89,9 +90,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -181,7 +180,8 @@ def list_by_resource_group( :return: An iterator like instance of AppServiceCertificateOrder :rtype: ~azure.mgmt.web.models.AppServiceCertificateOrderPaged[~azure.mgmt.web.models.AppServiceCertificateOrder] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -218,9 +218,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -254,7 +252,8 @@ def get( :return: AppServiceCertificateOrder or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.AppServiceCertificateOrder or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -284,9 +283,7 @@ def get( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -335,9 +332,7 @@ def _create_or_update_initial( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -379,7 +374,8 @@ def create_or_update( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.AppServiceCertificateOrder] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.AppServiceCertificateOrder]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -488,7 +484,8 @@ def update( :return: AppServiceCertificateOrder or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.AppServiceCertificateOrder or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -522,9 +519,7 @@ def update( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -559,7 +554,8 @@ def list_certificates( :return: An iterator like instance of AppServiceCertificateResource :rtype: ~azure.mgmt.web.models.AppServiceCertificateResourcePaged[~azure.mgmt.web.models.AppServiceCertificateResource] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -597,9 +593,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -636,7 +630,8 @@ def get_certificate( raw=true :rtype: ~azure.mgmt.web.models.AppServiceCertificateResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_certificate.metadata['url'] @@ -667,9 +662,7 @@ def get_certificate( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -719,9 +712,7 @@ def _create_or_update_certificate_initial( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -764,7 +755,8 @@ def create_or_update_certificate( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.AppServiceCertificateResource] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.AppServiceCertificateResource]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._create_or_update_certificate_initial( resource_group_name=resource_group_name, @@ -879,7 +871,8 @@ def update_certificate( raw=true :rtype: ~azure.mgmt.web.models.AppServiceCertificateResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_certificate.metadata['url'] @@ -914,9 +907,7 @@ def update_certificate( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1206,7 +1197,8 @@ def retrieve_site_seal( :return: SiteSeal or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteSeal or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ site_seal_request = models.SiteSealRequest(light_theme=light_theme, locale=locale) @@ -1242,9 +1234,7 @@ def retrieve_site_seal( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1334,7 +1324,8 @@ def retrieve_certificate_actions( :return: list or ClientRawResponse if raw=true :rtype: list[~azure.mgmt.web.models.CertificateOrderAction] or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.retrieve_certificate_actions.metadata['url'] @@ -1364,9 +1355,7 @@ def retrieve_certificate_actions( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1399,7 +1388,8 @@ def retrieve_certificate_email_history( :return: list or ClientRawResponse if raw=true :rtype: list[~azure.mgmt.web.models.CertificateEmail] or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.retrieve_certificate_email_history.metadata['url'] @@ -1429,9 +1419,7 @@ def retrieve_certificate_email_history( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None diff --git a/azure-mgmt-web/azure/mgmt/web/operations/app_service_environments_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/app_service_environments_operations.py index 033fade0ec3e..59804fc6d34a 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/app_service_environments_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/app_service_environments_operations.py @@ -25,7 +25,7 @@ class AppServiceEnvironmentsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-09-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-09-01" + self.api_version = "2018-02-01" self.config = config @@ -53,7 +53,8 @@ def list( :return: An iterator like instance of AppServiceEnvironmentResource :rtype: ~azure.mgmt.web.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.models.AppServiceEnvironmentResource] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -89,9 +90,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -123,7 +122,8 @@ def list_by_resource_group( :return: An iterator like instance of AppServiceEnvironmentResource :rtype: ~azure.mgmt.web.models.AppServiceEnvironmentResourcePaged[~azure.mgmt.web.models.AppServiceEnvironmentResource] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -160,9 +160,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -197,7 +195,8 @@ def get( raw=true :rtype: ~azure.mgmt.web.models.AppServiceEnvironmentResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -227,9 +226,7 @@ def get( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -538,7 +535,8 @@ def list_capacities( :return: An iterator like instance of StampCapacity :rtype: ~azure.mgmt.web.models.StampCapacityPaged[~azure.mgmt.web.models.StampCapacity] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -576,9 +574,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -612,7 +608,8 @@ def list_vips( :return: AddressResponse or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.AddressResponse or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_vips.metadata['url'] @@ -642,9 +639,7 @@ def list_vips( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -658,6 +653,115 @@ def list_vips( return deserialized list_vips.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/capacities/virtualip'} + + def _change_vnet_initial( + self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, **operation_config): + vnet_info = models.VirtualNetworkProfile(id=id, subnet=subnet) + + # Construct URL + url = self.change_vnet.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(vnet_info, 'VirtualNetworkProfile') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('WebAppCollection', response) + if response.status_code == 202: + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def change_vnet( + self, resource_group_name, name, id=None, subnet=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Move an App Service Environment to a different VNET. + + Move an App Service Environment to a different VNET. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the App Service Environment. + :type name: str + :param id: Resource id of the Virtual Network. + :type id: str + :param subnet: Subnet within the Virtual Network. + :type subnet: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns WebAppCollection or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.WebAppCollection] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.WebAppCollection]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._change_vnet_initial( + resource_group_name=resource_group_name, + name=name, + id=id, + subnet=subnet, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('WebAppCollection', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + change_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/hostingEnvironments/{name}/changeVirtualNetwork'} + def list_diagnostics( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): """Get diagnostic information for an App Service Environment. @@ -677,7 +781,8 @@ def list_diagnostics( :return: list or ClientRawResponse if raw=true :rtype: list[~azure.mgmt.web.models.HostingEnvironmentDiagnostics] or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_diagnostics.metadata['url'] @@ -707,9 +812,7 @@ def list_diagnostics( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -745,7 +848,8 @@ def get_diagnostics_item( raw=true :rtype: ~azure.mgmt.web.models.HostingEnvironmentDiagnostics or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_diagnostics_item.metadata['url'] @@ -776,9 +880,7 @@ def get_diagnostics_item( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -811,7 +913,8 @@ def list_metric_definitions( :return: MetricDefinition or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.MetricDefinition or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_metric_definitions.metadata['url'] @@ -841,9 +944,7 @@ def list_metric_definitions( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -885,7 +986,8 @@ def list_metrics( :return: An iterator like instance of ResourceMetric :rtype: ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -927,9 +1029,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -963,7 +1063,8 @@ def list_multi_role_pools( :return: An iterator like instance of WorkerPoolResource :rtype: ~azure.mgmt.web.models.WorkerPoolResourcePaged[~azure.mgmt.web.models.WorkerPoolResource] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1001,9 +1102,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1037,7 +1136,8 @@ def get_multi_role_pool( :return: WorkerPoolResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.WorkerPoolResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_multi_role_pool.metadata['url'] @@ -1067,9 +1167,7 @@ def get_multi_role_pool( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1286,7 +1384,8 @@ def list_multi_role_pool_instance_metric_definitions( :return: An iterator like instance of ResourceMetricDefinition :rtype: ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1325,9 +1424,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1368,7 +1465,8 @@ def list_multi_role_pool_instance_metrics( :return: An iterator like instance of ResourceMetric :rtype: ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1409,9 +1507,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1447,7 +1543,8 @@ def list_multi_role_metric_definitions( :return: An iterator like instance of ResourceMetricDefinition :rtype: ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1485,9 +1582,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1536,7 +1631,8 @@ def list_multi_role_metrics( :return: An iterator like instance of ResourceMetric :rtype: ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1584,9 +1680,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1620,7 +1714,8 @@ def list_multi_role_pool_skus( :return: An iterator like instance of SkuInfo :rtype: ~azure.mgmt.web.models.SkuInfoPaged[~azure.mgmt.web.models.SkuInfo] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1658,9 +1753,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1694,7 +1787,8 @@ def list_multi_role_usages( :return: An iterator like instance of Usage :rtype: ~azure.mgmt.web.models.UsagePaged[~azure.mgmt.web.models.Usage] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1732,9 +1826,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1768,7 +1860,8 @@ def list_operations( :return: list or ClientRawResponse if raw=true :rtype: list[~azure.mgmt.web.models.Operation] or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_operations.metadata['url'] @@ -1798,9 +1891,7 @@ def list_operations( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1902,9 +1993,7 @@ def _resume_initial( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1941,7 +2030,8 @@ def resume( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.WebAppCollection] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.WebAppCollection]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._resume_initial( resource_group_name=resource_group_name, @@ -1988,7 +2078,8 @@ def list_app_service_plans( :return: An iterator like instance of AppServicePlan :rtype: ~azure.mgmt.web.models.AppServicePlanPaged[~azure.mgmt.web.models.AppServicePlan] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -2026,9 +2117,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -2064,7 +2153,8 @@ def list_web_apps( overrides`. :return: An iterator like instance of Site :rtype: ~azure.mgmt.web.models.SitePaged[~azure.mgmt.web.models.Site] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -2104,9 +2194,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -2152,9 +2240,7 @@ def _suspend_initial( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -2191,7 +2277,8 @@ def suspend( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.WebAppCollection] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.WebAppCollection]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._suspend_initial( resource_group_name=resource_group_name, @@ -2244,7 +2331,8 @@ def list_usages( :return: An iterator like instance of CsmUsageQuota :rtype: ~azure.mgmt.web.models.CsmUsageQuotaPaged[~azure.mgmt.web.models.CsmUsageQuota] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -2284,9 +2372,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -2320,7 +2406,8 @@ def list_worker_pools( :return: An iterator like instance of WorkerPoolResource :rtype: ~azure.mgmt.web.models.WorkerPoolResourcePaged[~azure.mgmt.web.models.WorkerPoolResource] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -2358,9 +2445,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -2396,7 +2481,8 @@ def get_worker_pool( :return: WorkerPoolResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.WorkerPoolResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_worker_pool.metadata['url'] @@ -2427,9 +2513,7 @@ def get_worker_pool( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -2653,7 +2737,8 @@ def list_worker_pool_instance_metric_definitions( :return: An iterator like instance of ResourceMetricDefinition :rtype: ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -2693,9 +2778,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -2744,7 +2827,8 @@ def list_worker_pool_instance_metrics( :return: An iterator like instance of ResourceMetric :rtype: ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -2788,9 +2872,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -2826,7 +2908,8 @@ def list_web_worker_metric_definitions( :return: An iterator like instance of ResourceMetricDefinition :rtype: ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -2865,9 +2948,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -2914,7 +2995,8 @@ def list_web_worker_metrics( :return: An iterator like instance of ResourceMetric :rtype: ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -2957,9 +3039,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -2995,7 +3075,8 @@ def list_worker_pool_skus( :return: An iterator like instance of SkuInfo :rtype: ~azure.mgmt.web.models.SkuInfoPaged[~azure.mgmt.web.models.SkuInfo] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -3034,9 +3115,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -3072,7 +3151,8 @@ def list_web_worker_usages( :return: An iterator like instance of Usage :rtype: ~azure.mgmt.web.models.UsagePaged[~azure.mgmt.web.models.Usage] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -3111,9 +3191,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response diff --git a/azure-mgmt-web/azure/mgmt/web/operations/app_service_plans_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/app_service_plans_operations.py index bf35c0a10ccd..a80f65980427 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/app_service_plans_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/app_service_plans_operations.py @@ -25,7 +25,7 @@ class AppServicePlansOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-09-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-09-01" + self.api_version = "2018-02-01" self.config = config @@ -58,7 +58,8 @@ def list( :return: An iterator like instance of AppServicePlan :rtype: ~azure.mgmt.web.models.AppServicePlanPaged[~azure.mgmt.web.models.AppServicePlan] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -96,9 +97,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -130,7 +129,8 @@ def list_by_resource_group( :return: An iterator like instance of AppServicePlan :rtype: ~azure.mgmt.web.models.AppServicePlanPaged[~azure.mgmt.web.models.AppServicePlan] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -167,9 +167,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -284,9 +282,7 @@ def _create_or_update_initial( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -325,7 +321,8 @@ def create_or_update( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.AppServicePlan] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.AppServicePlan]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -433,7 +430,8 @@ def update( :return: AppServicePlan or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.AppServicePlan or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -467,9 +465,7 @@ def update( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -504,7 +500,8 @@ def list_capabilities( :return: list or ClientRawResponse if raw=true :rtype: list[~azure.mgmt.web.models.Capability] or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_capabilities.metadata['url'] @@ -534,9 +531,7 @@ def list_capabilities( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -573,7 +568,8 @@ def get_hybrid_connection( :return: HybridConnection or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnection or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_hybrid_connection.metadata['url'] @@ -605,9 +601,7 @@ def get_hybrid_connection( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -707,7 +701,8 @@ def list_hybrid_connection_keys( :return: HybridConnectionKey or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnectionKey or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_hybrid_connection_keys.metadata['url'] @@ -739,9 +734,7 @@ def list_hybrid_connection_keys( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -777,7 +770,8 @@ def list_web_apps_by_hybrid_connection( overrides`. :return: An iterator like instance of str :rtype: ~azure.mgmt.web.models.StrPaged[str] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -817,9 +811,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -855,7 +847,8 @@ def get_hybrid_connection_plan_limit( :return: HybridConnectionLimits or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnectionLimits or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_hybrid_connection_plan_limit.metadata['url'] @@ -885,9 +878,7 @@ def get_hybrid_connection_plan_limit( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -920,7 +911,8 @@ def list_hybrid_connections( :return: An iterator like instance of HybridConnection :rtype: ~azure.mgmt.web.models.HybridConnectionPaged[~azure.mgmt.web.models.HybridConnection] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -958,9 +950,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -996,7 +986,8 @@ def list_metric_defintions( :return: An iterator like instance of ResourceMetricDefinition :rtype: ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1034,9 +1025,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1079,7 +1068,8 @@ def list_metrics( :return: An iterator like instance of ResourceMetric :rtype: ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1121,9 +1111,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1230,7 +1218,8 @@ def list_web_apps( overrides`. :return: An iterator like instance of Site :rtype: ~azure.mgmt.web.models.SitePaged[~azure.mgmt.web.models.Site] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1274,9 +1263,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1309,7 +1296,8 @@ def get_server_farm_skus( overrides`. :return: object or ClientRawResponse if raw=true :rtype: object or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_server_farm_skus.metadata['url'] @@ -1339,9 +1327,7 @@ def get_server_farm_skus( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1378,7 +1364,8 @@ def list_usages( :return: An iterator like instance of CsmUsageQuota :rtype: ~azure.mgmt.web.models.CsmUsageQuotaPaged[~azure.mgmt.web.models.CsmUsageQuota] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1418,9 +1405,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1454,7 +1439,8 @@ def list_vnets( :return: list or ClientRawResponse if raw=true :rtype: list[~azure.mgmt.web.models.VnetInfo] or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_vnets.metadata['url'] @@ -1484,9 +1470,7 @@ def list_vnets( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1592,7 +1576,8 @@ def get_vnet_gateway( :return: VnetGateway or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetGateway or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_vnet_gateway.metadata['url'] @@ -1624,9 +1609,7 @@ def get_vnet_gateway( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1666,7 +1649,8 @@ def update_vnet_gateway( :return: VnetGateway or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetGateway or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_vnet_gateway.metadata['url'] @@ -1702,9 +1686,7 @@ def update_vnet_gateway( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1741,7 +1723,8 @@ def list_routes_for_vnet( :return: list or ClientRawResponse if raw=true :rtype: list[~azure.mgmt.web.models.VnetRoute] or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_routes_for_vnet.metadata['url'] @@ -1772,9 +1755,7 @@ def list_routes_for_vnet( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None diff --git a/azure-mgmt-web/azure/mgmt/web/operations/billing_meters_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/billing_meters_operations.py deleted file mode 100644 index 1fd793c46673..000000000000 --- a/azure-mgmt-web/azure/mgmt/web/operations/billing_meters_operations.py +++ /dev/null @@ -1,109 +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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError - -from .. import models - - -class BillingMetersOperations(object): - """BillingMetersOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-01" - - self.config = config - - def list( - self, billing_location=None, custom_headers=None, raw=False, **operation_config): - """Gets a list of meters for a given location. - - Gets a list of meters for a given location. - - :param billing_location: Azure Location of billable resource - :type billing_location: 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 BillingMeter - :rtype: - ~azure.mgmt.web.models.BillingMeterPaged[~azure.mgmt.web.models.BillingMeter] - :raises: :class:`CloudError` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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 = {} - if billing_location is not None: - query_parameters['billingLocation'] = self._serialize.query("billing_location", billing_location, 'str') - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} diff --git a/azure-mgmt-web/azure/mgmt/web/operations/certificate_registration_provider_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/certificate_registration_provider_operations.py index efea44179bf3..6fe72e405f80 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/certificate_registration_provider_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/certificate_registration_provider_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,7 @@ class CertificateRegistrationProviderOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2015-08-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-08-01" + self.api_version = "2018-02-01" self.config = config @@ -53,7 +52,8 @@ def list_operations( :return: An iterator like instance of CsmOperationDescription :rtype: ~azure.mgmt.web.models.CsmOperationDescriptionPaged[~azure.mgmt.web.models.CsmOperationDescription] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -85,9 +85,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response diff --git a/azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py index c1dc2463d2dd..d228ffb21026 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/certificates_operations.py @@ -23,7 +23,7 @@ class CertificatesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-03-01" + self.api_version = "2018-02-01" self.config = config @@ -51,7 +51,8 @@ def list( :return: An iterator like instance of Certificate :rtype: ~azure.mgmt.web.models.CertificatePaged[~azure.mgmt.web.models.Certificate] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -87,9 +88,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -121,7 +120,8 @@ def list_by_resource_group( :return: An iterator like instance of Certificate :rtype: ~azure.mgmt.web.models.CertificatePaged[~azure.mgmt.web.models.Certificate] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -158,9 +158,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -194,7 +192,8 @@ def get( :return: Certificate or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Certificate or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -224,9 +223,7 @@ def get( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -262,7 +259,8 @@ def create_or_update( :return: Certificate or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Certificate or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update.metadata['url'] @@ -296,9 +294,7 @@ def create_or_update( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -392,7 +388,8 @@ def update( :return: Certificate or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Certificate or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -426,9 +423,7 @@ def update( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None diff --git a/azure-mgmt-web/azure/mgmt/web/operations/deleted_web_apps_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/deleted_web_apps_operations.py index dadbb2822b87..267973006f96 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/deleted_web_apps_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/deleted_web_apps_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,7 @@ class DeletedWebAppsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-03-01" + self.api_version = "2018-02-01" self.config = config @@ -51,7 +50,8 @@ def list( :return: An iterator like instance of DeletedSite :rtype: ~azure.mgmt.web.models.DeletedSitePaged[~azure.mgmt.web.models.DeletedSite] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -87,9 +87,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response diff --git a/azure-mgmt-web/azure/mgmt/web/operations/diagnostics_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/diagnostics_operations.py index 90609947d199..4ea0569b1ad7 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/diagnostics_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/diagnostics_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,7 @@ class DiagnosticsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-03-01" + self.api_version = "2018-02-01" self.config = config @@ -56,7 +55,8 @@ def list_hosting_environment_detector_responses( :return: An iterator like instance of DetectorResponse :rtype: ~azure.mgmt.web.models.DetectorResponsePaged[~azure.mgmt.web.models.DetectorResponse] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -94,9 +94,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -138,7 +136,8 @@ def get_hosting_environment_detector_response( :return: DetectorResponse or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DetectorResponse or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_hosting_environment_detector_response.metadata['url'] @@ -175,9 +174,7 @@ def get_hosting_environment_detector_response( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -210,7 +207,8 @@ def list_site_detector_responses( :return: An iterator like instance of DetectorResponse :rtype: ~azure.mgmt.web.models.DetectorResponsePaged[~azure.mgmt.web.models.DetectorResponse] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -248,9 +246,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -292,7 +288,8 @@ def get_site_detector_response( :return: DetectorResponse or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DetectorResponse or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_site_detector_response.metadata['url'] @@ -329,9 +326,7 @@ def get_site_detector_response( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -364,7 +359,8 @@ def list_site_diagnostic_categories( :return: An iterator like instance of DiagnosticCategory :rtype: ~azure.mgmt.web.models.DiagnosticCategoryPaged[~azure.mgmt.web.models.DiagnosticCategory] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -402,9 +398,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -440,7 +434,8 @@ def get_site_diagnostic_category( :return: DiagnosticCategory or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DiagnosticCategory or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_site_diagnostic_category.metadata['url'] @@ -471,9 +466,7 @@ def get_site_diagnostic_category( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -508,7 +501,8 @@ def list_site_analyses( :return: An iterator like instance of AnalysisDefinition :rtype: ~azure.mgmt.web.models.AnalysisDefinitionPaged[~azure.mgmt.web.models.AnalysisDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -547,9 +541,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -587,7 +579,8 @@ def get_site_analysis( :return: DiagnosticAnalysis or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DiagnosticAnalysis or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_site_analysis.metadata['url'] @@ -619,9 +612,7 @@ def get_site_analysis( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -664,7 +655,8 @@ def execute_site_analysis( :return: DiagnosticAnalysis or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DiagnosticAnalysis or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.execute_site_analysis.metadata['url'] @@ -702,9 +694,7 @@ def execute_site_analysis( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -739,7 +729,8 @@ def list_site_detectors( :return: An iterator like instance of DetectorDefinition :rtype: ~azure.mgmt.web.models.DetectorDefinitionPaged[~azure.mgmt.web.models.DetectorDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -778,9 +769,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -818,7 +807,8 @@ def get_site_detector( :return: An iterator like instance of DetectorDefinition :rtype: ~azure.mgmt.web.models.DetectorDefinitionPaged[~azure.mgmt.web.models.DetectorDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -858,9 +848,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -904,7 +892,8 @@ def execute_site_detector( :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DiagnosticDetectorResponse or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.execute_site_detector.metadata['url'] @@ -942,9 +931,7 @@ def execute_site_detector( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -979,7 +966,8 @@ def list_site_detector_responses_slot( :return: An iterator like instance of DetectorResponse :rtype: ~azure.mgmt.web.models.DetectorResponsePaged[~azure.mgmt.web.models.DetectorResponse] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1018,9 +1006,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1064,7 +1050,8 @@ def get_site_detector_response_slot( :return: DetectorResponse or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DetectorResponse or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_site_detector_response_slot.metadata['url'] @@ -1102,9 +1089,7 @@ def get_site_detector_response_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1139,7 +1124,8 @@ def list_site_diagnostic_categories_slot( :return: An iterator like instance of DiagnosticCategory :rtype: ~azure.mgmt.web.models.DiagnosticCategoryPaged[~azure.mgmt.web.models.DiagnosticCategory] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1178,9 +1164,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1218,7 +1202,8 @@ def get_site_diagnostic_category_slot( :return: DiagnosticCategory or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DiagnosticCategory or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_site_diagnostic_category_slot.metadata['url'] @@ -1250,9 +1235,7 @@ def get_site_diagnostic_category_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1289,7 +1272,8 @@ def list_site_analyses_slot( :return: An iterator like instance of AnalysisDefinition :rtype: ~azure.mgmt.web.models.AnalysisDefinitionPaged[~azure.mgmt.web.models.AnalysisDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1329,9 +1313,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1371,7 +1353,8 @@ def get_site_analysis_slot( :return: DiagnosticAnalysis or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DiagnosticAnalysis or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_site_analysis_slot.metadata['url'] @@ -1404,9 +1387,7 @@ def get_site_analysis_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1451,7 +1432,8 @@ def execute_site_analysis_slot( :return: DiagnosticAnalysis or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DiagnosticAnalysis or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.execute_site_analysis_slot.metadata['url'] @@ -1490,9 +1472,7 @@ def execute_site_analysis_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1529,7 +1509,8 @@ def list_site_detectors_slot( :return: An iterator like instance of DetectorDefinition :rtype: ~azure.mgmt.web.models.DetectorDefinitionPaged[~azure.mgmt.web.models.DetectorDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1569,9 +1550,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1611,7 +1590,8 @@ def get_site_detector_slot( :return: An iterator like instance of DetectorDefinition :rtype: ~azure.mgmt.web.models.DetectorDefinitionPaged[~azure.mgmt.web.models.DetectorDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1652,9 +1632,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1700,7 +1678,8 @@ def execute_site_detector_slot( :return: DiagnosticDetectorResponse or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DiagnosticDetectorResponse or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.execute_site_detector_slot.metadata['url'] @@ -1739,9 +1718,7 @@ def execute_site_detector_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None diff --git a/azure-mgmt-web/azure/mgmt/web/operations/domain_registration_provider_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/domain_registration_provider_operations.py index 03e425c85bb8..70c15a6bb903 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/domain_registration_provider_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/domain_registration_provider_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,7 @@ class DomainRegistrationProviderOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2015-04-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-01" + self.api_version = "2018-02-01" self.config = config @@ -53,7 +52,8 @@ def list_operations( :return: An iterator like instance of CsmOperationDescription :rtype: ~azure.mgmt.web.models.CsmOperationDescriptionPaged[~azure.mgmt.web.models.CsmOperationDescription] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -85,9 +85,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response diff --git a/azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py index b7c35bb85110..f414a9d997b3 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/domains_operations.py @@ -25,7 +25,7 @@ class DomainsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2015-04-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-01" + self.api_version = "2018-02-01" self.config = config @@ -56,7 +56,8 @@ def check_availability( raw=true :rtype: ~azure.mgmt.web.models.DomainAvailablilityCheckResult or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ identifier = models.NameIdentifier(name=name) @@ -90,9 +91,7 @@ def check_availability( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -120,7 +119,8 @@ def list( :return: An iterator like instance of Domain :rtype: ~azure.mgmt.web.models.DomainPaged[~azure.mgmt.web.models.Domain] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -156,9 +156,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -188,7 +186,8 @@ def get_control_center_sso_request( raw=true :rtype: ~azure.mgmt.web.models.DomainControlCenterSsoRequest or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_control_center_sso_request.metadata['url'] @@ -216,9 +215,7 @@ def get_control_center_sso_request( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -251,7 +248,8 @@ def list_recommendations( :return: An iterator like instance of NameIdentifier :rtype: ~azure.mgmt.web.models.NameIdentifierPaged[~azure.mgmt.web.models.NameIdentifier] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ parameters = models.DomainRecommendationSearchParameters(keywords=keywords, max_domain_recommendations=max_domain_recommendations) @@ -292,9 +290,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -326,7 +322,8 @@ def list_by_resource_group( :return: An iterator like instance of Domain :rtype: ~azure.mgmt.web.models.DomainPaged[~azure.mgmt.web.models.Domain] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -363,9 +360,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -399,7 +394,8 @@ def get( :return: Domain or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Domain or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -429,9 +425,7 @@ def get( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -480,9 +474,7 @@ def _create_or_update_initial( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -521,7 +513,8 @@ def create_or_update( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.Domain] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.Domain]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -634,7 +627,8 @@ def update( :return: Domain or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Domain or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -668,9 +662,7 @@ def update( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -705,7 +697,8 @@ def list_ownership_identifiers( :return: An iterator like instance of DomainOwnershipIdentifier :rtype: ~azure.mgmt.web.models.DomainOwnershipIdentifierPaged[~azure.mgmt.web.models.DomainOwnershipIdentifier] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -743,9 +736,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -781,7 +772,8 @@ def get_ownership_identifier( :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DomainOwnershipIdentifier or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_ownership_identifier.metadata['url'] @@ -812,9 +804,7 @@ def get_ownership_identifier( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -855,7 +845,8 @@ def create_or_update_ownership_identifier( :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DomainOwnershipIdentifier or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) @@ -892,9 +883,7 @@ def create_or_update_ownership_identifier( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -995,7 +984,8 @@ def update_ownership_identifier( :return: DomainOwnershipIdentifier or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DomainOwnershipIdentifier or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ domain_ownership_identifier = models.DomainOwnershipIdentifier(kind=kind, ownership_id=ownership_id) @@ -1032,9 +1022,7 @@ def update_ownership_identifier( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1066,8 +1054,7 @@ def renew( overrides`. :return: None or ClientRawResponse if raw=true :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorResponseException` + :raises: :class:`CloudError` """ # Construct URL url = self.renew.metadata['url'] @@ -1096,8 +1083,10 @@ def renew( request = self._client.post(url, query_parameters) response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [200, 202, 204]: - raise models.ErrorResponseException(self._deserialize, response) + if response.status_code not in [200, 202, 204, 400, 500]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp if raw: client_raw_response = ClientRawResponse(None, response) diff --git a/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py index 3e88a13473a6..d30181ee2b50 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,7 @@ class ProviderOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-03-01" + self.api_version = "2018-02-01" self.config = config @@ -53,7 +52,8 @@ def get_available_stacks( :return: An iterator like instance of ApplicationStack :rtype: ~azure.mgmt.web.models.ApplicationStackPaged[~azure.mgmt.web.models.ApplicationStack] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -87,9 +87,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -120,7 +118,8 @@ def list_operations( :return: An iterator like instance of CsmOperationDescription :rtype: ~azure.mgmt.web.models.CsmOperationDescriptionPaged[~azure.mgmt.web.models.CsmOperationDescription] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -152,9 +151,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -185,7 +182,8 @@ def get_available_stacks_on_prem( :return: An iterator like instance of ApplicationStack :rtype: ~azure.mgmt.web.models.ApplicationStackPaged[~azure.mgmt.web.models.ApplicationStack] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -223,9 +221,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response diff --git a/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py index 79c8c4c870fd..45d9d9a5b4c6 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/recommendations_operations.py @@ -23,7 +23,7 @@ class RecommendationsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -33,7 +33,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-03-01" + self.api_version = "2018-02-01" self.config = config @@ -60,7 +60,8 @@ def list( :return: An iterator like instance of Recommendation :rtype: ~azure.mgmt.web.models.RecommendationPaged[~azure.mgmt.web.models.Recommendation] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -100,9 +101,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -223,7 +222,7 @@ def disable_recommendation_for_subscription( disable_recommendation_for_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/recommendations/{name}/disable'} def list_history_for_web_app( - self, resource_group_name, site_name, filter=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, site_name, expired_only=None, filter=None, custom_headers=None, raw=False, **operation_config): """Get past recommendations for an app, optionally specified by the time range. @@ -235,6 +234,10 @@ def list_history_for_web_app( :type resource_group_name: str :param site_name: Name of the app. :type site_name: str + :param expired_only: Specify false to return all + recommendations. The default is true, which returns only + expired recommendations. + :type expired_only: bool :param filter: Filter is specified by using OData syntax. Example: $filter=channels eq 'Api' or channel eq 'Notification' and startTime eq '2014-01-01T00:00:00Z' and endTime eq '2014-12-31T23:59:59Z' and @@ -248,7 +251,8 @@ def list_history_for_web_app( :return: An iterator like instance of Recommendation :rtype: ~azure.mgmt.web.models.RecommendationPaged[~azure.mgmt.web.models.Recommendation] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -264,6 +268,8 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} + if expired_only is not None: + query_parameters['expiredOnly'] = self._serialize.query("expired_only", expired_only, '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') @@ -288,9 +294,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -332,7 +336,8 @@ def list_recommended_rules_for_web_app( :return: An iterator like instance of Recommendation :rtype: ~azure.mgmt.web.models.RecommendationPaged[~azure.mgmt.web.models.Recommendation] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -374,9 +379,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -533,7 +536,8 @@ def get_rule_details_by_web_app( :return: RecommendationRule or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.RecommendationRule or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_rule_details_by_web_app.metadata['url'] @@ -568,9 +572,7 @@ def get_rule_details_by_web_app( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None diff --git a/azure-mgmt-web/azure/mgmt/web/operations/resource_health_metadata_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/resource_health_metadata_operations.py deleted file mode 100644 index 2b8b44f45e60..000000000000 --- a/azure-mgmt-web/azure/mgmt/web/operations/resource_health_metadata_operations.py +++ /dev/null @@ -1,461 +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. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ResourceHealthMetadataOperations(object): - """ResourceHealthMetadataOperations operations. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-03-01". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2016-03-01" - - self.config = config - - def list( - self, custom_headers=None, raw=False, **operation_config): - """List all ResourceHealthMetadata for all sites in the subscription. - - List all ResourceHealthMetadata for all sites in the subscription. - - :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 ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.models.ResourceHealthMetadataPaged[~azure.mgmt.web.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list.metadata['url'] - 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("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """List all ResourceHealthMetadata for all sites in the resource group in - the subscription. - - List all ResourceHealthMetadata for all sites in the resource group in - the 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`. - :return: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.models.ResourceHealthMetadataPaged[~azure.mgmt.web.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} - - def list_by_site( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the category of ResourceHealthMetadata to use for the given site - as a collection. - - Gets the category of ResourceHealthMetadata to use for the given site - as a collection. - - :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 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 ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.models.ResourceHealthMetadataPaged[~azure.mgmt.web.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} - - def get_by_site( - self, resource_group_name, name, 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 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: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} - - def list_by_site_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 - as a collection. - - Gets the category of ResourceHealthMetadata to use for the given site - as a collection. - - :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: An iterator like instance of ResourceHealthMetadata - :rtype: - ~azure.mgmt.web.models.ResourceHealthMetadataPaged[~azure.mgmt.web.models.ResourceHealthMetadata] - :raises: - :class:`DefaultErrorResponseException` - """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'slot': self._serialize.url("slot", slot, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send( - request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - return response - - # Deserialize response - deserialized = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} - - def get_by_site_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`. - :return: ResourceHealthMetadata or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.ResourceHealthMetadata or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` - """ - # Construct URL - url = self.get_by_site_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'slot': self._serialize.url("slot", slot, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ResourceHealthMetadata', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/azure-mgmt-web/azure/mgmt/web/operations/top_level_domains_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/top_level_domains_operations.py index ff0497fd60be..83cf978b7f06 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/top_level_domains_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/top_level_domains_operations.py @@ -11,7 +11,6 @@ import uuid from msrest.pipeline import ClientRawResponse -from msrestazure.azure_exceptions import CloudError from .. import models @@ -23,7 +22,7 @@ class TopLevelDomainsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2015-04-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -33,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-04-01" + self.api_version = "2018-02-01" self.config = config @@ -51,7 +50,8 @@ def list( :return: An iterator like instance of TopLevelDomain :rtype: ~azure.mgmt.web.models.TopLevelDomainPaged[~azure.mgmt.web.models.TopLevelDomain] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -87,9 +87,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -120,7 +118,8 @@ def get( :return: TopLevelDomain or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.TopLevelDomain or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get.metadata['url'] @@ -149,9 +148,7 @@ def get( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -191,7 +188,8 @@ def list_agreements( :return: An iterator like instance of TldLegalAgreement :rtype: ~azure.mgmt.web.models.TldLegalAgreementPaged[~azure.mgmt.web.models.TldLegalAgreement] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ agreement_option = models.TopLevelDomainAgreementOption(include_privacy=include_privacy, for_transfer=for_transfer) @@ -233,9 +231,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response diff --git a/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py index 944bd0ea99d2..ca889dacddb1 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/web_apps_operations.py @@ -25,7 +25,7 @@ class WebAppsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: API Version. Constant value: "2016-08-01". + :ivar api_version: API Version. Constant value: "2018-02-01". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2016-08-01" + self.api_version = "2018-02-01" self.config = config @@ -52,7 +52,8 @@ def list( overrides`. :return: An iterator like instance of Site :rtype: ~azure.mgmt.web.models.SitePaged[~azure.mgmt.web.models.Site] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -88,9 +89,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -125,7 +124,8 @@ def list_by_resource_group( overrides`. :return: An iterator like instance of Site :rtype: ~azure.mgmt.web.models.SitePaged[~azure.mgmt.web.models.Site] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -164,9 +164,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -281,9 +279,7 @@ def _create_or_update_initial( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -326,7 +322,8 @@ def create_or_update( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.Site] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.Site]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._create_or_update_initial( resource_group_name=resource_group_name, @@ -447,7 +444,8 @@ def update( :return: Site or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Site or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update.metadata['url'] @@ -481,9 +479,7 @@ def update( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -520,7 +516,8 @@ def analyze_custom_hostname( :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.CustomHostnameAnalysisResult or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.analyze_custom_hostname.metadata['url'] @@ -552,9 +549,7 @@ def analyze_custom_hostname( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -660,7 +655,8 @@ def backup( :return: BackupItem or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.BackupItem or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.backup.metadata['url'] @@ -694,9 +690,7 @@ def backup( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -729,7 +723,8 @@ def list_backups( :return: An iterator like instance of BackupItem :rtype: ~azure.mgmt.web.models.BackupItemPaged[~azure.mgmt.web.models.BackupItem] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -767,9 +762,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -784,80 +777,6 @@ def internal_paging(next_link=None, raw=False): return deserialized list_backups.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups'} - def discover_restore( - self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): - """Discovers an existing app backup that can be restored from a blob in - Azure storage. - - 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. - :type name: str - :param request: A RestoreRequest object that includes Azure storage - URL and blog name for discovery of backup. - :type request: ~azure.mgmt.web.models.RestoreRequest - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.discover_restore.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - 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(deserialized, response) - return client_raw_response - - return deserialized - discover_restore.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/backups/discover'} - def get_backup_status( self, resource_group_name, name, backup_id, custom_headers=None, raw=False, **operation_config): """Gets a backup of an app by its ID. @@ -879,7 +798,8 @@ def get_backup_status( :return: BackupItem or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.BackupItem or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_backup_status.metadata['url'] @@ -910,9 +830,7 @@ def get_backup_status( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1015,7 +933,8 @@ def list_backup_status_secrets( :return: BackupItem or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.BackupItem or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_backup_status_secrets.metadata['url'] @@ -1050,9 +969,7 @@ def list_backup_status_secrets( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1101,22 +1018,15 @@ def _restore_initial( response = self._client.send( request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [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('RestoreResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - def restore( self, resource_group_name, name, backup_id, request, custom_headers=None, raw=False, polling=True, **operation_config): """Restores a specific backup to another app (or deployment slot, if @@ -1139,12 +1049,10 @@ def restore( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns RestoreResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.RestoreResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.RestoreResponse]] + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._restore_initial( @@ -1158,14 +1066,10 @@ def restore( ) def get_long_running_output(response): - deserialized = self._deserialize('RestoreResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -1194,7 +1098,8 @@ def list_configurations( :return: An iterator like instance of SiteConfigResource :rtype: ~azure.mgmt.web.models.SiteConfigResourcePaged[~azure.mgmt.web.models.SiteConfigResource] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -1232,9 +1137,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -1272,7 +1175,8 @@ def update_application_settings( :return: StringDictionary or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.StringDictionary or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ app_settings = models.StringDictionary(kind=kind, properties=properties) @@ -1308,9 +1212,7 @@ def update_application_settings( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1343,7 +1245,8 @@ def list_application_settings( :return: StringDictionary or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.StringDictionary or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_application_settings.metadata['url'] @@ -1373,9 +1276,7 @@ def list_application_settings( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1412,7 +1313,8 @@ def update_auth_settings( :return: SiteAuthSettings or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteAuthSettings or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_auth_settings.metadata['url'] @@ -1446,9 +1348,7 @@ def update_auth_settings( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1481,7 +1381,8 @@ def get_auth_settings( :return: SiteAuthSettings or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteAuthSettings or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_auth_settings.metadata['url'] @@ -1511,9 +1412,7 @@ def get_auth_settings( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1548,7 +1447,8 @@ def update_backup_configuration( :return: BackupRequest or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.BackupRequest or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_backup_configuration.metadata['url'] @@ -1582,9 +1482,7 @@ def update_backup_configuration( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1674,7 +1572,8 @@ def get_backup_configuration( :return: BackupRequest or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.BackupRequest or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_backup_configuration.metadata['url'] @@ -1704,9 +1603,7 @@ def get_backup_configuration( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1744,7 +1641,8 @@ def update_connection_strings( :return: ConnectionStringDictionary or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.ConnectionStringDictionary or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) @@ -1780,9 +1678,7 @@ def update_connection_strings( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1815,7 +1711,8 @@ def list_connection_strings( :return: ConnectionStringDictionary or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.ConnectionStringDictionary or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_connection_strings.metadata['url'] @@ -1845,9 +1742,7 @@ def list_connection_strings( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1880,7 +1775,8 @@ def get_diagnostic_logs_configuration( :return: SiteLogsConfig or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteLogsConfig or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_diagnostic_logs_configuration.metadata['url'] @@ -1910,9 +1806,7 @@ def get_diagnostic_logs_configuration( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1948,7 +1842,8 @@ def update_diagnostic_logs_config( :return: SiteLogsConfig or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteLogsConfig or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_diagnostic_logs_config.metadata['url'] @@ -1982,9 +1877,7 @@ def update_diagnostic_logs_config( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -2021,7 +1914,8 @@ def update_metadata( :return: StringDictionary or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.StringDictionary or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ metadata = models.StringDictionary(kind=kind, properties=properties) @@ -2057,9 +1951,7 @@ def update_metadata( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -2092,7 +1984,8 @@ def list_metadata( :return: StringDictionary or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.StringDictionary or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_metadata.metadata['url'] @@ -2122,9 +2015,7 @@ def list_metadata( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -2169,9 +2060,7 @@ def _list_publishing_credentials_initial( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -2206,7 +2095,8 @@ def list_publishing_credentials( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.User] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.User]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._list_publishing_credentials_initial( resource_group_name=resource_group_name, @@ -2255,7 +2145,8 @@ def update_site_push_settings( :return: PushSettings or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.PushSettings or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_site_push_settings.metadata['url'] @@ -2289,9 +2180,7 @@ def update_site_push_settings( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -2324,7 +2213,8 @@ def list_site_push_settings( :return: PushSettings or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.PushSettings or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_site_push_settings.metadata['url'] @@ -2354,9 +2244,7 @@ def list_site_push_settings( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -2391,7 +2279,8 @@ def list_slot_configuration_names( :return: SlotConfigNamesResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SlotConfigNamesResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_slot_configuration_names.metadata['url'] @@ -2421,9 +2310,7 @@ def list_slot_configuration_names( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -2462,7 +2349,8 @@ def update_slot_configuration_names( :return: SlotConfigNamesResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SlotConfigNamesResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_slot_configuration_names.metadata['url'] @@ -2496,9 +2384,7 @@ def update_slot_configuration_names( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -2512,13 +2398,11 @@ def update_slot_configuration_names( return deserialized update_slot_configuration_names.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/slotConfigNames'} - def get_configuration( + def get_swift_virtual_network_connection( self, resource_group_name, name, 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. + """Gets a Swift Virtual Network connection. - Gets the configuration of an app, such as platform version and bitness, - default documents, virtual applications, Always On, etc. + Gets a Swift Virtual Network connection. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -2530,13 +2414,14 @@ def get_configuration( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.SiteConfigResource or + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SwiftVirtualNetwork or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL - url = self.get_configuration.metadata['url'] + url = self.get_swift_virtual_network_connection.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -2563,48 +2448,53 @@ def get_configuration( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) + deserialized = self._deserialize('SwiftVirtualNetwork', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/virtualNetwork'} - def create_or_update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """Updates the configuration of an app. + def create_or_update_swift_virtual_network_connection( + self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. - Updates the configuration of an app. + Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. :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: ~azure.mgmt.web.models.SiteConfigResource + :param connection_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: ~azure.mgmt.web.models.SwiftVirtualNetwork :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: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.SiteConfigResource or + :return: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SwiftVirtualNetwork or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL - url = self.create_or_update_configuration.metadata['url'] + url = self.create_or_update_swift_virtual_network_connection.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -2627,7 +2517,7 @@ def create_or_update_configuration( 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') + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') # Construct and send request request = self._client.put(url, query_parameters) @@ -2635,48 +2525,44 @@ def create_or_update_configuration( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SiteConfigResource', response) + deserialized = self._deserialize('SwiftVirtualNetwork', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/virtualNetwork'} - def update_configuration( - self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): - """Updates the configuration of an app. + def delete_swift_virtual_network( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Deletes a Swift Virtual Network connection from an app (or deployment + slot). - Updates the configuration of an app. + Deletes a Swift Virtual Network connection from an app (or 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 site_config: JSON representation of a SiteConfig object. See - example. - :type site_config: ~azure.mgmt.web.models.SiteConfigResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: SiteConfigResource or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.SiteConfigResource or - ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.update_configuration.metadata['url'] + url = self.delete_swift_virtual_network.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -2698,20 +2584,294 @@ def update_configuration( 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.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 404]: exp = CloudError(response) 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 + delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/virtualNetwork'} + + def update_swift_virtual_network_connection( + self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + :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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: ~azure.mgmt.web.models.SwiftVirtualNetwork + :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: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_swift_virtual_network_connection.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/virtualNetwork'} + + def get_configuration( + self, resource_group_name, name, 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. + + 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. + :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: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def create_or_update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """Updates the configuration 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: ~azure.mgmt.web.models.SiteConfigResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SiteConfigResource', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_configuration.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/web'} + + def update_configuration( + self, resource_group_name, name, site_config, custom_headers=None, raw=False, **operation_config): + """Updates the configuration 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: ~azure.mgmt.web.models.SiteConfigResource + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: SiteConfigResource or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteConfigResource or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_configuration.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(site_config, 'SiteConfigResource') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None if response.status_code == 200: deserialized = self._deserialize('SiteConfigResource', response) @@ -2744,7 +2904,8 @@ def list_configuration_snapshot_info( :return: An iterator like instance of SiteConfigurationSnapshotInfo :rtype: ~azure.mgmt.web.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.models.SiteConfigurationSnapshotInfo] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -2782,9 +2943,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -2822,7 +2981,8 @@ def get_configuration_snapshot( :return: SiteConfigResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteConfigResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_configuration_snapshot.metadata['url'] @@ -2853,9 +3013,7 @@ def get_configuration_snapshot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -2998,7 +3156,7 @@ def get_web_site_container_logs( return deserialized get_web_site_container_logs.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs'} - def get_web_site_container_logs_zip( + def get_container_logs_zip( self, resource_group_name, name, custom_headers=None, raw=False, callback=None, **operation_config): """Gets the ZIP archived docker log files for the given site. @@ -3024,7 +3182,7 @@ def get_web_site_container_logs_zip( :raises: :class:`CloudError` """ # Construct URL - url = self.get_web_site_container_logs_zip.metadata['url'] + url = self.get_container_logs_zip.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -3065,7 +3223,7 @@ def get_web_site_container_logs_zip( return client_raw_response return deserialized - get_web_site_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} + get_container_logs_zip.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/containerlogs/zip/download'} def list_continuous_web_jobs( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): @@ -3086,7 +3244,8 @@ def list_continuous_web_jobs( :return: An iterator like instance of ContinuousWebJob :rtype: ~azure.mgmt.web.models.ContinuousWebJobPaged[~azure.mgmt.web.models.ContinuousWebJob] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -3124,9 +3283,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -3408,7 +3565,8 @@ def list_deployments( :return: An iterator like instance of Deployment :rtype: ~azure.mgmt.web.models.DeploymentPaged[~azure.mgmt.web.models.Deployment] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -3446,9 +3604,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -3484,7 +3640,8 @@ def get_deployment( :return: Deployment or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Deployment or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_deployment.metadata['url'] @@ -3515,9 +3672,7 @@ def get_deployment( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -3554,7 +3709,8 @@ def create_deployment( :return: Deployment or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Deployment or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_deployment.metadata['url'] @@ -3589,9 +3745,7 @@ def create_deployment( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -3690,7 +3844,8 @@ def list_deployment_log( :return: Deployment or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Deployment or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_deployment_log.metadata['url'] @@ -3721,9 +3876,7 @@ def list_deployment_log( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -3737,6 +3890,81 @@ def list_deployment_log( return deserialized list_deployment_log.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/deployments/{id}/log'} + def discover_backup( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): + """Discovers an existing app backup that can be restored from a blob in + Azure storage. Use this to get information about the databases stored + in a backup. + + Discovers an existing app backup that can be restored from a blob in + Azure storage. Use this to get information about the databases stored + in a backup. + + :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: ~azure.mgmt.web.models.RestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.discover_backup.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_backup.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/discoverbackup'} + def list_domain_ownership_identifiers( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): """Lists ownership identifiers for domain associated with web app. @@ -3756,7 +3984,8 @@ def list_domain_ownership_identifiers( :return: An iterator like instance of Identifier :rtype: ~azure.mgmt.web.models.IdentifierPaged[~azure.mgmt.web.models.Identifier] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -3794,9 +4023,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -3833,7 +4060,8 @@ def get_domain_ownership_identifier( :return: Identifier or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Identifier or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_domain_ownership_identifier.metadata['url'] @@ -3864,9 +4092,7 @@ def get_domain_ownership_identifier( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -3908,7 +4134,8 @@ def create_or_update_domain_ownership_identifier( :return: Identifier or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Identifier or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) @@ -3945,9 +4172,7 @@ def create_or_update_domain_ownership_identifier( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -4050,7 +4275,8 @@ def update_domain_ownership_identifier( :return: Identifier or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Identifier or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) @@ -4087,9 +4313,7 @@ def update_domain_ownership_identifier( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -4122,7 +4346,8 @@ def get_ms_deploy_status( :return: MSDeployStatus or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.MSDeployStatus or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_ms_deploy_status.metadata['url'] @@ -4152,9 +4377,7 @@ def get_ms_deploy_status( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -4428,7 +4651,8 @@ def get_functions_admin_token( overrides`. :return: str or ClientRawResponse if raw=true :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_functions_admin_token.metadata['url'] @@ -4458,9 +4682,7 @@ def get_functions_admin_token( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -4578,9 +4800,7 @@ def _create_function_initial( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -4619,7 +4839,8 @@ def create_function( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.FunctionEnvelope] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.FunctionEnvelope]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._create_function_initial( resource_group_name=resource_group_name, @@ -4732,7 +4953,8 @@ def list_function_secrets( :return: FunctionSecrets or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.FunctionSecrets or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_function_secrets.metadata['url'] @@ -4763,9 +4985,7 @@ def list_function_secrets( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -4798,7 +5018,8 @@ def list_host_name_bindings( :return: An iterator like instance of HostNameBinding :rtype: ~azure.mgmt.web.models.HostNameBindingPaged[~azure.mgmt.web.models.HostNameBinding] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -4836,9 +5057,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -4876,7 +5095,8 @@ def get_host_name_binding( :return: HostNameBinding or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HostNameBinding or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_host_name_binding.metadata['url'] @@ -4907,9 +5127,7 @@ def get_host_name_binding( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -4947,7 +5165,8 @@ def create_or_update_host_name_binding( :return: HostNameBinding or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HostNameBinding or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_host_name_binding.metadata['url'] @@ -4982,9 +5201,7 @@ def create_or_update_host_name_binding( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -5083,7 +5300,8 @@ def get_hybrid_connection( :return: HybridConnection or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnection or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_hybrid_connection.metadata['url'] @@ -5115,9 +5333,7 @@ def get_hybrid_connection( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -5156,7 +5372,8 @@ def create_or_update_hybrid_connection( :return: HybridConnection or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnection or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_hybrid_connection.metadata['url'] @@ -5192,9 +5409,7 @@ def create_or_update_hybrid_connection( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -5296,7 +5511,8 @@ def update_hybrid_connection( :return: HybridConnection or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnection or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_hybrid_connection.metadata['url'] @@ -5332,9 +5548,7 @@ def update_hybrid_connection( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -5371,7 +5585,8 @@ def list_hybrid_connection_keys( :return: HybridConnectionKey or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnectionKey or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_hybrid_connection_keys.metadata['url'] @@ -5403,9 +5618,7 @@ def list_hybrid_connection_keys( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -5438,7 +5651,8 @@ def list_hybrid_connections( :return: HybridConnection or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnection or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_hybrid_connections.metadata['url'] @@ -5468,9 +5682,7 @@ def list_hybrid_connections( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -5505,7 +5717,8 @@ def list_relay_service_connections( :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_relay_service_connections.metadata['url'] @@ -5535,9 +5748,7 @@ def list_relay_service_connections( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -5572,7 +5783,8 @@ def get_relay_service_connection( :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_relay_service_connection.metadata['url'] @@ -5603,9 +5815,7 @@ def get_relay_service_connection( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -5646,7 +5856,8 @@ def create_or_update_relay_service_connection( :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_relay_service_connection.metadata['url'] @@ -5681,9 +5892,7 @@ def create_or_update_relay_service_connection( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -5784,7 +5993,8 @@ def update_relay_service_connection( :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_relay_service_connection.metadata['url'] @@ -5819,9 +6029,7 @@ def update_relay_service_connection( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -5854,7 +6062,8 @@ def list_instance_identifiers( :return: An iterator like instance of SiteInstance :rtype: ~azure.mgmt.web.models.SiteInstancePaged[~azure.mgmt.web.models.SiteInstance] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -5892,9 +6101,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -5930,7 +6137,8 @@ def get_instance_ms_deploy_status( :return: MSDeployStatus or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.MSDeployStatus or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_instance_ms_deploy_status.metadata['url'] @@ -5961,9 +6169,7 @@ def get_instance_ms_deploy_status( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -6799,7 +7005,8 @@ def is_cloneable( :return: SiteCloneability or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteCloneability or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.is_cloneable.metadata['url'] @@ -6829,9 +7036,7 @@ def is_cloneable( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -6864,7 +7069,8 @@ def list_sync_function_triggers( :return: FunctionSecrets or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.FunctionSecrets or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_sync_function_triggers.metadata['url'] @@ -6894,9 +7100,7 @@ def list_sync_function_triggers( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -6931,7 +7135,8 @@ def list_metric_definitions( :return: An iterator like instance of ResourceMetricDefinition :rtype: ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -6969,9 +7174,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -7014,7 +7217,8 @@ def list_metrics( :return: An iterator like instance of ResourceMetric :rtype: ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -7056,9 +7260,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -7109,9 +7311,7 @@ def _migrate_storage_initial( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -7152,7 +7352,8 @@ def migrate_storage( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.StorageMigrationResponse] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.StorageMigrationResponse]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._migrate_storage_initial( subscription_name=subscription_name, @@ -7217,9 +7418,7 @@ def _migrate_my_sql_initial( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -7257,7 +7456,8 @@ def migrate_my_sql( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.Operation] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.Operation]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._migrate_my_sql_initial( resource_group_name=resource_group_name, @@ -7307,7 +7507,8 @@ def get_migrate_my_sql_status( :return: MigrateMySqlStatus or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.MigrateMySqlStatus or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_migrate_my_sql_status.metadata['url'] @@ -7337,9 +7538,7 @@ def get_migrate_my_sql_status( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -7448,7 +7647,8 @@ def start_web_site_network_trace( overrides`. :return: str or ClientRawResponse if raw=true :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.start_web_site_network_trace.metadata['url'] @@ -7484,9 +7684,7 @@ def start_web_site_network_trace( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -7518,7 +7716,8 @@ def stop_web_site_network_trace( overrides`. :return: str or ClientRawResponse if raw=true :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.stop_web_site_network_trace.metadata['url'] @@ -7548,9 +7747,7 @@ def stop_web_site_network_trace( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -7647,7 +7844,8 @@ def list_perf_mon_counters( :return: An iterator like instance of PerfMonResponse :rtype: ~azure.mgmt.web.models.PerfMonResponsePaged[~azure.mgmt.web.models.PerfMonResponse] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -7687,9 +7885,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -7723,7 +7919,8 @@ def get_site_php_error_log_flag( :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SitePhpErrorLogFlag or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_site_php_error_log_flag.metadata['url'] @@ -7753,9 +7950,7 @@ def get_site_php_error_log_flag( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -7773,28 +7968,235 @@ 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. - 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 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: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_premier_add_ons.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} + + 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 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 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: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + '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.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + 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. + + 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 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: ~azure.mgmt.web.models.PremierAddOn + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.add_premier_add_on.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + '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, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + 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: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.PremierAddOn or - ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.list_premier_add_ons.metadata['url'] + url = self.delete_premier_add_on.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), + '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) @@ -7814,7 +8216,7 @@ def list_premier_add_ons( 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, stream=False, **operation_config) if response.status_code not in [200]: @@ -7822,23 +8224,16 @@ def list_premier_add_ons( 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) + client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - return deserialized - list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} - - 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. + def update_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. - Gets a named add-on of an app. + Updates a named add-on of an app. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -7847,6 +8242,9 @@ def get_premier_add_on( :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: ~azure.mgmt.web.models.PremierAddOnPatchResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -7855,10 +8253,11 @@ def get_premier_add_on( :return: PremierAddOn or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.PremierAddOn or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL - url = self.get_premier_add_on.metadata['url'] + url = self.update_premier_add_on.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -7881,14 +8280,16 @@ 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(premier_add_on, 'PremierAddOnPatchResource') + # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -7900,40 +8301,37 @@ def get_premier_add_on( return client_raw_response return deserialized - get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - 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_private_access( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets data around private site access enablement and authorized Virtual + Networks that can access the site. - Updates a named add-on of an app. + Gets data around private site access enablement and authorized Virtual + Networks that can access 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 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: ~azure.mgmt.web.models.PremierAddOn :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.PremierAddOn or + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PrivateAccess or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL - url = self.add_premier_add_on.metadata['url'] + url = self.get_private_access.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), - '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) @@ -7952,59 +8350,56 @@ 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, stream=False, **operation_config) + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) + deserialized = self._deserialize('PrivateAccess', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} - 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 put_private_access_vnet( + self, resource_group_name, name, access, custom_headers=None, raw=False, **operation_config): + """Sets data around private site access enablement and authorized Virtual + Networks that can access the site. - Delete a premier add-on from an app. + Sets data around private site access enablement and authorized Virtual + Networks that can access 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 premier_add_on_name: Add-on name. - :type premier_add_on_name: str + :param access: The information for the private access + :type access: ~azure.mgmt.web.models.PrivateAccess :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 ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL - url = self.delete_premier_add_on.metadata['url'] + url = self.put_private_access_vnet.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), - '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) @@ -8023,19 +8418,28 @@ def delete_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(access, 'PrivateAccess') + # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - delete_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + + return deserialized + put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} def list_processes( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): @@ -8642,7 +9046,8 @@ def list_public_certificates( :return: An iterator like instance of PublicCertificate :rtype: ~azure.mgmt.web.models.PublicCertificatePaged[~azure.mgmt.web.models.PublicCertificate] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -8680,9 +9085,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -8720,7 +9123,8 @@ def get_public_certificate( :return: PublicCertificate or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.PublicCertificate or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_public_certificate.metadata['url'] @@ -8751,9 +9155,7 @@ def get_public_certificate( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -8791,7 +9193,8 @@ def create_or_update_public_certificate( :return: PublicCertificate or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.PublicCertificate or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_public_certificate.metadata['url'] @@ -8826,9 +9229,7 @@ def create_or_update_public_certificate( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -8932,7 +9333,8 @@ def list_publishing_profile_xml_with_secrets( overrides`. :return: object or ClientRawResponse if raw=true :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ publishing_profile_options = models.CsmPublishingProfileOptions(format=format) @@ -8968,9 +9370,7 @@ def list_publishing_profile_xml_with_secrets( request, header_parameters, body_content, stream=True, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -8984,11 +9384,139 @@ def list_publishing_profile_xml_with_secrets( return deserialized list_publishing_profile_xml_with_secrets.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publishxml'} + 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 ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset_production_slot_config.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + 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 + reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} + + 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 ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.restart.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} + - def _recover_initial( - self, resource_group_name, name, recovery_entity, custom_headers=None, raw=False, **operation_config): + def _restore_from_backup_blob_initial( + self, resource_group_name, name, request, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.recover.metadata['url'] + url = self.restore_from_backup_blob.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -9011,7 +9539,7 @@ def _recover_initial( 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') + body_content = self._serialize.body(request, 'RestoreRequest') # Construct and send request request = self._client.post(url, query_parameters) @@ -9027,21 +9555,19 @@ def _recover_initial( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def recover( - self, resource_group_name, name, recovery_entity, custom_headers=None, raw=False, polling=True, **operation_config): - """Recovers a web app to a previous snapshot. + def restore_from_backup_blob( + self, resource_group_name, name, request, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores an app from a backup blob in Azure Storage. - Recovers a web app to a previous snapshot. + Restores an app from a backup 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 web app. + :param name: Name of the app. :type name: str - :param recovery_entity: Snapshot data used for web app recovery. - Snapshot information can be obtained by calling GetDeletedSites or - GetSiteSnapshots API. - :type recovery_entity: ~azure.mgmt.web.models.SnapshotRecoveryRequest + :param request: Information on restore request . + :type request: ~azure.mgmt.web.models.RestoreRequest :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -9053,10 +9579,10 @@ def recover( ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ - raw_result = self._recover_initial( + raw_result = self._restore_from_backup_blob_initial( resource_group_name=resource_group_name, name=name, - recovery_entity=recovery_entity, + request=request, custom_headers=custom_headers, raw=True, **operation_config @@ -9074,32 +9600,13 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - recover.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/recover'} - - 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. + restore_from_backup_blob.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromBackupBlob'} - 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 ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _restore_from_deleted_app_initial( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.reset_production_slot_config.metadata['url'] + url = self.restore_from_deleted_app.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -9121,11 +9628,15 @@ def reset_production_slot_config( 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(restore_request, 'DeletedAppRestoreRequest') + # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -9133,38 +9644,59 @@ def reset_production_slot_config( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - reset_production_slot_config.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resetSlotConfig'} - 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 restore_from_deleted_app( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a deleted web app to this web app. - Restarts an app (or deployment slot, if specified). + Restores a deleted web app to 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: Name of web 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 restore_request: Deleted web app restore information. + :type restore_request: ~azure.mgmt.web.models.DeletedAppRestoreRequest :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 ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ + raw_result = self._restore_from_deleted_app_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_deleted_app.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreFromDeletedApp'} + + + def _restore_snapshot_initial( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.restart.metadata['url'] + url = self.restore_snapshot.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -9174,10 +9706,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 @@ -9190,11 +9718,15 @@ def restart( 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(restore_request, 'SnapshotRestoreRequest') + # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -9202,7 +9734,55 @@ def restart( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restart'} + + def restore_snapshot( + self, resource_group_name, name, restore_request, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a web app from a snapshot. + + Restores a web app from a 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 restore_request: Snapshot restore settings. Snapshot + information can be obtained by calling GetDeletedSites or + GetSiteSnapshots API. + :type restore_request: ~azure.mgmt.web.models.SnapshotRestoreRequest + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_snapshot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_snapshot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/restoreSnapshot'} def list_site_extensions( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): @@ -9528,7 +10108,8 @@ def list_slots( overrides`. :return: An iterator like instance of Site :rtype: ~azure.mgmt.web.models.SitePaged[~azure.mgmt.web.models.Site] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -9566,9 +10147,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -9654,7 +10233,7 @@ def get_slot( def _create_or_update_slot_initial( - self, resource_group_name, name, site_envelope, slot, skip_dns_registration=None, skip_custom_domain_verification=None, force_dns_registration=None, ttl_in_seconds=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.create_or_update_slot.metadata['url'] path_format_arguments = { @@ -9667,14 +10246,6 @@ def _create_or_update_slot_initial( # 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 @@ -9696,9 +10267,7 @@ def _create_or_update_slot_initial( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -9714,7 +10283,7 @@ def _create_or_update_slot_initial( 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, polling=True, **operation_config): + self, resource_group_name, name, site_envelope, slot, custom_headers=None, raw=False, polling=True, **operation_config): """Creates a new web, mobile, or API app in an existing resource group, or updates an existing app. @@ -9733,19 +10302,6 @@ def create_or_update_slot( :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 - domain name. - :type ttl_in_seconds: str :param dict custom_headers: headers that will be added to the request :param bool raw: The poller return type is ClientRawResponse, the direct response alongside the deserialized response @@ -9757,17 +10313,14 @@ def create_or_update_slot( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.Site] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.Site]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._create_or_update_slot_initial( resource_group_name=resource_group_name, name=name, site_envelope=site_envelope, slot=slot, - skip_dns_registration=skip_dns_registration, - skip_custom_domain_verification=skip_custom_domain_verification, - force_dns_registration=force_dns_registration, - ttl_in_seconds=ttl_in_seconds, custom_headers=custom_headers, raw=True, **operation_config @@ -9792,7 +10345,7 @@ def get_long_running_output(response): create_or_update_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} 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): + self, resource_group_name, name, slot, delete_metrics=None, delete_empty_server_farm=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. @@ -9811,8 +10364,6 @@ def delete_slot( 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 @@ -9838,8 +10389,6 @@ def delete_slot( 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 @@ -9867,7 +10416,7 @@ def delete_slot( delete_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}'} def 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): + self, resource_group_name, name, site_envelope, slot, 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. @@ -9886,19 +10435,6 @@ def update_slot( :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 - domain name. - :type ttl_in_seconds: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -9907,7 +10443,8 @@ def update_slot( :return: Site or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Site or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_slot.metadata['url'] @@ -9921,14 +10458,6 @@ def 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 @@ -9950,9 +10479,7 @@ def update_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -9992,7 +10519,8 @@ def analyze_custom_hostname_slot( :return: CustomHostnameAnalysisResult or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.CustomHostnameAnalysisResult or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.analyze_custom_hostname_slot.metadata['url'] @@ -10025,9 +10553,7 @@ def analyze_custom_hostname_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -10140,7 +10666,8 @@ def backup_slot( :return: BackupItem or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.BackupItem or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.backup_slot.metadata['url'] @@ -10175,9 +10702,7 @@ def backup_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -10213,7 +10738,8 @@ def list_backups_slot( :return: An iterator like instance of BackupItem :rtype: ~azure.mgmt.web.models.BackupItemPaged[~azure.mgmt.web.models.BackupItem] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -10252,9 +10778,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -10269,84 +10793,6 @@ def internal_paging(next_link=None, raw=False): return deserialized list_backups_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups'} - 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. - - 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. - :type name: str - :param request: A RestoreRequest object that includes Azure storage - URL and blog name for discovery of backup. - :type request: ~azure.mgmt.web.models.RestoreRequest - :param slot: Name of the deployment slot. If a slot is not specified, - the API will perform discovery for the production slot. - :type slot: str - :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: RestoreRequest or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.RestoreRequest or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.discover_restore_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'slot': self._serialize.url("slot", slot, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(request, 'RestoreRequest') - - # Construct and send request - request = self._client.put(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) - - if response.status_code not in [200]: - 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(deserialized, response) - return client_raw_response - - return deserialized - discover_restore_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/backups/discover'} - 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. @@ -10371,7 +10817,8 @@ def get_backup_status_slot( :return: BackupItem or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.BackupItem or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_backup_status_slot.metadata['url'] @@ -10403,9 +10850,7 @@ def get_backup_status_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -10515,7 +10960,8 @@ def list_backup_status_secrets_slot( :return: BackupItem or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.BackupItem or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_backup_status_secrets_slot.metadata['url'] @@ -10551,9 +10997,7 @@ def list_backup_status_secrets_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -10603,22 +11047,15 @@ def _restore_slot_initial( response = self._client.send( request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [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('RestoreResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - def restore_slot( self, resource_group_name, name, backup_id, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): """Restores a specific backup to another app (or deployment slot, if @@ -10644,12 +11081,10 @@ def restore_slot( direct response alongside the deserialized response :param polling: True for ARMPolling, False for no polling, or a polling object for personal polling strategy - :return: An instance of LROPoller that returns RestoreResponse or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.RestoreResponse] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.RestoreResponse]] + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ raw_result = self._restore_slot_initial( @@ -10664,14 +11099,10 @@ def restore_slot( ) def get_long_running_output(response): - deserialized = self._deserialize('RestoreResponse', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response - return deserialized - lro_delay = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -10703,7 +11134,8 @@ def list_configurations_slot( :return: An iterator like instance of SiteConfigResource :rtype: ~azure.mgmt.web.models.SiteConfigResourcePaged[~azure.mgmt.web.models.SiteConfigResource] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -10742,9 +11174,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -10785,7 +11215,8 @@ def update_application_settings_slot( :return: StringDictionary or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.StringDictionary or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ app_settings = models.StringDictionary(kind=kind, properties=properties) @@ -10822,9 +11253,7 @@ def update_application_settings_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -10860,7 +11289,8 @@ def list_application_settings_slot( :return: StringDictionary or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.StringDictionary or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_application_settings_slot.metadata['url'] @@ -10891,9 +11321,7 @@ def list_application_settings_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -10933,7 +11361,8 @@ def update_auth_settings_slot( :return: SiteAuthSettings or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteAuthSettings or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_auth_settings_slot.metadata['url'] @@ -10968,9 +11397,7 @@ def update_auth_settings_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -11006,7 +11433,8 @@ def get_auth_settings_slot( :return: SiteAuthSettings or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteAuthSettings or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_auth_settings_slot.metadata['url'] @@ -11037,9 +11465,7 @@ def get_auth_settings_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -11077,7 +11503,8 @@ def update_backup_configuration_slot( :return: BackupRequest or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.BackupRequest or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_backup_configuration_slot.metadata['url'] @@ -11112,9 +11539,7 @@ def update_backup_configuration_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -11211,7 +11636,8 @@ def get_backup_configuration_slot( :return: BackupRequest or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.BackupRequest or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_backup_configuration_slot.metadata['url'] @@ -11242,9 +11668,7 @@ def get_backup_configuration_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -11285,7 +11709,8 @@ def update_connection_strings_slot( :return: ConnectionStringDictionary or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.ConnectionStringDictionary or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ connection_strings = models.ConnectionStringDictionary(kind=kind, properties=properties) @@ -11322,9 +11747,7 @@ def update_connection_strings_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -11360,7 +11783,8 @@ def list_connection_strings_slot( :return: ConnectionStringDictionary or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.ConnectionStringDictionary or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_connection_strings_slot.metadata['url'] @@ -11391,9 +11815,7 @@ def list_connection_strings_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -11429,7 +11851,8 @@ def get_diagnostic_logs_configuration_slot( :return: SiteLogsConfig or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteLogsConfig or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_diagnostic_logs_configuration_slot.metadata['url'] @@ -11460,9 +11883,7 @@ def get_diagnostic_logs_configuration_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -11501,7 +11922,8 @@ def update_diagnostic_logs_config_slot( :return: SiteLogsConfig or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteLogsConfig or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_diagnostic_logs_config_slot.metadata['url'] @@ -11536,9 +11958,7 @@ def update_diagnostic_logs_config_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -11578,7 +11998,8 @@ def update_metadata_slot( :return: StringDictionary or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.StringDictionary or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ metadata = models.StringDictionary(kind=kind, properties=properties) @@ -11615,9 +12036,7 @@ def update_metadata_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -11653,7 +12072,8 @@ def list_metadata_slot( :return: StringDictionary or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.StringDictionary or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_metadata_slot.metadata['url'] @@ -11684,9 +12104,7 @@ def list_metadata_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -11732,9 +12150,7 @@ def _list_publishing_credentials_slot_initial( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -11772,7 +12188,8 @@ def list_publishing_credentials_slot( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.User] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.User]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._list_publishing_credentials_slot_initial( resource_group_name=resource_group_name, @@ -11822,13 +12239,231 @@ def update_site_push_settings_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.PushSettings or + :return: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(push_settings, 'PushSettings') + + # Construct and send request + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} + + 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. + + 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 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: PushSettings or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PushSettings or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.list_site_push_settings_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PushSettings', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} + + def get_swift_virtual_network_connection_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets a Swift Virtual Network connection. + + Gets a Swift Virtual Network 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. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API will get a gateway for the production slot's Virtual Network. + :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: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('SwiftVirtualNetwork', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/virtualNetwork'} + + def create_or_update_swift_virtual_network_connection_slot( + self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + :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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: ~azure.mgmt.web.models.SwiftVirtualNetwork + :param slot: Name of the deployment slot. If a slot is not specified, + the API will add or update connections for the production slot. + :type slot: str + :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: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SwiftVirtualNetwork or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL - url = self.update_site_push_settings_slot.metadata['url'] + url = self.create_or_update_swift_virtual_network_connection_slot.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -11852,7 +12487,7 @@ 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(connection_envelope, 'SwiftVirtualNetwork') # Construct and send request request = self._client.put(url, query_parameters) @@ -11860,48 +12495,47 @@ def update_site_push_settings_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) + deserialized = self._deserialize('SwiftVirtualNetwork', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - update_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings'} + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/virtualNetwork'} - def list_site_push_settings_slot( + def delete_swift_virtual_network_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets the Push settings associated with web app. + """Deletes a Swift Virtual Network connection from an app (or deployment + slot). - Gets the Push settings associated with web app. + Deletes a Swift Virtual Network connection from an app (or 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 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 delete the connection 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: PushSettings or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.PushSettings or - ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.list_site_push_settings_slot.metadata['url'] + url = self.delete_swift_virtual_network_slot.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -11925,25 +12559,99 @@ 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.delete(url, query_parameters) response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 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 + delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/virtualNetwork'} + + def update_swift_virtual_network_connection_slot( + self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): + """Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + Integrates this Web App with a Virtual Network. This requires that 1) + "swiftSupported" is true when doing a GET against this resource, and 2) + that the target Subnet has already been delegated, and is not + in use by another App Service Plan other than the one this App is in. + + :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_envelope: Properties of the Virtual Network + connection. See example. + :type connection_envelope: ~azure.mgmt.web.models.SwiftVirtualNetwork + :param slot: Name of the deployment slot. If a slot is not specified, + the API will add or update connections for the production slot. + :type slot: str + :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: SwiftVirtualNetwork or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SwiftVirtualNetwork or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_swift_virtual_network_connection_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(connection_envelope, 'SwiftVirtualNetwork') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PushSettings', response) + deserialized = self._deserialize('SwiftVirtualNetwork', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list_site_push_settings_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/pushsettings/list'} + update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/virtualNetwork'} def get_configuration_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): @@ -11969,7 +12677,8 @@ def get_configuration_slot( :return: SiteConfigResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteConfigResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_configuration_slot.metadata['url'] @@ -12000,9 +12709,7 @@ def get_configuration_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -12041,7 +12748,8 @@ def create_or_update_configuration_slot( :return: SiteConfigResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteConfigResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_configuration_slot.metadata['url'] @@ -12076,9 +12784,7 @@ def create_or_update_configuration_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -12117,7 +12823,8 @@ def update_configuration_slot( :return: SiteConfigResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteConfigResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_configuration_slot.metadata['url'] @@ -12152,9 +12859,7 @@ def update_configuration_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -12192,7 +12897,8 @@ def list_configuration_snapshot_info_slot( :return: An iterator like instance of SiteConfigurationSnapshotInfo :rtype: ~azure.mgmt.web.models.SiteConfigurationSnapshotInfoPaged[~azure.mgmt.web.models.SiteConfigurationSnapshotInfo] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -12231,9 +12937,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -12274,7 +12978,8 @@ def get_configuration_snapshot_slot( :return: SiteConfigResource or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteConfigResource or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_configuration_snapshot_slot.metadata['url'] @@ -12306,9 +13011,7 @@ def get_configuration_snapshot_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -12459,7 +13162,7 @@ def get_web_site_container_logs_slot( return deserialized get_web_site_container_logs_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs'} - def get_web_site_container_logs_zip_slot( + def get_container_logs_zip_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, callback=None, **operation_config): """Gets the ZIP archived docker log files for the given site. @@ -12488,7 +13191,7 @@ def get_web_site_container_logs_zip_slot( :raises: :class:`CloudError` """ # Construct URL - url = self.get_web_site_container_logs_zip_slot.metadata['url'] + url = self.get_container_logs_zip_slot.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -12530,7 +13233,7 @@ def get_web_site_container_logs_zip_slot( return client_raw_response return deserialized - get_web_site_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} + get_container_logs_zip_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/containerlogs/zip/download'} def list_continuous_web_jobs_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): @@ -12554,7 +13257,8 @@ def list_continuous_web_jobs_slot( :return: An iterator like instance of ContinuousWebJob :rtype: ~azure.mgmt.web.models.ContinuousWebJobPaged[~azure.mgmt.web.models.ContinuousWebJob] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -12593,9 +13297,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -12896,7 +13598,8 @@ def list_deployments_slot( :return: An iterator like instance of Deployment :rtype: ~azure.mgmt.web.models.DeploymentPaged[~azure.mgmt.web.models.Deployment] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -12935,9 +13638,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -12976,7 +13677,8 @@ def get_deployment_slot( :return: Deployment or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Deployment or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_deployment_slot.metadata['url'] @@ -13008,9 +13710,7 @@ def get_deployment_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -13050,7 +13750,8 @@ def create_deployment_slot( :return: Deployment or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Deployment or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_deployment_slot.metadata['url'] @@ -13086,9 +13787,7 @@ def create_deployment_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -13194,7 +13893,8 @@ def list_deployment_log_slot( :return: Deployment or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Deployment or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_deployment_log_slot.metadata['url'] @@ -13226,9 +13926,7 @@ def list_deployment_log_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -13242,6 +13940,85 @@ def list_deployment_log_slot( return deserialized list_deployment_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/deployments/{id}/log'} + def discover_backup_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. Use this to get information about the databases stored + in a backup. + + Discovers an existing app backup that can be restored from a blob in + Azure storage. Use this to get information about the databases stored + in a backup. + + :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: ~azure.mgmt.web.models.RestoreRequest + :param slot: Name of the deployment slot. If a slot is not specified, + the API will perform discovery for the production slot. + :type slot: str + :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: RestoreRequest or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.RestoreRequest or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.discover_backup_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RestoreRequest', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + discover_backup_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/discoverbackup'} + 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. @@ -13264,7 +14041,8 @@ def list_domain_ownership_identifiers_slot( :return: An iterator like instance of Identifier :rtype: ~azure.mgmt.web.models.IdentifierPaged[~azure.mgmt.web.models.Identifier] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -13303,9 +14081,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -13345,7 +14121,8 @@ def get_domain_ownership_identifier_slot( :return: Identifier or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Identifier or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_domain_ownership_identifier_slot.metadata['url'] @@ -13377,9 +14154,7 @@ def get_domain_ownership_identifier_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -13424,7 +14199,8 @@ def create_or_update_domain_ownership_identifier_slot( :return: Identifier or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Identifier or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) @@ -13462,9 +14238,7 @@ def create_or_update_domain_ownership_identifier_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -13574,7 +14348,8 @@ def update_domain_ownership_identifier_slot( :return: Identifier or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.Identifier or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ domain_ownership_identifier = models.Identifier(kind=kind, identifier_id=identifier_id) @@ -13612,9 +14387,7 @@ def update_domain_ownership_identifier_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -13650,7 +14423,8 @@ def get_ms_deploy_status_slot( :return: MSDeployStatus or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.MSDeployStatus or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_ms_deploy_status_slot.metadata['url'] @@ -13681,9 +14455,7 @@ def get_ms_deploy_status_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -13973,7 +14745,8 @@ def get_functions_admin_token_slot( overrides`. :return: str or ClientRawResponse if raw=true :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_functions_admin_token_slot.metadata['url'] @@ -14004,9 +14777,7 @@ def get_functions_admin_token_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -14129,9 +14900,7 @@ def _create_instance_function_slot_initial( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -14173,7 +14942,8 @@ def create_instance_function_slot( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.FunctionEnvelope] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.FunctionEnvelope]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._create_instance_function_slot_initial( resource_group_name=resource_group_name, @@ -14294,7 +15064,8 @@ def list_function_secrets_slot( :return: FunctionSecrets or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.FunctionSecrets or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_function_secrets_slot.metadata['url'] @@ -14326,9 +15097,7 @@ def list_function_secrets_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -14364,7 +15133,8 @@ def list_host_name_bindings_slot( :return: An iterator like instance of HostNameBinding :rtype: ~azure.mgmt.web.models.HostNameBindingPaged[~azure.mgmt.web.models.HostNameBinding] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -14403,9 +15173,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -14446,7 +15214,8 @@ def get_host_name_binding_slot( :return: HostNameBinding or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HostNameBinding or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_host_name_binding_slot.metadata['url'] @@ -14478,9 +15247,7 @@ def get_host_name_binding_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -14521,7 +15288,8 @@ def create_or_update_host_name_binding_slot( :return: HostNameBinding or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HostNameBinding or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_host_name_binding_slot.metadata['url'] @@ -14557,9 +15325,7 @@ def create_or_update_host_name_binding_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -14664,7 +15430,8 @@ def get_hybrid_connection_slot( :return: HybridConnection or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnection or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_hybrid_connection_slot.metadata['url'] @@ -14697,9 +15464,7 @@ def get_hybrid_connection_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -14740,7 +15505,8 @@ def create_or_update_hybrid_connection_slot( :return: HybridConnection or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnection or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_hybrid_connection_slot.metadata['url'] @@ -14777,9 +15543,7 @@ def create_or_update_hybrid_connection_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -14886,7 +15650,8 @@ def update_hybrid_connection_slot( :return: HybridConnection or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnection or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_hybrid_connection_slot.metadata['url'] @@ -14923,9 +15688,7 @@ def update_hybrid_connection_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -14964,7 +15727,8 @@ def list_hybrid_connection_keys_slot( :return: HybridConnectionKey or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnectionKey or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_hybrid_connection_keys_slot.metadata['url'] @@ -14996,10 +15760,8 @@ def list_hybrid_connection_keys_slot( request = self._client.post(url, query_parameters) response = self._client.send(request, header_parameters, stream=False, **operation_config) - if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -15034,7 +15796,8 @@ def list_hybrid_connections_slot( :return: HybridConnection or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.HybridConnection or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_hybrid_connections_slot.metadata['url'] @@ -15065,9 +15828,7 @@ def list_hybrid_connections_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -15105,7 +15866,8 @@ def list_relay_service_connections_slot( :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_relay_service_connections_slot.metadata['url'] @@ -15136,9 +15898,7 @@ def list_relay_service_connections_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -15176,7 +15936,8 @@ def get_relay_service_connection_slot( :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_relay_service_connection_slot.metadata['url'] @@ -15208,9 +15969,7 @@ def get_relay_service_connection_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -15255,7 +16014,8 @@ def create_or_update_relay_service_connection_slot( :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_relay_service_connection_slot.metadata['url'] @@ -15291,9 +16051,7 @@ def create_or_update_relay_service_connection_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -15402,7 +16160,8 @@ def update_relay_service_connection_slot( :return: RelayServiceConnectionEntity or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.RelayServiceConnectionEntity or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_relay_service_connection_slot.metadata['url'] @@ -15438,9 +16197,7 @@ def update_relay_service_connection_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -15476,7 +16233,8 @@ def list_instance_identifiers_slot( :return: An iterator like instance of SiteInstance :rtype: ~azure.mgmt.web.models.SiteInstancePaged[~azure.mgmt.web.models.SiteInstance] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -15515,9 +16273,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -15556,7 +16312,8 @@ def get_instance_ms_deploy_status_slot( :return: MSDeployStatus or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.MSDeployStatus or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_instance_ms_deploy_status_slot.metadata['url'] @@ -15588,9 +16345,7 @@ def get_instance_ms_deploy_status_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -16470,7 +17225,8 @@ def is_cloneable_slot( :return: SiteCloneability or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteCloneability or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.is_cloneable_slot.metadata['url'] @@ -16501,9 +17257,7 @@ def is_cloneable_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -16539,7 +17293,8 @@ def list_sync_function_triggers_slot( :return: FunctionSecrets or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.FunctionSecrets or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_sync_function_triggers_slot.metadata['url'] @@ -16570,9 +17325,7 @@ def list_sync_function_triggers_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -16610,7 +17363,8 @@ def list_metric_definitions_slot( :return: An iterator like instance of ResourceMetricDefinition :rtype: ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -16649,9 +17403,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -16697,7 +17449,8 @@ def list_metrics_slot( :return: An iterator like instance of ResourceMetric :rtype: ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -16740,9 +17493,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -16780,7 +17531,8 @@ def get_migrate_my_sql_status_slot( :return: MigrateMySqlStatus or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.MigrateMySqlStatus or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_migrate_my_sql_status_slot.metadata['url'] @@ -16811,9 +17563,7 @@ def get_migrate_my_sql_status_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -16928,7 +17678,8 @@ def start_web_site_network_trace_slot( overrides`. :return: str or ClientRawResponse if raw=true :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.start_web_site_network_trace_slot.metadata['url'] @@ -16965,9 +17716,7 @@ def start_web_site_network_trace_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -17001,7 +17750,8 @@ def stop_web_site_network_trace_slot( overrides`. :return: str or ClientRawResponse if raw=true :rtype: str or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.stop_web_site_network_trace_slot.metadata['url'] @@ -17032,9 +17782,7 @@ def stop_web_site_network_trace_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -17138,7 +17886,8 @@ def list_perf_mon_counters_slot( :return: An iterator like instance of PerfMonResponse :rtype: ~azure.mgmt.web.models.PerfMonResponsePaged[~azure.mgmt.web.models.PerfMonResponse] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -17179,9 +17928,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -17218,7 +17965,8 @@ def get_site_php_error_log_flag_slot( :return: SitePhpErrorLogFlag or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SitePhpErrorLogFlag or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_site_php_error_log_flag_slot.metadata['url'] @@ -17249,9 +17997,7 @@ def get_site_php_error_log_flag_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -17287,7 +18033,8 @@ def list_premier_add_ons_slot( :return: PremierAddOn or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.PremierAddOn or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_premier_add_ons_slot.metadata['url'] @@ -17318,9 +18065,7 @@ def list_premier_add_ons_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -17358,7 +18103,8 @@ def get_premier_add_on_slot( :return: PremierAddOn or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.PremierAddOn or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_premier_add_on_slot.metadata['url'] @@ -17390,9 +18136,7 @@ def get_premier_add_on_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -17433,7 +18177,8 @@ def add_premier_add_on_slot( :return: PremierAddOn or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.PremierAddOn or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.add_premier_add_on_slot.metadata['url'] @@ -17469,9 +18214,7 @@ def add_premier_add_on_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -17511,11 +18254,224 @@ def delete_premier_add_on_slot( :raises: :class:`CloudError` """ # Construct URL - url = self.delete_premier_add_on_slot.metadata['url'] + url = self.delete_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + '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.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def update_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. + + 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 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: ~azure.mgmt.web.models.PremierAddOnPatchResource + :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`. + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.update_premier_add_on_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + '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 body + body_content = self._serialize.body(premier_add_on, 'PremierAddOnPatchResource') + + # Construct and send request + request = self._client.patch(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + def get_private_access_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets data around private site access enablement and authorized Virtual + Networks that can access the site. + + Gets data around private site access enablement and authorized Virtual + Networks that can access the site. + + :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 slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_private_access_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_private_access_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} + + def put_private_access_vnet_slot( + self, resource_group_name, name, access, slot, custom_headers=None, raw=False, **operation_config): + """Sets data around private site access enablement and authorized Virtual + Networks that can access the site. + + Sets data around private site access enablement and authorized Virtual + Networks that can access the site. + + :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 access: The information for the private access + :type access: ~azure.mgmt.web.models.PrivateAccess + :param slot: The name of the slot for the web app. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.put_private_access_vnet_slot.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), - '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') } @@ -17535,19 +18491,28 @@ def delete_premier_add_on_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(access, 'PrivateAccess') + # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PrivateAccess', response) if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - delete_premier_add_on_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/premieraddons/{premierAddOnName}'} + + return deserialized + put_private_access_vnet_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/privateAccess/virtualNetworks'} def list_processes_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): @@ -18189,7 +19154,8 @@ def list_public_certificates_slot( :return: An iterator like instance of PublicCertificate :rtype: ~azure.mgmt.web.models.PublicCertificatePaged[~azure.mgmt.web.models.PublicCertificate] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -18228,9 +19194,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -18271,7 +19235,8 @@ def get_public_certificate_slot( :return: PublicCertificate or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.PublicCertificate or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_public_certificate_slot.metadata['url'] @@ -18303,9 +19268,7 @@ def get_public_certificate_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -18346,7 +19309,8 @@ def create_or_update_public_certificate_slot( :return: PublicCertificate or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.PublicCertificate or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_public_certificate_slot.metadata['url'] @@ -18382,9 +19346,7 @@ def create_or_update_public_certificate_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -18495,7 +19457,8 @@ def list_publishing_profile_xml_with_secrets_slot( overrides`. :return: object or ClientRawResponse if raw=true :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ publishing_profile_options = models.CsmPublishingProfileOptions(format=format) @@ -18532,9 +19495,7 @@ def list_publishing_profile_xml_with_secrets_slot( request, header_parameters, body_content, stream=True, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -18548,11 +19509,242 @@ def list_publishing_profile_xml_with_secrets_slot( return deserialized list_publishing_profile_xml_with_secrets_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/publishxml'} + def reset_slot_configuration_slot( + self, resource_group_name, name, slot, 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 slot: Name of the deployment slot. If a slot is not specified, + the API resets configuration 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`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.reset_slot_configuration_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + 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 + reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} + + 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). + + 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 slot: Name of the deployment slot. If a slot is not specified, + the API will restart the production slot. + :type slot: 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 ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.restart_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + 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, stream=False, **operation_config) + + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} + + + def _restore_from_backup_blob_slot_initial( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.restore_from_backup_blob_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(request, 'RestoreRequest') + + # Construct and send request + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def restore_from_backup_blob_slot( + self, resource_group_name, name, request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores an app from a backup blob in Azure Storage. + + Restores an app from a backup 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. + :type name: str + :param request: Information on restore request . + :type request: ~azure.mgmt.web.models.RestoreRequest + :param slot: Name of the deployment slot. If a slot is not specified, + the API will restore a backup of the production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: :class:`CloudError` + """ + raw_result = self._restore_from_backup_blob_slot_initial( + resource_group_name=resource_group_name, + name=name, + request=request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_from_backup_blob_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromBackupBlob'} + - def _recover_slot_initial( - self, resource_group_name, name, recovery_entity, slot, custom_headers=None, raw=False, **operation_config): + def _restore_from_deleted_app_slot_initial( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.recover_slot.metadata['url'] + url = self.restore_from_deleted_app_slot.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -18576,7 +19768,7 @@ def _recover_slot_initial( 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') + body_content = self._serialize.body(restore_request, 'DeletedAppRestoreRequest') # Construct and send request request = self._client.post(url, query_parameters) @@ -18592,21 +19784,19 @@ def _recover_slot_initial( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def recover_slot( - self, resource_group_name, name, recovery_entity, slot, custom_headers=None, raw=False, polling=True, **operation_config): - """Recovers a web app to a previous snapshot. + def restore_from_deleted_app_slot( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a deleted web app to this web app. - Recovers a web app to a previous snapshot. + Restores a deleted web app to 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 web app. :type name: str - :param recovery_entity: Snapshot data used for web app recovery. - Snapshot information can be obtained by calling GetDeletedSites or - GetSiteSnapshots API. - :type recovery_entity: ~azure.mgmt.web.models.SnapshotRecoveryRequest + :param restore_request: Deleted web app restore information. + :type restore_request: ~azure.mgmt.web.models.DeletedAppRestoreRequest :param slot: Name of web app slot. If not specified then will default to production slot. :type slot: str @@ -18621,10 +19811,10 @@ def recover_slot( ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ - raw_result = self._recover_slot_initial( + raw_result = self._restore_from_deleted_app_slot_initial( resource_group_name=resource_group_name, name=name, - recovery_entity=recovery_entity, + restore_request=restore_request, slot=slot, custom_headers=custom_headers, raw=True, @@ -18643,35 +19833,13 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - recover_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/recover'} - - def reset_slot_configuration_slot( - self, resource_group_name, name, slot, 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. + restore_from_deleted_app_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreFromDeletedApp'} - 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 slot: Name of the deployment slot. If a slot is not specified, - the API resets configuration 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`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _restore_snapshot_slot_initial( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.reset_slot_configuration_slot.metadata['url'] + url = self.restore_snapshot_slot.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), 'name': self._serialize.url("name", name, 'str'), @@ -18694,11 +19862,15 @@ def reset_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(restore_request, 'SnapshotRestoreRequest') + # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -18706,80 +19878,59 @@ def reset_slot_configuration_slot( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - reset_slot_configuration_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resetSlotConfig'} - 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). + def restore_snapshot_slot( + self, resource_group_name, name, restore_request, slot, custom_headers=None, raw=False, polling=True, **operation_config): + """Restores a web app from a snapshot. - Restarts an app (or deployment slot, if specified). + Restores a web app from a 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. + :param name: Name of web app. :type name: str - :param slot: Name of the deployment slot. If a slot is not specified, - the API will restart the production slot. + :param restore_request: Snapshot restore settings. Snapshot + information can be obtained by calling GetDeletedSites or + GetSiteSnapshots API. + :type restore_request: ~azure.mgmt.web.models.SnapshotRestoreRequest + :param slot: Name of web app slot. If not specified then will default + to production slot. :type slot: 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 ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] :raises: :class:`CloudError` """ - # Construct URL - url = self.restart_slot.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), - 'name': self._serialize.url("name", name, 'str'), - 'slot': self._serialize.url("slot", slot, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - 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, stream=False, **operation_config) + raw_result = self._restore_snapshot_slot_initial( + resource_group_name=resource_group_name, + name=name, + restore_request=restore_request, + slot=slot, + custom_headers=custom_headers, + raw=True, + **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): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - restart_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restart'} + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + restore_snapshot_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/restoreSnapshot'} def list_site_extensions_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): @@ -19131,7 +20282,8 @@ def list_slot_differences_slot( :return: An iterator like instance of SlotDifference :rtype: ~azure.mgmt.web.models.SlotDifferencePaged[~azure.mgmt.web.models.SlotDifference] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) @@ -19175,9 +20327,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -19314,7 +20464,8 @@ def list_snapshots_slot( :return: An iterator like instance of Snapshot :rtype: ~azure.mgmt.web.models.SnapshotPaged[~azure.mgmt.web.models.Snapshot] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -19353,9 +20504,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -19393,7 +20542,8 @@ def get_source_control_slot( :return: SiteSourceControl or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteSourceControl or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_source_control_slot.metadata['url'] @@ -19424,9 +20574,7 @@ def get_source_control_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -19480,9 +20628,7 @@ def _create_or_update_source_control_slot_initial( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -19528,7 +20674,8 @@ def create_or_update_source_control_slot( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.SiteSourceControl] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.SiteSourceControl]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._create_or_update_source_control_slot_initial( resource_group_name=resource_group_name, @@ -19646,7 +20793,8 @@ def update_source_control_slot( :return: SiteSourceControl or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteSourceControl or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_source_control_slot.metadata['url'] @@ -19680,10 +20828,8 @@ def update_source_control_slot( response = self._client.send( request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -19691,6 +20837,8 @@ def update_source_control_slot( deserialized = self._deserialize('SiteSourceControl', response) if response.status_code == 201: deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -19965,7 +21113,8 @@ def list_triggered_web_jobs_slot( :return: An iterator like instance of TriggeredWebJob :rtype: ~azure.mgmt.web.models.TriggeredWebJobPaged[~azure.mgmt.web.models.TriggeredWebJob] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -20004,9 +21153,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -20409,7 +21556,8 @@ def list_usages_slot( :return: An iterator like instance of CsmUsageQuota :rtype: ~azure.mgmt.web.models.CsmUsageQuotaPaged[~azure.mgmt.web.models.CsmUsageQuota] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -20450,9 +21598,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -20489,7 +21635,8 @@ def list_vnet_connections_slot( :return: list or ClientRawResponse if raw=true :rtype: list[~azure.mgmt.web.models.VnetInfo] or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_vnet_connections_slot.metadata['url'] @@ -20520,9 +21667,7 @@ def list_vnet_connections_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -20562,7 +21707,8 @@ def get_vnet_connection_slot( :return: VnetInfo or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetInfo or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_vnet_connection_slot.metadata['url'] @@ -20594,9 +21740,7 @@ def get_vnet_connection_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -20639,7 +21783,8 @@ def create_or_update_vnet_connection_slot( :return: VnetInfo or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetInfo or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_vnet_connection_slot.metadata['url'] @@ -20675,9 +21820,7 @@ def create_or_update_vnet_connection_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -20786,7 +21929,8 @@ def update_vnet_connection_slot( :return: VnetInfo or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetInfo or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_vnet_connection_slot.metadata['url'] @@ -20822,9 +21966,7 @@ def update_vnet_connection_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -20947,7 +22089,8 @@ def create_or_update_vnet_connection_gateway_slot( :return: VnetGateway or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetGateway or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_vnet_connection_gateway_slot.metadata['url'] @@ -20984,9 +22127,7 @@ def create_or_update_vnet_connection_gateway_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -21033,7 +22174,8 @@ def update_vnet_connection_gateway_slot( :return: VnetGateway or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetGateway or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_vnet_connection_gateway_slot.metadata['url'] @@ -21070,9 +22212,7 @@ def update_vnet_connection_gateway_slot( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -21108,7 +22248,8 @@ def list_web_jobs_slot( :return: An iterator like instance of WebJob :rtype: ~azure.mgmt.web.models.WebJobPaged[~azure.mgmt.web.models.WebJob] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -21147,9 +22288,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -21188,7 +22327,8 @@ def get_web_job_slot( :return: WebJob or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.WebJob or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_web_job_slot.metadata['url'] @@ -21220,9 +22360,7 @@ def get_web_job_slot( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -21260,7 +22398,8 @@ def list_slot_differences_from_production( :return: An iterator like instance of SlotDifference :rtype: ~azure.mgmt.web.models.SlotDifferencePaged[~azure.mgmt.web.models.SlotDifference] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ slot_swap_entity = models.CsmSlotEntity(target_slot=target_slot, preserve_vnet=preserve_vnet) @@ -21303,9 +22442,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -21435,7 +22572,8 @@ def list_snapshots( :return: An iterator like instance of Snapshot :rtype: ~azure.mgmt.web.models.SnapshotPaged[~azure.mgmt.web.models.Snapshot] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -21473,9 +22611,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -21509,7 +22645,8 @@ def get_source_control( :return: SiteSourceControl or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteSourceControl or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_source_control.metadata['url'] @@ -21539,9 +22676,7 @@ def get_source_control( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -21594,9 +22729,7 @@ def _create_or_update_source_control_initial( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200, 201, 202]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -21638,7 +22771,8 @@ def create_or_update_source_control( ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.SiteSourceControl] or ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.SiteSourceControl]] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ raw_result = self._create_or_update_source_control_initial( resource_group_name=resource_group_name, @@ -21746,7 +22880,8 @@ def update_source_control( :return: SiteSourceControl or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SiteSourceControl or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_source_control.metadata['url'] @@ -21779,10 +22914,8 @@ def update_source_control( response = self._client.send( request, header_parameters, body_content, stream=False, **operation_config) - if response.status_code not in [200, 201]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200, 201, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -21790,6 +22923,8 @@ def update_source_control( deserialized = self._deserialize('SiteSourceControl', response) if response.status_code == 201: deserialized = self._deserialize('SiteSourceControl', response) + if response.status_code == 202: + deserialized = self._deserialize('SiteSourceControl', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -22045,7 +23180,8 @@ def list_triggered_web_jobs( :return: An iterator like instance of TriggeredWebJob :rtype: ~azure.mgmt.web.models.TriggeredWebJobPaged[~azure.mgmt.web.models.TriggeredWebJob] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -22083,9 +23219,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -22465,7 +23599,8 @@ def list_usages( :return: An iterator like instance of CsmUsageQuota :rtype: ~azure.mgmt.web.models.CsmUsageQuotaPaged[~azure.mgmt.web.models.CsmUsageQuota] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -22505,9 +23640,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -22541,7 +23674,8 @@ def list_vnet_connections( :return: list or ClientRawResponse if raw=true :rtype: list[~azure.mgmt.web.models.VnetInfo] or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.list_vnet_connections.metadata['url'] @@ -22571,9 +23705,7 @@ def list_vnet_connections( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -22610,7 +23742,8 @@ def get_vnet_connection( :return: VnetInfo or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetInfo or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_vnet_connection.metadata['url'] @@ -22641,9 +23774,7 @@ def get_vnet_connection( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -22683,7 +23814,8 @@ def create_or_update_vnet_connection( :return: VnetInfo or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetInfo or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_vnet_connection.metadata['url'] @@ -22718,9 +23850,7 @@ def create_or_update_vnet_connection( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -22822,7 +23952,8 @@ def update_vnet_connection( :return: VnetInfo or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetInfo or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_vnet_connection.metadata['url'] @@ -22857,9 +23988,7 @@ def update_vnet_connection( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -22974,7 +24103,8 @@ def create_or_update_vnet_connection_gateway( :return: VnetGateway or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetGateway or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.create_or_update_vnet_connection_gateway.metadata['url'] @@ -23010,9 +24140,7 @@ def create_or_update_vnet_connection_gateway( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -23055,7 +24183,8 @@ def update_vnet_connection_gateway( :return: VnetGateway or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetGateway or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.update_vnet_connection_gateway.metadata['url'] @@ -23091,9 +24220,7 @@ def update_vnet_connection_gateway( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -23126,7 +24253,8 @@ def list_web_jobs( :return: An iterator like instance of WebJob :rtype: ~azure.mgmt.web.models.WebJobPaged[~azure.mgmt.web.models.WebJob] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): @@ -23164,9 +24292,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -23202,7 +24328,8 @@ def get_web_job( :return: WebJob or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.WebJob or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL url = self.get_web_job.metadata['url'] @@ -23233,9 +24360,7 @@ def get_web_job( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None diff --git a/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py b/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py index 296ad78205d0..6cce23de18b9 100644 --- a/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py +++ b/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py @@ -28,8 +28,6 @@ from .operations.diagnostics_operations import DiagnosticsOperations from .operations.provider_operations import ProviderOperations from .operations.recommendations_operations import RecommendationsOperations -from .operations.resource_health_metadata_operations import ResourceHealthMetadataOperations -from .operations.billing_meters_operations import BillingMetersOperations from .operations.web_apps_operations import WebAppsOperations from .operations.app_service_environments_operations import AppServiceEnvironmentsOperations from .operations.app_service_plans_operations import AppServicePlansOperations @@ -95,10 +93,6 @@ class WebSiteManagementClient(SDKClient): :vartype provider: azure.mgmt.web.operations.ProviderOperations :ivar recommendations: Recommendations operations :vartype recommendations: azure.mgmt.web.operations.RecommendationsOperations - :ivar resource_health_metadata: ResourceHealthMetadata operations - :vartype resource_health_metadata: azure.mgmt.web.operations.ResourceHealthMetadataOperations - :ivar billing_meters: BillingMeters operations - :vartype billing_meters: azure.mgmt.web.operations.BillingMetersOperations :ivar web_apps: WebApps operations :vartype web_apps: azure.mgmt.web.operations.WebAppsOperations :ivar app_service_environments: AppServiceEnvironments operations @@ -122,6 +116,7 @@ def __init__( super(WebSiteManagementClient, self).__init__(self.config.credentials, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-02-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -145,10 +140,6 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.recommendations = RecommendationsOperations( self._client, self.config, self._serialize, self._deserialize) - self.resource_health_metadata = ResourceHealthMetadataOperations( - self._client, self.config, self._serialize, self._deserialize) - self.billing_meters = BillingMetersOperations( - self._client, self.config, self._serialize, self._deserialize) self.web_apps = WebAppsOperations( self._client, self.config, self._serialize, self._deserialize) self.app_service_environments = AppServiceEnvironmentsOperations( @@ -170,16 +161,15 @@ def get_publishing_user( :return: User or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.User or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ - api_version = "2016-03-01" - # Construct URL url = self.get_publishing_user.metadata['url'] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -196,9 +186,7 @@ def get_publishing_user( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -228,16 +216,15 @@ def update_publishing_user( :return: User or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.User or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ - api_version = "2016-03-01" - # Construct URL url = self.update_publishing_user.metadata['url'] # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -258,9 +245,7 @@ def update_publishing_user( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -288,10 +273,9 @@ def list_source_controls( :return: An iterator like instance of SourceControl :rtype: ~azure.mgmt.web.models.SourceControlPaged[~azure.mgmt.web.models.SourceControl] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ - api_version = "2016-03-01" - def internal_paging(next_link=None, raw=False): if not next_link: @@ -300,7 +284,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -322,9 +306,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -355,10 +337,9 @@ def get_source_control( :return: SourceControl or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SourceControl or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ - api_version = "2016-03-01" - # Construct URL url = self.get_source_control.metadata['url'] path_format_arguments = { @@ -368,7 +349,7 @@ def get_source_control( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -385,9 +366,7 @@ def get_source_control( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -419,10 +398,9 @@ def update_source_control( :return: SourceControl or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SourceControl or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ - api_version = "2016-03-01" - # Construct URL url = self.update_source_control.metadata['url'] path_format_arguments = { @@ -432,7 +410,7 @@ def update_source_control( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -453,9 +431,7 @@ def update_source_control( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -469,6 +445,80 @@ def update_source_control( return deserialized update_source_control.metadata = {'url': '/providers/Microsoft.Web/sourcecontrols/{sourceControlType}'} + def list_billing_meters( + self, billing_location=None, os_type=None, custom_headers=None, raw=False, **operation_config): + """Gets a list of meters for a given location. + + Gets a list of meters for a given location. + + :param billing_location: Azure Location of billable resource + :type billing_location: str + :param os_type: App Service OS type meters used for + :type os_type: 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 BillingMeter + :rtype: + ~azure.mgmt.web.models.BillingMeterPaged[~azure.mgmt.web.models.BillingMeter] + :raises: + :class:`DefaultErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_billing_meters.metadata['url'] + 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 = {} + if billing_location is not None: + query_parameters['billingLocation'] = self._serialize.query("billing_location", billing_location, 'str') + if os_type is not None: + query_parameters['osType'] = self._serialize.query("os_type", os_type, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters) + response = self._client.send( + request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.BillingMeterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_billing_meters.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/billingMeters'} + def check_name_availability( self, name, type, is_fqdn=None, custom_headers=None, raw=False, **operation_config): """Check if a resource name is available. @@ -492,12 +542,11 @@ def check_name_availability( :return: ResourceNameAvailability or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.ResourceNameAvailability or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ request = models.ResourceNameAvailabilityRequest(name=name, type=type, is_fqdn=is_fqdn) - api_version = "2016-03-01" - # Construct URL url = self.check_name_availability.metadata['url'] path_format_arguments = { @@ -507,7 +556,7 @@ def check_name_availability( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -528,9 +577,7 @@ def check_name_availability( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -558,10 +605,9 @@ def get_subscription_deployment_locations( :return: DeploymentLocations or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.DeploymentLocations or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ - api_version = "2016-03-01" - # Construct URL url = self.get_subscription_deployment_locations.metadata['url'] path_format_arguments = { @@ -571,7 +617,7 @@ def get_subscription_deployment_locations( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -588,9 +634,7 @@ def get_subscription_deployment_locations( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -605,18 +649,21 @@ def get_subscription_deployment_locations( get_subscription_deployment_locations.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/deploymentLocations'} def list_geo_regions( - self, sku=None, linux_workers_enabled=None, custom_headers=None, raw=False, **operation_config): + self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, custom_headers=None, raw=False, **operation_config): """Get a list of available geographical regions. Get a list of available geographical regions. :param sku: Name of SKU used to filter the regions. Possible values - include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', - 'PremiumV2', 'Dynamic', 'Isolated' + include: 'Free', 'Shared', 'Basic', 'Standard', 'Premium', 'Dynamic', + 'Isolated', 'PremiumV2' :type sku: str or ~azure.mgmt.web.models.SkuName :param linux_workers_enabled: Specify true if you want to filter to only regions that support Linux workers. :type linux_workers_enabled: bool + :param xenon_workers_enabled: Specify true if you want to + filter to only regions that support Xenon workers. + :type xenon_workers_enabled: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -625,10 +672,9 @@ def list_geo_regions( :return: An iterator like instance of GeoRegion :rtype: ~azure.mgmt.web.models.GeoRegionPaged[~azure.mgmt.web.models.GeoRegion] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ - api_version = "2016-03-01" - def internal_paging(next_link=None, raw=False): if not next_link: @@ -645,7 +691,9 @@ def internal_paging(next_link=None, raw=False): query_parameters['sku'] = self._serialize.query("sku", sku, 'str') if linux_workers_enabled is not None: query_parameters['linuxWorkersEnabled'] = self._serialize.query("linux_workers_enabled", linux_workers_enabled, 'bool') - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if xenon_workers_enabled is not None: + query_parameters['xenonWorkersEnabled'] = self._serialize.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -667,9 +715,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -700,12 +746,11 @@ def list_site_identifiers_assigned_to_host_name( :return: An iterator like instance of Identifier :rtype: ~azure.mgmt.web.models.IdentifierPaged[~azure.mgmt.web.models.Identifier] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ name_identifier = models.NameIdentifier(name=name) - api_version = "2016-03-01" - def internal_paging(next_link=None, raw=False): if not next_link: @@ -718,7 +763,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -743,9 +788,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -774,10 +817,9 @@ def list_premier_add_on_offers( :return: An iterator like instance of PremierAddOnOffer :rtype: ~azure.mgmt.web.models.PremierAddOnOfferPaged[~azure.mgmt.web.models.PremierAddOnOffer] - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ - api_version = "2016-03-01" - def internal_paging(next_link=None, raw=False): if not next_link: @@ -790,7 +832,7 @@ def internal_paging(next_link=None, raw=False): # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: url = next_link @@ -812,9 +854,7 @@ def internal_paging(next_link=None, raw=False): request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) return response @@ -843,10 +883,9 @@ def list_skus( :return: SkuInfos or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.SkuInfos or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ - api_version = "2016-03-01" - # Construct URL url = self.list_skus.metadata['url'] path_format_arguments = { @@ -856,7 +895,7 @@ def list_skus( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -873,9 +912,7 @@ def list_skus( response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -907,10 +944,9 @@ def verify_hosting_environment_vnet( :return: VnetValidationFailureDetails or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.VnetValidationFailureDetails or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ - api_version = "2016-03-01" - # Construct URL url = self.verify_hosting_environment_vnet.metadata['url'] path_format_arguments = { @@ -920,7 +956,7 @@ def verify_hosting_environment_vnet( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -941,9 +977,7 @@ def verify_hosting_environment_vnet( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -981,8 +1015,6 @@ def move( """ move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - api_version = "2016-03-01" - # Construct URL url = self.move.metadata['url'] path_format_arguments = { @@ -993,7 +1025,7 @@ def move( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -1042,10 +1074,9 @@ def validate( :return: ValidateResponse or ClientRawResponse if raw=true :rtype: ~azure.mgmt.web.models.ValidateResponse or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ - api_version = "2016-03-01" - # Construct URL url = self.validate.metadata['url'] path_format_arguments = { @@ -1056,7 +1087,7 @@ def validate( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} @@ -1077,9 +1108,7 @@ def validate( request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None @@ -1117,8 +1146,6 @@ def validate_move( """ move_resource_envelope = models.CsmMoveResourceEnvelope(target_resource_group=target_resource_group, resources=resources) - api_version = "2016-03-01" - # Construct URL url = self.validate_move.metadata['url'] path_format_arguments = { @@ -1129,7 +1156,7 @@ def validate_move( # Construct parameters query_parameters = {} - query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {}