diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_assignments_operations.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_assignments_operations.py index 1b5de5c73aa4..8a27c690b238 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_assignments_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/operations/policy_assignments_operations.py @@ -10,7 +10,6 @@ # -------------------------------------------------------------------------- import uuid -import warnings from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError @@ -314,9 +313,6 @@ def list_for_resource( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config): """Gets policy assignments for a resource. - .. warning:: - This method is deprecated - :param resource_group_name: The name of the resource group containing the resource. The name is case insensitive. :type resource_group_name: str @@ -342,7 +338,6 @@ def list_for_resource( ~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignmentPaged[~azure.mgmt.resource.policy.v2016_12_01.models.PolicyAssignment] :raises: :class:`CloudError` """ - warnings.warn("Method list_for_resource is deprecated", DeprecationWarning) def internal_paging(next_link=None, raw=False): if not next_link: diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/policy_client.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/policy_client.py index 16d57610fef0..5b3ed9584044 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/policy_client.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2016_12_01/policy_client.py @@ -9,7 +9,6 @@ # regenerated. # -------------------------------------------------------------------------- -import warnings from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_assignments_operations.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_assignments_operations.py index 3338ae8646b2..fbfc016db7c3 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_assignments_operations.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/operations/policy_assignments_operations.py @@ -10,7 +10,6 @@ # -------------------------------------------------------------------------- import uuid -import warnings from msrest.pipeline import ClientRawResponse from .. import models @@ -309,9 +308,6 @@ def list_for_resource( self, resource_group_name, resource_provider_namespace, parent_resource_path, resource_type, resource_name, filter=None, custom_headers=None, raw=False, **operation_config): """Gets policy assignments for a resource. - .. warning:: - This method is deprecated - :param resource_group_name: The name of the resource group containing the resource. The name is case insensitive. :type resource_group_name: str @@ -338,7 +334,6 @@ def list_for_resource( :raises: :class:`ErrorResponseException` """ - warnings.warn("Method list_for_resource is deprecated", DeprecationWarning) def internal_paging(next_link=None, raw=False): if not next_link: diff --git a/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/policy_client.py b/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/policy_client.py index 381f4f713ac5..d1c7ed935275 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/policy_client.py +++ b/azure-mgmt-resource/azure/mgmt/resource/policy/v2017_06_01_preview/policy_client.py @@ -9,7 +9,6 @@ # regenerated. # -------------------------------------------------------------------------- -import warnings from msrest.service_client import SDKClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/__init__.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/__init__.py index ae4447cedf0d..8e763379cfca 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/__init__.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/__init__.py @@ -33,6 +33,7 @@ from .deployment_extended_py3 import DeploymentExtended from .plan_py3 import Plan from .sku_py3 import Sku + from .identity_user_assigned_identities_value_py3 import IdentityUserAssignedIdentitiesValue from .identity_py3 import Identity from .generic_resource_py3 import GenericResource from .resource_group_properties_py3 import ResourceGroupProperties @@ -75,6 +76,7 @@ from .deployment_extended import DeploymentExtended from .plan import Plan from .sku import Sku + from .identity_user_assigned_identities_value import IdentityUserAssignedIdentitiesValue from .identity import Identity from .generic_resource import GenericResource from .resource_group_properties import ResourceGroupProperties @@ -129,6 +131,7 @@ 'DeploymentExtended', 'Plan', 'Sku', + 'IdentityUserAssignedIdentitiesValue', 'Identity', 'GenericResource', 'ResourceGroupProperties', diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity.py index 8b43780d01f6..0f7499f31cfa 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity.py @@ -26,6 +26,12 @@ class Identity(Model): 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' :type type: str or ~azure.mgmt.resource.resources.v2018_05_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the resource. The user identity dictionary key references will be ARM + resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.resource.resources.v2018_05_01.models.IdentityUserAssignedIdentitiesValue] """ _validation = { @@ -37,6 +43,7 @@ class Identity(Model): 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityUserAssignedIdentitiesValue}'}, } def __init__(self, **kwargs): @@ -44,3 +51,4 @@ def __init__(self, **kwargs): self.principal_id = None self.tenant_id = None self.type = kwargs.get('type', None) + self.user_assigned_identities = kwargs.get('user_assigned_identities', None) diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity_py3.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity_py3.py index f3e375c25b3a..6624bd2c5cf2 100644 --- a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity_py3.py +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity_py3.py @@ -26,6 +26,12 @@ class Identity(Model): 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' :type type: str or ~azure.mgmt.resource.resources.v2018_05_01.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the resource. The user identity dictionary key references will be ARM + resource ids in the form: + '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'. + :type user_assigned_identities: dict[str, + ~azure.mgmt.resource.resources.v2018_05_01.models.IdentityUserAssignedIdentitiesValue] """ _validation = { @@ -37,10 +43,12 @@ class Identity(Model): 'principal_id': {'key': 'principalId', 'type': 'str'}, 'tenant_id': {'key': 'tenantId', 'type': 'str'}, 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{IdentityUserAssignedIdentitiesValue}'}, } - def __init__(self, *, type=None, **kwargs) -> None: + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: super(Identity, self).__init__(**kwargs) self.principal_id = None self.tenant_id = None self.type = type + self.user_assigned_identities = user_assigned_identities diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity_user_assigned_identities_value.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity_user_assigned_identities_value.py new file mode 100644 index 000000000000..d4f566ff2086 --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity_user_assigned_identities_value.py @@ -0,0 +1,40 @@ +# 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 IdentityUserAssignedIdentitiesValue(Model): + """IdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(IdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None diff --git a/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity_user_assigned_identities_value_py3.py b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity_user_assigned_identities_value_py3.py new file mode 100644 index 000000000000..16159b444f4f --- /dev/null +++ b/azure-mgmt-resource/azure/mgmt/resource/resources/v2018_05_01/models/identity_user_assigned_identities_value_py3.py @@ -0,0 +1,40 @@ +# 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 IdentityUserAssignedIdentitiesValue(Model): + """IdentityUserAssignedIdentitiesValue. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of user assigned identity. + :vartype principal_id: str + :ivar client_id: The client id of user assigned identity. + :vartype client_id: str + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(IdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None