diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/__init__.py index febe5d73ee46..ef78f45062ce 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/__init__.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/__init__.py @@ -28,6 +28,7 @@ from ._models_py3 import ErrorResponse from ._models_py3 import ExportTemplateRequest from ._models_py3 import GenericResource + from ._models_py3 import GenericResourceExpanded from ._models_py3 import GenericResourceFilter from ._models_py3 import HttpMessage from ._models_py3 import Identity @@ -70,6 +71,7 @@ from ._models import ErrorResponse from ._models import ExportTemplateRequest from ._models import GenericResource + from ._models import GenericResourceExpanded from ._models import GenericResourceFilter from ._models import HttpMessage from ._models import Identity @@ -95,7 +97,7 @@ from ._models import TemplateLink from ._paged_models import DeploymentExtendedPaged from ._paged_models import DeploymentOperationPaged -from ._paged_models import GenericResourcePaged +from ._paged_models import GenericResourceExpandedPaged from ._paged_models import ProviderPaged from ._paged_models import ResourceGroupPaged from ._paged_models import TagDetailsPaged @@ -123,6 +125,7 @@ 'ErrorResponse', 'ExportTemplateRequest', 'GenericResource', + 'GenericResourceExpanded', 'GenericResourceFilter', 'HttpMessage', 'Identity', @@ -148,7 +151,7 @@ 'TemplateLink', 'DeploymentExtendedPaged', 'ProviderPaged', - 'GenericResourcePaged', + 'GenericResourceExpandedPaged', 'ResourceGroupPaged', 'TagDetailsPaged', 'DeploymentOperationPaged', diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/_models.py index d0c7ea3b05fe..b15fbf263556 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/_models.py @@ -651,6 +651,78 @@ def __init__(self, **kwargs): self.identity = kwargs.get('identity', None) +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2016_02_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: Id of the resource that manages this resource. + :type managed_by: str + :param sku: The sku of the resource. + :type sku: ~azure.mgmt.resource.resources.v2016_02_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2016_02_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericResourceExpanded, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/_models_py3.py index cb01f1f6e4f3..6acccb2d6013 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/_models_py3.py @@ -651,6 +651,78 @@ def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, self.identity = identity +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource Id + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2016_02_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: Id of the resource that manages this resource. + :type managed_by: str + :param sku: The sku of the resource. + :type sku: ~azure.mgmt.resource.resources.v2016_02_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2016_02_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, kind: str=None, managed_by: str=None, sku=None, identity=None, **kwargs) -> None: + super(GenericResourceExpanded, self).__init__(location=location, tags=tags, plan=plan, properties=properties, kind=kind, managed_by=managed_by, sku=sku, identity=identity, **kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/_paged_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/_paged_models.py index 503ebfa840e7..7d038125f963 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/_paged_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/models/_paged_models.py @@ -38,19 +38,19 @@ class ProviderPaged(Paged): def __init__(self, *args, **kwargs): super(ProviderPaged, self).__init__(*args, **kwargs) -class GenericResourcePaged(Paged): +class GenericResourceExpandedPaged(Paged): """ - A paging container for iterating over a list of :class:`GenericResource ` object + A paging container for iterating over a list of :class:`GenericResourceExpanded ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GenericResource]'} + 'current_page': {'key': 'value', 'type': '[GenericResourceExpanded]'} } def __init__(self, *args, **kwargs): - super(GenericResourcePaged, self).__init__(*args, **kwargs) + super(GenericResourceExpandedPaged, self).__init__(*args, **kwargs) class ResourceGroupPaged(Paged): """ A paging container for iterating over a list of :class:`ResourceGroup ` object diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_resource_groups_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_resource_groups_operations.py index c97ac3add73b..cb0261bf625d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_resource_groups_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_resource_groups_operations.py @@ -50,7 +50,10 @@ def list_resources( :type resource_group_name: str :param filter: The filter to apply on the operation. :type filter: str - :param expand: The $expand query parameter + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: Query parameters. If null is passed returns all resource groups. @@ -60,9 +63,9 @@ def list_resources( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2016_02_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2016_02_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2016_02_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2016_02_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -119,7 +122,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_resources_operations.py index 0e77e3c96988..65173414cf16 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_resources_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_02_01/operations/_resources_operations.py @@ -135,7 +135,10 @@ def list( :param filter: The filter to apply on the operation. :type filter: str - :param expand: The $expand query parameter. + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: Query parameters. If null is passed returns all resource groups. @@ -145,9 +148,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2016_02_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2016_02_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2016_02_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2016_02_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -203,7 +206,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/__init__.py index febe5d73ee46..ef78f45062ce 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/__init__.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/__init__.py @@ -28,6 +28,7 @@ from ._models_py3 import ErrorResponse from ._models_py3 import ExportTemplateRequest from ._models_py3 import GenericResource + from ._models_py3 import GenericResourceExpanded from ._models_py3 import GenericResourceFilter from ._models_py3 import HttpMessage from ._models_py3 import Identity @@ -70,6 +71,7 @@ from ._models import ErrorResponse from ._models import ExportTemplateRequest from ._models import GenericResource + from ._models import GenericResourceExpanded from ._models import GenericResourceFilter from ._models import HttpMessage from ._models import Identity @@ -95,7 +97,7 @@ from ._models import TemplateLink from ._paged_models import DeploymentExtendedPaged from ._paged_models import DeploymentOperationPaged -from ._paged_models import GenericResourcePaged +from ._paged_models import GenericResourceExpandedPaged from ._paged_models import ProviderPaged from ._paged_models import ResourceGroupPaged from ._paged_models import TagDetailsPaged @@ -123,6 +125,7 @@ 'ErrorResponse', 'ExportTemplateRequest', 'GenericResource', + 'GenericResourceExpanded', 'GenericResourceFilter', 'HttpMessage', 'Identity', @@ -148,7 +151,7 @@ 'TemplateLink', 'DeploymentExtendedPaged', 'ProviderPaged', - 'GenericResourcePaged', + 'GenericResourceExpandedPaged', 'ResourceGroupPaged', 'TagDetailsPaged', 'DeploymentOperationPaged', diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_models.py index 8db1ce3e8cc3..846b25951e64 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_models.py @@ -708,6 +708,79 @@ def __init__(self, **kwargs): self.identity = kwargs.get('identity', None) +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2016_09_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2016_09_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2016_09_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericResourceExpanded, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_models_py3.py index 44d86a08f7d4..d1ce868e68bf 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_models_py3.py @@ -708,6 +708,79 @@ def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, self.identity = identity +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2016_09_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2016_09_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2016_09_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, kind: str=None, managed_by: str=None, sku=None, identity=None, **kwargs) -> None: + super(GenericResourceExpanded, self).__init__(location=location, tags=tags, plan=plan, properties=properties, kind=kind, managed_by=managed_by, sku=sku, identity=identity, **kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_paged_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_paged_models.py index cafbf738c93f..d42ad6c10e64 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_paged_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/_paged_models.py @@ -38,19 +38,19 @@ class ProviderPaged(Paged): def __init__(self, *args, **kwargs): super(ProviderPaged, self).__init__(*args, **kwargs) -class GenericResourcePaged(Paged): +class GenericResourceExpandedPaged(Paged): """ - A paging container for iterating over a list of :class:`GenericResource ` object + A paging container for iterating over a list of :class:`GenericResourceExpanded ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GenericResource]'} + 'current_page': {'key': 'value', 'type': '[GenericResourceExpanded]'} } def __init__(self, *args, **kwargs): - super(GenericResourcePaged, self).__init__(*args, **kwargs) + super(GenericResourceExpandedPaged, self).__init__(*args, **kwargs) class ResourceGroupPaged(Paged): """ A paging container for iterating over a list of :class:`ResourceGroup ` object diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_resource_groups_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_resource_groups_operations.py index 0585164c211f..e512b91d0bd9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_resource_groups_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_resource_groups_operations.py @@ -50,7 +50,10 @@ def list_resources( :type resource_group_name: str :param filter: The filter to apply on the operation. :type filter: str - :param expand: The $expand query parameter + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. @@ -60,9 +63,9 @@ def list_resources( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2016_09_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2016_09_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2016_09_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2016_09_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -119,7 +122,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_resources.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_resources_operations.py index fc92357bb55e..ecdde9ebe7c6 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_resources_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/_resources_operations.py @@ -141,7 +141,10 @@ def list( :param filter: The filter to apply on the operation. :type filter: str - :param expand: The $expand query parameter. + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resource groups. @@ -151,9 +154,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2016_09_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2016_09_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2016_09_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2016_09_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -209,7 +212,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/__init__.py index 281796ba048c..6d69aa4efb8f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/__init__.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/__init__.py @@ -28,6 +28,7 @@ from ._models_py3 import ErrorResponse from ._models_py3 import ExportTemplateRequest from ._models_py3 import GenericResource + from ._models_py3 import GenericResourceExpanded from ._models_py3 import GenericResourceFilter from ._models_py3 import HttpMessage from ._models_py3 import Identity @@ -71,6 +72,7 @@ from ._models import ErrorResponse from ._models import ExportTemplateRequest from ._models import GenericResource + from ._models import GenericResourceExpanded from ._models import GenericResourceFilter from ._models import HttpMessage from ._models import Identity @@ -97,7 +99,7 @@ from ._models import TemplateLink from ._paged_models import DeploymentExtendedPaged from ._paged_models import DeploymentOperationPaged -from ._paged_models import GenericResourcePaged +from ._paged_models import GenericResourceExpandedPaged from ._paged_models import ProviderPaged from ._paged_models import ResourceGroupPaged from ._paged_models import TagDetailsPaged @@ -125,6 +127,7 @@ 'ErrorResponse', 'ExportTemplateRequest', 'GenericResource', + 'GenericResourceExpanded', 'GenericResourceFilter', 'HttpMessage', 'Identity', @@ -151,7 +154,7 @@ 'TemplateLink', 'DeploymentExtendedPaged', 'ProviderPaged', - 'GenericResourcePaged', + 'GenericResourceExpandedPaged', 'ResourceGroupPaged', 'TagDetailsPaged', 'DeploymentOperationPaged', diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/_models.py index 9528aa03964a..4ebdb811118d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/_models.py @@ -708,6 +708,79 @@ def __init__(self, **kwargs): self.identity = kwargs.get('identity', None) +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2017_05_10.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2017_05_10.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2017_05_10.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericResourceExpanded, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/_models_py3.py index 776d6f11adc3..e453236fb488 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/_models_py3.py @@ -708,6 +708,79 @@ def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, self.identity = identity +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2017_05_10.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2017_05_10.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2017_05_10.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, kind: str=None, managed_by: str=None, sku=None, identity=None, **kwargs) -> None: + super(GenericResourceExpanded, self).__init__(location=location, tags=tags, plan=plan, properties=properties, kind=kind, managed_by=managed_by, sku=sku, identity=identity, **kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/_paged_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/_paged_models.py index c5db548048c3..8380256e9902 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/_paged_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/models/_paged_models.py @@ -38,19 +38,19 @@ class ProviderPaged(Paged): def __init__(self, *args, **kwargs): super(ProviderPaged, self).__init__(*args, **kwargs) -class GenericResourcePaged(Paged): +class GenericResourceExpandedPaged(Paged): """ - A paging container for iterating over a list of :class:`GenericResource ` object + A paging container for iterating over a list of :class:`GenericResourceExpanded ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GenericResource]'} + 'current_page': {'key': 'value', 'type': '[GenericResourceExpanded]'} } def __init__(self, *args, **kwargs): - super(GenericResourcePaged, self).__init__(*args, **kwargs) + super(GenericResourceExpandedPaged, self).__init__(*args, **kwargs) class ResourceGroupPaged(Paged): """ A paging container for iterating over a list of :class:`ResourceGroup ` object diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/_resources_operations.py index b8fc219ee38e..eb5c31791467 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/_resources_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2017_05_10/operations/_resources_operations.py @@ -50,7 +50,10 @@ def list_by_resource_group( :type resource_group_name: str :param filter: The filter to apply on the operation. :type filter: str - :param expand: The $expand query parameter + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. @@ -60,9 +63,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2017_05_10.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2017_05_10.models.GenericResource] + ~azure.mgmt.resource.resources.v2017_05_10.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2017_05_10.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -119,7 +122,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} @@ -321,7 +324,10 @@ def list( :param filter: The filter to apply on the operation. :type filter: str - :param expand: The $expand query parameter. + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resource groups. @@ -331,9 +337,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2017_05_10.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2017_05_10.models.GenericResource] + ~azure.mgmt.resource.resources.v2017_05_10.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2017_05_10.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -389,7 +395,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py index 839715d022c0..ab9bcea6f39e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/__init__.py @@ -28,6 +28,7 @@ from ._models_py3 import ErrorResponse from ._models_py3 import ExportTemplateRequest from ._models_py3 import GenericResource + from ._models_py3 import GenericResourceExpanded from ._models_py3 import GenericResourceFilter from ._models_py3 import HttpMessage from ._models_py3 import Identity @@ -73,6 +74,7 @@ from ._models import ErrorResponse from ._models import ExportTemplateRequest from ._models import GenericResource + from ._models import GenericResourceExpanded from ._models import GenericResourceFilter from ._models import HttpMessage from ._models import Identity @@ -101,7 +103,7 @@ from ._models import TemplateLink from ._paged_models import DeploymentExtendedPaged from ._paged_models import DeploymentOperationPaged -from ._paged_models import GenericResourcePaged +from ._paged_models import GenericResourceExpandedPaged from ._paged_models import ProviderPaged from ._paged_models import ResourceGroupPaged from ._paged_models import TagDetailsPaged @@ -130,6 +132,7 @@ 'ErrorResponse', 'ExportTemplateRequest', 'GenericResource', + 'GenericResourceExpanded', 'GenericResourceFilter', 'HttpMessage', 'Identity', @@ -158,7 +161,7 @@ 'TemplateLink', 'DeploymentExtendedPaged', 'ProviderPaged', - 'GenericResourcePaged', + 'GenericResourceExpandedPaged', 'ResourceGroupPaged', 'TagDetailsPaged', 'DeploymentOperationPaged', diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/_models.py index 5b4c358857e2..21cbfd150f2c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/_models.py @@ -718,6 +718,79 @@ def __init__(self, **kwargs): self.identity = kwargs.get('identity', None) +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2018_02_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2018_02_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2018_02_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericResourceExpanded, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/_models_py3.py index 1b48ca8e5bcd..1664994dabc5 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/_models_py3.py @@ -718,6 +718,79 @@ def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, self.identity = identity +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2018_02_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2018_02_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2018_02_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, kind: str=None, managed_by: str=None, sku=None, identity=None, **kwargs) -> None: + super(GenericResourceExpanded, self).__init__(location=location, tags=tags, plan=plan, properties=properties, kind=kind, managed_by=managed_by, sku=sku, identity=identity, **kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/_paged_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/_paged_models.py index 48e171f17ffe..63baad6afdd9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/_paged_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/models/_paged_models.py @@ -38,19 +38,19 @@ class ProviderPaged(Paged): def __init__(self, *args, **kwargs): super(ProviderPaged, self).__init__(*args, **kwargs) -class GenericResourcePaged(Paged): +class GenericResourceExpandedPaged(Paged): """ - A paging container for iterating over a list of :class:`GenericResource ` object + A paging container for iterating over a list of :class:`GenericResourceExpanded ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GenericResource]'} + 'current_page': {'key': 'value', 'type': '[GenericResourceExpanded]'} } def __init__(self, *args, **kwargs): - super(GenericResourcePaged, self).__init__(*args, **kwargs) + super(GenericResourceExpandedPaged, self).__init__(*args, **kwargs) class ResourceGroupPaged(Paged): """ A paging container for iterating over a list of :class:`ResourceGroup ` object diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/_resources_operations.py index 2174bf4fde31..4a473e543e23 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/_resources_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_02_01/operations/_resources_operations.py @@ -50,7 +50,10 @@ def list_by_resource_group( :type resource_group_name: str :param filter: The filter to apply on the operation. :type filter: str - :param expand: The $expand query parameter + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. @@ -60,9 +63,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -119,7 +122,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} @@ -331,9 +334,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2018_02_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2018_02_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -389,7 +392,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/__init__.py index 5c2c9e84d26d..a4e62c5bf265 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/__init__.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/__init__.py @@ -28,6 +28,7 @@ from ._models_py3 import ErrorResponse from ._models_py3 import ExportTemplateRequest from ._models_py3 import GenericResource + from ._models_py3 import GenericResourceExpanded from ._models_py3 import GenericResourceFilter from ._models_py3 import HttpMessage from ._models_py3 import Identity @@ -76,6 +77,7 @@ from ._models import ErrorResponse from ._models import ExportTemplateRequest from ._models import GenericResource + from ._models import GenericResourceExpanded from ._models import GenericResourceFilter from ._models import HttpMessage from ._models import Identity @@ -107,7 +109,7 @@ from ._models import TemplateLink from ._paged_models import DeploymentExtendedPaged from ._paged_models import DeploymentOperationPaged -from ._paged_models import GenericResourcePaged +from ._paged_models import GenericResourceExpandedPaged from ._paged_models import OperationPaged from ._paged_models import ProviderPaged from ._paged_models import ResourceGroupPaged @@ -137,6 +139,7 @@ 'ErrorResponse', 'ExportTemplateRequest', 'GenericResource', + 'GenericResourceExpanded', 'GenericResourceFilter', 'HttpMessage', 'Identity', @@ -169,7 +172,7 @@ 'OperationPaged', 'DeploymentExtendedPaged', 'ProviderPaged', - 'GenericResourcePaged', + 'GenericResourceExpandedPaged', 'ResourceGroupPaged', 'TagDetailsPaged', 'DeploymentOperationPaged', diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/_models.py index 80b0b3fa6e92..c565a95fcc69 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/_models.py @@ -729,6 +729,79 @@ def __init__(self, **kwargs): self.identity = kwargs.get('identity', None) +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2018_05_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2018_05_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2018_05_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericResourceExpanded, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/_models_py3.py index 0916a1b641ea..737862b6abbd 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/_models_py3.py @@ -729,6 +729,79 @@ def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, self.identity = identity +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2018_05_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2018_05_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2018_05_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, kind: str=None, managed_by: str=None, sku=None, identity=None, **kwargs) -> None: + super(GenericResourceExpanded, self).__init__(location=location, tags=tags, plan=plan, properties=properties, kind=kind, managed_by=managed_by, sku=sku, identity=identity, **kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/_paged_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/_paged_models.py index 03bd023d6998..4acf24aa6cab 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/_paged_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/_paged_models.py @@ -51,19 +51,19 @@ class ProviderPaged(Paged): def __init__(self, *args, **kwargs): super(ProviderPaged, self).__init__(*args, **kwargs) -class GenericResourcePaged(Paged): +class GenericResourceExpandedPaged(Paged): """ - A paging container for iterating over a list of :class:`GenericResource ` object + A paging container for iterating over a list of :class:`GenericResourceExpanded ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GenericResource]'} + 'current_page': {'key': 'value', 'type': '[GenericResourceExpanded]'} } def __init__(self, *args, **kwargs): - super(GenericResourcePaged, self).__init__(*args, **kwargs) + super(GenericResourceExpandedPaged, self).__init__(*args, **kwargs) class ResourceGroupPaged(Paged): """ A paging container for iterating over a list of :class:`ResourceGroup ` object diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_resources_operations.py index f848d737bd5c..edd55c270374 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_resources_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/operations/_resources_operations.py @@ -67,9 +67,10 @@ def list_by_resource_group( plan and plan/publisher and plan/name, identity and identity/principalId. :type filter: str - :param expand: The $expand query parameter. You can expand createdTime - and changedTime. For example, to expand both properties, use - $expand=changedTime,createdTime + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. @@ -79,9 +80,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2018_05_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2018_05_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2018_05_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2018_05_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -138,7 +139,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} @@ -357,9 +358,10 @@ def list( plan and plan/publisher and plan/name, identity and identity/principalId. :type filter: str - :param expand: The $expand query parameter. You can expand createdTime - and changedTime. For example, to expand both properties, use - $expand=changedTime,createdTime + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resource groups. @@ -369,9 +371,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2018_05_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2018_05_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2018_05_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2018_05_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -427,7 +429,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/__init__.py index 5c2c9e84d26d..a4e62c5bf265 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/__init__.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/__init__.py @@ -28,6 +28,7 @@ from ._models_py3 import ErrorResponse from ._models_py3 import ExportTemplateRequest from ._models_py3 import GenericResource + from ._models_py3 import GenericResourceExpanded from ._models_py3 import GenericResourceFilter from ._models_py3 import HttpMessage from ._models_py3 import Identity @@ -76,6 +77,7 @@ from ._models import ErrorResponse from ._models import ExportTemplateRequest from ._models import GenericResource + from ._models import GenericResourceExpanded from ._models import GenericResourceFilter from ._models import HttpMessage from ._models import Identity @@ -107,7 +109,7 @@ from ._models import TemplateLink from ._paged_models import DeploymentExtendedPaged from ._paged_models import DeploymentOperationPaged -from ._paged_models import GenericResourcePaged +from ._paged_models import GenericResourceExpandedPaged from ._paged_models import OperationPaged from ._paged_models import ProviderPaged from ._paged_models import ResourceGroupPaged @@ -137,6 +139,7 @@ 'ErrorResponse', 'ExportTemplateRequest', 'GenericResource', + 'GenericResourceExpanded', 'GenericResourceFilter', 'HttpMessage', 'Identity', @@ -169,7 +172,7 @@ 'OperationPaged', 'DeploymentExtendedPaged', 'ProviderPaged', - 'GenericResourcePaged', + 'GenericResourceExpandedPaged', 'ResourceGroupPaged', 'TagDetailsPaged', 'DeploymentOperationPaged', diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/_models.py index f513b472247f..95c097dda8dd 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/_models.py @@ -739,6 +739,79 @@ def __init__(self, **kwargs): self.identity = kwargs.get('identity', None) +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2019_05_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2019_05_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2019_05_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericResourceExpanded, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/_models_py3.py index 0bf082618dd9..242c8e9a858d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/_models_py3.py @@ -739,6 +739,79 @@ def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, self.identity = identity +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2019_05_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2019_05_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2019_05_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, kind: str=None, managed_by: str=None, sku=None, identity=None, **kwargs) -> None: + super(GenericResourceExpanded, self).__init__(location=location, tags=tags, plan=plan, properties=properties, kind=kind, managed_by=managed_by, sku=sku, identity=identity, **kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/_paged_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/_paged_models.py index d62c78b76495..1a6e6a84b46c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/_paged_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/models/_paged_models.py @@ -51,19 +51,19 @@ class ProviderPaged(Paged): def __init__(self, *args, **kwargs): super(ProviderPaged, self).__init__(*args, **kwargs) -class GenericResourcePaged(Paged): +class GenericResourceExpandedPaged(Paged): """ - A paging container for iterating over a list of :class:`GenericResource ` object + A paging container for iterating over a list of :class:`GenericResourceExpanded ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GenericResource]'} + 'current_page': {'key': 'value', 'type': '[GenericResourceExpanded]'} } def __init__(self, *args, **kwargs): - super(GenericResourcePaged, self).__init__(*args, **kwargs) + super(GenericResourceExpandedPaged, self).__init__(*args, **kwargs) class ResourceGroupPaged(Paged): """ A paging container for iterating over a list of :class:`ResourceGroup ` object diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_resources_operations.py index 2e72aa97762b..21b94a1a4edf 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_resources_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_01/operations/_resources_operations.py @@ -67,9 +67,10 @@ def list_by_resource_group( plan and plan/publisher and plan/name, identity and identity/principalId. :type filter: str - :param expand: The $expand query parameter. You can expand createdTime - and changedTime. For example, to expand both properties, use - $expand=changedTime,createdTime + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. @@ -79,9 +80,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2019_05_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2019_05_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2019_05_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2019_05_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -138,7 +139,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} @@ -357,9 +358,10 @@ def list( plan and plan/publisher and plan/name, identity and identity/principalId. :type filter: str - :param expand: The $expand query parameter. You can expand createdTime - and changedTime. For example, to expand both properties, use - $expand=changedTime,createdTime + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resource groups. @@ -369,9 +371,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2019_05_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2019_05_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2019_05_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2019_05_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -427,7 +429,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/__init__.py index 5c2c9e84d26d..a4e62c5bf265 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/__init__.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/__init__.py @@ -28,6 +28,7 @@ from ._models_py3 import ErrorResponse from ._models_py3 import ExportTemplateRequest from ._models_py3 import GenericResource + from ._models_py3 import GenericResourceExpanded from ._models_py3 import GenericResourceFilter from ._models_py3 import HttpMessage from ._models_py3 import Identity @@ -76,6 +77,7 @@ from ._models import ErrorResponse from ._models import ExportTemplateRequest from ._models import GenericResource + from ._models import GenericResourceExpanded from ._models import GenericResourceFilter from ._models import HttpMessage from ._models import Identity @@ -107,7 +109,7 @@ from ._models import TemplateLink from ._paged_models import DeploymentExtendedPaged from ._paged_models import DeploymentOperationPaged -from ._paged_models import GenericResourcePaged +from ._paged_models import GenericResourceExpandedPaged from ._paged_models import OperationPaged from ._paged_models import ProviderPaged from ._paged_models import ResourceGroupPaged @@ -137,6 +139,7 @@ 'ErrorResponse', 'ExportTemplateRequest', 'GenericResource', + 'GenericResourceExpanded', 'GenericResourceFilter', 'HttpMessage', 'Identity', @@ -169,7 +172,7 @@ 'OperationPaged', 'DeploymentExtendedPaged', 'ProviderPaged', - 'GenericResourcePaged', + 'GenericResourceExpandedPaged', 'ResourceGroupPaged', 'TagDetailsPaged', 'DeploymentOperationPaged', diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/_models.py index 6cd2ab2236a4..e45064cd70a9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/_models.py @@ -739,6 +739,79 @@ def __init__(self, **kwargs): self.identity = kwargs.get('identity', None) +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2019_05_10.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2019_05_10.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2019_05_10.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericResourceExpanded, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/_models_py3.py index 175e45e5c745..8152c7a3c4dc 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/_models_py3.py @@ -739,6 +739,79 @@ def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, self.identity = identity +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2019_05_10.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2019_05_10.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2019_05_10.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, kind: str=None, managed_by: str=None, sku=None, identity=None, **kwargs) -> None: + super(GenericResourceExpanded, self).__init__(location=location, tags=tags, plan=plan, properties=properties, kind=kind, managed_by=managed_by, sku=sku, identity=identity, **kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/_paged_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/_paged_models.py index 4ae700ef7baa..1e2a6f61155f 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/_paged_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/models/_paged_models.py @@ -51,19 +51,19 @@ class ProviderPaged(Paged): def __init__(self, *args, **kwargs): super(ProviderPaged, self).__init__(*args, **kwargs) -class GenericResourcePaged(Paged): +class GenericResourceExpandedPaged(Paged): """ - A paging container for iterating over a list of :class:`GenericResource ` object + A paging container for iterating over a list of :class:`GenericResourceExpanded ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GenericResource]'} + 'current_page': {'key': 'value', 'type': '[GenericResourceExpanded]'} } def __init__(self, *args, **kwargs): - super(GenericResourcePaged, self).__init__(*args, **kwargs) + super(GenericResourceExpandedPaged, self).__init__(*args, **kwargs) class ResourceGroupPaged(Paged): """ A paging container for iterating over a list of :class:`ResourceGroup ` object diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_resources_operations.py index d5c8f0247077..ac86f11d499c 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_resources_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_05_10/operations/_resources_operations.py @@ -67,9 +67,10 @@ def list_by_resource_group( plan and plan/publisher and plan/name, identity and identity/principalId. :type filter: str - :param expand: The $expand query parameter. You can expand createdTime - and changedTime. For example, to expand both properties, use - $expand=changedTime,createdTime + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. @@ -79,9 +80,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2019_05_10.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2019_05_10.models.GenericResource] + ~azure.mgmt.resource.resources.v2019_05_10.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2019_05_10.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -138,7 +139,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} @@ -357,9 +358,10 @@ def list( plan and plan/publisher and plan/name, identity and identity/principalId. :type filter: str - :param expand: The $expand query parameter. You can expand createdTime - and changedTime. For example, to expand both properties, use - $expand=changedTime,createdTime + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resource groups. @@ -369,9 +371,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2019_05_10.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2019_05_10.models.GenericResource] + ~azure.mgmt.resource.resources.v2019_05_10.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2019_05_10.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -427,7 +429,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/__init__.py index 7f71f20a961b..2f02c0c85ca9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/__init__.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/__init__.py @@ -31,6 +31,7 @@ from ._models_py3 import ErrorResponse from ._models_py3 import ExportTemplateRequest from ._models_py3 import GenericResource + from ._models_py3 import GenericResourceExpanded from ._models_py3 import GenericResourceFilter from ._models_py3 import HttpMessage from ._models_py3 import Identity @@ -84,6 +85,7 @@ from ._models import ErrorResponse from ._models import ExportTemplateRequest from ._models import GenericResource + from ._models import GenericResourceExpanded from ._models import GenericResourceFilter from ._models import HttpMessage from ._models import Identity @@ -117,7 +119,7 @@ from ._models import WhatIfPropertyChange from ._paged_models import DeploymentExtendedPaged from ._paged_models import DeploymentOperationPaged -from ._paged_models import GenericResourcePaged +from ._paged_models import GenericResourceExpandedPaged from ._paged_models import OperationPaged from ._paged_models import ProviderPaged from ._paged_models import ResourceGroupPaged @@ -153,6 +155,7 @@ 'ErrorResponse', 'ExportTemplateRequest', 'GenericResource', + 'GenericResourceExpanded', 'GenericResourceFilter', 'HttpMessage', 'Identity', @@ -187,7 +190,7 @@ 'OperationPaged', 'DeploymentExtendedPaged', 'ProviderPaged', - 'GenericResourcePaged', + 'GenericResourceExpandedPaged', 'ResourceGroupPaged', 'TagDetailsPaged', 'DeploymentOperationPaged', diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models.py index 677e68e9faa5..a90e7c58d108 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models.py @@ -851,6 +851,79 @@ def __init__(self, **kwargs): self.identity = kwargs.get('identity', None) +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2019_07_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2019_07_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2019_07_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericResourceExpanded, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models_py3.py index 0b166a7fb6bb..496b687ba762 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_models_py3.py @@ -851,6 +851,79 @@ def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, self.identity = identity +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2019_07_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2019_07_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2019_07_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, kind: str=None, managed_by: str=None, sku=None, identity=None, **kwargs) -> None: + super(GenericResourceExpanded, self).__init__(location=location, tags=tags, plan=plan, properties=properties, kind=kind, managed_by=managed_by, sku=sku, identity=identity, **kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_paged_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_paged_models.py index 98abbb83e22a..dc02350ae2bb 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_paged_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/models/_paged_models.py @@ -51,19 +51,19 @@ class ProviderPaged(Paged): def __init__(self, *args, **kwargs): super(ProviderPaged, self).__init__(*args, **kwargs) -class GenericResourcePaged(Paged): +class GenericResourceExpandedPaged(Paged): """ - A paging container for iterating over a list of :class:`GenericResource ` object + A paging container for iterating over a list of :class:`GenericResourceExpanded ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GenericResource]'} + 'current_page': {'key': 'value', 'type': '[GenericResourceExpanded]'} } def __init__(self, *args, **kwargs): - super(GenericResourcePaged, self).__init__(*args, **kwargs) + super(GenericResourceExpandedPaged, self).__init__(*args, **kwargs) class ResourceGroupPaged(Paged): """ A paging container for iterating over a list of :class:`ResourceGroup ` object diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_resources_operations.py index 693da52a5f35..855b603dc10a 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_resources_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/operations/_resources_operations.py @@ -67,9 +67,10 @@ def list_by_resource_group( plan and plan/publisher and plan/name, identity and identity/principalId. :type filter: str - :param expand: The $expand query parameter. You can expand createdTime - and changedTime. For example, to expand both properties, use - $expand=changedTime,createdTime + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. @@ -79,9 +80,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2019_07_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2019_07_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2019_07_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2019_07_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -138,7 +139,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} @@ -357,9 +358,10 @@ def list( plan and plan/publisher and plan/name, identity and identity/principalId. :type filter: str - :param expand: The $expand query parameter. You can expand createdTime - and changedTime. For example, to expand both properties, use - $expand=changedTime,createdTime + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resource groups. @@ -369,9 +371,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2019_07_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2019_07_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2019_07_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2019_07_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -427,7 +429,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/__init__.py index bee7b2ee4105..1b7c3ec2fdd3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/__init__.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/__init__.py @@ -31,6 +31,7 @@ from ._models_py3 import ErrorResponse from ._models_py3 import ExportTemplateRequest from ._models_py3 import GenericResource + from ._models_py3 import GenericResourceExpanded from ._models_py3 import GenericResourceFilter from ._models_py3 import HttpMessage from ._models_py3 import Identity @@ -85,6 +86,7 @@ from ._models import ErrorResponse from ._models import ExportTemplateRequest from ._models import GenericResource + from ._models import GenericResourceExpanded from ._models import GenericResourceFilter from ._models import HttpMessage from ._models import Identity @@ -119,7 +121,7 @@ from ._models import WhatIfPropertyChange from ._paged_models import DeploymentExtendedPaged from ._paged_models import DeploymentOperationPaged -from ._paged_models import GenericResourcePaged +from ._paged_models import GenericResourceExpandedPaged from ._paged_models import OperationPaged from ._paged_models import ProviderPaged from ._paged_models import ResourceGroupPaged @@ -155,6 +157,7 @@ 'ErrorResponse', 'ExportTemplateRequest', 'GenericResource', + 'GenericResourceExpanded', 'GenericResourceFilter', 'HttpMessage', 'Identity', @@ -190,7 +193,7 @@ 'OperationPaged', 'DeploymentExtendedPaged', 'ProviderPaged', - 'GenericResourcePaged', + 'GenericResourceExpandedPaged', 'ResourceGroupPaged', 'TagDetailsPaged', 'DeploymentOperationPaged', diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_models.py index 626f842725b3..795db659f2b6 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_models.py @@ -851,6 +851,79 @@ def __init__(self, **kwargs): self.identity = kwargs.get('identity', None) +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2019_08_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2019_08_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2019_08_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericResourceExpanded, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_models_py3.py index aaac8bcaffd6..3c9993b1d39b 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_models_py3.py @@ -851,6 +851,79 @@ def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, self.identity = identity +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2019_08_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2019_08_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2019_08_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, kind: str=None, managed_by: str=None, sku=None, identity=None, **kwargs) -> None: + super(GenericResourceExpanded, self).__init__(location=location, tags=tags, plan=plan, properties=properties, kind=kind, managed_by=managed_by, sku=sku, identity=identity, **kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_paged_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_paged_models.py index 97ee608ecbc1..b254e60921b9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_paged_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/models/_paged_models.py @@ -51,19 +51,19 @@ class ProviderPaged(Paged): def __init__(self, *args, **kwargs): super(ProviderPaged, self).__init__(*args, **kwargs) -class GenericResourcePaged(Paged): +class GenericResourceExpandedPaged(Paged): """ - A paging container for iterating over a list of :class:`GenericResource ` object + A paging container for iterating over a list of :class:`GenericResourceExpanded ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GenericResource]'} + 'current_page': {'key': 'value', 'type': '[GenericResourceExpanded]'} } def __init__(self, *args, **kwargs): - super(GenericResourcePaged, self).__init__(*args, **kwargs) + super(GenericResourceExpandedPaged, self).__init__(*args, **kwargs) class ResourceGroupPaged(Paged): """ A paging container for iterating over a list of :class:`ResourceGroup ` object diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_resources_operations.py index 3afe6c9f44bd..9d601c73063e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_resources_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_08_01/operations/_resources_operations.py @@ -68,9 +68,10 @@ def list_by_resource_group( resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. :type filter: str - :param expand: The $expand query parameter. You can expand createdTime - and changedTime. For example, to expand both properties, use - $expand=changedTime,createdTime + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. @@ -80,9 +81,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2019_08_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2019_08_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2019_08_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2019_08_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -139,7 +140,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} @@ -359,9 +360,10 @@ def list( resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. :type filter: str - :param expand: The $expand query parameter. You can expand createdTime - and changedTime. For example, to expand both properties, use - $expand=changedTime,createdTime + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resource groups. @@ -371,9 +373,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2019_08_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2019_08_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2019_08_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2019_08_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -429,7 +431,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/__init__.py index 7c6c4fdd0879..fdb12bcf9dc4 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/__init__.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/__init__.py @@ -31,6 +31,7 @@ from ._models_py3 import ErrorResponse from ._models_py3 import ExportTemplateRequest from ._models_py3 import GenericResource + from ._models_py3 import GenericResourceExpanded from ._models_py3 import GenericResourceFilter from ._models_py3 import HttpMessage from ._models_py3 import Identity @@ -50,14 +51,15 @@ from ._models_py3 import ResourceGroupPatchable from ._models_py3 import ResourceGroupProperties from ._models_py3 import ResourceProviderOperationDisplayProperties + from ._models_py3 import ResourceReference from ._models_py3 import ResourcesMoveInfo from ._models_py3 import ScopedDeployment from ._models_py3 import Sku from ._models_py3 import SubResource from ._models_py3 import TagCount from ._models_py3 import TagDetails - from ._models_py3 import TagPatchRequest from ._models_py3 import Tags + from ._models_py3 import TagsPatchResource from ._models_py3 import TagsResource from ._models_py3 import TagValue from ._models_py3 import TargetResource @@ -88,6 +90,7 @@ from ._models import ErrorResponse from ._models import ExportTemplateRequest from ._models import GenericResource + from ._models import GenericResourceExpanded from ._models import GenericResourceFilter from ._models import HttpMessage from ._models import Identity @@ -107,14 +110,15 @@ from ._models import ResourceGroupPatchable from ._models import ResourceGroupProperties from ._models import ResourceProviderOperationDisplayProperties + from ._models import ResourceReference from ._models import ResourcesMoveInfo from ._models import ScopedDeployment from ._models import Sku from ._models import SubResource from ._models import TagCount from ._models import TagDetails - from ._models import TagPatchRequest from ._models import Tags + from ._models import TagsPatchResource from ._models import TagsResource from ._models import TagValue from ._models import TargetResource @@ -125,7 +129,7 @@ from ._models import WhatIfPropertyChange from ._paged_models import DeploymentExtendedPaged from ._paged_models import DeploymentOperationPaged -from ._paged_models import GenericResourcePaged +from ._paged_models import GenericResourceExpandedPaged from ._paged_models import OperationPaged from ._paged_models import ProviderPaged from ._paged_models import ResourceGroupPaged @@ -161,6 +165,7 @@ 'ErrorResponse', 'ExportTemplateRequest', 'GenericResource', + 'GenericResourceExpanded', 'GenericResourceFilter', 'HttpMessage', 'Identity', @@ -180,14 +185,15 @@ 'ResourceGroupPatchable', 'ResourceGroupProperties', 'ResourceProviderOperationDisplayProperties', + 'ResourceReference', 'ResourcesMoveInfo', 'ScopedDeployment', 'Sku', 'SubResource', 'TagCount', 'TagDetails', - 'TagPatchRequest', 'Tags', + 'TagsPatchResource', 'TagsResource', 'TagValue', 'TargetResource', @@ -199,7 +205,7 @@ 'OperationPaged', 'DeploymentExtendedPaged', 'ProviderPaged', - 'GenericResourcePaged', + 'GenericResourceExpandedPaged', 'ResourceGroupPaged', 'TagDetailsPaged', 'DeploymentOperationPaged', diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/_models.py index 5c72eb92aa53..3dcc76c563f9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/_models.py @@ -441,39 +441,43 @@ class DeploymentPropertiesExtended(Model): :vartype timestamp: datetime :ivar duration: The duration of the template deployment. :vartype duration: str - :param outputs: Key/value pairs that represent deployment output. - :type outputs: object - :param providers: The list of resource providers needed for the - deployment. - :type providers: + :ivar outputs: Key/value pairs that represent deployment output. + :vartype outputs: object + :ivar providers: The list of resource providers needed for the deployment. + :vartype providers: list[~azure.mgmt.resource.resources.v2019_10_01.models.Provider] - :param dependencies: The list of deployment dependencies. - :type dependencies: + :ivar dependencies: The list of deployment dependencies. + :vartype dependencies: list[~azure.mgmt.resource.resources.v2019_10_01.models.Dependency] - :param template: The template content. Use only one of Template or - TemplateLink. - :type template: object - :param template_link: The URI referencing the template. Use only one of - Template or TemplateLink. - :type template_link: + :ivar template_link: The URI referencing the template. + :vartype template_link: ~azure.mgmt.resource.resources.v2019_10_01.models.TemplateLink - :param parameters: Deployment parameters. Use only one of Parameters or - ParametersLink. - :type parameters: object - :param parameters_link: The URI referencing the parameters. Use only one - of Parameters or ParametersLink. - :type parameters_link: + :ivar parameters: Deployment parameters. + :vartype parameters: object + :ivar parameters_link: The URI referencing the parameters. + :vartype parameters_link: ~azure.mgmt.resource.resources.v2019_10_01.models.ParametersLink - :param mode: The deployment mode. Possible values are Incremental and + :ivar mode: The deployment mode. Possible values are Incremental and Complete. Possible values include: 'Incremental', 'Complete' - :type mode: str or + :vartype mode: str or ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentMode - :param debug_setting: The debug setting of the deployment. - :type debug_setting: + :ivar debug_setting: The debug setting of the deployment. + :vartype debug_setting: ~azure.mgmt.resource.resources.v2019_10_01.models.DebugSetting - :param on_error_deployment: The deployment on error behavior. - :type on_error_deployment: + :ivar on_error_deployment: The deployment on error behavior. + :vartype on_error_deployment: ~azure.mgmt.resource.resources.v2019_10_01.models.OnErrorDeploymentExtended + :ivar template_hash: The hash produced for the template. + :vartype template_hash: str + :ivar output_resources: Array of provisioned resources. + :vartype output_resources: + list[~azure.mgmt.resource.resources.v2019_10_01.models.ResourceReference] + :ivar validated_resources: Array of validated resources. + :vartype validated_resources: + list[~azure.mgmt.resource.resources.v2019_10_01.models.ResourceReference] + :ivar error: The deployment error. + :vartype error: + ~azure.mgmt.resource.resources.v2019_10_01.models.ErrorResponse """ _validation = { @@ -481,6 +485,19 @@ class DeploymentPropertiesExtended(Model): 'correlation_id': {'readonly': True}, 'timestamp': {'readonly': True}, 'duration': {'readonly': True}, + 'outputs': {'readonly': True}, + 'providers': {'readonly': True}, + 'dependencies': {'readonly': True}, + 'template_link': {'readonly': True}, + 'parameters': {'readonly': True}, + 'parameters_link': {'readonly': True}, + 'mode': {'readonly': True}, + 'debug_setting': {'readonly': True}, + 'on_error_deployment': {'readonly': True}, + 'template_hash': {'readonly': True}, + 'output_resources': {'readonly': True}, + 'validated_resources': {'readonly': True}, + 'error': {'readonly': True}, } _attribute_map = { @@ -491,13 +508,16 @@ class DeploymentPropertiesExtended(Model): 'outputs': {'key': 'outputs', 'type': 'object'}, 'providers': {'key': 'providers', 'type': '[Provider]'}, 'dependencies': {'key': 'dependencies', 'type': '[Dependency]'}, - 'template': {'key': 'template', 'type': 'object'}, 'template_link': {'key': 'templateLink', 'type': 'TemplateLink'}, 'parameters': {'key': 'parameters', 'type': 'object'}, 'parameters_link': {'key': 'parametersLink', 'type': 'ParametersLink'}, 'mode': {'key': 'mode', 'type': 'DeploymentMode'}, 'debug_setting': {'key': 'debugSetting', 'type': 'DebugSetting'}, 'on_error_deployment': {'key': 'onErrorDeployment', 'type': 'OnErrorDeploymentExtended'}, + 'template_hash': {'key': 'templateHash', 'type': 'str'}, + 'output_resources': {'key': 'outputResources', 'type': '[ResourceReference]'}, + 'validated_resources': {'key': 'validatedResources', 'type': '[ResourceReference]'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, } def __init__(self, **kwargs): @@ -506,29 +526,39 @@ def __init__(self, **kwargs): self.correlation_id = None self.timestamp = None self.duration = None - self.outputs = kwargs.get('outputs', None) - self.providers = kwargs.get('providers', None) - self.dependencies = kwargs.get('dependencies', None) - self.template = kwargs.get('template', None) - self.template_link = kwargs.get('template_link', None) - self.parameters = kwargs.get('parameters', None) - self.parameters_link = kwargs.get('parameters_link', None) - self.mode = kwargs.get('mode', None) - self.debug_setting = kwargs.get('debug_setting', None) - self.on_error_deployment = kwargs.get('on_error_deployment', None) + self.outputs = None + self.providers = None + self.dependencies = None + self.template_link = None + self.parameters = None + self.parameters_link = None + self.mode = None + self.debug_setting = None + self.on_error_deployment = None + self.template_hash = None + self.output_resources = None + self.validated_resources = None + self.error = None class DeploymentValidateResult(Model): """Information from validate template deployment response. - :param error: The deployment validation error. - :type error: + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: The deployment validation error. + :vartype error: ~azure.mgmt.resource.resources.v2019_10_01.models.ErrorResponse :param properties: The template deployment properties. :type properties: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentPropertiesExtended """ + _validation = { + 'error': {'readonly': True}, + } + _attribute_map = { 'error': {'key': 'error', 'type': 'ErrorResponse'}, 'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'}, @@ -536,7 +566,7 @@ class DeploymentValidateResult(Model): def __init__(self, **kwargs): super(DeploymentValidateResult, self).__init__(**kwargs) - self.error = kwargs.get('error', None) + self.error = None self.properties = kwargs.get('properties', None) @@ -851,6 +881,79 @@ def __init__(self, **kwargs): self.identity = kwargs.get('identity', None) +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2019_10_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2019_10_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2019_10_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(GenericResourceExpanded, self).__init__(**kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. @@ -1393,6 +1496,29 @@ def __init__(self, **kwargs): self.description = kwargs.get('description', None) +class ResourceReference(Model): + """The resource Id model. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified resource Id. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ResourceReference, self).__init__(**kwargs) + self.id = None + + class ResourcesMoveInfo(Model): """Parameters of move resources. @@ -1519,7 +1645,7 @@ class TagDetails(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The tag ID. + :ivar id: The tag name ID. :vartype id: str :param tag_name: The tag name. :type tag_name: str @@ -1551,63 +1677,59 @@ def __init__(self, **kwargs): self.values = kwargs.get('values', None) -class TagPatchRequest(Model): - """Tag Request for Patch operation. +class Tags(Model): + """A dictionary of name and value pairs. - :param operation: The operation type for the patch api. Possible values - include: 'Replace', 'Merge', 'Delete' - :type operation: str or - ~azure.mgmt.resource.resources.v2019_10_01.models.enum - :param properties: tags object passing in the request. - :type properties: ~azure.mgmt.resource.resources.v2019_10_01.models.Tags + :param tags: + :type tags: dict[str, str] """ _attribute_map = { - 'operation': {'key': 'operation', 'type': 'str'}, - 'properties': {'key': 'properties', 'type': 'Tags'}, + 'tags': {'key': 'tags', 'type': '{str}'}, } def __init__(self, **kwargs): - super(TagPatchRequest, self).__init__(**kwargs) - self.operation = kwargs.get('operation', None) - self.properties = kwargs.get('properties', None) + super(Tags, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) -class Tags(Model): - """key and value pairs for tags. +class TagsPatchResource(Model): + """Wrapper resource for tags patch API request only. - :param tags: - :type tags: dict[str, str] + :param operation: The operation type for the patch API. Possible values + include: 'Replace', 'Merge', 'Delete' + :type operation: str or + ~azure.mgmt.resource.resources.v2019_10_01.models.enum + :param properties: The set of tags. + :type properties: ~azure.mgmt.resource.resources.v2019_10_01.models.Tags """ _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'Tags'}, } def __init__(self, **kwargs): - super(Tags, self).__init__(**kwargs) - self.tags = kwargs.get('tags', None) + super(TagsPatchResource, self).__init__(**kwargs) + self.operation = kwargs.get('operation', None) + self.properties = kwargs.get('properties', None) -class TagsResource(Resource): - """Tags for the resource. +class TagsResource(Model): + """Wrapper resource for tags API requests and responses. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource ID + :ivar id: The ID of the tags wrapper resource. :vartype id: str - :ivar name: Resource name + :ivar name: The name of the tags wrapper resource. :vartype name: str - :ivar type: Resource type + :ivar type: The type of the tags wrapper resource. :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param properties: Required. tags property. + :param properties: Required. The set of tags. :type properties: ~azure.mgmt.resource.resources.v2019_10_01.models.Tags """ @@ -1622,13 +1744,14 @@ class TagsResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'properties': {'key': 'properties', 'type': 'Tags'}, } def __init__(self, **kwargs): super(TagsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None self.properties = kwargs.get('properties', None) @@ -1638,7 +1761,7 @@ class TagValue(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The tag ID. + :ivar id: The tag value ID. :vartype id: str :param tag_value: The tag value. :type tag_value: str diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/_models_py3.py index fe13bdb1b954..6eca285dc566 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/_models_py3.py @@ -441,39 +441,43 @@ class DeploymentPropertiesExtended(Model): :vartype timestamp: datetime :ivar duration: The duration of the template deployment. :vartype duration: str - :param outputs: Key/value pairs that represent deployment output. - :type outputs: object - :param providers: The list of resource providers needed for the - deployment. - :type providers: + :ivar outputs: Key/value pairs that represent deployment output. + :vartype outputs: object + :ivar providers: The list of resource providers needed for the deployment. + :vartype providers: list[~azure.mgmt.resource.resources.v2019_10_01.models.Provider] - :param dependencies: The list of deployment dependencies. - :type dependencies: + :ivar dependencies: The list of deployment dependencies. + :vartype dependencies: list[~azure.mgmt.resource.resources.v2019_10_01.models.Dependency] - :param template: The template content. Use only one of Template or - TemplateLink. - :type template: object - :param template_link: The URI referencing the template. Use only one of - Template or TemplateLink. - :type template_link: + :ivar template_link: The URI referencing the template. + :vartype template_link: ~azure.mgmt.resource.resources.v2019_10_01.models.TemplateLink - :param parameters: Deployment parameters. Use only one of Parameters or - ParametersLink. - :type parameters: object - :param parameters_link: The URI referencing the parameters. Use only one - of Parameters or ParametersLink. - :type parameters_link: + :ivar parameters: Deployment parameters. + :vartype parameters: object + :ivar parameters_link: The URI referencing the parameters. + :vartype parameters_link: ~azure.mgmt.resource.resources.v2019_10_01.models.ParametersLink - :param mode: The deployment mode. Possible values are Incremental and + :ivar mode: The deployment mode. Possible values are Incremental and Complete. Possible values include: 'Incremental', 'Complete' - :type mode: str or + :vartype mode: str or ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentMode - :param debug_setting: The debug setting of the deployment. - :type debug_setting: + :ivar debug_setting: The debug setting of the deployment. + :vartype debug_setting: ~azure.mgmt.resource.resources.v2019_10_01.models.DebugSetting - :param on_error_deployment: The deployment on error behavior. - :type on_error_deployment: + :ivar on_error_deployment: The deployment on error behavior. + :vartype on_error_deployment: ~azure.mgmt.resource.resources.v2019_10_01.models.OnErrorDeploymentExtended + :ivar template_hash: The hash produced for the template. + :vartype template_hash: str + :ivar output_resources: Array of provisioned resources. + :vartype output_resources: + list[~azure.mgmt.resource.resources.v2019_10_01.models.ResourceReference] + :ivar validated_resources: Array of validated resources. + :vartype validated_resources: + list[~azure.mgmt.resource.resources.v2019_10_01.models.ResourceReference] + :ivar error: The deployment error. + :vartype error: + ~azure.mgmt.resource.resources.v2019_10_01.models.ErrorResponse """ _validation = { @@ -481,6 +485,19 @@ class DeploymentPropertiesExtended(Model): 'correlation_id': {'readonly': True}, 'timestamp': {'readonly': True}, 'duration': {'readonly': True}, + 'outputs': {'readonly': True}, + 'providers': {'readonly': True}, + 'dependencies': {'readonly': True}, + 'template_link': {'readonly': True}, + 'parameters': {'readonly': True}, + 'parameters_link': {'readonly': True}, + 'mode': {'readonly': True}, + 'debug_setting': {'readonly': True}, + 'on_error_deployment': {'readonly': True}, + 'template_hash': {'readonly': True}, + 'output_resources': {'readonly': True}, + 'validated_resources': {'readonly': True}, + 'error': {'readonly': True}, } _attribute_map = { @@ -491,52 +508,65 @@ class DeploymentPropertiesExtended(Model): 'outputs': {'key': 'outputs', 'type': 'object'}, 'providers': {'key': 'providers', 'type': '[Provider]'}, 'dependencies': {'key': 'dependencies', 'type': '[Dependency]'}, - 'template': {'key': 'template', 'type': 'object'}, 'template_link': {'key': 'templateLink', 'type': 'TemplateLink'}, 'parameters': {'key': 'parameters', 'type': 'object'}, 'parameters_link': {'key': 'parametersLink', 'type': 'ParametersLink'}, 'mode': {'key': 'mode', 'type': 'DeploymentMode'}, 'debug_setting': {'key': 'debugSetting', 'type': 'DebugSetting'}, 'on_error_deployment': {'key': 'onErrorDeployment', 'type': 'OnErrorDeploymentExtended'}, + 'template_hash': {'key': 'templateHash', 'type': 'str'}, + 'output_resources': {'key': 'outputResources', 'type': '[ResourceReference]'}, + 'validated_resources': {'key': 'validatedResources', 'type': '[ResourceReference]'}, + 'error': {'key': 'error', 'type': 'ErrorResponse'}, } - def __init__(self, *, outputs=None, providers=None, dependencies=None, template=None, template_link=None, parameters=None, parameters_link=None, mode=None, debug_setting=None, on_error_deployment=None, **kwargs) -> None: + def __init__(self, **kwargs) -> None: super(DeploymentPropertiesExtended, self).__init__(**kwargs) self.provisioning_state = None self.correlation_id = None self.timestamp = None self.duration = None - self.outputs = outputs - self.providers = providers - self.dependencies = dependencies - self.template = template - self.template_link = template_link - self.parameters = parameters - self.parameters_link = parameters_link - self.mode = mode - self.debug_setting = debug_setting - self.on_error_deployment = on_error_deployment + self.outputs = None + self.providers = None + self.dependencies = None + self.template_link = None + self.parameters = None + self.parameters_link = None + self.mode = None + self.debug_setting = None + self.on_error_deployment = None + self.template_hash = None + self.output_resources = None + self.validated_resources = None + self.error = None class DeploymentValidateResult(Model): """Information from validate template deployment response. - :param error: The deployment validation error. - :type error: + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar error: The deployment validation error. + :vartype error: ~azure.mgmt.resource.resources.v2019_10_01.models.ErrorResponse :param properties: The template deployment properties. :type properties: ~azure.mgmt.resource.resources.v2019_10_01.models.DeploymentPropertiesExtended """ + _validation = { + 'error': {'readonly': True}, + } + _attribute_map = { 'error': {'key': 'error', 'type': 'ErrorResponse'}, 'properties': {'key': 'properties', 'type': 'DeploymentPropertiesExtended'}, } - def __init__(self, *, error=None, properties=None, **kwargs) -> None: + def __init__(self, *, properties=None, **kwargs) -> None: super(DeploymentValidateResult, self).__init__(**kwargs) - self.error = error + self.error = None self.properties = properties @@ -851,6 +881,79 @@ def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, self.identity = identity +class GenericResourceExpanded(GenericResource): + """Resource information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Resource ID + :vartype id: str + :ivar name: Resource name + :vartype name: str + :ivar type: Resource type + :vartype type: str + :param location: Resource location + :type location: str + :param tags: Resource tags + :type tags: dict[str, str] + :param plan: The plan of the resource. + :type plan: ~azure.mgmt.resource.resources.v2019_10_01.models.Plan + :param properties: The resource properties. + :type properties: object + :param kind: The kind of the resource. + :type kind: str + :param managed_by: ID of the resource that manages this resource. + :type managed_by: str + :param sku: The SKU of the resource. + :type sku: ~azure.mgmt.resource.resources.v2019_10_01.models.Sku + :param identity: The identity of the resource. + :type identity: ~azure.mgmt.resource.resources.v2019_10_01.models.Identity + :ivar created_time: The created time of the resource. This is only present + if requested via the $expand query parameter. + :vartype created_time: datetime + :ivar changed_time: The changed time of the resource. This is only present + if requested via the $expand query parameter. + :vartype changed_time: datetime + :ivar provisioning_state: The provisioning state of the resource. This is + only present if requested via the $expand query parameter. + :vartype provisioning_state: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + 'kind': {'pattern': r'^[-\w\._,\(\)]+$'}, + 'created_time': {'readonly': True}, + 'changed_time': {'readonly': True}, + 'provisioning_state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'plan': {'key': 'plan', 'type': 'Plan'}, + 'properties': {'key': 'properties', 'type': 'object'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'managed_by': {'key': 'managedBy', 'type': 'str'}, + 'sku': {'key': 'sku', 'type': 'Sku'}, + 'identity': {'key': 'identity', 'type': 'Identity'}, + 'created_time': {'key': 'createdTime', 'type': 'iso-8601'}, + 'changed_time': {'key': 'changedTime', 'type': 'iso-8601'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + } + + def __init__(self, *, location: str=None, tags=None, plan=None, properties=None, kind: str=None, managed_by: str=None, sku=None, identity=None, **kwargs) -> None: + super(GenericResourceExpanded, self).__init__(location=location, tags=tags, plan=plan, properties=properties, kind=kind, managed_by=managed_by, sku=sku, identity=identity, **kwargs) + self.created_time = None + self.changed_time = None + self.provisioning_state = None + + class GenericResourceFilter(Model): """Resource filter. @@ -1393,6 +1496,29 @@ def __init__(self, *, publisher: str=None, provider: str=None, resource: str=Non self.description = description +class ResourceReference(Model): + """The resource Id model. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified resource Id. + :vartype id: str + """ + + _validation = { + 'id': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ResourceReference, self).__init__(**kwargs) + self.id = None + + class ResourcesMoveInfo(Model): """Parameters of move resources. @@ -1519,7 +1645,7 @@ class TagDetails(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The tag ID. + :ivar id: The tag name ID. :vartype id: str :param tag_name: The tag name. :type tag_name: str @@ -1551,14 +1677,30 @@ def __init__(self, *, tag_name: str=None, count=None, values=None, **kwargs) -> self.values = values -class TagPatchRequest(Model): - """Tag Request for Patch operation. +class Tags(Model): + """A dictionary of name and value pairs. + + :param tags: + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(Tags, self).__init__(**kwargs) + self.tags = tags + + +class TagsPatchResource(Model): + """Wrapper resource for tags patch API request only. - :param operation: The operation type for the patch api. Possible values + :param operation: The operation type for the patch API. Possible values include: 'Replace', 'Merge', 'Delete' :type operation: str or ~azure.mgmt.resource.resources.v2019_10_01.models.enum - :param properties: tags object passing in the request. + :param properties: The set of tags. :type properties: ~azure.mgmt.resource.resources.v2019_10_01.models.Tags """ @@ -1568,46 +1710,26 @@ class TagPatchRequest(Model): } def __init__(self, *, operation=None, properties=None, **kwargs) -> None: - super(TagPatchRequest, self).__init__(**kwargs) + super(TagsPatchResource, self).__init__(**kwargs) self.operation = operation self.properties = properties -class Tags(Model): - """key and value pairs for tags. - - :param tags: - :type tags: dict[str, str] - """ - - _attribute_map = { - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(Tags, self).__init__(**kwargs) - self.tags = tags - - -class TagsResource(Resource): - """Tags for the resource. +class TagsResource(Model): + """Wrapper resource for tags API requests and responses. Variables are only populated by the server, and will be ignored when sending a request. All required parameters must be populated in order to send to Azure. - :ivar id: Resource ID + :ivar id: The ID of the tags wrapper resource. :vartype id: str - :ivar name: Resource name + :ivar name: The name of the tags wrapper resource. :vartype name: str - :ivar type: Resource type + :ivar type: The type of the tags wrapper resource. :vartype type: str - :param location: Resource location - :type location: str - :param tags: Resource tags - :type tags: dict[str, str] - :param properties: Required. tags property. + :param properties: Required. The set of tags. :type properties: ~azure.mgmt.resource.resources.v2019_10_01.models.Tags """ @@ -1622,13 +1744,14 @@ class TagsResource(Resource): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, 'properties': {'key': 'properties', 'type': 'Tags'}, } - def __init__(self, *, properties, location: str=None, tags=None, **kwargs) -> None: - super(TagsResource, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, properties, **kwargs) -> None: + super(TagsResource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None self.properties = properties @@ -1638,7 +1761,7 @@ class TagValue(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: The tag ID. + :ivar id: The tag value ID. :vartype id: str :param tag_value: The tag value. :type tag_value: str diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/_paged_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/_paged_models.py index c5bc154746e3..8df0d703591e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/_paged_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/models/_paged_models.py @@ -51,19 +51,19 @@ class ProviderPaged(Paged): def __init__(self, *args, **kwargs): super(ProviderPaged, self).__init__(*args, **kwargs) -class GenericResourcePaged(Paged): +class GenericResourceExpandedPaged(Paged): """ - A paging container for iterating over a list of :class:`GenericResource ` object + A paging container for iterating over a list of :class:`GenericResourceExpanded ` object """ _attribute_map = { 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[GenericResource]'} + 'current_page': {'key': 'value', 'type': '[GenericResourceExpanded]'} } def __init__(self, *args, **kwargs): - super(GenericResourcePaged, self).__init__(*args, **kwargs) + super(GenericResourceExpandedPaged, self).__init__(*args, **kwargs) class ResourceGroupPaged(Paged): """ A paging container for iterating over a list of :class:`ResourceGroup ` object diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_resources_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_resources_operations.py index 59684264f898..f763439d1ef9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_resources_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_resources_operations.py @@ -68,9 +68,10 @@ def list_by_resource_group( resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. :type filter: str - :param expand: The $expand query parameter. You can expand createdTime - and changedTime. For example, to expand both properties, use - $expand=changedTime,createdTime + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resources. @@ -80,9 +81,9 @@ def list_by_resource_group( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2019_10_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2019_10_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2019_10_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2019_10_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -139,7 +140,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/resources'} @@ -359,9 +360,10 @@ def list( resourceType, plan and plan/publisher and plan/name, identity and identity/principalId. :type filter: str - :param expand: The $expand query parameter. You can expand createdTime - and changedTime. For example, to expand both properties, use - $expand=changedTime,createdTime + :param expand: Comma-separated list of additional properties to be + included in the response. Valid values include `createdTime`, + `changedTime` and `provisioningState`. For example, + `$expand=createdTime,changedTime`. :type expand: str :param top: The number of results to return. If null is passed, returns all resource groups. @@ -371,9 +373,9 @@ def list( deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: An iterator like instance of GenericResource + :return: An iterator like instance of GenericResourceExpanded :rtype: - ~azure.mgmt.resource.resources.v2019_10_01.models.GenericResourcePaged[~azure.mgmt.resource.resources.v2019_10_01.models.GenericResource] + ~azure.mgmt.resource.resources.v2019_10_01.models.GenericResourceExpandedPaged[~azure.mgmt.resource.resources.v2019_10_01.models.GenericResourceExpanded] :raises: :class:`CloudError` """ def prepare_request(next_link=None): @@ -429,7 +431,7 @@ def internal_paging(next_link=None): header_dict = None if raw: header_dict = {} - deserialized = models.GenericResourcePaged(internal_paging, self._deserialize.dependencies, header_dict) + deserialized = models.GenericResourceExpandedPaged(internal_paging, self._deserialize.dependencies, header_dict) return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/resources'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_tags_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_tags_operations.py index 91a28eed0adc..e65913b7f528 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_tags_operations.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/operations/_tags_operations.py @@ -41,7 +41,12 @@ def __init__(self, client, config, serializer, deserializer): def delete_value( self, tag_name, tag_value, custom_headers=None, raw=False, **operation_config): - """Deletes a tag value. + """Deletes a predefined tag value for a predefined tag name. + + This operation allows deleting a value from the list of predefined + values for an existing predefined tag name. The value being deleted + must not be in use as a tag value for the given tag name for any + resource. :param tag_name: The name of the tag. :type tag_name: str @@ -94,7 +99,11 @@ def delete_value( def create_or_update_value( self, tag_name, tag_value, custom_headers=None, raw=False, **operation_config): - """Creates a tag value. The name of the tag must already exist. + """Creates a predefined value for a predefined tag name. + + This operation allows adding a value to the list of predefined values + for an existing predefined tag name. A tag value can have a maximum of + 256 characters. :param tag_name: The name of the tag. :type tag_name: str @@ -157,11 +166,13 @@ def create_or_update_value( def create_or_update( self, tag_name, custom_headers=None, raw=False, **operation_config): - """Creates a tag in the subscription. + """Creates a predefined tag name. - The tag name can have a maximum of 512 characters and is case - insensitive. Tag names created by Azure have prefixes of microsoft, - azure, or windows. You cannot create tags with one of these prefixes. + This operation allows adding a name to the list of predefined tag names + for the given subscription. A tag name can have a maximum of 512 + characters and is case-insensitive. Tag names cannot have the following + prefixes which are reserved for Azure use: 'microsoft', 'azure', + 'windows'. :param tag_name: The name of the tag to create. :type tag_name: str @@ -221,10 +232,12 @@ def create_or_update( def delete( self, tag_name, custom_headers=None, raw=False, **operation_config): - """Deletes a tag from the subscription. + """Deletes a predefined tag name. - You must remove all values from a resource tag before you can delete - it. + This operation allows deleting a name from the list of predefined tag + names for the given subscription. The name being deleted must not be in + use as a tag name for any resource. All predefined values for the given + name must have already been deleted. :param tag_name: The name of the tag. :type tag_name: str @@ -274,8 +287,13 @@ def delete( def list( self, custom_headers=None, raw=False, **operation_config): - """Gets the names and values of all resource tags that are defined in a - subscription. + """Gets a summary of tag usage under the subscription. + + This operation performs a union of predefined tags, resource tags, + resource group tags and subscription tags, and returns a summary of + usage for each tag name and value under the given subscription. In case + of a large number of tags, this operation may return a previously + cached result. :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -339,15 +357,20 @@ def internal_paging(next_link=None): return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/tagNames'} - def resource_create( - self, scope, parameters, custom_headers=None, raw=False, **operation_config): - """Create or Replace existing tags with passing in tags. + def create_or_update_at_scope( + self, scope, properties, custom_headers=None, raw=False, **operation_config): + """Creates or updates the entire set of tags on a resource or + subscription. + + This operation allows adding or replacing the entire set of tags on the + specified resource or subscription. The specified entity can have a + maximum of 50 tags. :param scope: The resource scope. :type scope: str - :param parameters: Parameters for creating multiple tags. - :type parameters: - ~azure.mgmt.resource.resources.v2019_10_01.models.TagsResource + :param properties: The set of tags. + :type properties: + ~azure.mgmt.resource.resources.v2019_10_01.models.Tags :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -358,8 +381,10 @@ def resource_create( or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ + parameters = models.TagsResource(properties=properties) + # Construct URL - url = self.resource_create.metadata['url'] + url = self.create_or_update_at_scope.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str') } @@ -401,20 +426,27 @@ def resource_create( return client_raw_response return deserialized - resource_create.metadata = {'url': '/{scope}/providers/Microsoft.Resources/tags/default'} + create_or_update_at_scope.metadata = {'url': '/{scope}/providers/Microsoft.Resources/tags/default'} - def resource_update( + def update_at_scope( self, scope, operation=None, properties=None, custom_headers=None, raw=False, **operation_config): - """Update multiple tags: if the tagKey exists, update tagValue with the - new value; if not, insert the new record. + """Selectively updates the set of tags on a resource or subscription. + + This operation allows replacing, merging or selectively deleting tags + on the specified resource or subscription. The specified entity can + have a maximum of 50 tags at the end of the operation. The 'replace' + option replaces the entire set of existing tags with a new set. The + 'merge' option allows adding tags with new names and updating the + values of tags with existing names. The 'delete' option allows + selectively deleting tags based on given names or name/value pairs. :param scope: The resource scope. :type scope: str - :param operation: The operation type for the patch api. Possible + :param operation: The operation type for the patch API. Possible values include: 'Replace', 'Merge', 'Delete' :type operation: str or ~azure.mgmt.resource.resources.v2019_10_01.models.enum - :param properties: tags object passing in the request. + :param properties: The set of tags. :type properties: ~azure.mgmt.resource.resources.v2019_10_01.models.Tags :param dict custom_headers: headers that will be added to the request @@ -427,10 +459,10 @@ def resource_update( or ~msrest.pipeline.ClientRawResponse :raises: :class:`CloudError` """ - parameters = models.TagPatchRequest(operation=operation, properties=properties) + parameters = models.TagsPatchResource(operation=operation, properties=properties) # Construct URL - url = self.resource_update.metadata['url'] + url = self.update_at_scope.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str') } @@ -452,7 +484,7 @@ def resource_update( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct body - body_content = self._serialize.body(parameters, 'TagPatchRequest') + body_content = self._serialize.body(parameters, 'TagsPatchResource') # Construct and send request request = self._client.patch(url, query_parameters, header_parameters, body_content) @@ -472,11 +504,11 @@ def resource_update( return client_raw_response return deserialized - resource_update.metadata = {'url': '/{scope}/providers/Microsoft.Resources/tags/default'} + update_at_scope.metadata = {'url': '/{scope}/providers/Microsoft.Resources/tags/default'} - def resource_get( + def get_at_scope( self, scope, custom_headers=None, raw=False, **operation_config): - """Gets all the tags for the resource. + """Gets the entire set of tags on a resource or subscription. :param scope: The resource scope. :type scope: str @@ -491,7 +523,7 @@ def resource_get( :raises: :class:`CloudError` """ # Construct URL - url = self.resource_get.metadata['url'] + url = self.get_at_scope.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str') } @@ -529,11 +561,11 @@ def resource_get( return client_raw_response return deserialized - resource_get.metadata = {'url': '/{scope}/providers/Microsoft.Resources/tags/default'} + get_at_scope.metadata = {'url': '/{scope}/providers/Microsoft.Resources/tags/default'} - def resource_delete( + def delete_at_scope( self, scope, custom_headers=None, raw=False, **operation_config): - """Deletes all the tags for the resource. + """Deletes the entire set of tags on a resource or subscription. :param scope: The resource scope. :type scope: str @@ -547,7 +579,7 @@ def resource_delete( :raises: :class:`CloudError` """ # Construct URL - url = self.resource_delete.metadata['url'] + url = self.delete_at_scope.metadata['url'] path_format_arguments = { 'scope': self._serialize.url("scope", scope, 'str') } @@ -578,4 +610,4 @@ def resource_delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - resource_delete.metadata = {'url': '/{scope}/providers/Microsoft.Resources/tags/default'} + delete_at_scope.metadata = {'url': '/{scope}/providers/Microsoft.Resources/tags/default'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_subscription_client.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_subscription_client.py index f3e3cf240e23..f90f6f82107d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_subscription_client.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/_subscription_client.py @@ -42,7 +42,7 @@ class SubscriptionClient(MultiApiClientMixin, SDKClient): :type profile: azure.profiles.KnownProfiles """ - DEFAULT_API_VERSION = '2019-06-01' + DEFAULT_API_VERSION = '2019-11-01' _PROFILE_TAG = "azure.mgmt.resource.subscriptions.SubscriptionClient" LATEST_PROFILE = ProfileDefinition({ _PROFILE_TAG: { @@ -71,6 +71,7 @@ def models(cls, api_version=DEFAULT_API_VERSION): * 2016-06-01: :mod:`v2016_06_01.models` * 2018-06-01: :mod:`v2018_06_01.models` * 2019-06-01: :mod:`v2019_06_01.models` + * 2019-11-01: :mod:`v2019_11_01.models` """ if api_version == '2016-06-01': from .v2016_06_01 import models @@ -81,6 +82,9 @@ def models(cls, api_version=DEFAULT_API_VERSION): elif api_version == '2019-06-01': from .v2019_06_01 import models return models + elif api_version == '2019-11-01': + from .v2019_11_01 import models + return models raise NotImplementedError("APIVersion {} is not available".format(api_version)) @property @@ -90,6 +94,7 @@ def operations(self): * 2016-06-01: :class:`Operations` * 2018-06-01: :class:`Operations` * 2019-06-01: :class:`Operations` + * 2019-11-01: :class:`Operations` """ api_version = self._get_api_version('operations') if api_version == '2016-06-01': @@ -98,6 +103,8 @@ def operations(self): from .v2018_06_01.operations import Operations as OperationClass elif api_version == '2019-06-01': from .v2019_06_01.operations import Operations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import Operations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -109,6 +116,7 @@ def subscriptions(self): * 2016-06-01: :class:`SubscriptionsOperations` * 2018-06-01: :class:`SubscriptionsOperations` * 2019-06-01: :class:`SubscriptionsOperations` + * 2019-11-01: :class:`SubscriptionsOperations` """ api_version = self._get_api_version('subscriptions') if api_version == '2016-06-01': @@ -117,6 +125,8 @@ def subscriptions(self): from .v2018_06_01.operations import SubscriptionsOperations as OperationClass elif api_version == '2019-06-01': from .v2019_06_01.operations import SubscriptionsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import SubscriptionsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) @@ -128,6 +138,7 @@ def tenants(self): * 2016-06-01: :class:`TenantsOperations` * 2018-06-01: :class:`TenantsOperations` * 2019-06-01: :class:`TenantsOperations` + * 2019-11-01: :class:`TenantsOperations` """ api_version = self._get_api_version('tenants') if api_version == '2016-06-01': @@ -136,6 +147,8 @@ def tenants(self): from .v2018_06_01.operations import TenantsOperations as OperationClass elif api_version == '2019-06-01': from .v2019_06_01.operations import TenantsOperations as OperationClass + elif api_version == '2019-11-01': + from .v2019_11_01.operations import TenantsOperations as OperationClass else: raise NotImplementedError("APIVersion {} is not available".format(api_version)) return OperationClass(self._client, self.config, Serializer(self._models_dict(api_version)), Deserializer(self._models_dict(api_version))) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/models.py index e14bb6e177c2..28ba9b61c72e 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/models.py @@ -4,4 +4,4 @@ # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- -from .v2019_06_01.models import * +from .v2019_11_01.models import * diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/models/_models.py index b57b92b3e465..21ba7cc06de9 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/models/_models.py @@ -227,6 +227,10 @@ class TenantIdDescription(Model): :ivar tenant_id: The tenant ID. For example, 00000000-0000-0000-0000-000000000000. :vartype tenant_id: str + :ivar country: Country/region name of the address for the tenant. + :vartype country: str + :ivar country_code: Country/region abbreviation for the tenant. + :vartype country_code: str :ivar display_name: The display name of the tenant. :vartype display_name: str :ivar domains: The list of domains for the tenant. @@ -236,6 +240,8 @@ class TenantIdDescription(Model): _validation = { 'id': {'readonly': True}, 'tenant_id': {'readonly': True}, + 'country': {'readonly': True}, + 'country_code': {'readonly': True}, 'display_name': {'readonly': True}, 'domains': {'readonly': True}, } @@ -243,6 +249,8 @@ class TenantIdDescription(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'domains': {'key': 'domains', 'type': '[str]'}, } @@ -251,5 +259,7 @@ def __init__(self, **kwargs): super(TenantIdDescription, self).__init__(**kwargs) self.id = None self.tenant_id = None + self.country = None + self.country_code = None self.display_name = None self.domains = None diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/models/_models_py3.py index b93102c1b939..b18427d606cc 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2018_06_01/models/_models_py3.py @@ -227,6 +227,10 @@ class TenantIdDescription(Model): :ivar tenant_id: The tenant ID. For example, 00000000-0000-0000-0000-000000000000. :vartype tenant_id: str + :ivar country: Country/region name of the address for the tenant. + :vartype country: str + :ivar country_code: Country/region abbreviation for the tenant. + :vartype country_code: str :ivar display_name: The display name of the tenant. :vartype display_name: str :ivar domains: The list of domains for the tenant. @@ -236,6 +240,8 @@ class TenantIdDescription(Model): _validation = { 'id': {'readonly': True}, 'tenant_id': {'readonly': True}, + 'country': {'readonly': True}, + 'country_code': {'readonly': True}, 'display_name': {'readonly': True}, 'domains': {'readonly': True}, } @@ -243,6 +249,8 @@ class TenantIdDescription(Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'country': {'key': 'country', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, 'display_name': {'key': 'displayName', 'type': 'str'}, 'domains': {'key': 'domains', 'type': '[str]'}, } @@ -251,5 +259,7 @@ def __init__(self, **kwargs) -> None: super(TenantIdDescription, self).__init__(**kwargs) self.id = None self.tenant_id = None + self.country = None + self.country_code = None self.display_name = None self.domains = None diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/__init__.py index e9e64cdae349..d7233118a968 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/__init__.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/__init__.py @@ -32,6 +32,7 @@ from ._subscription_client_enums import ( SubscriptionState, SpendingLimit, + TenantCategory, ) __all__ = [ @@ -48,4 +49,5 @@ 'TenantIdDescriptionPaged', 'SubscriptionState', 'SpendingLimit', + 'TenantCategory', ] diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/_models.py index 17c69ad30ee3..8d63331e9684 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/_models.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/_models.py @@ -256,19 +256,46 @@ class TenantIdDescription(Model): :ivar tenant_id: The tenant ID. For example, 00000000-0000-0000-0000-000000000000. :vartype tenant_id: str + :ivar tenant_category: The tenant category. Possible values include: + 'Home', 'ProjectedBy', 'ManagedBy' + :vartype tenant_category: str or + ~azure.mgmt.resource.subscriptions.v2019_06_01.models.TenantCategory + :ivar country: Country/region name of the address for the tenant. + :vartype country: str + :ivar country_code: Country/region abbreviation for the tenant. + :vartype country_code: str + :ivar display_name: The display name of the tenant. + :vartype display_name: str + :ivar domains: The list of domains for the tenant. + :vartype domains: list[str] """ _validation = { 'id': {'readonly': True}, 'tenant_id': {'readonly': True}, + 'tenant_category': {'readonly': True}, + 'country': {'readonly': True}, + 'country_code': {'readonly': True}, + 'display_name': {'readonly': True}, + 'domains': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'tenant_category': {'key': 'tenantCategory', 'type': 'TenantCategory'}, + 'country': {'key': 'country', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'domains': {'key': 'domains', 'type': '[str]'}, } def __init__(self, **kwargs): super(TenantIdDescription, self).__init__(**kwargs) self.id = None self.tenant_id = None + self.tenant_category = None + self.country = None + self.country_code = None + self.display_name = None + self.domains = None diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/_models_py3.py index b58b89764e4b..fa15df1e87e3 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/_models_py3.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/_models_py3.py @@ -256,19 +256,46 @@ class TenantIdDescription(Model): :ivar tenant_id: The tenant ID. For example, 00000000-0000-0000-0000-000000000000. :vartype tenant_id: str + :ivar tenant_category: The tenant category. Possible values include: + 'Home', 'ProjectedBy', 'ManagedBy' + :vartype tenant_category: str or + ~azure.mgmt.resource.subscriptions.v2019_06_01.models.TenantCategory + :ivar country: Country/region name of the address for the tenant. + :vartype country: str + :ivar country_code: Country/region abbreviation for the tenant. + :vartype country_code: str + :ivar display_name: The display name of the tenant. + :vartype display_name: str + :ivar domains: The list of domains for the tenant. + :vartype domains: list[str] """ _validation = { 'id': {'readonly': True}, 'tenant_id': {'readonly': True}, + 'tenant_category': {'readonly': True}, + 'country': {'readonly': True}, + 'country_code': {'readonly': True}, + 'display_name': {'readonly': True}, + 'domains': {'readonly': True}, } _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'tenant_category': {'key': 'tenantCategory', 'type': 'TenantCategory'}, + 'country': {'key': 'country', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'domains': {'key': 'domains', 'type': '[str]'}, } def __init__(self, **kwargs) -> None: super(TenantIdDescription, self).__init__(**kwargs) self.id = None self.tenant_id = None + self.tenant_category = None + self.country = None + self.country_code = None + self.display_name = None + self.domains = None diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/_subscription_client_enums.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/_subscription_client_enums.py index bc846c09187b..7def5956d33d 100644 --- a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/_subscription_client_enums.py +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/models/_subscription_client_enums.py @@ -26,3 +26,10 @@ class SpendingLimit(str, Enum): on = "On" off = "Off" current_period_off = "CurrentPeriodOff" + + +class TenantCategory(str, Enum): + + home = "Home" + projected_by = "ProjectedBy" + managed_by = "ManagedBy" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/__init__.py new file mode 100644 index 000000000000..399e93fb102f --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/__init__.py @@ -0,0 +1,19 @@ +# 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 ._configuration import SubscriptionClientConfiguration +from ._subscription_client import SubscriptionClient +__all__ = ['SubscriptionClient', 'SubscriptionClientConfiguration'] + +from .version import VERSION + +__version__ = VERSION + diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_configuration.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_configuration.py new file mode 100644 index 000000000000..935bf662873f --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_configuration.py @@ -0,0 +1,43 @@ +# 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 msrestazure import AzureConfiguration + +from .version import VERSION + + +class SubscriptionClientConfiguration(AzureConfiguration): + """Configuration for SubscriptionClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(SubscriptionClientConfiguration, self).__init__(base_url) + + # Starting Autorest.Python 4.0.64, make connection pool activated by default + self.keep_alive = True + + self.add_user_agent('azure-mgmt-resource/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_subscription_client.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_subscription_client.py new file mode 100644 index 000000000000..7b2d8ff052cc --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/_subscription_client.py @@ -0,0 +1,57 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer + +from ._configuration import SubscriptionClientConfiguration +from .operations import Operations +from .operations import SubscriptionsOperations +from .operations import TenantsOperations +from . import models + + +class SubscriptionClient(SDKClient): + """All resource groups and resources exist within subscriptions. These operation enable you get information about your subscriptions and tenants. A tenant is a dedicated instance of Azure Active Directory (Azure AD) for your organization. + + :ivar config: Configuration for client. + :vartype config: SubscriptionClientConfiguration + + :ivar operations: Operations operations + :vartype operations: azure.mgmt.resource.subscriptions.v2019_11_01.operations.Operations + :ivar subscriptions: Subscriptions operations + :vartype subscriptions: azure.mgmt.resource.subscriptions.v2019_11_01.operations.SubscriptionsOperations + :ivar tenants: Tenants operations + :vartype tenants: azure.mgmt.resource.subscriptions.v2019_11_01.operations.TenantsOperations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param str base_url: Service URL + """ + + def __init__( + self, credentials, base_url=None): + + self.config = SubscriptionClientConfiguration(credentials, base_url) + super(SubscriptionClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2019-11-01' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) + self.subscriptions = SubscriptionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.tenants = TenantsOperations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/__init__.py new file mode 100644 index 000000000000..ccb68724c045 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/__init__.py @@ -0,0 +1,63 @@ +# 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. +# -------------------------------------------------------------------------- + +try: + from ._models_py3 import Location + from ._models_py3 import LocationMetadata + from ._models_py3 import ManagedByTenant + from ._models_py3 import Operation + from ._models_py3 import OperationDisplay + from ._models_py3 import PairedRegion + from ._models_py3 import Subscription + from ._models_py3 import SubscriptionPolicies + from ._models_py3 import TenantIdDescription +except (SyntaxError, ImportError): + from ._models import Location + from ._models import LocationMetadata + from ._models import ManagedByTenant + from ._models import Operation + from ._models import OperationDisplay + from ._models import PairedRegion + from ._models import Subscription + from ._models import SubscriptionPolicies + from ._models import TenantIdDescription +from ._paged_models import LocationPaged +from ._paged_models import OperationPaged +from ._paged_models import SubscriptionPaged +from ._paged_models import TenantIdDescriptionPaged +from ._subscription_client_enums import ( + RegionType, + RegionCategory, + SubscriptionState, + SpendingLimit, + TenantCategory, +) + +__all__ = [ + 'Location', + 'LocationMetadata', + 'ManagedByTenant', + 'Operation', + 'OperationDisplay', + 'PairedRegion', + 'Subscription', + 'SubscriptionPolicies', + 'TenantIdDescription', + 'OperationPaged', + 'LocationPaged', + 'SubscriptionPaged', + 'TenantIdDescriptionPaged', + 'RegionType', + 'RegionCategory', + 'SubscriptionState', + 'SpendingLimit', + 'TenantCategory', +] diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/_models.py new file mode 100644 index 000000000000..b51e78dbf001 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/_models.py @@ -0,0 +1,394 @@ +# 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Location(Model): + """Location information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID of the location. For example, + /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. + :vartype id: str + :ivar subscription_id: The subscription ID. + :vartype subscription_id: str + :ivar name: The location name. + :vartype name: str + :ivar display_name: The display name of the location. + :vartype display_name: str + :ivar regional_display_name: The display name of the location and its + region. + :vartype regional_display_name: str + :param metadata: Metadata of the location, such as lat/long, paired + region, and others. + :type metadata: + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.LocationMetadata + """ + + _validation = { + 'id': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'regional_display_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'regional_display_name': {'key': 'regionalDisplayName', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'LocationMetadata'}, + } + + def __init__(self, **kwargs): + super(Location, self).__init__(**kwargs) + self.id = None + self.subscription_id = None + self.name = None + self.display_name = None + self.regional_display_name = None + self.metadata = kwargs.get('metadata', None) + + +class LocationMetadata(Model): + """Location metadata information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar region_type: The type of the region. Possible values include: + 'Physical', 'Logical' + :vartype region_type: str or + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.RegionType + :ivar region_category: The category of the region. Possible values + include: 'Recommended', 'Other' + :vartype region_category: str or + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.RegionCategory + :ivar geography_group: The geography group of the location. + :vartype geography_group: str + :ivar longitude: The longitude of the location. + :vartype longitude: str + :ivar latitude: The latitude of the location. + :vartype latitude: str + :ivar physical_location: The physical location of the Azure location. + :vartype physical_location: str + :param paired_region: The regions paired to this region. + :type paired_region: + list[~azure.mgmt.resource.subscriptions.v2019_11_01.models.PairedRegion] + """ + + _validation = { + 'region_type': {'readonly': True}, + 'region_category': {'readonly': True}, + 'geography_group': {'readonly': True}, + 'longitude': {'readonly': True}, + 'latitude': {'readonly': True}, + 'physical_location': {'readonly': True}, + } + + _attribute_map = { + 'region_type': {'key': 'regionType', 'type': 'str'}, + 'region_category': {'key': 'regionCategory', 'type': 'str'}, + 'geography_group': {'key': 'geographyGroup', 'type': 'str'}, + 'longitude': {'key': 'longitude', 'type': 'str'}, + 'latitude': {'key': 'latitude', 'type': 'str'}, + 'physical_location': {'key': 'physicalLocation', 'type': 'str'}, + 'paired_region': {'key': 'pairedRegion', 'type': '[PairedRegion]'}, + } + + def __init__(self, **kwargs): + super(LocationMetadata, self).__init__(**kwargs) + self.region_type = None + self.region_category = None + self.geography_group = None + self.longitude = None + self.latitude = None + self.physical_location = None + self.paired_region = kwargs.get('paired_region', None) + + +class ManagedByTenant(Model): + """Information about a tenant managing the subscription. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tenant_id: The tenant ID of the managing tenant. This is a GUID. + :vartype tenant_id: str + """ + + _validation = { + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedByTenant, self).__init__(**kwargs) + self.tenant_id = None + + +class Operation(Model): + """Microsoft.Resources operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.Resources + :type provider: str + :param resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) + self.description = kwargs.get('description', None) + + +class PairedRegion(Model): + """Information regarding paired region. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the paired region. + :vartype name: str + :ivar id: The fully qualified ID of the location. For example, + /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. + :vartype id: str + :ivar subscription_id: The subscription ID. + :vartype subscription_id: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'subscription_id': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(PairedRegion, self).__init__(**kwargs) + self.name = None + self.id = None + self.subscription_id = None + + +class Subscription(Model): + """Subscription information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the subscription. For example, + /subscriptions/00000000-0000-0000-0000-000000000000. + :vartype id: str + :ivar subscription_id: The subscription ID. + :vartype subscription_id: str + :ivar display_name: The subscription display name. + :vartype display_name: str + :ivar tenant_id: The subscription tenant ID. + :vartype tenant_id: str + :ivar state: The subscription state. Possible values are Enabled, Warned, + PastDue, Disabled, and Deleted. Possible values include: 'Enabled', + 'Warned', 'PastDue', 'Disabled', 'Deleted' + :vartype state: str or + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.SubscriptionState + :param subscription_policies: The subscription policies. + :type subscription_policies: + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.SubscriptionPolicies + :param authorization_source: The authorization source of the request. + Valid values are one or more combinations of Legacy, RoleBased, Bypassed, + Direct and Management. For example, 'Legacy, RoleBased'. + :type authorization_source: str + :param managed_by_tenants: An array containing the tenants managing the + subscription. + :type managed_by_tenants: + list[~azure.mgmt.resource.subscriptions.v2019_11_01.models.ManagedByTenant] + """ + + _validation = { + 'id': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'display_name': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'SubscriptionState'}, + 'subscription_policies': {'key': 'subscriptionPolicies', 'type': 'SubscriptionPolicies'}, + 'authorization_source': {'key': 'authorizationSource', 'type': 'str'}, + 'managed_by_tenants': {'key': 'managedByTenants', 'type': '[ManagedByTenant]'}, + } + + def __init__(self, **kwargs): + super(Subscription, self).__init__(**kwargs) + self.id = None + self.subscription_id = None + self.display_name = None + self.tenant_id = None + self.state = None + self.subscription_policies = kwargs.get('subscription_policies', None) + self.authorization_source = kwargs.get('authorization_source', None) + self.managed_by_tenants = kwargs.get('managed_by_tenants', None) + + +class SubscriptionPolicies(Model): + """Subscription policies. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location_placement_id: The subscription location placement ID. The + ID indicates which regions are visible for a subscription. For example, a + subscription with a location placement Id of Public_2014-09-01 has access + to Azure public regions. + :vartype location_placement_id: str + :ivar quota_id: The subscription quota ID. + :vartype quota_id: str + :ivar spending_limit: The subscription spending limit. Possible values + include: 'On', 'Off', 'CurrentPeriodOff' + :vartype spending_limit: str or + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.SpendingLimit + """ + + _validation = { + 'location_placement_id': {'readonly': True}, + 'quota_id': {'readonly': True}, + 'spending_limit': {'readonly': True}, + } + + _attribute_map = { + 'location_placement_id': {'key': 'locationPlacementId', 'type': 'str'}, + 'quota_id': {'key': 'quotaId', 'type': 'str'}, + 'spending_limit': {'key': 'spendingLimit', 'type': 'SpendingLimit'}, + } + + def __init__(self, **kwargs): + super(SubscriptionPolicies, self).__init__(**kwargs) + self.location_placement_id = None + self.quota_id = None + self.spending_limit = None + + +class TenantIdDescription(Model): + """Tenant Id information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID of the tenant. For example, + /tenants/00000000-0000-0000-0000-000000000000. + :vartype id: str + :ivar tenant_id: The tenant ID. For example, + 00000000-0000-0000-0000-000000000000. + :vartype tenant_id: str + :ivar tenant_category: Category of the tenant. Possible values include: + 'Home', 'ProjectedBy', 'ManagedBy' + :vartype tenant_category: str or + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.TenantCategory + :ivar country: Country/region name of the address for the tenant. + :vartype country: str + :ivar country_code: Country/region abbreviation for the tenant. + :vartype country_code: str + :ivar display_name: The display name of the tenant. + :vartype display_name: str + :ivar domains: The list of domains for the tenant. + :vartype domains: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'tenant_category': {'readonly': True}, + 'country': {'readonly': True}, + 'country_code': {'readonly': True}, + 'display_name': {'readonly': True}, + 'domains': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'tenant_category': {'key': 'tenantCategory', 'type': 'TenantCategory'}, + 'country': {'key': 'country', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'domains': {'key': 'domains', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(TenantIdDescription, self).__init__(**kwargs) + self.id = None + self.tenant_id = None + self.tenant_category = None + self.country = None + self.country_code = None + self.display_name = None + self.domains = None diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/_models_py3.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/_models_py3.py new file mode 100644 index 000000000000..f73f278386fa --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/_models_py3.py @@ -0,0 +1,394 @@ +# 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 CloudError(Model): + """CloudError. + """ + + _attribute_map = { + } + + +class Location(Model): + """Location information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID of the location. For example, + /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. + :vartype id: str + :ivar subscription_id: The subscription ID. + :vartype subscription_id: str + :ivar name: The location name. + :vartype name: str + :ivar display_name: The display name of the location. + :vartype display_name: str + :ivar regional_display_name: The display name of the location and its + region. + :vartype regional_display_name: str + :param metadata: Metadata of the location, such as lat/long, paired + region, and others. + :type metadata: + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.LocationMetadata + """ + + _validation = { + 'id': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'name': {'readonly': True}, + 'display_name': {'readonly': True}, + 'regional_display_name': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'regional_display_name': {'key': 'regionalDisplayName', 'type': 'str'}, + 'metadata': {'key': 'metadata', 'type': 'LocationMetadata'}, + } + + def __init__(self, *, metadata=None, **kwargs) -> None: + super(Location, self).__init__(**kwargs) + self.id = None + self.subscription_id = None + self.name = None + self.display_name = None + self.regional_display_name = None + self.metadata = metadata + + +class LocationMetadata(Model): + """Location metadata information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar region_type: The type of the region. Possible values include: + 'Physical', 'Logical' + :vartype region_type: str or + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.RegionType + :ivar region_category: The category of the region. Possible values + include: 'Recommended', 'Other' + :vartype region_category: str or + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.RegionCategory + :ivar geography_group: The geography group of the location. + :vartype geography_group: str + :ivar longitude: The longitude of the location. + :vartype longitude: str + :ivar latitude: The latitude of the location. + :vartype latitude: str + :ivar physical_location: The physical location of the Azure location. + :vartype physical_location: str + :param paired_region: The regions paired to this region. + :type paired_region: + list[~azure.mgmt.resource.subscriptions.v2019_11_01.models.PairedRegion] + """ + + _validation = { + 'region_type': {'readonly': True}, + 'region_category': {'readonly': True}, + 'geography_group': {'readonly': True}, + 'longitude': {'readonly': True}, + 'latitude': {'readonly': True}, + 'physical_location': {'readonly': True}, + } + + _attribute_map = { + 'region_type': {'key': 'regionType', 'type': 'str'}, + 'region_category': {'key': 'regionCategory', 'type': 'str'}, + 'geography_group': {'key': 'geographyGroup', 'type': 'str'}, + 'longitude': {'key': 'longitude', 'type': 'str'}, + 'latitude': {'key': 'latitude', 'type': 'str'}, + 'physical_location': {'key': 'physicalLocation', 'type': 'str'}, + 'paired_region': {'key': 'pairedRegion', 'type': '[PairedRegion]'}, + } + + def __init__(self, *, paired_region=None, **kwargs) -> None: + super(LocationMetadata, self).__init__(**kwargs) + self.region_type = None + self.region_category = None + self.geography_group = None + self.longitude = None + self.latitude = None + self.physical_location = None + self.paired_region = paired_region + + +class ManagedByTenant(Model): + """Information about a tenant managing the subscription. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar tenant_id: The tenant ID of the managing tenant. This is a GUID. + :vartype tenant_id: str + """ + + _validation = { + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ManagedByTenant, self).__init__(**kwargs) + self.tenant_id = None + + +class Operation(Model): + """Microsoft.Resources operation. + + :param name: Operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: Service provider: Microsoft.Resources + :type provider: str + :param resource: Resource on which the operation is performed: Profile, + endpoint, etc. + :type resource: str + :param operation: Operation type: Read, write, delete, etc. + :type operation: str + :param description: Description of the operation. + :type description: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'description': {'key': 'description', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, description: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation + self.description = description + + +class PairedRegion(Model): + """Information regarding paired region. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar name: The name of the paired region. + :vartype name: str + :ivar id: The fully qualified ID of the location. For example, + /subscriptions/00000000-0000-0000-0000-000000000000/locations/westus. + :vartype id: str + :ivar subscription_id: The subscription ID. + :vartype subscription_id: str + """ + + _validation = { + 'name': {'readonly': True}, + 'id': {'readonly': True}, + 'subscription_id': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'id': {'key': 'id', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(PairedRegion, self).__init__(**kwargs) + self.name = None + self.id = None + self.subscription_id = None + + +class Subscription(Model): + """Subscription information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID for the subscription. For example, + /subscriptions/00000000-0000-0000-0000-000000000000. + :vartype id: str + :ivar subscription_id: The subscription ID. + :vartype subscription_id: str + :ivar display_name: The subscription display name. + :vartype display_name: str + :ivar tenant_id: The subscription tenant ID. + :vartype tenant_id: str + :ivar state: The subscription state. Possible values are Enabled, Warned, + PastDue, Disabled, and Deleted. Possible values include: 'Enabled', + 'Warned', 'PastDue', 'Disabled', 'Deleted' + :vartype state: str or + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.SubscriptionState + :param subscription_policies: The subscription policies. + :type subscription_policies: + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.SubscriptionPolicies + :param authorization_source: The authorization source of the request. + Valid values are one or more combinations of Legacy, RoleBased, Bypassed, + Direct and Management. For example, 'Legacy, RoleBased'. + :type authorization_source: str + :param managed_by_tenants: An array containing the tenants managing the + subscription. + :type managed_by_tenants: + list[~azure.mgmt.resource.subscriptions.v2019_11_01.models.ManagedByTenant] + """ + + _validation = { + 'id': {'readonly': True}, + 'subscription_id': {'readonly': True}, + 'display_name': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'state': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subscription_id': {'key': 'subscriptionId', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'state': {'key': 'state', 'type': 'SubscriptionState'}, + 'subscription_policies': {'key': 'subscriptionPolicies', 'type': 'SubscriptionPolicies'}, + 'authorization_source': {'key': 'authorizationSource', 'type': 'str'}, + 'managed_by_tenants': {'key': 'managedByTenants', 'type': '[ManagedByTenant]'}, + } + + def __init__(self, *, subscription_policies=None, authorization_source: str=None, managed_by_tenants=None, **kwargs) -> None: + super(Subscription, self).__init__(**kwargs) + self.id = None + self.subscription_id = None + self.display_name = None + self.tenant_id = None + self.state = None + self.subscription_policies = subscription_policies + self.authorization_source = authorization_source + self.managed_by_tenants = managed_by_tenants + + +class SubscriptionPolicies(Model): + """Subscription policies. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar location_placement_id: The subscription location placement ID. The + ID indicates which regions are visible for a subscription. For example, a + subscription with a location placement Id of Public_2014-09-01 has access + to Azure public regions. + :vartype location_placement_id: str + :ivar quota_id: The subscription quota ID. + :vartype quota_id: str + :ivar spending_limit: The subscription spending limit. Possible values + include: 'On', 'Off', 'CurrentPeriodOff' + :vartype spending_limit: str or + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.SpendingLimit + """ + + _validation = { + 'location_placement_id': {'readonly': True}, + 'quota_id': {'readonly': True}, + 'spending_limit': {'readonly': True}, + } + + _attribute_map = { + 'location_placement_id': {'key': 'locationPlacementId', 'type': 'str'}, + 'quota_id': {'key': 'quotaId', 'type': 'str'}, + 'spending_limit': {'key': 'spendingLimit', 'type': 'SpendingLimit'}, + } + + def __init__(self, **kwargs) -> None: + super(SubscriptionPolicies, self).__init__(**kwargs) + self.location_placement_id = None + self.quota_id = None + self.spending_limit = None + + +class TenantIdDescription(Model): + """Tenant Id information. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: The fully qualified ID of the tenant. For example, + /tenants/00000000-0000-0000-0000-000000000000. + :vartype id: str + :ivar tenant_id: The tenant ID. For example, + 00000000-0000-0000-0000-000000000000. + :vartype tenant_id: str + :ivar tenant_category: Category of the tenant. Possible values include: + 'Home', 'ProjectedBy', 'ManagedBy' + :vartype tenant_category: str or + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.TenantCategory + :ivar country: Country/region name of the address for the tenant. + :vartype country: str + :ivar country_code: Country/region abbreviation for the tenant. + :vartype country_code: str + :ivar display_name: The display name of the tenant. + :vartype display_name: str + :ivar domains: The list of domains for the tenant. + :vartype domains: list[str] + """ + + _validation = { + 'id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + 'tenant_category': {'readonly': True}, + 'country': {'readonly': True}, + 'country_code': {'readonly': True}, + 'display_name': {'readonly': True}, + 'domains': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'tenant_category': {'key': 'tenantCategory', 'type': 'TenantCategory'}, + 'country': {'key': 'country', 'type': 'str'}, + 'country_code': {'key': 'countryCode', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'domains': {'key': 'domains', 'type': '[str]'}, + } + + def __init__(self, **kwargs) -> None: + super(TenantIdDescription, self).__init__(**kwargs) + self.id = None + self.tenant_id = None + self.tenant_category = None + self.country = None + self.country_code = None + self.display_name = None + self.domains = None diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/_paged_models.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/_paged_models.py new file mode 100644 index 000000000000..b46b75589169 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/_paged_models.py @@ -0,0 +1,66 @@ +# 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 OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) +class LocationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Location ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Location]'} + } + + def __init__(self, *args, **kwargs): + + super(LocationPaged, self).__init__(*args, **kwargs) +class SubscriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`Subscription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Subscription]'} + } + + def __init__(self, *args, **kwargs): + + super(SubscriptionPaged, self).__init__(*args, **kwargs) +class TenantIdDescriptionPaged(Paged): + """ + A paging container for iterating over a list of :class:`TenantIdDescription ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[TenantIdDescription]'} + } + + def __init__(self, *args, **kwargs): + + super(TenantIdDescriptionPaged, self).__init__(*args, **kwargs) diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/_subscription_client_enums.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/_subscription_client_enums.py new file mode 100644 index 000000000000..3fee1db7fd51 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/models/_subscription_client_enums.py @@ -0,0 +1,47 @@ +# 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 enum import Enum + + +class RegionType(str, Enum): + + physical = "Physical" + logical = "Logical" + + +class RegionCategory(str, Enum): + + recommended = "Recommended" + other = "Other" + + +class SubscriptionState(str, Enum): + + enabled = "Enabled" + warned = "Warned" + past_due = "PastDue" + disabled = "Disabled" + deleted = "Deleted" + + +class SpendingLimit(str, Enum): + + on = "On" + off = "Off" + current_period_off = "CurrentPeriodOff" + + +class TenantCategory(str, Enum): + + home = "Home" + projected_by = "ProjectedBy" + managed_by = "ManagedBy" diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/__init__.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/__init__.py new file mode 100644 index 000000000000..5b07794f3097 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/__init__.py @@ -0,0 +1,20 @@ +# 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 ._operations import Operations +from ._subscriptions_operations import SubscriptionsOperations +from ._tenants_operations import TenantsOperations + +__all__ = [ + 'Operations', + 'SubscriptionsOperations', + 'TenantsOperations', +] diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_operations.py new file mode 100644 index 000000000000..cd646a42e97f --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class Operations(object): + """Operations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :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: The API version to use for the operation. Constant value: "2019-11-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-11-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available Microsoft.Resources REST API operations. + + :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 Operation + :rtype: + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.OperationPaged[~azure.mgmt.resource.subscriptions.v2019_11_01.models.Operation] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/providers/Microsoft.Resources/operations'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_subscriptions_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_subscriptions_operations.py new file mode 100644 index 000000000000..f89095a02e4d --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_subscriptions_operations.py @@ -0,0 +1,232 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class SubscriptionsOperations(object): + """SubscriptionsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :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: The API version to use for the operation. Constant value: "2019-11-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-11-01" + + self.config = config + + def list_locations( + self, subscription_id, custom_headers=None, raw=False, **operation_config): + """Gets all available geo-locations. + + This operation provides all the locations that are available for + resource providers; however, each resource provider may support a + subset of this list. + + :param subscription_id: The ID of the target subscription. + :type subscription_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 Location + :rtype: + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.LocationPaged[~azure.mgmt.resource.subscriptions.v2019_11_01.models.Location] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list_locations.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.LocationPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list_locations.metadata = {'url': '/subscriptions/{subscriptionId}/locations'} + + def get( + self, subscription_id, custom_headers=None, raw=False, **operation_config): + """Gets details about a specified subscription. + + :param subscription_id: The ID of the target subscription. + :type subscription_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: Subscription or ClientRawResponse if raw=true + :rtype: + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.Subscription or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + # Construct URL + url = self.get.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("subscription_id", 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]: + 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('Subscription', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets all subscriptions for a tenant. + + :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 Subscription + :rtype: + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.SubscriptionPaged[~azure.mgmt.resource.subscriptions.v2019_11_01.models.Subscription] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.SubscriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/subscriptions'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_tenants_operations.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_tenants_operations.py new file mode 100644 index 000000000000..4da6dc3f13b9 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/operations/_tenants_operations.py @@ -0,0 +1,102 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrestazure.azure_exceptions import CloudError + +from .. import models + + +class TenantsOperations(object): + """TenantsOperations operations. + + You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. + + :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: The API version to use for the operation. Constant value: "2019-11-01". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2019-11-01" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Gets the tenants for your account. + + :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 TenantIdDescription + :rtype: + ~azure.mgmt.resource.subscriptions.v2019_11_01.models.TenantIdDescriptionPaged[~azure.mgmt.resource.subscriptions.v2019_11_01.models.TenantIdDescription] + :raises: :class:`CloudError` + """ + def prepare_request(next_link=None): + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # 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) + return request + + def internal_paging(next_link=None): + request = prepare_request(next_link) + + 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 + + return response + + # Deserialize response + header_dict = None + if raw: + header_dict = {} + deserialized = models.TenantIdDescriptionPaged(internal_paging, self._deserialize.dependencies, header_dict) + + return deserialized + list.metadata = {'url': '/tenants'} diff --git a/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/version.py b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/version.py new file mode 100644 index 000000000000..93d376dfdcc7 --- /dev/null +++ b/sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_11_01/version.py @@ -0,0 +1,13 @@ +# 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. +# -------------------------------------------------------------------------- + +VERSION = "2019-11-01" +