diff --git a/azure-mgmt-web/MANIFEST.in b/azure-mgmt-web/MANIFEST.in index bb37a2723dae..6ceb27f7a96e 100644 --- a/azure-mgmt-web/MANIFEST.in +++ b/azure-mgmt-web/MANIFEST.in @@ -1 +1,4 @@ include *.rst +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-web/azure/mgmt/web/models/__init__.py b/azure-mgmt-web/azure/mgmt/web/models/__init__.py index 25af3a3d7bbe..6fe853254970 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/__init__.py +++ b/azure-mgmt-web/azure/mgmt/web/models/__init__.py @@ -182,6 +182,7 @@ from .migrate_my_sql_status_py3 import MigrateMySqlStatus from .relay_service_connection_entity_py3 import RelayServiceConnectionEntity from .network_features_py3 import NetworkFeatures + from .network_trace_py3 import NetworkTrace from .perf_mon_sample_py3 import PerfMonSample from .perf_mon_set_py3 import PerfMonSet from .perf_mon_response_py3 import PerfMonResponse @@ -403,6 +404,7 @@ from .migrate_my_sql_status import MigrateMySqlStatus from .relay_service_connection_entity import RelayServiceConnectionEntity from .network_features import NetworkFeatures + from .network_trace import NetworkTrace from .perf_mon_sample import PerfMonSample from .perf_mon_set import PerfMonSet from .perf_mon_response import PerfMonResponse @@ -743,6 +745,7 @@ 'MigrateMySqlStatus', 'RelayServiceConnectionEntity', 'NetworkFeatures', + 'NetworkTrace', 'PerfMonSample', 'PerfMonSet', 'PerfMonResponse', 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 c34010da2706..bda3392d467e 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 @@ -56,6 +56,9 @@ class AppServicePlan(Resource): If false, apps assigned to this App Service plan will scale to all instances of the plan. Default value: False . :type per_site_scaling: bool + :param maximum_elastic_worker_count: Maximum number of total workers + allowed for this ElasticScaleEnabled App Service Plan + :type maximum_elastic_worker_count: int :ivar number_of_sites: Number of apps assigned to this App Service plan. :vartype number_of_sites: int :param is_spot: If true, this App Service Plan owns spot @@ -120,6 +123,7 @@ class AppServicePlan(Resource): 'maximum_number_of_workers': {'key': 'properties.maximumNumberOfWorkers', 'type': 'int'}, 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, 'per_site_scaling': {'key': 'properties.perSiteScaling', 'type': 'bool'}, + 'maximum_elastic_worker_count': {'key': 'properties.maximumElasticWorkerCount', 'type': 'int'}, 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, @@ -144,6 +148,7 @@ def __init__(self, **kwargs): self.maximum_number_of_workers = None self.geo_region = None self.per_site_scaling = kwargs.get('per_site_scaling', False) + self.maximum_elastic_worker_count = kwargs.get('maximum_elastic_worker_count', None) self.number_of_sites = None self.is_spot = kwargs.get('is_spot', None) self.spot_expiration_time = kwargs.get('spot_expiration_time', 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 fe641394a178..169c71ccb4dd 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 @@ -50,6 +50,9 @@ class AppServicePlanPatchResource(ProxyOnlyResource): If false, apps assigned to this App Service plan will scale to all instances of the plan. Default value: False . :type per_site_scaling: bool + :param maximum_elastic_worker_count: Maximum number of total workers + allowed for this ElasticScaleEnabled App Service Plan + :type maximum_elastic_worker_count: int :ivar number_of_sites: Number of apps assigned to this App Service plan. :vartype number_of_sites: int :param is_spot: If true, this App Service Plan owns spot @@ -109,6 +112,7 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'maximum_number_of_workers': {'key': 'properties.maximumNumberOfWorkers', 'type': 'int'}, 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, 'per_site_scaling': {'key': 'properties.perSiteScaling', 'type': 'bool'}, + 'maximum_elastic_worker_count': {'key': 'properties.maximumElasticWorkerCount', 'type': 'int'}, 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, @@ -132,6 +136,7 @@ def __init__(self, **kwargs): self.maximum_number_of_workers = None self.geo_region = None self.per_site_scaling = kwargs.get('per_site_scaling', False) + self.maximum_elastic_worker_count = kwargs.get('maximum_elastic_worker_count', None) self.number_of_sites = None self.is_spot = kwargs.get('is_spot', None) self.spot_expiration_time = kwargs.get('spot_expiration_time', 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 0d04154d0093..87f1e9d45897 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 @@ -50,6 +50,9 @@ class AppServicePlanPatchResource(ProxyOnlyResource): If false, apps assigned to this App Service plan will scale to all instances of the plan. Default value: False . :type per_site_scaling: bool + :param maximum_elastic_worker_count: Maximum number of total workers + allowed for this ElasticScaleEnabled App Service Plan + :type maximum_elastic_worker_count: int :ivar number_of_sites: Number of apps assigned to this App Service plan. :vartype number_of_sites: int :param is_spot: If true, this App Service Plan owns spot @@ -109,6 +112,7 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'maximum_number_of_workers': {'key': 'properties.maximumNumberOfWorkers', 'type': 'int'}, 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, 'per_site_scaling': {'key': 'properties.perSiteScaling', 'type': 'bool'}, + 'maximum_elastic_worker_count': {'key': 'properties.maximumElasticWorkerCount', 'type': 'int'}, 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, @@ -122,7 +126,7 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, } - 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, hyper_v: 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, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: super(AppServicePlanPatchResource, self).__init__(kind=kind, **kwargs) self.worker_tier_name = worker_tier_name self.status = None @@ -132,6 +136,7 @@ def __init__(self, *, kind: str=None, worker_tier_name: str=None, admin_site_nam self.maximum_number_of_workers = None self.geo_region = None self.per_site_scaling = per_site_scaling + self.maximum_elastic_worker_count = maximum_elastic_worker_count self.number_of_sites = None self.is_spot = is_spot self.spot_expiration_time = spot_expiration_time 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 3a8d6e22c267..14e421ba666a 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 @@ -56,6 +56,9 @@ class AppServicePlan(Resource): If false, apps assigned to this App Service plan will scale to all instances of the plan. Default value: False . :type per_site_scaling: bool + :param maximum_elastic_worker_count: Maximum number of total workers + allowed for this ElasticScaleEnabled App Service Plan + :type maximum_elastic_worker_count: int :ivar number_of_sites: Number of apps assigned to this App Service plan. :vartype number_of_sites: int :param is_spot: If true, this App Service Plan owns spot @@ -120,6 +123,7 @@ class AppServicePlan(Resource): 'maximum_number_of_workers': {'key': 'properties.maximumNumberOfWorkers', 'type': 'int'}, 'geo_region': {'key': 'properties.geoRegion', 'type': 'str'}, 'per_site_scaling': {'key': 'properties.perSiteScaling', 'type': 'bool'}, + 'maximum_elastic_worker_count': {'key': 'properties.maximumElasticWorkerCount', 'type': 'int'}, 'number_of_sites': {'key': 'properties.numberOfSites', 'type': 'int'}, 'is_spot': {'key': 'properties.isSpot', 'type': 'bool'}, 'spot_expiration_time': {'key': 'properties.spotExpirationTime', 'type': 'iso-8601'}, @@ -134,7 +138,7 @@ class AppServicePlan(Resource): 'sku': {'key': 'sku', 'type': 'SkuDescription'}, } - 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, hyper_v: 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, maximum_elastic_worker_count: int=None, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, hyper_v: 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.worker_tier_name = worker_tier_name self.status = None @@ -144,6 +148,7 @@ def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name self.maximum_number_of_workers = None self.geo_region = None self.per_site_scaling = per_site_scaling + self.maximum_elastic_worker_count = maximum_elastic_worker_count self.number_of_sites = None self.is_spot = is_spot self.spot_expiration_time = spot_expiration_time diff --git a/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py b/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py index 5096932c5327..aa2ffd08ff69 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py +++ b/azure-mgmt-web/azure/mgmt/web/models/cors_settings.py @@ -19,12 +19,19 @@ class CorsSettings(Model): allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] + :param support_credentials: Gets or sets whether CORS requests with + credentials are allowed. See + https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials + for more details. + :type support_credentials: bool """ _attribute_map = { 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + 'support_credentials': {'key': 'supportCredentials', 'type': 'bool'}, } def __init__(self, **kwargs): super(CorsSettings, self).__init__(**kwargs) self.allowed_origins = kwargs.get('allowed_origins', None) + self.support_credentials = kwargs.get('support_credentials', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/cors_settings_py3.py b/azure-mgmt-web/azure/mgmt/web/models/cors_settings_py3.py index 17c530afdd67..ca466b9648c4 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/cors_settings_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/cors_settings_py3.py @@ -19,12 +19,19 @@ class CorsSettings(Model): allowed to make cross-origin calls (for example: http://example.com:12345). Use "*" to allow all. :type allowed_origins: list[str] + :param support_credentials: Gets or sets whether CORS requests with + credentials are allowed. See + https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentials + for more details. + :type support_credentials: bool """ _attribute_map = { 'allowed_origins': {'key': 'allowedOrigins', 'type': '[str]'}, + 'support_credentials': {'key': 'supportCredentials', 'type': 'bool'}, } - def __init__(self, *, allowed_origins=None, **kwargs) -> None: + def __init__(self, *, allowed_origins=None, support_credentials: bool=None, **kwargs) -> None: super(CorsSettings, self).__init__(**kwargs) self.allowed_origins = allowed_origins + self.support_credentials = support_credentials 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 index 0fe0f903f66d..42d5ae80a25e 100644 --- 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 @@ -36,6 +36,9 @@ class DeletedAppRestoreRequest(ProxyOnlyResource): formatted as a DateTime string. If unspecified, default value is the time that the app was deleted. :type snapshot_time: str + :param use_dr_secondary: If true, the snapshot is retrieved from + DRSecondary endpoint. + :type use_dr_secondary: bool """ _validation = { @@ -52,6 +55,7 @@ class DeletedAppRestoreRequest(ProxyOnlyResource): 'deleted_site_id': {'key': 'properties.deletedSiteId', 'type': 'str'}, 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, 'snapshot_time': {'key': 'properties.snapshotTime', 'type': 'str'}, + 'use_dr_secondary': {'key': 'properties.useDRSecondary', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -59,3 +63,4 @@ def __init__(self, **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) + self.use_dr_secondary = kwargs.get('use_dr_secondary', 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 index 69ca457e864b..3216b8c3056f 100644 --- 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 @@ -36,6 +36,9 @@ class DeletedAppRestoreRequest(ProxyOnlyResource): formatted as a DateTime string. If unspecified, default value is the time that the app was deleted. :type snapshot_time: str + :param use_dr_secondary: If true, the snapshot is retrieved from + DRSecondary endpoint. + :type use_dr_secondary: bool """ _validation = { @@ -52,10 +55,12 @@ class DeletedAppRestoreRequest(ProxyOnlyResource): 'deleted_site_id': {'key': 'properties.deletedSiteId', 'type': 'str'}, 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, 'snapshot_time': {'key': 'properties.snapshotTime', 'type': 'str'}, + 'use_dr_secondary': {'key': 'properties.useDRSecondary', 'type': 'bool'}, } - def __init__(self, *, kind: str=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, deleted_site_id: str=None, recover_configuration: bool=None, snapshot_time: str=None, use_dr_secondary: bool=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 + self.use_dr_secondary = use_dr_secondary diff --git a/azure-mgmt-web/azure/mgmt/web/models/network_trace.py b/azure-mgmt-web/azure/mgmt/web/models/network_trace.py new file mode 100644 index 000000000000..c6dcab7967e9 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/network_trace.py @@ -0,0 +1,38 @@ +# 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 NetworkTrace(Model): + """Network trace. + + :param path: Local file path for the captured network trace file. + :type path: str + :param status: Current status of the network trace operation, same as + Operation.Status (InProgress/Succeeded/Failed). + :type status: str + :param message: Detailed message of a network trace operation, e.g. error + message in case of failure. + :type message: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(NetworkTrace, self).__init__(**kwargs) + self.path = kwargs.get('path', None) + self.status = kwargs.get('status', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/network_trace_py3.py b/azure-mgmt-web/azure/mgmt/web/models/network_trace_py3.py new file mode 100644 index 000000000000..58f8bf5b7a8c --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/network_trace_py3.py @@ -0,0 +1,38 @@ +# 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 NetworkTrace(Model): + """Network trace. + + :param path: Local file path for the captured network trace file. + :type path: str + :param status: Current status of the network trace operation, same as + Operation.Status (InProgress/Succeeded/Failed). + :type status: str + :param message: Detailed message of a network trace operation, e.g. error + message in case of failure. + :type message: str + """ + + _attribute_map = { + 'path': {'key': 'path', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, path: str=None, status: str=None, message: str=None, **kwargs) -> None: + super(NetworkTrace, self).__init__(**kwargs) + self.path = path + self.status = status + self.message = message 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 c280193927e4..2256599aea41 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 @@ -82,6 +82,11 @@ class SiteAuthSettings(ProxyOnlyResource): More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html :type client_secret: str + :param client_secret_certificate_thumbprint: An alternative to the client + secret, that is the thumbprint of a certifite used for signing purposes. + This property acts as + a replacement for the Client Secret. It is also optional. + :type client_secret_certificate_thumbprint: str :param issuer: The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. When using Azure Active Directory, this value is the URI of the directory @@ -190,6 +195,7 @@ class SiteAuthSettings(ProxyOnlyResource): 'token_refresh_extension_hours': {'key': 'properties.tokenRefreshExtensionHours', 'type': 'float'}, 'client_id': {'key': 'properties.clientId', 'type': 'str'}, 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + 'client_secret_certificate_thumbprint': {'key': 'properties.clientSecretCertificateThumbprint', 'type': 'str'}, 'issuer': {'key': 'properties.issuer', 'type': 'str'}, 'validate_issuer': {'key': 'properties.validateIssuer', 'type': 'bool'}, 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, @@ -218,6 +224,7 @@ def __init__(self, **kwargs): self.token_refresh_extension_hours = kwargs.get('token_refresh_extension_hours', None) self.client_id = kwargs.get('client_id', None) self.client_secret = kwargs.get('client_secret', None) + self.client_secret_certificate_thumbprint = kwargs.get('client_secret_certificate_thumbprint', None) self.issuer = kwargs.get('issuer', None) self.validate_issuer = kwargs.get('validate_issuer', None) self.allowed_audiences = kwargs.get('allowed_audiences', 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 b2b246e30079..0684318a3ce1 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 @@ -82,6 +82,11 @@ class SiteAuthSettings(ProxyOnlyResource): More information on OpenID Connect: http://openid.net/specs/openid-connect-core-1_0.html :type client_secret: str + :param client_secret_certificate_thumbprint: An alternative to the client + secret, that is the thumbprint of a certifite used for signing purposes. + This property acts as + a replacement for the Client Secret. It is also optional. + :type client_secret_certificate_thumbprint: str :param issuer: The OpenID Connect Issuer URI that represents the entity which issues access tokens for this application. When using Azure Active Directory, this value is the URI of the directory @@ -190,6 +195,7 @@ class SiteAuthSettings(ProxyOnlyResource): 'token_refresh_extension_hours': {'key': 'properties.tokenRefreshExtensionHours', 'type': 'float'}, 'client_id': {'key': 'properties.clientId', 'type': 'str'}, 'client_secret': {'key': 'properties.clientSecret', 'type': 'str'}, + 'client_secret_certificate_thumbprint': {'key': 'properties.clientSecretCertificateThumbprint', 'type': 'str'}, 'issuer': {'key': 'properties.issuer', 'type': 'str'}, 'validate_issuer': {'key': 'properties.validateIssuer', 'type': 'bool'}, 'allowed_audiences': {'key': 'properties.allowedAudiences', 'type': '[str]'}, @@ -207,7 +213,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, 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: + 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, client_secret_certificate_thumbprint: 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 @@ -218,6 +224,7 @@ def __init__(self, *, kind: str=None, enabled: bool=None, runtime_version: str=N self.token_refresh_extension_hours = token_refresh_extension_hours self.client_id = client_id self.client_secret = client_secret + self.client_secret_certificate_thumbprint = client_secret_certificate_thumbprint self.issuer = issuer self.validate_issuer = validate_issuer self.allowed_audiences = allowed_audiences 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 759ff0876aaa..81a874dc03f0 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_config.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_config.py @@ -129,9 +129,15 @@ class SiteConfig(Model): :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. + :param ip_security_restrictions: IP security restrictions for main. :type ip_security_restrictions: list[~azure.mgmt.web.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.models.IpSecurityRestriction] + :param scm_ip_security_restrictions_use_main: IP security restrictions for + scm to use main. + :type scm_ip_security_restrictions_use_main: bool :param http20_enabled: Http20Enabled: configures a web site to allow clients to connect over http2.0. Default value: True . :type http20_enabled: bool @@ -200,6 +206,8 @@ class SiteConfig(Model): 'managed_service_identity_id': {'key': 'managedServiceIdentityId', 'type': 'int'}, 'x_managed_service_identity_id': {'key': 'xManagedServiceIdentityId', 'type': 'int'}, 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions': {'key': 'scmIpSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions_use_main': {'key': 'scmIpSecurityRestrictionsUseMain', 'type': 'bool'}, 'http20_enabled': {'key': 'http20Enabled', 'type': 'bool'}, 'min_tls_version': {'key': 'minTlsVersion', 'type': 'str'}, 'ftps_state': {'key': 'ftpsState', 'type': 'str'}, @@ -255,6 +263,8 @@ def __init__(self, **kwargs): 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.scm_ip_security_restrictions = kwargs.get('scm_ip_security_restrictions', None) + self.scm_ip_security_restrictions_use_main = kwargs.get('scm_ip_security_restrictions_use_main', 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) 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 a8534e4686b4..b1c6f59d8521 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 @@ -129,9 +129,15 @@ class SiteConfig(Model): :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. + :param ip_security_restrictions: IP security restrictions for main. :type ip_security_restrictions: list[~azure.mgmt.web.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.models.IpSecurityRestriction] + :param scm_ip_security_restrictions_use_main: IP security restrictions for + scm to use main. + :type scm_ip_security_restrictions_use_main: bool :param http20_enabled: Http20Enabled: configures a web site to allow clients to connect over http2.0. Default value: True . :type http20_enabled: bool @@ -200,13 +206,15 @@ class SiteConfig(Model): 'managed_service_identity_id': {'key': 'managedServiceIdentityId', 'type': 'int'}, 'x_managed_service_identity_id': {'key': 'xManagedServiceIdentityId', 'type': 'int'}, 'ip_security_restrictions': {'key': 'ipSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions': {'key': 'scmIpSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions_use_main': {'key': 'scmIpSecurityRestrictionsUseMain', 'type': 'bool'}, '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, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: + def __init__(self, *, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=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 @@ -255,6 +263,8 @@ def __init__(self, *, number_of_workers: int=None, default_documents=None, net_f 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.scm_ip_security_restrictions = scm_ip_security_restrictions + self.scm_ip_security_restrictions_use_main = scm_ip_security_restrictions_use_main self.http20_enabled = http20_enabled self.min_tls_version = min_tls_version self.ftps_state = ftps_state 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 1c4b3bc66086..e95309f42e4b 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 @@ -137,9 +137,15 @@ class SiteConfigResource(ProxyOnlyResource): :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. + :param ip_security_restrictions: IP security restrictions for main. :type ip_security_restrictions: list[~azure.mgmt.web.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.models.IpSecurityRestriction] + :param scm_ip_security_restrictions_use_main: IP security restrictions for + scm to use main. + :type scm_ip_security_restrictions_use_main: bool :param http20_enabled: Http20Enabled: configures a web site to allow clients to connect over http2.0. Default value: True . :type http20_enabled: bool @@ -215,6 +221,8 @@ class SiteConfigResource(ProxyOnlyResource): '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]'}, + 'scm_ip_security_restrictions': {'key': 'properties.scmIpSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions_use_main': {'key': 'properties.scmIpSecurityRestrictionsUseMain', 'type': 'bool'}, 'http20_enabled': {'key': 'properties.http20Enabled', 'type': 'bool'}, 'min_tls_version': {'key': 'properties.minTlsVersion', 'type': 'str'}, 'ftps_state': {'key': 'properties.ftpsState', 'type': 'str'}, @@ -270,6 +278,8 @@ def __init__(self, **kwargs): 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.scm_ip_security_restrictions = kwargs.get('scm_ip_security_restrictions', None) + self.scm_ip_security_restrictions_use_main = kwargs.get('scm_ip_security_restrictions_use_main', 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) 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 e766a1a891b2..f0ed5ad5cada 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 @@ -137,9 +137,15 @@ class SiteConfigResource(ProxyOnlyResource): :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. + :param ip_security_restrictions: IP security restrictions for main. :type ip_security_restrictions: list[~azure.mgmt.web.models.IpSecurityRestriction] + :param scm_ip_security_restrictions: IP security restrictions for scm. + :type scm_ip_security_restrictions: + list[~azure.mgmt.web.models.IpSecurityRestriction] + :param scm_ip_security_restrictions_use_main: IP security restrictions for + scm to use main. + :type scm_ip_security_restrictions_use_main: bool :param http20_enabled: Http20Enabled: configures a web site to allow clients to connect over http2.0. Default value: True . :type http20_enabled: bool @@ -215,13 +221,15 @@ class SiteConfigResource(ProxyOnlyResource): '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]'}, + 'scm_ip_security_restrictions': {'key': 'properties.scmIpSecurityRestrictions', 'type': '[IpSecurityRestriction]'}, + 'scm_ip_security_restrictions_use_main': {'key': 'properties.scmIpSecurityRestrictionsUseMain', 'type': 'bool'}, '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, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, http20_enabled: bool=True, min_tls_version=None, ftps_state=None, reserved_instance_count: int=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, number_of_workers: int=None, default_documents=None, net_framework_version: str="v4.6", php_version: str=None, python_version: str=None, node_version: str=None, linux_fx_version: str=None, windows_fx_version: str=None, request_tracing_enabled: bool=None, request_tracing_expiration_time=None, remote_debugging_enabled: bool=None, remote_debugging_version: str=None, http_logging_enabled: bool=None, logs_directory_size_limit: int=None, detailed_error_logging_enabled: bool=None, publishing_username: str=None, app_settings=None, azure_storage_accounts=None, connection_strings=None, handler_mappings=None, document_root: str=None, scm_type=None, use32_bit_worker_process: bool=None, web_sockets_enabled: bool=None, always_on: bool=None, java_version: str=None, java_container: str=None, java_container_version: str=None, app_command_line: str=None, managed_pipeline_mode=None, virtual_applications=None, load_balancing=None, experiments=None, limits=None, auto_heal_enabled: bool=None, auto_heal_rules=None, tracing_options: str=None, vnet_name: str=None, cors=None, push=None, api_definition=None, auto_swap_slot_name: str=None, local_my_sql_enabled: bool=False, managed_service_identity_id: int=None, x_managed_service_identity_id: int=None, ip_security_restrictions=None, scm_ip_security_restrictions=None, scm_ip_security_restrictions_use_main: bool=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 @@ -270,6 +278,8 @@ def __init__(self, *, kind: str=None, number_of_workers: int=None, default_docum 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.scm_ip_security_restrictions = scm_ip_security_restrictions + self.scm_ip_security_restrictions_use_main = scm_ip_security_restrictions_use_main self.http20_enabled = http20_enabled self.min_tls_version = min_tls_version self.ftps_state = ftps_state diff --git a/azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request.py b/azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request.py index ef65405d81ab..7924152d75a8 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request.py +++ b/azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request.py @@ -45,6 +45,9 @@ class SnapshotRestoreRequest(ProxyOnlyResource): will be ignored when recovering to a target web app. This setting is only necessary when RecoverConfiguration is enabled. :type ignore_conflicting_host_names: bool + :param use_dr_secondary: If true, the snapshot is retrieved from + DRSecondary endpoint. + :type use_dr_secondary: bool """ _validation = { @@ -64,6 +67,7 @@ class SnapshotRestoreRequest(ProxyOnlyResource): 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + 'use_dr_secondary': {'key': 'properties.useDRSecondary', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -73,3 +77,4 @@ def __init__(self, **kwargs): 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) + self.use_dr_secondary = kwargs.get('use_dr_secondary', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request_py3.py b/azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request_py3.py index e32f278bc028..2d6c5ca1dcd5 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/snapshot_restore_request_py3.py @@ -45,6 +45,9 @@ class SnapshotRestoreRequest(ProxyOnlyResource): will be ignored when recovering to a target web app. This setting is only necessary when RecoverConfiguration is enabled. :type ignore_conflicting_host_names: bool + :param use_dr_secondary: If true, the snapshot is retrieved from + DRSecondary endpoint. + :type use_dr_secondary: bool """ _validation = { @@ -64,12 +67,14 @@ class SnapshotRestoreRequest(ProxyOnlyResource): 'overwrite': {'key': 'properties.overwrite', 'type': 'bool'}, 'recover_configuration': {'key': 'properties.recoverConfiguration', 'type': 'bool'}, 'ignore_conflicting_host_names': {'key': 'properties.ignoreConflictingHostNames', 'type': 'bool'}, + 'use_dr_secondary': {'key': 'properties.useDRSecondary', 'type': 'bool'}, } - 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: + 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, use_dr_secondary: bool=None, **kwargs) -> None: super(SnapshotRestoreRequest, self).__init__(kind=kind, **kwargs) self.snapshot_time = snapshot_time self.recovery_source = recovery_source self.overwrite = overwrite self.recover_configuration = recover_configuration self.ignore_conflicting_host_names = ignore_conflicting_host_names + self.use_dr_secondary = use_dr_secondary diff --git a/azure-mgmt-web/azure/mgmt/web/models/stack_major_version.py b/azure-mgmt-web/azure/mgmt/web/models/stack_major_version.py index d5faa48be425..44390b4d28c6 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/stack_major_version.py +++ b/azure-mgmt-web/azure/mgmt/web/models/stack_major_version.py @@ -24,6 +24,9 @@ class StackMajorVersion(Model): :type is_default: bool :param minor_versions: Minor versions associated with the major version. :type minor_versions: list[~azure.mgmt.web.models.StackMinorVersion] + :param application_insights: true if this supports + Application Insights; otherwise, false. + :type application_insights: bool """ _attribute_map = { @@ -31,6 +34,7 @@ class StackMajorVersion(Model): 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, 'is_default': {'key': 'isDefault', 'type': 'bool'}, 'minor_versions': {'key': 'minorVersions', 'type': '[StackMinorVersion]'}, + 'application_insights': {'key': 'applicationInsights', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -39,3 +43,4 @@ def __init__(self, **kwargs): self.runtime_version = kwargs.get('runtime_version', None) self.is_default = kwargs.get('is_default', None) self.minor_versions = kwargs.get('minor_versions', None) + self.application_insights = kwargs.get('application_insights', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/stack_major_version_py3.py b/azure-mgmt-web/azure/mgmt/web/models/stack_major_version_py3.py index d53e57163b0d..29563e003781 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/stack_major_version_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/stack_major_version_py3.py @@ -24,6 +24,9 @@ class StackMajorVersion(Model): :type is_default: bool :param minor_versions: Minor versions associated with the major version. :type minor_versions: list[~azure.mgmt.web.models.StackMinorVersion] + :param application_insights: true if this supports + Application Insights; otherwise, false. + :type application_insights: bool """ _attribute_map = { @@ -31,11 +34,13 @@ class StackMajorVersion(Model): 'runtime_version': {'key': 'runtimeVersion', 'type': 'str'}, 'is_default': {'key': 'isDefault', 'type': 'bool'}, 'minor_versions': {'key': 'minorVersions', 'type': '[StackMinorVersion]'}, + 'application_insights': {'key': 'applicationInsights', 'type': 'bool'}, } - def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, **kwargs) -> None: + def __init__(self, *, display_version: str=None, runtime_version: str=None, is_default: bool=None, minor_versions=None, application_insights: bool=None, **kwargs) -> None: super(StackMajorVersion, self).__init__(**kwargs) self.display_version = display_version self.runtime_version = runtime_version self.is_default = is_default self.minor_versions = minor_versions + self.application_insights = application_insights diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_info.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_info.py index 2a6527234b04..c7cca0aeb2f4 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/vnet_info.py +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_info.py @@ -42,6 +42,8 @@ class VnetInfo(ProxyOnlyResource): :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses. :type dns_servers: str + :param is_swift: Flag that is used to denote if this is VNET injection + :type is_swift: bool """ _validation = { @@ -64,6 +66,7 @@ class VnetInfo(ProxyOnlyResource): 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + 'is_swift': {'key': 'properties.isSwift', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -74,3 +77,4 @@ def __init__(self, **kwargs): self.routes = None self.resync_required = None self.dns_servers = kwargs.get('dns_servers', None) + self.is_swift = kwargs.get('is_swift', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/vnet_info_py3.py b/azure-mgmt-web/azure/mgmt/web/models/vnet_info_py3.py index 2aad16e2d9dc..d60038dea1e8 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/vnet_info_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/vnet_info_py3.py @@ -42,6 +42,8 @@ class VnetInfo(ProxyOnlyResource): :param dns_servers: DNS servers to be used by this Virtual Network. This should be a comma-separated list of IP addresses. :type dns_servers: str + :param is_swift: Flag that is used to denote if this is VNET injection + :type is_swift: bool """ _validation = { @@ -64,9 +66,10 @@ class VnetInfo(ProxyOnlyResource): 'routes': {'key': 'properties.routes', 'type': '[VnetRoute]'}, 'resync_required': {'key': 'properties.resyncRequired', 'type': 'bool'}, 'dns_servers': {'key': 'properties.dnsServers', 'type': 'str'}, + 'is_swift': {'key': 'properties.isSwift', 'type': 'bool'}, } - def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: bytearray=None, dns_servers: str=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: bytearray=None, dns_servers: str=None, is_swift: bool=None, **kwargs) -> None: super(VnetInfo, self).__init__(kind=kind, **kwargs) self.vnet_resource_id = vnet_resource_id self.cert_thumbprint = None @@ -74,3 +77,4 @@ def __init__(self, *, kind: str=None, vnet_resource_id: str=None, cert_blob: byt self.routes = None self.resync_required = None self.dns_servers = dns_servers + self.is_swift = is_swift 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 ab38e3030187..0b73d35b24a8 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 @@ -544,3 +544,5 @@ class SkuName(str, Enum): dynamic = "Dynamic" isolated = "Isolated" premium_v2 = "PremiumV2" + elastic_premium = "ElasticPremium" + elastic_isolated = "ElasticIsolated" 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 19430e11b82f..884a432121a4 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/provider_operations.py @@ -42,7 +42,8 @@ def get_available_stacks( Get available application frameworks and their versions. - :param os_type_selected: Possible values include: 'Windows', 'Linux' + :param os_type_selected: Possible values include: 'Windows', 'Linux', + 'WindowsFunctions', 'LinuxFunctions' :type os_type_selected: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -170,7 +171,8 @@ def get_available_stacks_on_prem( Get available application frameworks and their versions. - :param os_type_selected: Possible values include: 'Windows', 'Linux' + :param os_type_selected: Possible values include: 'Windows', 'Linux', + 'WindowsFunctions', 'LinuxFunctions' :type os_type_selected: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the 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 16fba6036b43..73539a7b5545 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 @@ -2592,7 +2592,7 @@ def get_swift_virtual_network_connection( return client_raw_response return deserialized - get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/virtualNetwork'} + get_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} def create_or_update_swift_virtual_network_connection( self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): @@ -2669,7 +2669,7 @@ def create_or_update_swift_virtual_network_connection( return client_raw_response return deserialized - create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/virtualNetwork'} + create_or_update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} def delete_swift_virtual_network( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): @@ -2727,7 +2727,7 @@ def delete_swift_virtual_network( 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'} + delete_swift_virtual_network.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} def update_swift_virtual_network_connection( self, resource_group_name, name, connection_envelope, custom_headers=None, raw=False, **operation_config): @@ -2804,7 +2804,7 @@ def update_swift_virtual_network_connection( return client_raw_response return deserialized - update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/config/virtualNetwork'} + update_swift_virtual_network_connection.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkConfig/virtualNetwork'} def get_configuration( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): @@ -7731,50 +7731,44 @@ def list_network_features( return deserialized list_network_features.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkFeatures/{view}'} - def start_web_site_network_trace( - self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """Start capturing network packets for the site. + def get_network_trace_operation( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). - Start capturing network packets for the site. + Gets a named operation for a network trace capturing (or deployment + slot, if specified). :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: The name of the web app. + :param name: Name of the app. :type name: str - :param duration_in_seconds: The duration to keep capturing in seconds. - :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). - :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. - :type sas_url: str + :param operation_id: GUID of the operation. + :type operation_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ # Construct URL - url = self.start_web_site_network_trace.metadata['url'] + url = self.get_network_trace_operation.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'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') - if max_frame_length is not None: - query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') - if sas_url is not None: - query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -7788,35 +7782,43 @@ def start_web_site_network_trace( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.post(url, query_parameters, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('str', response) + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} + get_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/operationresults/{operationId}'} - def stop_web_site_network_trace( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Stop ongoing capturing network packets for the site. + def start_web_site_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """Start capturing network packets for the site (To be deprecated). - Stop ongoing capturing network packets for the site. + Start capturing network packets for the site (To be deprecated). :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 duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -7828,7 +7830,7 @@ def stop_web_site_network_trace( :class:`DefaultErrorResponseException` """ # Construct URL - url = self.stop_web_site_network_trace.metadata['url'] + url = self.start_web_site_network_trace.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'), @@ -7838,6 +7840,12 @@ def stop_web_site_network_trace( # Construct parameters query_parameters = {} + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -7867,32 +7875,13 @@ def stop_web_site_network_trace( return client_raw_response return deserialized - stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} - - def generate_new_site_publishing_password( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Generates a new publishing password for an app (or deployment slot, if - specified). + start_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/start'} - Generates a new publishing password for an app (or deployment slot, if - specified). - :param resource_group_name: Name of the resource group to which the - resource belongs. - :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 _start_web_site_network_trace_operation_initial( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.generate_new_site_publishing_password.metadata['url'] + url = self.start_web_site_network_trace_operation.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'), @@ -7902,10 +7891,17 @@ def generate_new_site_publishing_password( # Construct parameters query_parameters = {} + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -7917,119 +7913,104 @@ def generate_new_site_publishing_password( request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} - def list_perf_mon_counters( - self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets perfmon counters for web app. + return deserialized - Gets perfmon counters for web app. + def start_web_site_network_trace_operation( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Start capturing network packets for the site. + + Start capturing network packets for the site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Name of web app. + :param name: The name of the web app. :type name: str - :param filter: Return only usages/metrics specified in the filter. - Filter conforms to odata syntax. Example: $filter=(startTime eq - 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain - eq duration'[Hour|Minute|Day]'. - :type filter: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of PerfMonResponse + :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 list or + ClientRawResponse if raw==True :rtype: - ~azure.mgmt.web.models.PerfMonResponsePaged[~azure.mgmt.web.models.PerfMonResponse] + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.models.NetworkTrace]]] :raises: :class:`DefaultErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_perf_mon_counters.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 filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) + raw_result = self._start_web_site_network_trace_operation_initial( + resource_group_name=resource_group_name, + name=name, + duration_in_seconds=duration_in_seconds, + max_frame_length=max_frame_length, + sas_url=sas_url, + custom_headers=custom_headers, + raw=True, + **operation_config + ) - return response + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) - # Deserialize response - deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if raw: - header_dict = {} - client_raw_response = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + return deserialized - return deserialized - list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} + 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) + start_web_site_network_trace_operation.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/startOperation'} - def get_site_php_error_log_flag( + def stop_web_site_network_trace( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets web app's event logs. + """Stop ongoing capturing network packets for the site. - Gets web app's event logs. + Stop ongoing capturing network packets for the site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Name of web app. + :param name: The name of the web app. :type name: str :param 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: SitePhpErrorLogFlag or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.SitePhpErrorLogFlag or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` """ # Construct URL - url = self.get_site_php_error_log_flag.metadata['url'] + url = self.stop_web_site_network_trace.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'), @@ -8043,7 +8024,6 @@ def get_site_php_error_log_flag( # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -8052,51 +8032,51 @@ def get_site_php_error_log_flag( 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, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, 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('SitePhpErrorLogFlag', response) + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response + stop_web_site_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/stop'} - return deserialized - get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} - - def list_premier_add_ons( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Gets the premier add-ons of an app. + def get_network_traces( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). - Gets the premier add-ons of an app. + Gets a named operation for a network trace capturing (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 operation_id: GUID of the operation. + :type operation_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.PremierAddOn or + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.NetworkTrace] or ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ # Construct URL - url = self.list_premier_add_ons.metadata['url'] + url = self.get_network_traces.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'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -8125,45 +8105,47 @@ def list_premier_add_ons( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) + deserialized = self._deserialize('[NetworkTrace]', 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'} + get_network_traces.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTrace/{operationId}'} - 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 get_network_trace_operation_v2( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). - Gets a named add-on of an app. + Gets a named operation for a network trace capturing (or deployment + slot, if specified). :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param name: Name of the app. :type name: str - :param premier_add_on_name: Add-on name. - :type premier_add_on_name: str + :param operation_id: GUID of the operation. + :type operation_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.PremierAddOn or + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.NetworkTrace] or ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ # Construct URL - url = self.get_premier_add_on.metadata['url'] + url = self.get_network_trace_operation_v2.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'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -8186,54 +8168,55 @@ def get_premier_add_on( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', 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}'} + get_network_trace_operation_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/current/operationresults/{operationId}'} - 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_network_traces_v2( + self, resource_group_name, name, operation_id, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). - Updates a named add-on of an app. + Gets a named operation for a network trace capturing (or deployment + slot, if specified). :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param name: Name of the app. :type name: str - :param premier_add_on_name: Add-on name. - :type premier_add_on_name: str - :param premier_add_on: A JSON representation of the edited premier - add-on. - :type premier_add_on: ~azure.mgmt.web.models.PremierAddOn + :param operation_id: GUID of the operation. + :type operation_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.PremierAddOn or + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.NetworkTrace] or ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ # Construct URL - url = self.add_premier_add_on.metadata['url'] + url = self.get_network_traces_v2.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'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -8245,7 +8228,6 @@ def add_premier_add_on( # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' - 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: @@ -8253,11 +8235,8 @@ 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, header_parameters, body_content) + request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -8266,28 +8245,28 @@ def add_premier_add_on( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) + deserialized = self._deserialize('[NetworkTrace]', 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_network_traces_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/networkTraces/{operationId}'} - 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 generate_new_site_publishing_password( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Generates a new publishing password for an app (or deployment slot, if + specified). - Delete a premier add-on from an app. + Generates a new publishing password for an app (or deployment slot, if + specified). :param resource_group_name: Name of the resource group to which the resource belongs. :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 @@ -8298,11 +8277,10 @@ def delete_premier_add_on( :raises: :class:`CloudError` """ # Construct URL - url = self.delete_premier_add_on.metadata['url'] + url = self.generate_new_site_publishing_password.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) @@ -8321,10 +8299,10 @@ def delete_premier_add_on( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -8332,41 +8310,114 @@ def delete_premier_add_on( if raw: 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}'} + generate_new_site_publishing_password.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/newpassword'} - 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. + def list_perf_mon_counters( + self, resource_group_name, name, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets perfmon counters for web app. - Updates a named add-on of an app. + Gets perfmon counters for web app. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Name of the app. + :param name: Name of web app. :type name: str - :param premier_add_on_name: Add-on name. - :type premier_add_on_name: str - :param premier_add_on: A JSON representation of the edited premier - add-on. - :type premier_add_on: ~azure.mgmt.web.models.PremierAddOnPatchResource + :param filter: Return only usages/metrics specified in the filter. + Filter conforms to odata syntax. Example: $filter=(startTime eq + 2014-01-01T00:00:00Z and endTime eq 2014-12-31T23:59:59Z and timeGrain + eq duration'[Hour|Minute|Day]'. + :type filter: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: PremierAddOn or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.PremierAddOn or + :return: An iterator like instance of PerfMonResponse + :rtype: + ~azure.mgmt.web.models.PerfMonResponsePaged[~azure.mgmt.web.models.PerfMonResponse] + :raises: + :class:`DefaultErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_perf_mon_counters.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 filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PerfMonResponsePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_perf_mon_counters.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/perfcounters'} + + def get_site_php_error_log_flag( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets web app's event logs. + + Gets web app's event logs. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param 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: SitePhpErrorLogFlag or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SitePhpErrorLogFlag or ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ # Construct URL - url = self.update_premier_add_on.metadata['url'] + url = self.get_site_php_error_log_flag.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) @@ -8378,7 +8429,6 @@ def update_premier_add_on( # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' - 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: @@ -8386,11 +8436,8 @@ def update_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.patch(url, query_parameters, header_parameters, body_content) + request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -8399,41 +8446,39 @@ def update_premier_add_on( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PremierAddOn', response) + deserialized = self._deserialize('SitePhpErrorLogFlag', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} + get_site_php_error_log_flag.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/phplogging'} - def get_private_access( + def list_premier_add_ons( 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. + """Gets the premier add-ons of an app. - Gets data around private site access enablement and authorized Virtual - Networks that can access the site. + 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: The name of the web app. + :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: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.PrivateAccess or + :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_private_access.metadata['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'), @@ -8465,46 +8510,45 @@ def get_private_access( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) + deserialized = self._deserialize('PremierAddOn', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} + list_premier_add_ons.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons'} - 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. + 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. - Sets data around private site access enablement and authorized Virtual - Networks that can access the site. + 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: The name of the web app. + :param name: Name of the app. :type name: str - :param access: The information for the private access - :type access: ~azure.mgmt.web.models.PrivateAccess + :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: PrivateAccess or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.PrivateAccess or + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ # Construct URL - url = self.put_private_access_vnet.metadata['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) @@ -8516,7 +8560,6 @@ def put_private_access_vnet( # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' - 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: @@ -8524,11 +8567,8 @@ def put_private_access_vnet( 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.put(url, query_parameters, header_parameters, body_content) + request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -8537,121 +8577,117 @@ def put_private_access_vnet( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PrivateAccess', response) + deserialized = self._deserialize('PremierAddOn', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - put_private_access_vnet.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} + get_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - def list_processes( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get list of processes for a web site, or a deployment slot, or for a - specific scaled-out instance in a web site. + 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. - Get list of processes for a web site, or a deployment slot, or for a - specific scaled-out instance in a web site. + 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: Site name. + :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: An iterator like instance of ProcessInfo - :rtype: - ~azure.mgmt.web.models.ProcessInfoPaged[~azure.mgmt.web.models.ProcessInfo] - :raises: :class:`CloudError` + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` """ - def internal_paging(next_link=None, raw=False): + # 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) - if not next_link: - # Construct URL - url = self.list_processes.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 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['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) - return response + deserialized = None - # Deserialize response - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies) + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) if raw: - header_dict = {} - client_raw_response = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} + add_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - def get_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. + 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. - Get process information by its ID for a specific scaled-out instance in - a web site. + 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: Site name. + :param name: Name of the app. :type name: str - :param process_id: PID. - :type process_id: 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: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.ProcessInfo or - ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get_process.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'), - 'processId': self._serialize.url("process_id", process_id, '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) @@ -8662,7 +8698,6 @@ def get_process( # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -8671,56 +8706,52 @@ def get_process( 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, header_parameters) + request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: + if response.status_code not in [200]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', 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 - get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - - def delete_process( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """Terminate a process by its ID for a web site, or a deployment slot, or - specific scaled-out instance in a web site. + 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. - Terminate a process by its ID for a web site, or a deployment slot, or - specific scaled-out instance in a web site. + 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: Site name. + :param name: Name of the app. :type name: str - :param process_id: PID. - :type process_id: 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 :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :return: PremierAddOn or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PremierAddOn or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL - url = self.delete_process.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'), - 'processId': self._serialize.url("process_id", process_id, '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) @@ -8731,6 +8762,8 @@ def delete_process( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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: @@ -8738,55 +8771,57 @@ def delete_process( 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.delete(url, query_parameters, header_parameters) + request = self._client.patch(url, query_parameters, header_parameters, body_content) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204, 404]: - 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 + + if response.status_code == 200: + deserialized = self._deserialize('PremierAddOn', response) if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - def get_process_dump( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): - """Get a memory dump of a process by its ID for a specific scaled-out - instance in a web site. + return deserialized + update_premier_add_on.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/premieraddons/{premierAddOnName}'} - Get a memory dump of a process by its ID for a specific scaled-out - instance in a web site. + 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. + + 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: Site name. + :param name: The name of the web app. :type name: str - :param process_id: PID. - :type process_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] :param operation_config: :ref:`Operation configuration overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator 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.get_process_dump.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'), - 'processId': self._serialize.url("process_id", process_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -8807,70 +8842,137 @@ def get_process_dump( # Construct and send request request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._client.stream_download(response, callback) + deserialized = self._deserialize('PrivateAccess', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} + get_private_access.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/privateAccess/virtualNetworks'} - def list_process_modules( - self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """List module information for a process by its ID for a specific - scaled-out instance in a web site. + 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. - List module information for a process by its ID for a specific - scaled-out instance in a web 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: Site name. + :param name: The name of the web app. :type name: str - :param process_id: PID. - :type process_id: 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: An iterator like instance of ProcessModuleInfo - :rtype: - ~azure.mgmt.web.models.ProcessModuleInfoPaged[~azure.mgmt.web.models.ProcessModuleInfo] - :raises: :class:`CloudError` + :return: PrivateAccess or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PrivateAccess or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` """ - def internal_paging(next_link=None, raw=False): + # Construct 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'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - if not next_link: - # Construct URL - url = self.list_process_modules.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'), - 'processId': self._serialize.url("process_id", process_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - else: - url = next_link - query_parameters = {} + # Construct body + body_content = self._serialize.body(access, 'PrivateAccess') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, 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 + 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): + """Get list of processes for a web site, or a deployment slot, or for a + specific scaled-out instance in a web site. + + Get list of processes for a web site, or a deployment slot, or for a + specific scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param 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 ProcessInfo + :rtype: + ~azure.mgmt.web.models.ProcessInfoPaged[~azure.mgmt.web.models.ProcessInfo] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_processes.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 = {} @@ -8894,18 +8996,18 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies) + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} + list_processes.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes'} - def get_process_module( - self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): + def get_process( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): """Get process information by its ID for a specific scaled-out instance in a web site. @@ -8919,25 +9021,22 @@ def get_process_module( :type name: str :param process_id: PID. :type process_id: str - :param base_address: Module base address. - :type base_address: 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: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.ProcessModuleInfo or + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessInfo or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get_process_module.metadata['url'] + url = self.get_process.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'), 'processId': self._serialize.url("process_id", process_id, 'str'), - 'baseAddress': self._serialize.url("base_address", base_address, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -8968,22 +9067,22 @@ def get_process_module( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) + deserialized = self._deserialize('ProcessInfo', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} + get_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - def list_process_threads( + def delete_process( self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): - """List the threads in a process by its ID for a specific scaled-out - instance in a web site. + """Terminate a process by its ID for a web site, or a deployment slot, or + specific scaled-out instance in a web site. - List the threads in a process by its ID for a specific scaled-out - instance in a web site. + Terminate a process by its ID for a web site, or a deployment slot, or + specific scaled-out instance in a web site. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -8997,71 +9096,54 @@ def list_process_threads( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of ProcessThreadInfo - :rtype: - ~azure.mgmt.web.models.ProcessThreadInfoPaged[~azure.mgmt.web.models.ProcessThreadInfo] + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_process_threads.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'), - 'processId': self._serialize.url("process_id", process_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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 URL + url = self.delete_process.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'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + # Construct headers + header_parameters = {} + 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') - return response + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - # Deserialize response - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies) + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp if raw: - header_dict = {} - client_raw_response = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_process.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}'} - return deserialized - list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} - - def get_process_thread( - self, resource_group_name, name, process_id, thread_id, custom_headers=None, raw=False, **operation_config): - """Get thread information by Thread ID for a specific process, in a - specific scaled-out instance in a web site. + def get_process_dump( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, callback=None, **operation_config): + """Get a memory dump of a process by its ID for a specific scaled-out + instance in a web site. - Get thread information by Thread ID for a specific process, in a - specific scaled-out instance in a web site. + Get a memory dump of a process by its ID for a specific scaled-out + instance in a web site. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -9070,25 +9152,26 @@ def get_process_thread( :type name: str :param process_id: PID. :type process_id: str - :param thread_id: TID. - :type thread_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] :param operation_config: :ref:`Operation configuration overrides`. - :return: ProcessThreadInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.ProcessThreadInfo or - ~msrest.pipeline.ClientRawResponse + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get_process_thread.metadata['url'] + url = self.get_process_dump.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'), 'processId': self._serialize.url("process_id", process_id, 'str'), - 'threadId': self._serialize.url("thread_id", thread_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -9109,7 +9192,7 @@ def get_process_thread( # Construct and send request request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + response = self._client.send(request, stream=True, **operation_config) if response.status_code not in [200, 404]: exp = CloudError(response) @@ -9119,45 +9202,49 @@ def get_process_thread( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ProcessThreadInfo', response) + deserialized = self._client.stream_download(response, callback) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'} + get_process_dump.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/dump'} - def list_public_certificates( - self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): - """Get public certificates for an app or a deployment slot. + def list_process_modules( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """List module information for a process by its ID for a specific + scaled-out instance in a web site. - Get public certificates for an app or a deployment slot. + List module information for a process by its ID for a specific + scaled-out instance in a web 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: Site name. :type name: str + :param process_id: PID. + :type process_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of PublicCertificate + :return: An iterator like instance of ProcessModuleInfo :rtype: - ~azure.mgmt.web.models.PublicCertificatePaged[~azure.mgmt.web.models.PublicCertificate] - :raises: - :class:`DefaultErrorResponseException` + ~azure.mgmt.web.models.ProcessModuleInfoPaged[~azure.mgmt.web.models.ProcessModuleInfo] + :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_public_certificates.metadata['url'] + url = self.list_process_modules.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'), + 'processId': self._serialize.url("process_id", process_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -9184,54 +9271,58 @@ def internal_paging(next_link=None, raw=False): request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp return response # Deserialize response - deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies) + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} - - def get_public_certificate( - self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """Get the named public certificate for an app (or deployment slot, if - specified). + list_process_modules.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules'} - Get the named public certificate for an app (or deployment slot, if - specified). + def get_process_module( + self, resource_group_name, name, process_id, base_address, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + Get process information by its ID for a specific scaled-out instance in + a web 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: Site name. :type name: str - :param public_certificate_name: Public certificate name. - :type public_certificate_name: str + :param process_id: PID. + :type process_id: str + :param base_address: Module base address. + :type base_address: 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: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.PublicCertificate or + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessModuleInfo or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` + :raises: :class:`CloudError` """ # Construct URL - url = self.get_public_certificate.metadata['url'] + url = self.get_process_module.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'), - 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'baseAddress': self._serialize.url("base_address", base_address, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -9254,54 +9345,135 @@ def get_public_certificate( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) + deserialized = self._deserialize('ProcessModuleInfo', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + get_process_module.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/modules/{baseAddress}'} - def create_or_update_public_certificate( - self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): - """Creates a hostname binding for an app. + def list_process_threads( + self, resource_group_name, name, process_id, custom_headers=None, raw=False, **operation_config): + """List the threads in a process by its ID for a specific scaled-out + instance in a web site. - Creates a hostname binding for an app. + List the threads in a process by its ID for a specific scaled-out + instance in a web 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: Site name. :type name: str - :param public_certificate_name: Public certificate name. - :type public_certificate_name: str - :param public_certificate: Public certificate details. This is the - JSON representation of a PublicCertificate object. - :type public_certificate: ~azure.mgmt.web.models.PublicCertificate + :param process_id: PID. + :type process_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: PublicCertificate or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.PublicCertificate or + :return: An iterator like instance of ProcessThreadInfo + :rtype: + ~azure.mgmt.web.models.ProcessThreadInfoPaged[~azure.mgmt.web.models.ProcessThreadInfo] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_process_threads.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'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_process_threads.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads'} + + def get_process_thread( + self, resource_group_name, name, process_id, thread_id, custom_headers=None, raw=False, **operation_config): + """Get thread information by Thread ID for a specific process, in a + specific scaled-out instance in a web site. + + Get thread information by Thread ID for a specific process, in a + specific scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param thread_id: TID. + :type thread_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessThreadInfo or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` + :raises: :class:`CloudError` """ # Construct URL - url = self.create_or_update_public_certificate.metadata['url'] + url = self.get_process_thread.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'), - 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'threadId': self._serialize.url("thread_id", thread_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -9313,7 +9485,6 @@ def create_or_update_public_certificate( # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' - 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: @@ -9321,33 +9492,106 @@ def create_or_update_public_certificate( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct body - body_content = self._serialize.body(public_certificate, 'PublicCertificate') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) + request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('PublicCertificate', response) + deserialized = self._deserialize('ProcessThreadInfo', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + get_process_thread.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/processes/{processId}/threads/{threadId}'} - def delete_public_certificate( + def list_public_certificates( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Get public certificates for an app or a deployment slot. + + Get public certificates for an app or a deployment slot. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of PublicCertificate + :rtype: + ~azure.mgmt.web.models.PublicCertificatePaged[~azure.mgmt.web.models.PublicCertificate] + :raises: + :class:`DefaultErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_public_certificates.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['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.PublicCertificatePaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_public_certificates.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates'} + + def get_public_certificate( self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): - """Deletes a hostname binding for an app. + """Get the named public certificate for an app (or deployment slot, if + specified). - Deletes a hostname binding for an app. + Get the named public certificate for an app (or deployment slot, if + specified). :param resource_group_name: Name of the resource group to which the resource belongs. @@ -9361,12 +9605,14 @@ def delete_public_certificate( 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: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL - url = self.delete_public_certificate.metadata['url'] + url = self.get_public_certificate.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'), @@ -9381,6 +9627,7 @@ def delete_public_certificate( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -9389,12 +9636,150 @@ def delete_public_certificate( 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, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 204]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def create_or_update_public_certificate( + self, resource_group_name, name, public_certificate_name, public_certificate, custom_headers=None, raw=False, **operation_config): + """Creates a hostname binding for an app. + + Creates a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :param public_certificate: Public certificate details. This is the + JSON representation of a PublicCertificate object. + :type public_certificate: ~azure.mgmt.web.models.PublicCertificate + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: PublicCertificate or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.PublicCertificate or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.create_or_update_public_certificate.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'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(public_certificate, 'PublicCertificate') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, 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('PublicCertificate', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + create_or_update_public_certificate.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/publicCertificates/{publicCertificateName}'} + + def delete_public_certificate( + self, resource_group_name, name, public_certificate_name, custom_headers=None, raw=False, **operation_config): + """Deletes a hostname binding for an app. + + Deletes a hostname binding for an app. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of the app. + :type name: str + :param public_certificate_name: Public certificate name. + :type public_certificate_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_public_certificate.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'), + 'publicCertificateName': self._serialize.url("public_certificate_name", public_certificate_name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') raise exp if raw: @@ -12664,7 +13049,7 @@ def get_swift_virtual_network_connection_slot( 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'} + get_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/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): @@ -12745,7 +13130,7 @@ def create_or_update_swift_virtual_network_connection_slot( return client_raw_response return deserialized - create_or_update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/virtualNetwork'} + create_or_update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} def delete_swift_virtual_network_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): @@ -12807,7 +13192,7 @@ def delete_swift_virtual_network_slot( 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'} + delete_swift_virtual_network_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} def update_swift_virtual_network_connection_slot( self, resource_group_name, name, connection_envelope, slot, custom_headers=None, raw=False, **operation_config): @@ -12888,7 +13273,7 @@ def update_swift_virtual_network_connection_slot( return client_raw_response return deserialized - update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/config/virtualNetwork'} + update_swift_virtual_network_connection_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkConfig/virtualNetwork'} def get_configuration_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): @@ -16536,10 +16921,433 @@ def get_instance_ms_deploy_status_slot( :class:`DefaultErrorResponseException` """ # Construct URL - url = self.get_instance_ms_deploy_status_slot.metadata['url'] + url = self.get_instance_ms_deploy_status_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'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, 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('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} + + + def _create_instance_ms_deploy_operation_slot_initial( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create_instance_ms_deploy_operation_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'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(ms_deploy, 'MSDeploy') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [201, 409]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 201: + deserialized = self._deserialize('MSDeployStatus', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create_instance_ms_deploy_operation_slot( + self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): + """Invoke the MSDeploy web app extension. + + Invoke the MSDeploy web app extension. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param instance_id: ID of web app instance. + :type instance_id: str + :param ms_deploy: Details of MSDeploy operation + :type ms_deploy: ~azure.mgmt.web.models.MSDeploy + :param dict custom_headers: headers that will be added to the request + :param bool raw: 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 MSDeployStatus or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.MSDeployStatus] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.MSDeployStatus]] + :raises: :class:`CloudError` + """ + raw_result = self._create_instance_ms_deploy_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + instance_id=instance_id, + ms_deploy=ms_deploy, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('MSDeployStatus', 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) + create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} + + def get_instance_ms_deploy_log_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get the MSDeploy Log for the last MSDeploy operation. + + Get the MSDeploy Log for the last MSDeploy operation. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param instance_id: ID of web app instance. + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: MSDeployLog or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.MSDeployLog or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_ms_deploy_log_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'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('MSDeployLog', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} + + def list_instance_processes_slot( + self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get list of processes for a web site, or a deployment slot, or for a + specific scaled-out instance in a web site. + + Get list of processes for a web site, or a deployment slot, or for a + specific scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API returns deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the + value of the name property in the JSON response from "GET + api/sites/{siteName}/instances". + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessInfo + :rtype: + ~azure.mgmt.web.models.ProcessInfoPaged[~azure.mgmt.web.models.ProcessInfo] + :raises: :class:`CloudError` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_instance_processes_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'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} + + def get_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + Get process information by its ID for a specific scaled-out instance in + a web site. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API returns deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the + value of the name property in the JSON response from "GET + api/sites/{siteName}/instances". + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ProcessInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessInfo or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get_instance_process_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'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ProcessInfo', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + + def delete_instance_process_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Terminate a process by its ID for a web site, or a deployment slot, or + specific scaled-out instance in a web site. + + Terminate a process by its ID for a web site, or a deployment slot, or + specific scaled-out instance in a web site. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API returns deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the + value of the name property in the JSON response from "GET + api/sites/{siteName}/instances". + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.delete_instance_process_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'), + 'processId': self._serialize.url("process_id", process_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -16552,7 +17360,6 @@ def get_instance_ms_deploy_status_slot( # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -16561,32 +17368,61 @@ def get_instance_ms_deploy_status_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.delete(url, query_parameters, header_parameters) response = self._client.send(request, 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('MSDeployStatus', response) + if response.status_code not in [204, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - return deserialized - get_instance_ms_deploy_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} + def get_instance_process_dump_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): + """Get a memory dump of a process by its ID for a specific scaled-out + instance in a web site. + Get a memory dump of a process by its ID for a specific scaled-out + instance in a web site. - def _create_instance_ms_deploy_operation_slot_initial( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, **operation_config): + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Site name. + :type name: str + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API returns deployments for the production slot. + :type slot: str + :param instance_id: ID of a specific scaled-out instance. This is the + value of the name property in the JSON response from "GET + api/sites/{siteName}/instances". + :type instance_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param callback: When specified, will be called with each chunk of + data that is streamed. The callback should take two arguments, the + bytes of the current chunk of data and the response object. If the + data is uploading, response will be None. + :type callback: Callable[Bytes, response=None] + :param operation_config: :ref:`Operation configuration + overrides`. + :return: object or ClientRawResponse if raw=true + :rtype: Generator or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ # Construct URL - url = self.create_instance_ms_deploy_operation_slot.metadata['url'] + url = self.get_instance_process_dump_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'), + 'processId': self._serialize.url("process_id", process_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -16600,7 +17436,6 @@ def _create_instance_ms_deploy_operation_slot_initial( # Construct headers header_parameters = {} header_parameters['Accept'] = 'application/json' - 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: @@ -16608,120 +17443,155 @@ def _create_instance_ms_deploy_operation_slot_initial( if self.config.accept_language is not None: header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - # Construct body - body_content = self._serialize.body(ms_deploy, 'MSDeploy') - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=True, **operation_config) - if response.status_code not in [201, 409]: + if response.status_code not in [200, 404]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp deserialized = None - if response.status_code == 201: - deserialized = self._deserialize('MSDeployStatus', response) + if response.status_code == 200: + deserialized = self._client.stream_download(response, callback) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized + get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} - def create_instance_ms_deploy_operation_slot( - self, resource_group_name, name, slot, instance_id, ms_deploy, custom_headers=None, raw=False, polling=True, **operation_config): - """Invoke the MSDeploy web app extension. + def list_instance_process_modules_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """List module information for a process by its ID for a specific + scaled-out instance in a web site. - Invoke the MSDeploy web app extension. + List module information for a process by its ID for a specific + scaled-out instance in a web site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Name of web app. + :param name: Site name. :type name: str - :param slot: Name of web app slot. If not specified then will default - to production slot. + :param process_id: PID. + :type process_id: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API returns deployments for the production slot. :type slot: str - :param instance_id: ID of web app instance. + :param instance_id: ID of a specific scaled-out instance. This is the + value of the name property in the JSON response from "GET + api/sites/{siteName}/instances". :type instance_id: str - :param ms_deploy: Details of MSDeploy operation - :type ms_deploy: ~azure.mgmt.web.models.MSDeploy :param dict custom_headers: headers that will be added to the request - :param bool raw: 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 MSDeployStatus or - ClientRawResponse if raw==True + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ProcessModuleInfo :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.web.models.MSDeployStatus] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.web.models.MSDeployStatus]] + ~azure.mgmt.web.models.ProcessModuleInfoPaged[~azure.mgmt.web.models.ProcessModuleInfo] :raises: :class:`CloudError` """ - raw_result = self._create_instance_ms_deploy_operation_slot_initial( - resource_group_name=resource_group_name, - name=name, - slot=slot, - instance_id=instance_id, - ms_deploy=ms_deploy, - custom_headers=custom_headers, - raw=True, - **operation_config - ) + def internal_paging(next_link=None, raw=False): - def get_long_running_output(response): - deserialized = self._deserialize('MSDeployStatus', response) + if not next_link: + # Construct URL + url = self.list_instance_process_modules_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'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - return deserialized + else: + url = next_link + query_parameters = {} - 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) - create_instance_ms_deploy_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy'} + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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') - def get_instance_ms_deploy_log_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get the MSDeploy Log for the last MSDeploy operation. + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - Get the MSDeploy Log for the last MSDeploy operation. + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + return response + + # Deserialize response + deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} + + def get_instance_process_module_slot( + self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get process information by its ID for a specific scaled-out instance in + a web site. + + Get process information by its ID for a specific scaled-out instance in + a web site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Name of web app. + :param name: Site name. :type name: str - :param slot: Name of web app slot. If not specified then will default - to production slot. + :param process_id: PID. + :type process_id: str + :param base_address: Module base address. + :type base_address: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API returns deployments for the production slot. :type slot: str - :param instance_id: ID of web app instance. + :param instance_id: ID of a specific scaled-out instance. This is the + value of the name property in the JSON response from "GET + api/sites/{siteName}/instances". :type instance_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: MSDeployLog or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.MSDeployLog or + :return: ProcessModuleInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessModuleInfo or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get_instance_ms_deploy_log_slot.metadata['url'] + url = self.get_instance_process_module_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'), + 'processId': self._serialize.url("process_id", process_id, 'str'), + 'baseAddress': self._serialize.url("base_address", base_address, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -16754,28 +17624,30 @@ def get_instance_ms_deploy_log_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('MSDeployLog', response) + deserialized = self._deserialize('ProcessModuleInfo', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_instance_ms_deploy_log_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/extensions/MSDeploy/log'} + get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} - def list_instance_processes_slot( - self, resource_group_name, name, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get list of processes for a web site, or a deployment slot, or for a - specific scaled-out instance in a web site. + def list_instance_process_threads_slot( + self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """List the threads in a process by its ID for a specific scaled-out + instance in a web site. - Get list of processes for a web site, or a deployment slot, or for a - specific scaled-out instance in a web site. + List the threads in a process by its ID for a specific scaled-out + instance in a web site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param name: Site name. :type name: str + :param process_id: PID. + :type process_id: str :param slot: Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. :type slot: str @@ -16788,19 +17660,20 @@ def list_instance_processes_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of ProcessInfo + :return: An iterator like instance of ProcessThreadInfo :rtype: - ~azure.mgmt.web.models.ProcessInfoPaged[~azure.mgmt.web.models.ProcessInfo] + ~azure.mgmt.web.models.ProcessThreadInfoPaged[~azure.mgmt.web.models.ProcessThreadInfo] :raises: :class:`CloudError` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_instance_processes_slot.metadata['url'] + url = self.list_instance_process_threads_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'), + 'processId': self._serialize.url("process_id", process_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -16837,23 +17710,23 @@ def internal_paging(next_link=None, raw=False): return response # Deserialize response - deserialized = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies) + deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.ProcessInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - list_instance_processes_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes'} + list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} - def get_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. + def get_instance_process_thread_slot( + self, resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): + """Get thread information by Thread ID for a specific process, in a + specific scaled-out instance in a web site. - Get process information by its ID for a specific scaled-out instance in - a web site. + Get thread information by Thread ID for a specific process, in a + specific scaled-out instance in a web site. :param resource_group_name: Name of the resource group to which the resource belongs. @@ -16862,6 +17735,8 @@ def get_instance_process_slot( :type name: str :param process_id: PID. :type process_id: str + :param thread_id: TID. + :type thread_id: str :param slot: Name of the deployment slot. If a slot is not specified, the API returns deployments for the production slot. :type slot: str @@ -16874,17 +17749,18 @@ def get_instance_process_slot( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ProcessInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.ProcessInfo or + :return: ProcessThreadInfo or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ProcessThreadInfo or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ # Construct URL - url = self.get_instance_process_slot.metadata['url'] + url = self.get_instance_process_thread_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'), 'processId': self._serialize.url("process_id", process_id, 'str'), + 'threadId': self._serialize.url("thread_id", thread_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') @@ -16917,54 +17793,48 @@ def get_instance_process_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ProcessInfo', response) + deserialized = self._deserialize('ProcessThreadInfo', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} + get_instance_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} - def delete_instance_process_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Terminate a process by its ID for a web site, or a deployment slot, or - specific scaled-out instance in a web site. + def is_cloneable_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Shows whether an app can be cloned to another resource group or + subscription. - Terminate a process by its ID for a web site, or a deployment slot, or - specific scaled-out instance in a web site. + Shows whether an app can be cloned to another resource group or + subscription. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Site name. + :param name: Name of the app. :type name: str - :param process_id: PID. - :type process_id: str - :param slot: Name of the deployment slot. If a slot is not specified, - the API returns deployments for the production slot. + :param slot: Name of the deployment slot. By default, this API returns + information on the production slot. :type slot: str - :param instance_id: ID of a specific scaled-out instance. This is the - value of the name property in the JSON response from "GET - api/sites/{siteName}/instances". - :type instance_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :return: SiteCloneability or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.SiteCloneability or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL - url = self.delete_instance_process_slot.metadata['url'] + url = self.is_cloneable_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'), - 'processId': self._serialize.url("process_id", process_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -16975,6 +17845,7 @@ def delete_instance_process_slot( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -16983,63 +17854,55 @@ def delete_instance_process_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204, 404]: - 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 + + if response.status_code == 200: + deserialized = self._deserialize('SiteCloneability', response) if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - delete_instance_process_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}'} - def get_instance_process_dump_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, callback=None, **operation_config): - """Get a memory dump of a process by its ID for a specific scaled-out - instance in a web site. + return deserialized + is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} - Get a memory dump of a process by its ID for a specific scaled-out - instance in a web site. + def list_sync_function_triggers_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """This is to allow calling via powershell and ARM template. + + This is to allow calling via powershell and ARM template. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Site name. + :param name: Name of the app. :type name: str - :param process_id: PID. - :type process_id: str :param slot: Name of the deployment slot. If a slot is not specified, - the API returns deployments for the production slot. + the API will restore a backup of the production slot. :type slot: str - :param instance_id: ID of a specific scaled-out instance. This is the - value of the name property in the JSON response from "GET - api/sites/{siteName}/instances". - :type instance_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response - :param callback: When specified, will be called with each chunk of - data that is streamed. The callback should take two arguments, the - bytes of the current chunk of data and the response object. If the - data is uploading, response will be None. - :type callback: Callable[Bytes, response=None] :param operation_config: :ref:`Operation configuration overrides`. - :return: object or ClientRawResponse if raw=true - :rtype: Generator or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :return: FunctionSecrets or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.FunctionSecrets or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL - url = self.get_instance_process_dump_slot.metadata['url'] + url = self.list_sync_function_triggers_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'), - 'processId': self._serialize.url("process_id", process_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -17059,69 +17922,60 @@ def get_instance_process_dump_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=True, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._client.stream_download(response, callback) + deserialized = self._deserialize('FunctionSecrets', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_instance_process_dump_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/dump'} + list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} - def list_instance_process_modules_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """List module information for a process by its ID for a specific - scaled-out instance in a web site. + def list_metric_definitions_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets all metric definitions of an app (or deployment slot, if + specified). - List module information for a process by its ID for a specific - scaled-out instance in a web site. + Gets all metric definitions of an app (or deployment slot, if + specified). :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Site name. + :param name: Name of the app. :type name: str - :param process_id: PID. - :type process_id: str :param slot: Name of the deployment slot. If a slot is not specified, - the API returns deployments for the production slot. + the API will get metric definitions of the production slot. :type slot: str - :param instance_id: ID of a specific scaled-out instance. This is the - value of the name property in the JSON response from "GET - api/sites/{siteName}/instances". - :type instance_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of ProcessModuleInfo + :return: An iterator like instance of ResourceMetricDefinition :rtype: - ~azure.mgmt.web.models.ProcessModuleInfoPaged[~azure.mgmt.web.models.ProcessModuleInfo] - :raises: :class:`CloudError` + ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_instance_process_modules_slot.metadata['url'] + url = self.list_metric_definitions_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'), - 'processId': self._serialize.url("process_id", process_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -17148,155 +18002,75 @@ def internal_paging(next_link=None, raw=False): request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - return response - - # Deserialize response - deserialized = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies) - - if raw: - header_dict = {} - client_raw_response = models.ProcessModuleInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response - - return deserialized - list_instance_process_modules_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules'} - - def get_instance_process_module_slot( - self, resource_group_name, name, process_id, base_address, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get process information by its ID for a specific scaled-out instance in - a web site. - - Get process information by its ID for a specific scaled-out instance in - a web site. - - :param resource_group_name: Name of the resource group to which the - resource belongs. - :type resource_group_name: str - :param name: Site name. - :type name: str - :param process_id: PID. - :type process_id: str - :param base_address: Module base address. - :type base_address: str - :param slot: Name of the deployment slot. If a slot is not specified, - the API returns deployments for the production slot. - :type slot: str - :param instance_id: ID of a specific scaled-out instance. This is the - value of the name property in the JSON response from "GET - api/sites/{siteName}/instances". - :type instance_id: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ProcessModuleInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.ProcessModuleInfo or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ - # Construct URL - url = self.get_instance_process_module_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'), - 'processId': self._serialize.url("process_id", process_id, 'str'), - 'baseAddress': self._serialize.url("base_address", base_address, 'str'), - 'slot': self._serialize.url("slot", slot, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp - - deserialized = None + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) - if response.status_code == 200: - deserialized = self._deserialize('ProcessModuleInfo', response) + return response + + # Deserialize response + deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies) if raw: - client_raw_response = ClientRawResponse(deserialized, response) + header_dict = {} + client_raw_response = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - get_instance_process_module_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/modules/{baseAddress}'} + list_metric_definitions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions'} - def list_instance_process_threads_slot( - self, resource_group_name, name, process_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """List the threads in a process by its ID for a specific scaled-out - instance in a web site. + def list_metrics_slot( + self, resource_group_name, name, slot, details=None, filter=None, custom_headers=None, raw=False, **operation_config): + """Gets performance metrics of an app (or deployment slot, if specified). - List the threads in a process by its ID for a specific scaled-out - instance in a web site. + Gets performance metrics of an app (or deployment slot, if specified). :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Site name. + :param name: Name of the app. :type name: str - :param process_id: PID. - :type process_id: str :param slot: Name of the deployment slot. If a slot is not specified, - the API returns deployments for the production slot. + the API will get metrics of the production slot. :type slot: str - :param instance_id: ID of a specific scaled-out instance. This is the - value of the name property in the JSON response from "GET - api/sites/{siteName}/instances". - :type instance_id: str + :param details: Specify "true" to include metric details in the + response. It is "false" by default. + :type details: bool + :param filter: Return only metrics specified in the filter (using + OData syntax). For example: $filter=(name.value eq 'Metric1' or + name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and + endTime eq 2014-12-31T23:59:59Z and timeGrain eq + duration'[Hour|Minute|Day]'. + :type filter: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of ProcessThreadInfo + :return: An iterator like instance of ResourceMetric :rtype: - ~azure.mgmt.web.models.ProcessThreadInfoPaged[~azure.mgmt.web.models.ProcessThreadInfo] - :raises: :class:`CloudError` + ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] + :raises: + :class:`DefaultErrorResponseException` """ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_instance_process_threads_slot.metadata['url'] + url = self.list_metrics_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'), - 'processId': self._serialize.url("process_id", process_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} + if details is not None: + query_parameters['details'] = self._serialize.query("details", details, 'bool') + if filter is not None: + query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: @@ -17317,67 +18091,54 @@ def internal_paging(next_link=None, raw=False): request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) return response # Deserialize response - deserialized = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies) + deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies) if raw: header_dict = {} - client_raw_response = models.ProcessThreadInfoPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) return client_raw_response return deserialized - list_instance_process_threads_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads'} + list_metrics_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics'} - def get_instance_process_thread_slot( - self, resource_group_name, name, process_id, thread_id, slot, instance_id, custom_headers=None, raw=False, **operation_config): - """Get thread information by Thread ID for a specific process, in a - specific scaled-out instance in a web site. + def get_migrate_my_sql_status_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Returns the status of MySql in app migration, if one is active, and + whether or not MySql in app is enabled. - Get thread information by Thread ID for a specific process, in a - specific scaled-out instance in a web site. + Returns the status of MySql in app migration, if one is active, and + whether or not MySql in app is enabled. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Site name. + :param name: Name of web app. :type name: str - :param process_id: PID. - :type process_id: str - :param thread_id: TID. - :type thread_id: str - :param slot: Name of the deployment slot. If a slot is not specified, - the API returns deployments for the production slot. + :param slot: Name of the deployment slot. :type slot: str - :param instance_id: ID of a specific scaled-out instance. This is the - value of the name property in the JSON response from "GET - api/sites/{siteName}/instances". - :type instance_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ProcessThreadInfo or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.ProcessThreadInfo or + :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_instance_process_thread_slot.metadata['url'] + url = self.get_migrate_my_sql_status_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'), - 'processId': self._serialize.url("process_id", process_id, 'str'), - 'threadId': self._serialize.url("thread_id", thread_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), - 'instanceId': self._serialize.url("instance_id", instance_id, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -17400,55 +18161,56 @@ def get_instance_process_thread_slot( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ProcessThreadInfo', response) + deserialized = self._deserialize('MigrateMySqlStatus', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_instance_process_thread_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/instances/{instanceId}/processes/{processId}/threads/{threadId}'} + get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} - def is_cloneable_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Shows whether an app can be cloned to another resource group or - subscription. + def list_network_features_slot( + self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): + """Gets all network features used by the app (or deployment slot, if + specified). - Shows whether an app can be cloned to another resource group or - subscription. + Gets all network features used by the app (or deployment slot, if + specified). :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str :param name: Name of the app. :type name: str - :param slot: Name of the deployment slot. By default, this API returns - information on the production slot. + :param view: The type of view. This can either be "summary" or + "detailed". + :type view: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API will get network features 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: SiteCloneability or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.SiteCloneability or + :return: NetworkFeatures or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.NetworkFeatures or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` + :raises: :class:`CloudError` """ # Construct URL - url = self.is_cloneable_slot.metadata['url'] + url = self.list_network_features_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'), + 'view': self._serialize.url("view", view, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -17469,54 +18231,61 @@ def is_cloneable_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, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) + if response.status_code not in [200, 404]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp deserialized = None if response.status_code == 200: - deserialized = self._deserialize('SiteCloneability', response) + deserialized = self._deserialize('NetworkFeatures', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - is_cloneable_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/iscloneable'} + list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} - def list_sync_function_triggers_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """This is to allow calling via powershell and ARM template. + def get_network_trace_operation_slot( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). - This is to allow calling via powershell and ARM template. + Gets a named operation for a network trace capturing (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 operation_id: GUID of the operation. + :type operation_id: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will restore a backup of the production slot. + the API will get an operation 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: FunctionSecrets or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.FunctionSecrets or + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.NetworkTrace] or ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ # Construct URL - url = self.list_sync_function_triggers_slot.metadata['url'] + url = self.get_network_trace_operation_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'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -17537,219 +18306,244 @@ def list_sync_function_triggers_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, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('FunctionSecrets', response) + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list_sync_function_triggers_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/listsyncfunctiontriggerstatus'} + get_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/operationresults/{operationId}'} - def list_metric_definitions_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Gets all metric definitions of an app (or deployment slot, if - specified). + def start_web_site_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + """Start capturing network packets for the site (To be deprecated). - Gets all metric definitions of an app (or deployment slot, if - specified). + Start capturing network packets for the site (To be deprecated). :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 slot: Name of the deployment slot. If a slot is not specified, - the API will get metric definitions of the production slot. + :param slot: The name of the slot for this web app. :type slot: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str :param 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 ResourceMetricDefinition - :rtype: - ~azure.mgmt.web.models.ResourceMetricDefinitionPaged[~azure.mgmt.web.models.ResourceMetricDefinition] + :return: str or ClientRawResponse if raw=true + :rtype: str or ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ - def internal_paging(next_link=None, raw=False): + # Construct URL + url = self.start_web_site_network_trace_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) - if not next_link: - # Construct URL - url = self.list_metric_definitions_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 duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, 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('str', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - else: - url = next_link - query_parameters = {} + def _start_web_site_network_trace_operation_slot_initial( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_web_site_network_trace_operation_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 headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + # Construct parameters + query_parameters = {} + if duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - return response + if response.status_code not in [200, 202]: + raise models.DefaultErrorResponseException(self._deserialize, response) - # Deserialize response - deserialized = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies) + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) if raw: - header_dict = {} - client_raw_response = models.ResourceMetricDefinitionPaged(internal_paging, self._deserialize.dependencies, header_dict) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list_metric_definitions_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metricdefinitions'} - def list_metrics_slot( - self, resource_group_name, name, slot, details=None, filter=None, custom_headers=None, raw=False, **operation_config): - """Gets performance metrics of an app (or deployment slot, if specified). + def start_web_site_network_trace_operation_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Start capturing network packets for the site. - Gets performance metrics of an app (or deployment slot, if specified). + Start capturing network packets for the site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Name of the app. + :param name: The name of the web app. :type name: str - :param slot: Name of the deployment slot. If a slot is not specified, - the API will get metrics of the production slot. + :param slot: The name of the slot for this web app. :type slot: str - :param details: Specify "true" to include metric details in the - response. It is "false" by default. - :type details: bool - :param filter: Return only metrics specified in the filter (using - OData syntax). For example: $filter=(name.value eq 'Metric1' or - name.value eq 'Metric2') and startTime eq 2014-01-01T00:00:00Z and - endTime eq 2014-12-31T23:59:59Z and timeGrain eq - duration'[Hour|Minute|Day]'. - :type filter: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ResourceMetric + :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 list or + ClientRawResponse if raw==True :rtype: - ~azure.mgmt.web.models.ResourceMetricPaged[~azure.mgmt.web.models.ResourceMetric] + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.models.NetworkTrace]]] :raises: :class:`DefaultErrorResponseException` """ - def internal_paging(next_link=None, raw=False): - - if not next_link: - # Construct URL - url = self.list_metrics_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 details is not None: - query_parameters['details'] = self._serialize.query("details", details, 'bool') - if filter is not None: - query_parameters['$filter'] = self._serialize.query("filter", filter, 'str', skip_quote=True) - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - 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, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.DefaultErrorResponseException(self._deserialize, response) + raw_result = self._start_web_site_network_trace_operation_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + duration_in_seconds=duration_in_seconds, + max_frame_length=max_frame_length, + sas_url=sas_url, + custom_headers=custom_headers, + raw=True, + **operation_config + ) - return response + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) - # Deserialize response - deserialized = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies) + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response - if raw: - header_dict = {} - client_raw_response = models.ResourceMetricPaged(internal_paging, self._deserialize.dependencies, header_dict) - return client_raw_response + return deserialized - return deserialized - list_metrics_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/metrics'} + 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) + start_web_site_network_trace_operation_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/startOperation'} - def get_migrate_my_sql_status_slot( + def stop_web_site_network_trace_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Returns the status of MySql in app migration, if one is active, and - whether or not MySql in app is enabled. + """Stop ongoing capturing network packets for the site. - Returns the status of MySql in app migration, if one is active, and - whether or not MySql in app is enabled. + Stop ongoing capturing network packets for the site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Name of web app. + :param name: The name of the web app. :type name: str - :param slot: Name of the deployment slot. + :param slot: The name of the slot for this 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: MigrateMySqlStatus or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.MigrateMySqlStatus or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`DefaultErrorResponseException` + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` """ # Construct URL - url = self.get_migrate_my_sql_status_slot.metadata['url'] + url = self.stop_web_site_network_trace_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'), @@ -17764,7 +18558,6 @@ def get_migrate_my_sql_status_slot( # Construct headers header_parameters = {} - header_parameters['Accept'] = 'application/json' if self.config.generate_client_request_id: header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) if custom_headers: @@ -17773,59 +18566,54 @@ def get_migrate_my_sql_status_slot( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) + request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, 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('MigrateMySqlStatus', response) + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response + stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} - return deserialized - get_migrate_my_sql_status_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/migratemysql/status'} - - def list_network_features_slot( - self, resource_group_name, name, view, slot, custom_headers=None, raw=False, **operation_config): - """Gets all network features used by the app (or deployment slot, if - specified). + def get_network_traces_slot( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). - Gets all network features used by the app (or deployment slot, if - specified). + Gets a named operation for a network trace capturing (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 view: The type of view. This can either be "summary" or - "detailed". - :type view: str + :param operation_id: GUID of the operation. + :type operation_id: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will get network features for the production slot. + the API will get an operation 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: NetworkFeatures or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.web.models.NetworkFeatures or + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.NetworkTrace] or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` + :raises: + :class:`DefaultErrorResponseException` """ # Construct URL - url = self.list_network_features_slot.metadata['url'] + url = self.get_network_traces_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'), - 'view': self._serialize.url("view", view, 'str'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -17849,57 +18637,56 @@ def list_network_features_slot( request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200, 404]: - exp = CloudError(response) - exp.request_id = response.headers.get('x-ms-request-id') - raise exp + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('NetworkFeatures', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - list_network_features_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkFeatures/{view}'} + get_network_traces_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/{operationId}'} - def start_web_site_network_trace_slot( - self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): - """Start capturing network packets for the site. + def get_network_trace_operation_slot_v2( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). - Start capturing network packets for the site. + Gets a named operation for a network trace capturing (or deployment + slot, if specified). :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: The name of the web app. + :param name: Name of the app. :type name: str - :param slot: The name of the slot for this web app. + :param operation_id: GUID of the operation. + :type operation_id: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API will get an operation for the production slot. :type slot: str - :param duration_in_seconds: The duration to keep capturing in seconds. - :type duration_in_seconds: int - :param max_frame_length: The maximum frame length in bytes (Optional). - :type max_frame_length: int - :param sas_url: The Blob URL to store capture file. - :type sas_url: str :param 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: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ # Construct URL - url = self.start_web_site_network_trace_slot.metadata['url'] + url = self.get_network_trace_operation_slot_v2.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'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -17907,12 +18694,6 @@ def start_web_site_network_trace_slot( # Construct parameters query_parameters = {} - if duration_in_seconds is not None: - query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') - if max_frame_length is not None: - query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') - if sas_url is not None: - query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') # Construct headers @@ -17926,52 +18707,61 @@ def start_web_site_network_trace_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, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 202]: raise models.DefaultErrorResponseException(self._deserialize, response) deserialized = None if response.status_code == 200: - deserialized = self._deserialize('str', response) + deserialized = self._deserialize('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - start_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/start'} + get_network_trace_operation_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/current/operationresults/{operationId}'} - def stop_web_site_network_trace_slot( - self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Stop ongoing capturing network packets for the site. + def get_network_traces_slot_v2( + self, resource_group_name, name, operation_id, slot, custom_headers=None, raw=False, **operation_config): + """Gets a named operation for a network trace capturing (or deployment + slot, if specified). - Stop ongoing capturing network packets for the site. + Gets a named operation for a network trace capturing (or deployment + slot, if specified). :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: The name of the web app. + :param name: Name of the app. :type name: str - :param slot: The name of the slot for this web app. + :param operation_id: GUID of the operation. + :type operation_id: str + :param slot: Name of the deployment slot. If a slot is not specified, + the API will get an operation 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: str or ClientRawResponse if raw=true - :rtype: str or ~msrest.pipeline.ClientRawResponse + :return: list or ClientRawResponse if raw=true + :rtype: list[~azure.mgmt.web.models.NetworkTrace] or + ~msrest.pipeline.ClientRawResponse :raises: :class:`DefaultErrorResponseException` """ # Construct URL - url = self.stop_web_site_network_trace_slot.metadata['url'] + url = self.get_network_traces_slot_v2.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'), + 'operationId': self._serialize.url("operation_id", operation_id, 'str'), 'slot': self._serialize.url("slot", slot, 'str'), 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') } @@ -17992,7 +18782,7 @@ def stop_web_site_network_trace_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, header_parameters) + request = self._client.get(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: @@ -18001,14 +18791,14 @@ def stop_web_site_network_trace_slot( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('str', response) + deserialized = self._deserialize('[NetworkTrace]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - stop_web_site_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTrace/stop'} + get_network_traces_slot_v2.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/networkTraces/{operationId}'} def generate_new_site_publishing_password_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): @@ -20718,6 +21508,81 @@ def internal_paging(next_link=None, raw=False): return deserialized list_snapshots_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshots'} + def list_snapshots_from_dr_secondary_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Returns all Snapshots to the user from DRSecondary endpoint. + + Returns all Snapshots to the user from DRSecondary endpoint. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Website Name. + :type name: str + :param slot: Website 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 Snapshot + :rtype: + ~azure.mgmt.web.models.SnapshotPaged[~azure.mgmt.web.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary_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['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_snapshots_from_dr_secondary_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/snapshotsdr'} + def get_source_control_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): """Gets the source control configuration of an app. @@ -21038,18 +21903,194 @@ def update_source_control_slot( if response.status_code == 202: deserialized = self._deserialize('SiteSourceControl', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + + def start_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Starts an app (or deployment slot, if specified). + + Starts 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 start 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.start_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 = {} + 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, header_parameters) + response = self._client.send(request, stream=False, **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 + start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} + + + def _start_network_trace_slot_initial( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_network_trace_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 duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, 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('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_network_trace_slot( + self, resource_group_name, name, slot, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Start capturing network packets for the site. + + Start capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param slot: The name of the slot for this web app. + :type slot: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :param 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 list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._start_network_trace_slot_initial( + resource_group_name=resource_group_name, + name=name, + slot=slot, + duration_in_seconds=duration_in_seconds, + max_frame_length=max_frame_length, + sas_url=sas_url, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized - return deserialized - update_source_control_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/sourcecontrols/web'} + 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) + start_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/startNetworkTrace'} - def start_slot( + def stop_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Starts an app (or deployment slot, if specified). + """Stops an app (or deployment slot, if specified). - Starts an app (or deployment slot, if specified). + Stops an app (or deployment slot, if specified). :param resource_group_name: Name of the resource group to which the resource belongs. @@ -21057,7 +22098,7 @@ def start_slot( :param name: Name of the app. :type name: str :param slot: Name of the deployment slot. If a slot is not specified, - the API will start the production slot. + the API will stop 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 @@ -21069,7 +22110,7 @@ def start_slot( :raises: :class:`CloudError` """ # Construct URL - url = self.start_slot.metadata['url'] + url = self.stop_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'), @@ -21103,21 +22144,20 @@ def start_slot( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - start_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/start'} + stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} - def stop_slot( + def stop_network_trace_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): - """Stops an app (or deployment slot, if specified). + """Stop ongoing capturing network packets for the site. - Stops an app (or deployment slot, if specified). + Stop ongoing capturing network packets for the site. :param resource_group_name: Name of the resource group to which the resource belongs. :type resource_group_name: str - :param name: Name of the app. + :param name: The name of the web app. :type name: str - :param slot: Name of the deployment slot. If a slot is not specified, - the API will stop the production slot. + :param slot: The name of the slot for this 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 @@ -21129,7 +22169,7 @@ def stop_slot( :raises: :class:`CloudError` """ # Construct URL - url = self.stop_slot.metadata['url'] + url = self.stop_network_trace_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'), @@ -21155,7 +22195,7 @@ def stop_slot( request = self._client.post(url, query_parameters, header_parameters) response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [200, 204]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -21163,7 +22203,7 @@ def stop_slot( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - stop_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stop'} + stop_network_trace_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/stopNetworkTrace'} def sync_repository_slot( self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): @@ -22811,6 +23851,78 @@ def internal_paging(next_link=None, raw=False): return deserialized list_snapshots.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshots'} + def list_snapshots_from_dr_secondary( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Returns all Snapshots to the user from DRSecondary endpoint. + + Returns all Snapshots to the user from DRSecondary endpoint. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Website Name. + :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 Snapshot + :rtype: + ~azure.mgmt.web.models.SnapshotPaged[~azure.mgmt.web.models.Snapshot] + :raises: + :class:`DefaultErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_snapshots_from_dr_secondary.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['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.DefaultErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.SnapshotPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.SnapshotPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_snapshots_from_dr_secondary.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/snapshotsdr'} + def get_source_control( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): """Gets the source control configuration of an app. @@ -23173,6 +24285,118 @@ def start( return client_raw_response start.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/start'} + + def _start_network_trace_initial( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.start_network_trace.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 duration_in_seconds is not None: + query_parameters['durationInSeconds'] = self._serialize.query("duration_in_seconds", duration_in_seconds, 'int') + if max_frame_length is not None: + query_parameters['maxFrameLength'] = self._serialize.query("max_frame_length", max_frame_length, 'int') + if sas_url is not None: + query_parameters['sasUrl'] = self._serialize.query("sas_url", sas_url, 'str') + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + 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, header_parameters) + response = self._client.send(request, 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('[NetworkTrace]', response) + if response.status_code == 202: + deserialized = self._deserialize('[NetworkTrace]', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def start_network_trace( + self, resource_group_name, name, duration_in_seconds=None, max_frame_length=None, sas_url=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Start capturing network packets for the site. + + Start capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: The name of the web app. + :type name: str + :param duration_in_seconds: The duration to keep capturing in seconds. + :type duration_in_seconds: int + :param max_frame_length: The maximum frame length in bytes (Optional). + :type max_frame_length: int + :param sas_url: The Blob URL to store capture file. + :type sas_url: str + :param 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 list or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[list[~azure.mgmt.web.models.NetworkTrace]] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[list[~azure.mgmt.web.models.NetworkTrace]]] + :raises: + :class:`DefaultErrorResponseException` + """ + raw_result = self._start_network_trace_initial( + resource_group_name=resource_group_name, + name=name, + duration_in_seconds=duration_in_seconds, + max_frame_length=max_frame_length, + sas_url=sas_url, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('[NetworkTrace]', 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) + start_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/startNetworkTrace'} + def stop( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): """Stops an app (or deployment slot, if specified). @@ -23229,6 +24453,62 @@ def stop( return client_raw_response stop.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stop'} + def stop_network_trace( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Stop ongoing capturing network packets for the site. + + Stop ongoing capturing network packets for the site. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: The name of the 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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.stop_network_trace.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 = {} + 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, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + stop_network_trace.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/stopNetworkTrace'} + def sync_repository( self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): """Sync web app repository. diff --git a/azure-mgmt-web/azure/mgmt/web/version.py b/azure-mgmt-web/azure/mgmt/web/version.py index 57866fdf17d0..8ae395630e43 100644 --- a/azure-mgmt-web/azure/mgmt/web/version.py +++ b/azure-mgmt-web/azure/mgmt/web/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.40.0" +VERSION = "0.36.0" 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 5574e1ff74b6..5c48ad1d85df 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 @@ -652,14 +652,14 @@ 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, xenon_workers_enabled=None, custom_headers=None, raw=False, **operation_config): + self, sku=None, linux_workers_enabled=None, xenon_workers_enabled=None, linux_dynamic_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', 'Dynamic', - 'Isolated', 'PremiumV2' + 'Isolated', 'PremiumV2', 'ElasticPremium', 'ElasticIsolated' :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. @@ -667,6 +667,9 @@ def list_geo_regions( :param xenon_workers_enabled: Specify true if you want to filter to only regions that support Xenon workers. :type xenon_workers_enabled: bool + :param linux_dynamic_workers_enabled: Specify true if you + want to filter to only regions that support Linux Consumption Workers. + :type linux_dynamic_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 @@ -696,6 +699,8 @@ def internal_paging(next_link=None, raw=False): query_parameters['linuxWorkersEnabled'] = self._serialize.query("linux_workers_enabled", linux_workers_enabled, 'bool') if xenon_workers_enabled is not None: query_parameters['xenonWorkersEnabled'] = self._serialize.query("xenon_workers_enabled", xenon_workers_enabled, 'bool') + if linux_dynamic_workers_enabled is not None: + query_parameters['linuxDynamicWorkersEnabled'] = self._serialize.query("linux_dynamic_workers_enabled", linux_dynamic_workers_enabled, 'bool') query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') else: