diff --git a/azure-mgmt-web/azure/mgmt/web/models/__init__.py b/azure-mgmt-web/azure/mgmt/web/models/__init__.py index bd1762cc5238..25af3a3d7bbe 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/__init__.py +++ b/azure-mgmt-web/azure/mgmt/web/models/__init__.py @@ -33,6 +33,7 @@ from .identifier_py3 import Identifier from .hybrid_connection_key_py3 import HybridConnectionKey from .hybrid_connection_py3 import HybridConnection + from .deleted_site_py3 import DeletedSite from .proxy_only_resource_py3 import ProxyOnlyResource from .managed_service_identity_py3 import ManagedServiceIdentity from .slot_swap_status_py3 import SlotSwapStatus @@ -101,7 +102,6 @@ from .app_service_environment_py3 import AppServiceEnvironment from .localizable_string_py3 import LocalizableString from .csm_usage_quota_py3 import CsmUsageQuota - from .deleted_site_py3 import DeletedSite from .error_entity_py3 import ErrorEntity from .operation_py3 import Operation from .resource_metric_name_py3 import ResourceMetricName @@ -229,6 +229,7 @@ from .worker_pool_resource_py3 import WorkerPoolResource from .app_service_plan_patch_resource_py3 import AppServicePlanPatchResource from .hybrid_connection_limits_py3 import HybridConnectionLimits + from .resource_health_metadata_py3 import ResourceHealthMetadata except (SyntaxError, ImportError): from .app_service_certificate import AppServiceCertificate from .app_service_certificate_resource import AppServiceCertificateResource @@ -253,6 +254,7 @@ from .identifier import Identifier from .hybrid_connection_key import HybridConnectionKey from .hybrid_connection import HybridConnection + from .deleted_site import DeletedSite from .proxy_only_resource import ProxyOnlyResource from .managed_service_identity import ManagedServiceIdentity from .slot_swap_status import SlotSwapStatus @@ -321,7 +323,6 @@ from .app_service_environment import AppServiceEnvironment from .localizable_string import LocalizableString from .csm_usage_quota import CsmUsageQuota - from .deleted_site import DeletedSite from .error_entity import ErrorEntity from .operation import Operation from .resource_metric_name import ResourceMetricName @@ -449,6 +450,7 @@ from .worker_pool_resource import WorkerPoolResource from .app_service_plan_patch_resource import AppServicePlanPatchResource from .hybrid_connection_limits import HybridConnectionLimits + from .resource_health_metadata import ResourceHealthMetadata from .app_service_certificate_order_paged import AppServiceCertificateOrderPaged from .app_service_certificate_resource_paged import AppServiceCertificateResourcePaged from .csm_operation_description_paged import CsmOperationDescriptionPaged @@ -501,6 +503,7 @@ from .app_service_plan_paged import AppServicePlanPaged from .str_paged import StrPaged from .hybrid_connection_paged import HybridConnectionPaged +from .resource_health_metadata_paged import ResourceHealthMetadataPaged from .web_site_management_client_enums import ( KeyVaultSecretStatus, CertificateProductType, @@ -591,6 +594,7 @@ 'Identifier', 'HybridConnectionKey', 'HybridConnection', + 'DeletedSite', 'ProxyOnlyResource', 'ManagedServiceIdentity', 'SlotSwapStatus', @@ -659,7 +663,6 @@ 'AppServiceEnvironment', 'LocalizableString', 'CsmUsageQuota', - 'DeletedSite', 'ErrorEntity', 'Operation', 'ResourceMetricName', @@ -787,6 +790,7 @@ 'WorkerPoolResource', 'AppServicePlanPatchResource', 'HybridConnectionLimits', + 'ResourceHealthMetadata', 'AppServiceCertificateOrderPaged', 'AppServiceCertificateResourcePaged', 'CsmOperationDescriptionPaged', @@ -839,6 +843,7 @@ 'AppServicePlanPaged', 'StrPaged', 'HybridConnectionPaged', + 'ResourceHealthMetadataPaged', 'KeyVaultSecretStatus', 'CertificateProductType', 'ProvisioningState', 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 964fa959409c..c34010da2706 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 @@ -72,9 +72,12 @@ class AppServicePlan(Resource): :param reserved: If Linux app service plan true, false otherwise. Default value: False . :type reserved: bool - :param is_xenon: If Hyper-V container app service plan true, - false otherwise. Default value: False . + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :type hyper_v: bool :param target_worker_count: Scaling worker count. :type target_worker_count: int :param target_worker_size_id: Scaling worker size ID. @@ -124,6 +127,7 @@ class AppServicePlan(Resource): 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, @@ -147,6 +151,7 @@ def __init__(self, **kwargs): self.resource_group = None self.reserved = kwargs.get('reserved', False) self.is_xenon = kwargs.get('is_xenon', False) + self.hyper_v = kwargs.get('hyper_v', False) self.target_worker_count = kwargs.get('target_worker_count', None) self.target_worker_size_id = kwargs.get('target_worker_size_id', None) self.provisioning_state = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource.py index f1ee1e51c04c..fe641394a178 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 @@ -66,9 +66,12 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :param reserved: If Linux app service plan true, false otherwise. Default value: False . :type reserved: bool - :param is_xenon: If Hyper-V container app service plan true, - false otherwise. Default value: False . + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :type hyper_v: bool :param target_worker_count: Scaling worker count. :type target_worker_count: int :param target_worker_size_id: Scaling worker size ID. @@ -113,6 +116,7 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, @@ -135,6 +139,7 @@ def __init__(self, **kwargs): self.resource_group = None self.reserved = kwargs.get('reserved', False) self.is_xenon = kwargs.get('is_xenon', False) + self.hyper_v = kwargs.get('hyper_v', False) self.target_worker_count = kwargs.get('target_worker_count', None) self.target_worker_size_id = kwargs.get('target_worker_size_id', None) self.provisioning_state = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource_py3.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_patch_resource_py3.py index 10d555ee877c..0d04154d0093 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 @@ -66,9 +66,12 @@ class AppServicePlanPatchResource(ProxyOnlyResource): :param reserved: If Linux app service plan true, false otherwise. Default value: False . :type reserved: bool - :param is_xenon: If Hyper-V container app service plan true, - false otherwise. Default value: False . + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :type hyper_v: bool :param target_worker_count: Scaling worker count. :type target_worker_count: int :param target_worker_size_id: Scaling worker size ID. @@ -113,12 +116,13 @@ class AppServicePlanPatchResource(ProxyOnlyResource): 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, } - def __init__(self, *, kind: str=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, **kwargs) -> None: + 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: super(AppServicePlanPatchResource, self).__init__(kind=kind, **kwargs) self.worker_tier_name = worker_tier_name self.status = None @@ -135,6 +139,7 @@ def __init__(self, *, kind: str=None, worker_tier_name: str=None, admin_site_nam self.resource_group = None self.reserved = reserved self.is_xenon = is_xenon + self.hyper_v = hyper_v self.target_worker_count = target_worker_count self.target_worker_size_id = target_worker_size_id self.provisioning_state = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_py3.py b/azure-mgmt-web/azure/mgmt/web/models/app_service_plan_py3.py index 5ce4203df04f..3a8d6e22c267 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 @@ -72,9 +72,12 @@ class AppServicePlan(Resource): :param reserved: If Linux app service plan true, false otherwise. Default value: False . :type reserved: bool - :param is_xenon: If Hyper-V container app service plan true, - false otherwise. Default value: False . + :param is_xenon: Obsolete: If Hyper-V container app service plan + true, false otherwise. Default value: False . :type is_xenon: bool + :param hyper_v: If Hyper-V container app service plan true, + false otherwise. Default value: False . + :type hyper_v: bool :param target_worker_count: Scaling worker count. :type target_worker_count: int :param target_worker_size_id: Scaling worker size ID. @@ -124,13 +127,14 @@ class AppServicePlan(Resource): 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, 'target_worker_count': {'key': 'properties.targetWorkerCount', 'type': 'int'}, 'target_worker_size_id': {'key': 'properties.targetWorkerSizeId', 'type': 'int'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'ProvisioningState'}, 'sku': {'key': 'sku', 'type': 'SkuDescription'}, } - def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name: str=None, admin_site_name: str=None, hosting_environment_profile=None, per_site_scaling: bool=False, is_spot: bool=None, spot_expiration_time=None, free_offer_expiration_time=None, reserved: bool=False, is_xenon: bool=False, target_worker_count: int=None, target_worker_size_id: int=None, sku=None, **kwargs) -> None: + 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: super(AppServicePlan, self).__init__(kind=kind, location=location, tags=tags, **kwargs) self.worker_tier_name = worker_tier_name self.status = None @@ -147,6 +151,7 @@ def __init__(self, *, location: str, kind: str=None, tags=None, worker_tier_name self.resource_group = None self.reserved = reserved self.is_xenon = is_xenon + self.hyper_v = hyper_v self.target_worker_count = target_worker_count self.target_worker_size_id = target_worker_size_id self.provisioning_state = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py b/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py index b93573234957..cab4d170ab91 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deleted_site.py @@ -9,15 +9,23 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .proxy_only_resource import ProxyOnlyResource -class DeletedSite(Model): +class DeletedSite(ProxyOnlyResource): """A deleted app. Variables are only populated by the server, and will be ignored when sending a request. + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str :ivar deleted_site_id: Numeric id for the deleted site :vartype deleted_site_id: int :ivar deleted_timestamp: Time in UTC when the app was deleted. @@ -30,24 +38,35 @@ class DeletedSite(Model): :vartype deleted_site_name: str :ivar slot: Slot of the deleted site :vartype slot: str + :ivar deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_kind: str """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'deleted_site_id': {'readonly': True}, 'deleted_timestamp': {'readonly': True}, 'subscription': {'readonly': True}, 'resource_group': {'readonly': True}, 'deleted_site_name': {'readonly': True}, 'slot': {'readonly': True}, + 'deleted_site_kind': {'readonly': True}, } _attribute_map = { - 'deleted_site_id': {'key': 'deletedSiteId', 'type': 'int'}, - 'deleted_timestamp': {'key': 'deletedTimestamp', 'type': 'str'}, - 'subscription': {'key': 'subscription', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'deleted_site_name': {'key': 'deletedSiteName', 'type': 'str'}, - 'slot': {'key': 'slot', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deleted_site_id': {'key': 'properties.deletedSiteId', 'type': 'int'}, + 'deleted_timestamp': {'key': 'properties.deletedTimestamp', 'type': 'str'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'deleted_site_name': {'key': 'properties.deletedSiteName', 'type': 'str'}, + 'slot': {'key': 'properties.slot', 'type': 'str'}, + 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, } def __init__(self, **kwargs): @@ -58,3 +77,4 @@ def __init__(self, **kwargs): self.resource_group = None self.deleted_site_name = None self.slot = None + self.deleted_site_kind = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/deleted_site_py3.py b/azure-mgmt-web/azure/mgmt/web/models/deleted_site_py3.py index f014d769c5dc..85152fdd18f8 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/deleted_site_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/deleted_site_py3.py @@ -9,15 +9,23 @@ # regenerated. # -------------------------------------------------------------------------- -from msrest.serialization import Model +from .proxy_only_resource_py3 import ProxyOnlyResource -class DeletedSite(Model): +class DeletedSite(ProxyOnlyResource): """A deleted app. Variables are only populated by the server, and will be ignored when sending a request. + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str :ivar deleted_site_id: Numeric id for the deleted site :vartype deleted_site_id: int :ivar deleted_timestamp: Time in UTC when the app was deleted. @@ -30,31 +38,43 @@ class DeletedSite(Model): :vartype deleted_site_name: str :ivar slot: Slot of the deleted site :vartype slot: str + :ivar deleted_site_kind: Kind of site that was deleted + :vartype deleted_site_kind: str """ _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, 'deleted_site_id': {'readonly': True}, 'deleted_timestamp': {'readonly': True}, 'subscription': {'readonly': True}, 'resource_group': {'readonly': True}, 'deleted_site_name': {'readonly': True}, 'slot': {'readonly': True}, + 'deleted_site_kind': {'readonly': True}, } _attribute_map = { - 'deleted_site_id': {'key': 'deletedSiteId', 'type': 'int'}, - 'deleted_timestamp': {'key': 'deletedTimestamp', 'type': 'str'}, - 'subscription': {'key': 'subscription', 'type': 'str'}, - 'resource_group': {'key': 'resourceGroup', 'type': 'str'}, - 'deleted_site_name': {'key': 'deletedSiteName', 'type': 'str'}, - 'slot': {'key': 'slot', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'deleted_site_id': {'key': 'properties.deletedSiteId', 'type': 'int'}, + 'deleted_timestamp': {'key': 'properties.deletedTimestamp', 'type': 'str'}, + 'subscription': {'key': 'properties.subscription', 'type': 'str'}, + 'resource_group': {'key': 'properties.resourceGroup', 'type': 'str'}, + 'deleted_site_name': {'key': 'properties.deletedSiteName', 'type': 'str'}, + 'slot': {'key': 'properties.slot', 'type': 'str'}, + 'deleted_site_kind': {'key': 'properties.kind', 'type': 'str'}, } - def __init__(self, **kwargs) -> None: - super(DeletedSite, self).__init__(**kwargs) + def __init__(self, *, kind: str=None, **kwargs) -> None: + super(DeletedSite, self).__init__(kind=kind, **kwargs) self.deleted_site_id = None self.deleted_timestamp = None self.subscription = None self.resource_group = None self.deleted_site_name = None self.slot = None + self.deleted_site_kind = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata.py b/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata.py new file mode 100644 index 000000000000..0c6c14f68dc4 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource import ProxyOnlyResource + + +class ResourceHealthMetadata(ProxyOnlyResource): + """Used for getting ResourceHealthCheck settings. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param category: The category that the resource matches in the RHC Policy + File + :type category: str + :param signal_availability: Is there a health signal for the resource + :type signal_availability: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'signal_availability': {'key': 'properties.signalAvailability', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ResourceHealthMetadata, self).__init__(**kwargs) + self.category = kwargs.get('category', None) + self.signal_availability = kwargs.get('signal_availability', None) diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata_paged.py b/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata_paged.py new file mode 100644 index 000000000000..45c9b8c4945b --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ResourceHealthMetadataPaged(Paged): + """ + A paging container for iterating over a list of :class:`ResourceHealthMetadata ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[ResourceHealthMetadata]'} + } + + def __init__(self, *args, **kwargs): + + super(ResourceHealthMetadataPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata_py3.py b/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata_py3.py new file mode 100644 index 000000000000..1e151f270086 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/models/resource_health_metadata_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_only_resource_py3 import ProxyOnlyResource + + +class ResourceHealthMetadata(ProxyOnlyResource): + """Used for getting ResourceHealthCheck settings. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id. + :vartype id: str + :ivar name: Resource Name. + :vartype name: str + :param kind: Kind of resource. + :type kind: str + :ivar type: Resource type. + :vartype type: str + :param category: The category that the resource matches in the RHC Policy + File + :type category: str + :param signal_availability: Is there a health signal for the resource + :type signal_availability: bool + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'category': {'key': 'properties.category', 'type': 'str'}, + 'signal_availability': {'key': 'properties.signalAvailability', 'type': 'bool'}, + } + + def __init__(self, *, kind: str=None, category: str=None, signal_availability: bool=None, **kwargs) -> None: + super(ResourceHealthMetadata, self).__init__(kind=kind, **kwargs) + self.category = category + self.signal_availability = signal_availability diff --git a/azure-mgmt-web/azure/mgmt/web/models/site.py b/azure-mgmt-web/azure/mgmt/web/models/site.py index f244ac523067..0bf04d727a18 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site.py @@ -64,8 +64,10 @@ class Site(Resource): :param reserved: true if reserved; otherwise, false. Default value: False . :type reserved: bool - :param is_xenon: Hyper-V sandbox. Default value: False . + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :type hyper_v: bool :ivar last_modified_time_utc: Last time the app was modified, in UTC. Read-only. :vartype last_modified_time_utc: datetime @@ -181,6 +183,7 @@ class Site(Resource): 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, 'last_modified_time_utc': {'key': 'properties.lastModifiedTimeUtc', 'type': 'iso-8601'}, 'site_config': {'key': 'properties.siteConfig', 'type': 'SiteConfig'}, 'traffic_manager_host_names': {'key': 'properties.trafficManagerHostNames', 'type': '[str]'}, @@ -218,6 +221,7 @@ def __init__(self, **kwargs): self.server_farm_id = kwargs.get('server_farm_id', None) self.reserved = kwargs.get('reserved', False) self.is_xenon = kwargs.get('is_xenon', False) + self.hyper_v = kwargs.get('hyper_v', False) self.last_modified_time_utc = None self.site_config = kwargs.get('site_config', None) self.traffic_manager_host_names = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource.py b/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource.py index 291bbff47844..392b54229183 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource.py @@ -58,8 +58,10 @@ class SitePatchResource(ProxyOnlyResource): :param reserved: true if reserved; otherwise, false. Default value: False . :type reserved: bool - :param is_xenon: Hyper-V sandbox. Default value: False . + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :type hyper_v: bool :ivar last_modified_time_utc: Last time the app was modified, in UTC. Read-only. :vartype last_modified_time_utc: datetime @@ -170,6 +172,7 @@ class SitePatchResource(ProxyOnlyResource): 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, 'last_modified_time_utc': {'key': 'properties.lastModifiedTimeUtc', 'type': 'iso-8601'}, 'site_config': {'key': 'properties.siteConfig', 'type': 'SiteConfig'}, 'traffic_manager_host_names': {'key': 'properties.trafficManagerHostNames', 'type': '[str]'}, @@ -206,6 +209,7 @@ def __init__(self, **kwargs): self.server_farm_id = kwargs.get('server_farm_id', None) self.reserved = kwargs.get('reserved', False) self.is_xenon = kwargs.get('is_xenon', False) + self.hyper_v = kwargs.get('hyper_v', False) self.last_modified_time_utc = None self.site_config = kwargs.get('site_config', None) self.traffic_manager_host_names = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource_py3.py b/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource_py3.py index f3e23f94d291..e459e6d70bbd 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_patch_resource_py3.py @@ -58,8 +58,10 @@ class SitePatchResource(ProxyOnlyResource): :param reserved: true if reserved; otherwise, false. Default value: False . :type reserved: bool - :param is_xenon: Hyper-V sandbox. Default value: False . + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :type hyper_v: bool :ivar last_modified_time_utc: Last time the app was modified, in UTC. Read-only. :vartype last_modified_time_utc: datetime @@ -170,6 +172,7 @@ class SitePatchResource(ProxyOnlyResource): 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, 'last_modified_time_utc': {'key': 'properties.lastModifiedTimeUtc', 'type': 'iso-8601'}, 'site_config': {'key': 'properties.siteConfig', 'type': 'SiteConfig'}, 'traffic_manager_host_names': {'key': 'properties.trafficManagerHostNames', 'type': '[str]'}, @@ -193,7 +196,7 @@ class SitePatchResource(ProxyOnlyResource): 'https_only': {'key': 'properties.httpsOnly', 'type': 'bool'}, } - def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, **kwargs) -> None: + def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, **kwargs) -> None: super(SitePatchResource, self).__init__(kind=kind, **kwargs) self.state = None self.host_names = None @@ -206,6 +209,7 @@ def __init__(self, *, kind: str=None, enabled: bool=None, host_name_ssl_states=N self.server_farm_id = server_farm_id self.reserved = reserved self.is_xenon = is_xenon + self.hyper_v = hyper_v self.last_modified_time_utc = None self.site_config = site_config self.traffic_manager_host_names = None diff --git a/azure-mgmt-web/azure/mgmt/web/models/site_py3.py b/azure-mgmt-web/azure/mgmt/web/models/site_py3.py index 3fb9e61bdede..d4ec907a9c06 100644 --- a/azure-mgmt-web/azure/mgmt/web/models/site_py3.py +++ b/azure-mgmt-web/azure/mgmt/web/models/site_py3.py @@ -64,8 +64,10 @@ class Site(Resource): :param reserved: true if reserved; otherwise, false. Default value: False . :type reserved: bool - :param is_xenon: Hyper-V sandbox. Default value: False . + :param is_xenon: Obsolete: Hyper-V sandbox. Default value: False . :type is_xenon: bool + :param hyper_v: Hyper-V sandbox. Default value: False . + :type hyper_v: bool :ivar last_modified_time_utc: Last time the app was modified, in UTC. Read-only. :vartype last_modified_time_utc: datetime @@ -181,6 +183,7 @@ class Site(Resource): 'server_farm_id': {'key': 'properties.serverFarmId', 'type': 'str'}, 'reserved': {'key': 'properties.reserved', 'type': 'bool'}, 'is_xenon': {'key': 'properties.isXenon', 'type': 'bool'}, + 'hyper_v': {'key': 'properties.hyperV', 'type': 'bool'}, 'last_modified_time_utc': {'key': 'properties.lastModifiedTimeUtc', 'type': 'iso-8601'}, 'site_config': {'key': 'properties.siteConfig', 'type': 'SiteConfig'}, 'traffic_manager_host_names': {'key': 'properties.trafficManagerHostNames', 'type': '[str]'}, @@ -205,7 +208,7 @@ class Site(Resource): 'identity': {'key': 'identity', 'type': 'ManagedServiceIdentity'}, } - def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, identity=None, **kwargs) -> None: + def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=None, host_name_ssl_states=None, server_farm_id: str=None, reserved: bool=False, is_xenon: bool=False, hyper_v: bool=False, site_config=None, scm_site_also_stopped: bool=False, hosting_environment_profile=None, client_affinity_enabled: bool=None, client_cert_enabled: bool=None, host_names_disabled: bool=None, container_size: int=None, daily_memory_time_quota: int=None, cloning_info=None, https_only: bool=None, identity=None, **kwargs) -> None: super(Site, self).__init__(kind=kind, location=location, tags=tags, **kwargs) self.state = None self.host_names = None @@ -218,6 +221,7 @@ def __init__(self, *, location: str, kind: str=None, tags=None, enabled: bool=No self.server_farm_id = server_farm_id self.reserved = reserved self.is_xenon = is_xenon + self.hyper_v = hyper_v self.last_modified_time_utc = None self.site_config = site_config self.traffic_manager_host_names = None diff --git a/azure-mgmt-web/azure/mgmt/web/operations/__init__.py b/azure-mgmt-web/azure/mgmt/web/operations/__init__.py index 93d9712f46bd..20bb873098b3 100644 --- a/azure-mgmt-web/azure/mgmt/web/operations/__init__.py +++ b/azure-mgmt-web/azure/mgmt/web/operations/__init__.py @@ -22,6 +22,7 @@ from .web_apps_operations import WebAppsOperations from .app_service_environments_operations import AppServiceEnvironmentsOperations from .app_service_plans_operations import AppServicePlansOperations +from .resource_health_metadata_operations import ResourceHealthMetadataOperations __all__ = [ 'AppServiceCertificateOrdersOperations', @@ -37,4 +38,5 @@ 'WebAppsOperations', 'AppServiceEnvironmentsOperations', 'AppServicePlansOperations', + 'ResourceHealthMetadataOperations', ] diff --git a/azure-mgmt-web/azure/mgmt/web/operations/resource_health_metadata_operations.py b/azure-mgmt-web/azure/mgmt/web/operations/resource_health_metadata_operations.py new file mode 100644 index 000000000000..65648c293f07 --- /dev/null +++ b/azure-mgmt-web/azure/mgmt/web/operations/resource_health_metadata_operations.py @@ -0,0 +1,457 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ResourceHealthMetadataOperations(object): + """ResourceHealthMetadataOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: API Version. Constant value: "2018-02-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-02-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """List all ResourceHealthMetadata for all sites in the subscription. + + List all ResourceHealthMetadata for all sites in the subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.models.ResourceHealthMetadataPaged[~azure.mgmt.web.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['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.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """List all ResourceHealthMetadata for all sites in the resource group in + the subscription. + + List all ResourceHealthMetadata for all sites in the resource group in + the subscription. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.models.ResourceHealthMetadataPaged[~azure.mgmt.web.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['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.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/resourceHealthMetadata'} + + def list_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the category of ResourceHealthMetadata to use for the given site + as a collection. + + Gets the category of ResourceHealthMetadata to use for the given site + as a collection. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.models.ResourceHealthMetadataPaged[~azure.mgmt.web.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['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.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata'} + + def get_by_site( + self, resource_group_name, name, custom_headers=None, raw=False, **operation_config): + """Gets the category of ResourceHealthMetadata to use for the given site. + + Gets the category of ResourceHealthMetadata to use for the given site. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app + :type name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['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('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/resourceHealthMetadata/default'} + + def list_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the category of ResourceHealthMetadata to use for the given site + as a collection. + + Gets the category of ResourceHealthMetadata to use for the given site + as a collection. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app. + :type name: str + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of ResourceHealthMetadata + :rtype: + ~azure.mgmt.web.models.ResourceHealthMetadataPaged[~azure.mgmt.web.models.ResourceHealthMetadata] + :raises: + :class:`DefaultErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['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.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ResourceHealthMetadataPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata'} + + def get_by_site_slot( + self, resource_group_name, name, slot, custom_headers=None, raw=False, **operation_config): + """Gets the category of ResourceHealthMetadata to use for the given site. + + Gets the category of ResourceHealthMetadata to use for the given site. + + :param resource_group_name: Name of the resource group to which the + resource belongs. + :type resource_group_name: str + :param name: Name of web app + :type name: str + :param slot: Name of web app slot. If not specified then will default + to production slot. + :type slot: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ResourceHealthMetadata or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.web.models.ResourceHealthMetadata or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`DefaultErrorResponseException` + """ + # Construct URL + url = self.get_by_site_slot.metadata['url'] + path_format_arguments = { + 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str', max_length=90, min_length=1, pattern=r'^[-\w\._\(\)]+[^\.]$'), + 'name': self._serialize.url("name", name, 'str'), + 'slot': self._serialize.url("slot", slot, 'str'), + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['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('ResourceHealthMetadata', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_by_site_slot.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{name}/slots/{slot}/resourceHealthMetadata/default'} diff --git a/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py b/azure-mgmt-web/azure/mgmt/web/web_site_management_client.py index f8f6dd1416e1..5574e1ff74b6 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 @@ -31,6 +31,7 @@ from .operations.web_apps_operations import WebAppsOperations from .operations.app_service_environments_operations import AppServiceEnvironmentsOperations from .operations.app_service_plans_operations import AppServicePlansOperations +from .operations.resource_health_metadata_operations import ResourceHealthMetadataOperations from . import models @@ -99,6 +100,8 @@ class WebSiteManagementClient(SDKClient): :vartype app_service_environments: azure.mgmt.web.operations.AppServiceEnvironmentsOperations :ivar app_service_plans: AppServicePlans operations :vartype app_service_plans: azure.mgmt.web.operations.AppServicePlansOperations + :ivar resource_health_metadata: ResourceHealthMetadata operations + :vartype resource_health_metadata: azure.mgmt.web.operations.ResourceHealthMetadataOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -146,6 +149,8 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.app_service_plans = AppServicePlansOperations( self._client, self.config, self._serialize, self._deserialize) + self.resource_health_metadata = ResourceHealthMetadataOperations( + self._client, self.config, self._serialize, self._deserialize) def get_publishing_user( self, custom_headers=None, raw=False, **operation_config):