diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/_service_fabric_management_client.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/_service_fabric_management_client.py index cda98aa0e4c7..2776dc8cc068 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/_service_fabric_management_client.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/_service_fabric_management_client.py @@ -59,7 +59,7 @@ def __init__( super(ServiceFabricManagementClient, 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-03-01' + self.api_version = '2019-06-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/__init__.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/__init__.py index 64315742f6c5..faa9937184f9 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/__init__.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/__init__.py @@ -21,6 +21,7 @@ from ._models_py3 import ApplicationTypeVersionResource from ._models_py3 import ApplicationTypeVersionResourceList from ._models_py3 import ApplicationUpgradePolicy + from ._models_py3 import ApplicationUserAssignedIdentity from ._models_py3 import ArmApplicationHealthPolicy from ._models_py3 import ArmRollingUpgradeMonitoringPolicy from ._models_py3 import ArmServiceTypeHealthPolicy @@ -42,6 +43,7 @@ from ._models_py3 import EndpointRangeDescription from ._models_py3 import ErrorModel, ErrorModelException from ._models_py3 import ErrorModelError + from ._models_py3 import ManagedIdentity from ._models_py3 import NamedPartitionSchemeDescription from ._models_py3 import NodeTypeDescription from ._models_py3 import OperationResult @@ -69,6 +71,7 @@ from ._models_py3 import StatelessServiceProperties from ._models_py3 import StatelessServiceUpdateProperties from ._models_py3 import UniformInt64RangePartitionSchemeDescription + from ._models_py3 import UserAssignedIdentity except (SyntaxError, ImportError): from ._models import ApplicationDeltaHealthPolicy from ._models import ApplicationHealthPolicy @@ -81,6 +84,7 @@ from ._models import ApplicationTypeVersionResource from ._models import ApplicationTypeVersionResourceList from ._models import ApplicationUpgradePolicy + from ._models import ApplicationUserAssignedIdentity from ._models import ArmApplicationHealthPolicy from ._models import ArmRollingUpgradeMonitoringPolicy from ._models import ArmServiceTypeHealthPolicy @@ -102,6 +106,7 @@ from ._models import EndpointRangeDescription from ._models import ErrorModel, ErrorModelException from ._models import ErrorModelError + from ._models import ManagedIdentity from ._models import NamedPartitionSchemeDescription from ._models import NodeTypeDescription from ._models import OperationResult @@ -129,9 +134,11 @@ from ._models import StatelessServiceProperties from ._models import StatelessServiceUpdateProperties from ._models import UniformInt64RangePartitionSchemeDescription + from ._models import UserAssignedIdentity from ._paged_models import OperationResultPaged from ._service_fabric_management_client_enums import ( ProvisioningState, + ManagedIdentityType, ArmUpgradeFailureAction, ServiceCorrelationScheme, MoveCost, @@ -154,6 +161,7 @@ 'ApplicationTypeVersionResource', 'ApplicationTypeVersionResourceList', 'ApplicationUpgradePolicy', + 'ApplicationUserAssignedIdentity', 'ArmApplicationHealthPolicy', 'ArmRollingUpgradeMonitoringPolicy', 'ArmServiceTypeHealthPolicy', @@ -175,6 +183,7 @@ 'EndpointRangeDescription', 'ErrorModel', 'ErrorModelException', 'ErrorModelError', + 'ManagedIdentity', 'NamedPartitionSchemeDescription', 'NodeTypeDescription', 'OperationResult', @@ -202,8 +211,10 @@ 'StatelessServiceProperties', 'StatelessServiceUpdateProperties', 'UniformInt64RangePartitionSchemeDescription', + 'UserAssignedIdentity', 'OperationResultPaged', 'ProvisioningState', + 'ManagedIdentityType', 'ArmUpgradeFailureAction', 'ServiceCorrelationScheme', 'MoveCost', diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models.py index 227321db7212..febcd46deac4 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models.py @@ -191,6 +191,8 @@ class ApplicationResource(ProxyResource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param identity: Describes the managed identities for an Azure resource. + :type identity: ~azure.mgmt.servicefabric.models.ManagedIdentity :param type_version: The version of the application type as defined in the application manifest. :type type_version: str @@ -220,6 +222,10 @@ class ApplicationResource(ProxyResource): :param metrics: List of application capacity metric description. :type metrics: list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription] + :param managed_identities: List of user assigned identities for the + application, each mapped to a friendly name. + :type managed_identities: + list[~azure.mgmt.servicefabric.models.ApplicationUserAssignedIdentity] :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str @@ -245,6 +251,7 @@ class ApplicationResource(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedIdentity'}, 'type_version': {'key': 'properties.typeVersion', 'type': 'str'}, 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'ApplicationUpgradePolicy'}, @@ -252,12 +259,14 @@ class ApplicationResource(ProxyResource): 'maximum_nodes': {'key': 'properties.maximumNodes', 'type': 'long'}, 'remove_application_capacity': {'key': 'properties.removeApplicationCapacity', 'type': 'bool'}, 'metrics': {'key': 'properties.metrics', 'type': '[ApplicationMetricDescription]'}, + 'managed_identities': {'key': 'properties.managedIdentities', 'type': '[ApplicationUserAssignedIdentity]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'type_name': {'key': 'properties.typeName', 'type': 'str'}, } def __init__(self, **kwargs): super(ApplicationResource, self).__init__(**kwargs) + self.identity = kwargs.get('identity', None) self.type_version = kwargs.get('type_version', None) self.parameters = kwargs.get('parameters', None) self.upgrade_policy = kwargs.get('upgrade_policy', None) @@ -265,6 +274,7 @@ def __init__(self, **kwargs): self.maximum_nodes = kwargs.get('maximum_nodes', 0) self.remove_application_capacity = kwargs.get('remove_application_capacity', None) self.metrics = kwargs.get('metrics', None) + self.managed_identities = kwargs.get('managed_identities', None) self.provisioning_state = None self.type_name = kwargs.get('type_name', None) @@ -345,6 +355,10 @@ class ApplicationResourceUpdate(ProxyResource): :param metrics: List of application capacity metric description. :type metrics: list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription] + :param managed_identities: List of user assigned identities for the + application, each mapped to a friendly name. + :type managed_identities: + list[~azure.mgmt.servicefabric.models.ApplicationUserAssignedIdentity] """ _validation = { @@ -370,6 +384,7 @@ class ApplicationResourceUpdate(ProxyResource): 'maximum_nodes': {'key': 'properties.maximumNodes', 'type': 'long'}, 'remove_application_capacity': {'key': 'properties.removeApplicationCapacity', 'type': 'bool'}, 'metrics': {'key': 'properties.metrics', 'type': '[ApplicationMetricDescription]'}, + 'managed_identities': {'key': 'properties.managedIdentities', 'type': '[ApplicationUserAssignedIdentity]'}, } def __init__(self, **kwargs): @@ -381,6 +396,7 @@ def __init__(self, **kwargs): self.maximum_nodes = kwargs.get('maximum_nodes', 0) self.remove_application_capacity = kwargs.get('remove_application_capacity', None) self.metrics = kwargs.get('metrics', None) + self.managed_identities = kwargs.get('managed_identities', None) class ApplicationTypeResource(ProxyResource): @@ -589,6 +605,33 @@ def __init__(self, **kwargs): self.application_health_policy = kwargs.get('application_health_policy', None) +class ApplicationUserAssignedIdentity(Model): + """ApplicationUserAssignedIdentity. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The friendly name of user assigned identity. + :type name: str + :param principal_id: Required. The principal id of user assigned identity. + :type principal_id: str + """ + + _validation = { + 'name': {'required': True}, + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationUserAssignedIdentity, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.principal_id = kwargs.get('principal_id', None) + + class ArmApplicationHealthPolicy(Model): """Defines a health policy used to evaluate the health of an application or one of its children entities. @@ -1053,7 +1096,7 @@ class Cluster(Resource): ~azure.mgmt.servicefabric.models.ProvisioningState :param reliability_level: The reliability level sets the replica set size of system services. Learn about - [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. - Bronze - Run the System services with a target replica set count of 3. @@ -1345,7 +1388,7 @@ class ClusterUpdateParameters(Model): list[~azure.mgmt.servicefabric.models.NodeTypeDescription] :param reliability_level: The reliability level sets the replica set size of system services. Learn about - [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. - Bronze - Run the System services with a target replica set count of 3. @@ -1587,6 +1630,9 @@ class DiagnosticsStorageAccountConfig(Model): :param protected_account_key_name: Required. The protected diagnostics storage key name. :type protected_account_key_name: str + :param protected_account_key_name2: The secondary protected diagnostics + storage key name. + :type protected_account_key_name2: str :param blob_endpoint: Required. The blob endpoint of the azure storage account. :type blob_endpoint: str @@ -1609,6 +1655,7 @@ class DiagnosticsStorageAccountConfig(Model): _attribute_map = { 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, 'protected_account_key_name': {'key': 'protectedAccountKeyName', 'type': 'str'}, + 'protected_account_key_name2': {'key': 'protectedAccountKeyName2', 'type': 'str'}, 'blob_endpoint': {'key': 'blobEndpoint', 'type': 'str'}, 'queue_endpoint': {'key': 'queueEndpoint', 'type': 'str'}, 'table_endpoint': {'key': 'tableEndpoint', 'type': 'str'}, @@ -1618,6 +1665,7 @@ def __init__(self, **kwargs): super(DiagnosticsStorageAccountConfig, self).__init__(**kwargs) self.storage_account_name = kwargs.get('storage_account_name', None) self.protected_account_key_name = kwargs.get('protected_account_key_name', None) + self.protected_account_key_name2 = kwargs.get('protected_account_key_name2', None) self.blob_endpoint = kwargs.get('blob_endpoint', None) self.queue_endpoint = kwargs.get('queue_endpoint', None) self.table_endpoint = kwargs.get('table_endpoint', None) @@ -1698,6 +1746,50 @@ def __init__(self, **kwargs): self.message = kwargs.get('message', None) +class ManagedIdentity(Model): + """Describes the managed identities for an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of the managed identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the managed identity. This property will + only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of managed identity for the resource. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or ~azure.mgmt.servicefabric.models.ManagedIdentityType + :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.servicefabric.models.UserAssignedIdentity] + """ + + _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': 'ManagedIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__(self, **kwargs): + super(ManagedIdentity, 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) + + class PartitionSchemeDescription(Model): """Describes how the service is partitioned. @@ -1786,7 +1878,7 @@ class NodeTypeDescription(Model): :type http_gateway_endpoint_port: int :param durability_level: The durability level of the node type. Learn about - [DurabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + [DurabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). - Bronze - No privileges. This is the default. - Silver - The infrastructure jobs can be paused for a duration of 10 minutes per UD. @@ -2885,3 +2977,31 @@ def __init__(self, **kwargs): self.low_key = kwargs.get('low_key', None) self.high_key = kwargs.get('high_key', None) self.partition_scheme = 'UniformInt64Range' + + +class UserAssignedIdentity(Model): + """UserAssignedIdentity. + + 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(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models_py3.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models_py3.py index 40255dab3990..cd96cd4804a3 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models_py3.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models_py3.py @@ -191,6 +191,8 @@ class ApplicationResource(ProxyResource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param identity: Describes the managed identities for an Azure resource. + :type identity: ~azure.mgmt.servicefabric.models.ManagedIdentity :param type_version: The version of the application type as defined in the application manifest. :type type_version: str @@ -220,6 +222,10 @@ class ApplicationResource(ProxyResource): :param metrics: List of application capacity metric description. :type metrics: list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription] + :param managed_identities: List of user assigned identities for the + application, each mapped to a friendly name. + :type managed_identities: + list[~azure.mgmt.servicefabric.models.ApplicationUserAssignedIdentity] :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str @@ -245,6 +251,7 @@ class ApplicationResource(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'identity': {'key': 'identity', 'type': 'ManagedIdentity'}, 'type_version': {'key': 'properties.typeVersion', 'type': 'str'}, 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'ApplicationUpgradePolicy'}, @@ -252,12 +259,14 @@ class ApplicationResource(ProxyResource): 'maximum_nodes': {'key': 'properties.maximumNodes', 'type': 'long'}, 'remove_application_capacity': {'key': 'properties.removeApplicationCapacity', 'type': 'bool'}, 'metrics': {'key': 'properties.metrics', 'type': '[ApplicationMetricDescription]'}, + 'managed_identities': {'key': 'properties.managedIdentities', 'type': '[ApplicationUserAssignedIdentity]'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'type_name': {'key': 'properties.typeName', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, type_version: str=None, parameters=None, upgrade_policy=None, minimum_nodes: int=None, maximum_nodes: int=0, remove_application_capacity: bool=None, metrics=None, type_name: str=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, identity=None, type_version: str=None, parameters=None, upgrade_policy=None, minimum_nodes: int=None, maximum_nodes: int=0, remove_application_capacity: bool=None, metrics=None, managed_identities=None, type_name: str=None, **kwargs) -> None: super(ApplicationResource, self).__init__(location=location, tags=tags, **kwargs) + self.identity = identity self.type_version = type_version self.parameters = parameters self.upgrade_policy = upgrade_policy @@ -265,6 +274,7 @@ def __init__(self, *, location: str=None, tags=None, type_version: str=None, par self.maximum_nodes = maximum_nodes self.remove_application_capacity = remove_application_capacity self.metrics = metrics + self.managed_identities = managed_identities self.provisioning_state = None self.type_name = type_name @@ -345,6 +355,10 @@ class ApplicationResourceUpdate(ProxyResource): :param metrics: List of application capacity metric description. :type metrics: list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription] + :param managed_identities: List of user assigned identities for the + application, each mapped to a friendly name. + :type managed_identities: + list[~azure.mgmt.servicefabric.models.ApplicationUserAssignedIdentity] """ _validation = { @@ -370,9 +384,10 @@ class ApplicationResourceUpdate(ProxyResource): 'maximum_nodes': {'key': 'properties.maximumNodes', 'type': 'long'}, 'remove_application_capacity': {'key': 'properties.removeApplicationCapacity', 'type': 'bool'}, 'metrics': {'key': 'properties.metrics', 'type': '[ApplicationMetricDescription]'}, + 'managed_identities': {'key': 'properties.managedIdentities', 'type': '[ApplicationUserAssignedIdentity]'}, } - def __init__(self, *, location: str=None, tags=None, type_version: str=None, parameters=None, upgrade_policy=None, minimum_nodes: int=None, maximum_nodes: int=0, remove_application_capacity: bool=None, metrics=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, type_version: str=None, parameters=None, upgrade_policy=None, minimum_nodes: int=None, maximum_nodes: int=0, remove_application_capacity: bool=None, metrics=None, managed_identities=None, **kwargs) -> None: super(ApplicationResourceUpdate, self).__init__(location=location, tags=tags, **kwargs) self.type_version = type_version self.parameters = parameters @@ -381,6 +396,7 @@ def __init__(self, *, location: str=None, tags=None, type_version: str=None, par self.maximum_nodes = maximum_nodes self.remove_application_capacity = remove_application_capacity self.metrics = metrics + self.managed_identities = managed_identities class ApplicationTypeResource(ProxyResource): @@ -589,6 +605,33 @@ def __init__(self, *, upgrade_replica_set_check_timeout: str=None, force_restart self.application_health_policy = application_health_policy +class ApplicationUserAssignedIdentity(Model): + """ApplicationUserAssignedIdentity. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The friendly name of user assigned identity. + :type name: str + :param principal_id: Required. The principal id of user assigned identity. + :type principal_id: str + """ + + _validation = { + 'name': {'required': True}, + 'principal_id': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + } + + def __init__(self, *, name: str, principal_id: str, **kwargs) -> None: + super(ApplicationUserAssignedIdentity, self).__init__(**kwargs) + self.name = name + self.principal_id = principal_id + + class ArmApplicationHealthPolicy(Model): """Defines a health policy used to evaluate the health of an application or one of its children entities. @@ -1053,7 +1096,7 @@ class Cluster(Resource): ~azure.mgmt.servicefabric.models.ProvisioningState :param reliability_level: The reliability level sets the replica set size of system services. Learn about - [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. - Bronze - Run the System services with a target replica set count of 3. @@ -1345,7 +1388,7 @@ class ClusterUpdateParameters(Model): list[~azure.mgmt.servicefabric.models.NodeTypeDescription] :param reliability_level: The reliability level sets the replica set size of system services. Learn about - [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). - None - Run the System services with a target replica set count of 1. This should only be used for test clusters. - Bronze - Run the System services with a target replica set count of 3. @@ -1587,6 +1630,9 @@ class DiagnosticsStorageAccountConfig(Model): :param protected_account_key_name: Required. The protected diagnostics storage key name. :type protected_account_key_name: str + :param protected_account_key_name2: The secondary protected diagnostics + storage key name. + :type protected_account_key_name2: str :param blob_endpoint: Required. The blob endpoint of the azure storage account. :type blob_endpoint: str @@ -1609,15 +1655,17 @@ class DiagnosticsStorageAccountConfig(Model): _attribute_map = { 'storage_account_name': {'key': 'storageAccountName', 'type': 'str'}, 'protected_account_key_name': {'key': 'protectedAccountKeyName', 'type': 'str'}, + 'protected_account_key_name2': {'key': 'protectedAccountKeyName2', 'type': 'str'}, 'blob_endpoint': {'key': 'blobEndpoint', 'type': 'str'}, 'queue_endpoint': {'key': 'queueEndpoint', 'type': 'str'}, 'table_endpoint': {'key': 'tableEndpoint', 'type': 'str'}, } - def __init__(self, *, storage_account_name: str, protected_account_key_name: str, blob_endpoint: str, queue_endpoint: str, table_endpoint: str, **kwargs) -> None: + def __init__(self, *, storage_account_name: str, protected_account_key_name: str, blob_endpoint: str, queue_endpoint: str, table_endpoint: str, protected_account_key_name2: str=None, **kwargs) -> None: super(DiagnosticsStorageAccountConfig, self).__init__(**kwargs) self.storage_account_name = storage_account_name self.protected_account_key_name = protected_account_key_name + self.protected_account_key_name2 = protected_account_key_name2 self.blob_endpoint = blob_endpoint self.queue_endpoint = queue_endpoint self.table_endpoint = table_endpoint @@ -1698,6 +1746,50 @@ def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: self.message = message +class ManagedIdentity(Model): + """Describes the managed identities for an Azure resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar principal_id: The principal id of the managed identity. This + property will only be provided for a system assigned identity. + :vartype principal_id: str + :ivar tenant_id: The tenant id of the managed identity. This property will + only be provided for a system assigned identity. + :vartype tenant_id: str + :param type: The type of managed identity for the resource. Possible + values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned, + UserAssigned', 'None' + :type type: str or ~azure.mgmt.servicefabric.models.ManagedIdentityType + :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.servicefabric.models.UserAssignedIdentity] + """ + + _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': 'ManagedIdentityType'}, + 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'}, + } + + def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None: + super(ManagedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.tenant_id = None + self.type = type + self.user_assigned_identities = user_assigned_identities + + class PartitionSchemeDescription(Model): """Describes how the service is partitioned. @@ -1786,7 +1878,7 @@ class NodeTypeDescription(Model): :type http_gateway_endpoint_port: int :param durability_level: The durability level of the node type. Learn about - [DurabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity). + [DurabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity). - Bronze - No privileges. This is the default. - Silver - The infrastructure jobs can be paused for a duration of 10 minutes per UD. @@ -2885,3 +2977,31 @@ def __init__(self, *, count: int, low_key: str, high_key: str, **kwargs) -> None self.low_key = low_key self.high_key = high_key self.partition_scheme = 'UniformInt64Range' + + +class UserAssignedIdentity(Model): + """UserAssignedIdentity. + + 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(UserAssignedIdentity, self).__init__(**kwargs) + self.principal_id = None + self.client_id = None diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_service_fabric_management_client_enums.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_service_fabric_management_client_enums.py index 166593097003..bda5b8f60d70 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_service_fabric_management_client_enums.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_service_fabric_management_client_enums.py @@ -20,6 +20,14 @@ class ProvisioningState(str, Enum): canceled = "Canceled" +class ManagedIdentityType(str, Enum): + + system_assigned = "SystemAssigned" #: Indicates that system assigned identity is associated with the resource. + user_assigned = "UserAssigned" #: Indicates that user assigned identity is associated with the resource. + system_assigned_user_assigned = "SystemAssigned, UserAssigned" #: Indicates that both system assigned and user assigned identity are associated with the resource. + none = "None" #: Indicates that no identity is associated with the resource. + + class ArmUpgradeFailureAction(str, Enum): rollback = "Rollback" #: Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails. diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_type_versions_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_type_versions_operations.py index 4328ce62ea90..0b6eda0e76df 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_type_versions_operations.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_type_versions_operations.py @@ -26,7 +26,7 @@ class ApplicationTypeVersionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-03-01" for this specification. Constant value: "2019-03-01". + :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-06-01-preview" for this specification. Constant value: "2019-06-01-preview". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-01" + self.api_version = "2019-06-01-preview" self.config = config @@ -114,10 +114,10 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}'} - def _create_or_update_initial( + def _create_initial( self, resource_group_name, cluster_name, application_type_name, version, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -163,7 +163,7 @@ def _create_or_update_initial( return deserialized - def create_or_update( + def create( self, resource_group_name, cluster_name, application_type_name, version, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a Service Fabric application type version resource. @@ -197,7 +197,7 @@ def create_or_update( :raises: :class:`ErrorModelException` """ - raw_result = self._create_or_update_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, application_type_name=application_type_name, @@ -224,7 +224,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}'} + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}/versions/{version}'} def _delete_initial( diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_types_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_types_operations.py index bd3b8ed9b9cf..40c85c37cbeb 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_types_operations.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_types_operations.py @@ -26,7 +26,7 @@ class ApplicationTypesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-03-01" for this specification. Constant value: "2019-03-01". + :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-06-01-preview" for this specification. Constant value: "2019-06-01-preview". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-01" + self.api_version = "2019-06-01-preview" self.config = config @@ -107,7 +107,7 @@ def get( return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}'} - def create_or_update( + def create( self, resource_group_name, cluster_name, application_type_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): """Creates or updates a Service Fabric application type name resource. @@ -140,7 +140,7 @@ def create_or_update( parameters = models.ApplicationTypeResource(location=location, tags=tags) # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -183,7 +183,7 @@ def create_or_update( return client_raw_response return deserialized - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}'} + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}'} def _delete_initial( diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_applications_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_applications_operations.py index cc5d71a046af..edc179bc633c 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_applications_operations.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_applications_operations.py @@ -26,7 +26,7 @@ class ApplicationsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-03-01" for this specification. Constant value: "2019-03-01". + :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-06-01-preview" for this specification. Constant value: "2019-06-01-preview". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-01" + self.api_version = "2019-06-01-preview" self.config = config @@ -107,10 +107,10 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}'} - def _create_or_update_initial( + def _create_initial( self, resource_group_name, cluster_name, application_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -155,7 +155,7 @@ def _create_or_update_initial( return deserialized - def create_or_update( + def create( self, resource_group_name, cluster_name, application_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a Service Fabric application resource. @@ -184,7 +184,7 @@ def create_or_update( :raises: :class:`ErrorModelException` """ - raw_result = self._create_or_update_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, application_name=application_name, @@ -210,7 +210,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}'} + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}'} def _update_initial( diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_cluster_versions_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_cluster_versions_operations.py index cba7391cba03..884d6329a9be 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_cluster_versions_operations.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_cluster_versions_operations.py @@ -25,7 +25,7 @@ class ClusterVersionsOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-03-01" for this specification. Constant value: "2019-03-01". + :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-06-01-preview" for this specification. Constant value: "2019-06-01-preview". """ models = models @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-01" + self.api_version = "2019-06-01-preview" self.config = config diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_clusters_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_clusters_operations.py index f179db760c8f..84d8adde6fa8 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_clusters_operations.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_clusters_operations.py @@ -26,7 +26,7 @@ class ClustersOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-03-01" for this specification. Constant value: "2019-03-01". + :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-06-01-preview" for this specification. Constant value: "2019-06-01-preview". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-01" + self.api_version = "2019-06-01-preview" self.config = config @@ -104,10 +104,10 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}'} - def _create_or_update_initial( + def _create_initial( self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create.metadata['url'] path_format_arguments = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), @@ -153,7 +153,7 @@ def _create_or_update_initial( return deserialized - def create_or_update( + def create( self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a Service Fabric cluster resource. @@ -180,7 +180,7 @@ def create_or_update( :raises: :class:`ErrorModelException` """ - raw_result = self._create_or_update_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, parameters=parameters, @@ -205,7 +205,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}'} + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}'} def _update_initial( diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_services_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_services_operations.py index b253a18ae3f9..a785dc0dc4c2 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_services_operations.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_services_operations.py @@ -26,7 +26,7 @@ class ServicesOperations(object): :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-03-01" for this specification. Constant value: "2019-03-01". + :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-06-01-preview" for this specification. Constant value: "2019-06-01-preview". """ models = models @@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2019-03-01" + self.api_version = "2019-06-01-preview" self.config = config @@ -111,10 +111,10 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}/services/{serviceName}'} - def _create_or_update_initial( + def _create_initial( self, resource_group_name, cluster_name, application_name, service_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL - url = self.create_or_update.metadata['url'] + url = self.create.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -160,7 +160,7 @@ def _create_or_update_initial( return deserialized - def create_or_update( + def create( self, resource_group_name, cluster_name, application_name, service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): """Creates or updates a Service Fabric service resource. @@ -192,7 +192,7 @@ def create_or_update( :raises: :class:`ErrorModelException` """ - raw_result = self._create_or_update_initial( + raw_result = self._create_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, application_name=application_name, @@ -219,7 +219,7 @@ def get_long_running_output(response): elif polling is False: polling_method = NoPolling() else: polling_method = polling return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}/services/{serviceName}'} + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applications/{applicationName}/services/{serviceName}'} def _update_initial(