diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py index 5cf5b297b638..4b6dd4bed3de 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py @@ -25,6 +25,8 @@ from .storage_account_py3 import StorageAccount from .storage_profile_py3 import StorageProfile from .cluster_create_properties_py3 import ClusterCreateProperties + from .cluster_identity_user_assigned_identities_value_py3 import ClusterIdentityUserAssignedIdentitiesValue + from .cluster_identity_py3 import ClusterIdentity from .cluster_create_parameters_extended_py3 import ClusterCreateParametersExtended from .cluster_patch_parameters_py3 import ClusterPatchParameters from .quota_info_py3 import QuotaInfo @@ -73,6 +75,8 @@ from .storage_account import StorageAccount from .storage_profile import StorageProfile from .cluster_create_properties import ClusterCreateProperties + from .cluster_identity_user_assigned_identities_value import ClusterIdentityUserAssignedIdentitiesValue + from .cluster_identity import ClusterIdentity from .cluster_create_parameters_extended import ClusterCreateParametersExtended from .cluster_patch_parameters import ClusterPatchParameters from .quota_info import QuotaInfo @@ -113,6 +117,7 @@ DirectoryType, OSType, Tier, + ResourceIdentityType, HDInsightClusterProvisioningState, AsyncOperationState, ) @@ -133,6 +138,8 @@ 'StorageAccount', 'StorageProfile', 'ClusterCreateProperties', + 'ClusterIdentityUserAssignedIdentitiesValue', + 'ClusterIdentity', 'ClusterCreateParametersExtended', 'ClusterPatchParameters', 'QuotaInfo', @@ -172,6 +179,7 @@ 'DirectoryType', 'OSType', 'Tier', + 'ResourceIdentityType', 'HDInsightClusterProvisioningState', 'AsyncOperationState', ] diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster.py index cff55f384b0c..a9789d7e0561 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster.py @@ -32,6 +32,8 @@ class Cluster(TrackedResource): :type etag: str :param properties: The properties of the cluster. :type properties: ~azure.mgmt.hdinsight.models.ClusterGetProperties + :param identity: The identity of the cluster, if configured. + :type identity: ~azure.mgmt.hdinsight.models.ClusterIdentity """ _validation = { @@ -48,9 +50,11 @@ class Cluster(TrackedResource): 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'ClusterGetProperties'}, + 'identity': {'key': 'identity', 'type': 'ClusterIdentity'}, } def __init__(self, **kwargs): super(Cluster, self).__init__(**kwargs) self.etag = kwargs.get('etag', None) self.properties = kwargs.get('properties', None) + self.identity = kwargs.get('identity', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended.py index 898754c65466..cf52365c9f99 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended.py @@ -21,12 +21,15 @@ class ClusterCreateParametersExtended(Model): :type tags: dict[str, str] :param properties: The cluster create parameters. :type properties: ~azure.mgmt.hdinsight.models.ClusterCreateProperties + :param identity: The identity of the cluster, if configured. + :type identity: ~azure.mgmt.hdinsight.models.ClusterIdentity """ _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'properties': {'key': 'properties', 'type': 'ClusterCreateProperties'}, + 'identity': {'key': 'identity', 'type': 'ClusterIdentity'}, } def __init__(self, **kwargs): @@ -34,3 +37,4 @@ def __init__(self, **kwargs): self.location = kwargs.get('location', None) self.tags = kwargs.get('tags', None) self.properties = kwargs.get('properties', None) + self.identity = kwargs.get('identity', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended_py3.py index 31dfb47324d2..ab3cc3ffb567 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended_py3.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended_py3.py @@ -21,16 +21,20 @@ class ClusterCreateParametersExtended(Model): :type tags: dict[str, str] :param properties: The cluster create parameters. :type properties: ~azure.mgmt.hdinsight.models.ClusterCreateProperties + :param identity: The identity of the cluster, if configured. + :type identity: ~azure.mgmt.hdinsight.models.ClusterIdentity """ _attribute_map = { 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'properties': {'key': 'properties', 'type': 'ClusterCreateProperties'}, + 'identity': {'key': 'identity', 'type': 'ClusterIdentity'}, } - def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, properties=None, identity=None, **kwargs) -> None: super(ClusterCreateParametersExtended, self).__init__(**kwargs) self.location = location self.tags = tags self.properties = properties + self.identity = identity diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_identity.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_identity.py new file mode 100644 index 000000000000..faaf1bd05360 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_identity.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.serialization import Model + + +class ClusterIdentity(Model): + """Identity for the cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of cluster identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the cluster. This property + will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the cluster. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or ~azure.mgmt.hdinsight.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the cluster. 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.hdinsight.models.ClusterIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ClusterIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, **kwargs): + super(ClusterIdentity, self).__init__(**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-hdinsight/azure/mgmt/hdinsight/models/cluster_identity_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_identity_py3.py new file mode 100644 index 000000000000..01df7592337f --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_identity_py3.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.serialization import Model + + +class ClusterIdentity(Model): + """Identity for the cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of cluster identity. This property + will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id associated with the cluster. This property + will only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of identity used for the cluster. The type + 'SystemAssigned, UserAssigned' includes both an implicitly created + identity and a set of user assigned identities. Possible values include: + 'SystemAssigned', 'UserAssigned', 'SystemAssigned, UserAssigned', 'None' + :type type: str or ~azure.mgmt.hdinsight.models.ResourceIdentityType + :param user_assigned_identities: The list of user identities associated + with the cluster. 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.hdinsight.models.ClusterIdentityUserAssignedIdentitiesValue] + """ + + _validation = { + 'principal_id': {'readonly': True}, + 'tenant_id': {'readonly': True}, + } + + _attribute_map = { + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'tenant_id': {'key': 'tenantId', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'ResourceIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{ClusterIdentityUserAssignedIdentitiesValue}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(ClusterIdentity, 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-hdinsight/azure/mgmt/hdinsight/models/cluster_identity_user_assigned_identities_value.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_identity_user_assigned_identities_value.py new file mode 100644 index 000000000000..c72247be9c88 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_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 ClusterIdentityUserAssignedIdentitiesValue(Model): + """ClusterIdentityUserAssignedIdentitiesValue. + + 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(ClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_identity_user_assigned_identities_value_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_identity_user_assigned_identities_value_py3.py new file mode 100644 index 000000000000..697dfdb82627 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_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 ClusterIdentityUserAssignedIdentitiesValue(Model): + """ClusterIdentityUserAssignedIdentitiesValue. + + 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(ClusterIdentityUserAssignedIdentitiesValue, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_py3.py index c73049d9c383..795bea63608f 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_py3.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_py3.py @@ -32,6 +32,8 @@ class Cluster(TrackedResource): :type etag: str :param properties: The properties of the cluster. :type properties: ~azure.mgmt.hdinsight.models.ClusterGetProperties + :param identity: The identity of the cluster, if configured. + :type identity: ~azure.mgmt.hdinsight.models.ClusterIdentity """ _validation = { @@ -48,9 +50,11 @@ class Cluster(TrackedResource): 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, 'properties': {'key': 'properties', 'type': 'ClusterGetProperties'}, + 'identity': {'key': 'identity', 'type': 'ClusterIdentity'}, } - def __init__(self, *, location: str=None, tags=None, etag: str=None, properties=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, etag: str=None, properties=None, identity=None, **kwargs) -> None: super(Cluster, self).__init__(location=location, tags=tags, **kwargs) self.etag = etag self.properties = properties + self.identity = identity diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hd_insight_management_client_enums.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hd_insight_management_client_enums.py index 5c9779b9846e..d4988723eada 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hd_insight_management_client_enums.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hd_insight_management_client_enums.py @@ -29,6 +29,14 @@ class Tier(str, Enum): premium = "Premium" +class ResourceIdentityType(str, Enum): + + system_assigned = "SystemAssigned" + user_assigned = "UserAssigned" + system_assigned_user_assigned = "SystemAssigned, UserAssigned" + none = "None" + + class HDInsightClusterProvisioningState(str, Enum): in_progress = "InProgress"