diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/README.md b/sdk/servicefabric/azure-mgmt-servicefabric/README.md index 486971896332..20fd5a5bc608 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/README.md +++ b/sdk/servicefabric/azure-mgmt-servicefabric/README.md @@ -1,29 +1,21 @@ -## Microsoft Azure SDK for Python +# Microsoft Azure SDK for Python This is the Microsoft Azure Service Fabric Management Client Library. +This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8. +For a more complete view of Azure libraries, see the [Github repo](https://github.com/Azure/azure-sdk-for-python/) -Azure Resource Manager (ARM) is the next generation of management APIs -that replace the old Azure Service Management (ASM). -This package has been tested with Python 2.7, 3.5, 3.6 and 3.7. +# Usage -For the older Azure Service Management (ASM) libraries, see -[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy) -library. - -For a more complete set of Azure libraries, see the -[azure](https://pypi.python.org/pypi/azure) bundle package. - -## Usage - -For code examples, see [Service Fabric -Management](https://docs.microsoft.com/python/api/overview/azure/servicefabric) +For code examples, see [Service Fabric Management](https://docs.microsoft.com/python/api/overview/azure/servicefabric) on docs.microsoft.com. -## Provide Feedback -If you encounter any bugs or have suggestions, please file an issue in -the [Issues](https://github.com/Azure/azure-sdk-for-python/issues) +# Provide Feedback + +If you encounter any bugs or have suggestions, please file an issue in the +[Issues](https://github.com/Azure/azure-sdk-for-python/issues) section of the project. -![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-servicefabric%2FREADME.png) + +![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-servicefabric%2FREADME.png) 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..fb9de39b3632 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 = '2020-03-01' 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..238ca1d733d1 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 @@ -20,7 +20,9 @@ from ._models_py3 import ApplicationTypeResourceList from ._models_py3 import ApplicationTypeVersionResource from ._models_py3 import ApplicationTypeVersionResourceList + from ._models_py3 import ApplicationTypeVersionsCleanupPolicy 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 +44,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 +72,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 @@ -80,7 +84,9 @@ from ._models import ApplicationTypeResourceList from ._models import ApplicationTypeVersionResource from ._models import ApplicationTypeVersionResourceList + from ._models import ApplicationTypeVersionsCleanupPolicy from ._models import ApplicationUpgradePolicy + from ._models import ApplicationUserAssignedIdentity from ._models import ArmApplicationHealthPolicy from ._models import ArmRollingUpgradeMonitoringPolicy from ._models import ArmServiceTypeHealthPolicy @@ -102,6 +108,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,10 +136,13 @@ 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, + RollingUpgradeMode, ServiceCorrelationScheme, MoveCost, PartitionScheme, @@ -153,7 +163,9 @@ 'ApplicationTypeResourceList', 'ApplicationTypeVersionResource', 'ApplicationTypeVersionResourceList', + 'ApplicationTypeVersionsCleanupPolicy', 'ApplicationUpgradePolicy', + 'ApplicationUserAssignedIdentity', 'ArmApplicationHealthPolicy', 'ArmRollingUpgradeMonitoringPolicy', 'ArmServiceTypeHealthPolicy', @@ -175,6 +187,7 @@ 'EndpointRangeDescription', 'ErrorModel', 'ErrorModelException', 'ErrorModelError', + 'ManagedIdentity', 'NamedPartitionSchemeDescription', 'NodeTypeDescription', 'OperationResult', @@ -202,9 +215,12 @@ 'StatelessServiceProperties', 'StatelessServiceUpdateProperties', 'UniformInt64RangePartitionSchemeDescription', + 'UserAssignedIdentity', 'OperationResultPaged', 'ProvisioningState', + 'ManagedIdentityType', 'ArmUpgradeFailureAction', + 'RollingUpgradeMode', 'ServiceCorrelationScheme', 'MoveCost', 'PartitionScheme', 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..cd4664e7c93a 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): @@ -550,6 +566,29 @@ def __init__(self, **kwargs): self.next_link = None +class ApplicationTypeVersionsCleanupPolicy(Model): + """ApplicationTypeVersionsCleanupPolicy. + + All required parameters must be populated in order to send to Azure. + + :param max_unused_versions_to_keep: Required. Number of unused versions + per application type to keep. + :type max_unused_versions_to_keep: int + """ + + _validation = { + 'max_unused_versions_to_keep': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'max_unused_versions_to_keep': {'key': 'maxUnusedVersionsToKeep', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ApplicationTypeVersionsCleanupPolicy, self).__init__(**kwargs) + self.max_unused_versions_to_keep = kwargs.get('max_unused_versions_to_keep', None) + + class ApplicationUpgradePolicy(Model): """Describes the policy for a monitored application upgrade. @@ -572,6 +611,12 @@ class ApplicationUpgradePolicy(Model): the health of an application or one of its children entities. :type application_health_policy: ~azure.mgmt.servicefabric.models.ArmApplicationHealthPolicy + :param upgrade_mode: The mode used to monitor health during a rolling + upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored. + Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "Monitored" . + :type upgrade_mode: str or + ~azure.mgmt.servicefabric.models.RollingUpgradeMode """ _attribute_map = { @@ -579,6 +624,7 @@ class ApplicationUpgradePolicy(Model): 'force_restart': {'key': 'forceRestart', 'type': 'bool'}, 'rolling_upgrade_monitoring_policy': {'key': 'rollingUpgradeMonitoringPolicy', 'type': 'ArmRollingUpgradeMonitoringPolicy'}, 'application_health_policy': {'key': 'applicationHealthPolicy', 'type': 'ArmApplicationHealthPolicy'}, + 'upgrade_mode': {'key': 'upgradeMode', 'type': 'str'}, } def __init__(self, **kwargs): @@ -587,6 +633,34 @@ def __init__(self, **kwargs): self.force_restart = kwargs.get('force_restart', None) self.rolling_upgrade_monitoring_policy = kwargs.get('rolling_upgrade_monitoring_policy', None) self.application_health_policy = kwargs.get('application_health_policy', None) + self.upgrade_mode = kwargs.get('upgrade_mode', "Monitored") + + +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): @@ -1053,7 +1127,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. @@ -1084,6 +1158,10 @@ class Cluster(Resource): **clusterCodeVersion** property in the cluster resource. . Possible values include: 'Automatic', 'Manual' :type upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum + :param application_type_versions_cleanup_policy: The policy used to clean + up unused versions. + :type application_type_versions_cleanup_policy: + ~azure.mgmt.servicefabric.models.ApplicationTypeVersionsCleanupPolicy :param vm_image: The VM image VMSS has been configured with. Generic names such as Windows or Linux can be used. :type vm_image: str @@ -1133,6 +1211,7 @@ class Cluster(Resource): 'reverse_proxy_certificate_common_names': {'key': 'properties.reverseProxyCertificateCommonNames', 'type': 'ServerCertificateCommonNames'}, 'upgrade_description': {'key': 'properties.upgradeDescription', 'type': 'ClusterUpgradePolicy'}, 'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'str'}, + 'application_type_versions_cleanup_policy': {'key': 'properties.applicationTypeVersionsCleanupPolicy', 'type': 'ApplicationTypeVersionsCleanupPolicy'}, 'vm_image': {'key': 'properties.vmImage', 'type': 'str'}, } @@ -1160,6 +1239,7 @@ def __init__(self, **kwargs): self.reverse_proxy_certificate_common_names = kwargs.get('reverse_proxy_certificate_common_names', None) self.upgrade_description = kwargs.get('upgrade_description', None) self.upgrade_mode = kwargs.get('upgrade_mode', None) + self.application_type_versions_cleanup_policy = kwargs.get('application_type_versions_cleanup_policy', None) self.vm_image = kwargs.get('vm_image', None) @@ -1345,7 +1425,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. @@ -1371,6 +1451,10 @@ class ClusterUpdateParameters(Model): **clusterCodeVersion** property in the cluster resource. . Possible values include: 'Automatic', 'Manual' :type upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum + :param application_type_versions_cleanup_policy: The policy used to clean + up unused versions. + :type application_type_versions_cleanup_policy: + ~azure.mgmt.servicefabric.models.ApplicationTypeVersionsCleanupPolicy :param tags: Cluster update parameters :type tags: dict[str, str] """ @@ -1389,6 +1473,7 @@ class ClusterUpdateParameters(Model): 'reverse_proxy_certificate': {'key': 'properties.reverseProxyCertificate', 'type': 'CertificateDescription'}, 'upgrade_description': {'key': 'properties.upgradeDescription', 'type': 'ClusterUpgradePolicy'}, 'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'str'}, + 'application_type_versions_cleanup_policy': {'key': 'properties.applicationTypeVersionsCleanupPolicy', 'type': 'ApplicationTypeVersionsCleanupPolicy'}, 'tags': {'key': 'tags', 'type': '{str}'}, } @@ -1407,6 +1492,7 @@ def __init__(self, **kwargs): self.reverse_proxy_certificate = kwargs.get('reverse_proxy_certificate', None) self.upgrade_description = kwargs.get('upgrade_description', None) self.upgrade_mode = kwargs.get('upgrade_mode', None) + self.application_type_versions_cleanup_policy = kwargs.get('application_type_versions_cleanup_policy', None) self.tags = kwargs.get('tags', None) @@ -1587,6 +1673,10 @@ 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. If one of the storage account keys is rotated the + cluster will fallback to using the other. + :type protected_account_key_name2: str :param blob_endpoint: Required. The blob endpoint of the azure storage account. :type blob_endpoint: str @@ -1609,6 +1699,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 +1709,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 +1790,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. @@ -1738,7 +1874,7 @@ class NamedPartitionSchemeDescription(PartitionSchemeDescription): :type partition_scheme: str :param count: Required. The number of partitions. :type count: int - :param names: Required. Array of size specified by the ‘Count’ parameter, + :param names: Required. Array of size specified by the ‘count’ parameter, for the names of the partitions. :type names: list[str] """ @@ -1751,8 +1887,8 @@ class NamedPartitionSchemeDescription(PartitionSchemeDescription): _attribute_map = { 'partition_scheme': {'key': 'partitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'names': {'key': 'Names', 'type': '[str]'}, + 'count': {'key': 'count', 'type': 'int'}, + 'names': {'key': 'names', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -1786,7 +1922,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. @@ -2029,7 +2165,7 @@ class ServicePlacementPolicyDescription(Model): } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__(self, **kwargs): @@ -2089,6 +2225,10 @@ class ServiceResource(ProxyResource): package. Possible values include: 'SharedProcess', 'ExclusiveProcess' :type service_package_activation_mode: str or ~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode + :param service_dns_name: Dns name used for the service. If this is + specified, then the service can be accessed via its DNS name instead of + service name. + :type service_dns_name: str """ _validation = { @@ -2115,6 +2255,7 @@ class ServiceResource(ProxyResource): 'service_type_name': {'key': 'properties.serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'properties.partitionDescription', 'type': 'PartitionSchemeDescription'}, 'service_package_activation_mode': {'key': 'properties.servicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'properties.serviceDnsName', 'type': 'str'}, } def __init__(self, **kwargs): @@ -2128,6 +2269,7 @@ def __init__(self, **kwargs): self.service_type_name = kwargs.get('service_type_name', None) self.partition_description = kwargs.get('partition_description', None) self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) + self.service_dns_name = kwargs.get('service_dns_name', None) class ServiceResourceList(Model): @@ -2245,6 +2387,10 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase): package. Possible values include: 'SharedProcess', 'ExclusiveProcess' :type service_package_activation_mode: str or ~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode + :param service_dns_name: Dns name used for the service. If this is + specified, then the service can be accessed via its DNS name instead of + service name. + :type service_dns_name: str :param service_kind: Required. Constant filled by server. :type service_kind: str """ @@ -2264,6 +2410,7 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase): 'service_type_name': {'key': 'serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'partitionDescription', 'type': 'PartitionSchemeDescription'}, 'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'}, 'service_kind': {'key': 'serviceKind', 'type': 'str'}, } @@ -2277,6 +2424,7 @@ def __init__(self, **kwargs): self.service_type_name = kwargs.get('service_type_name', None) self.partition_description = kwargs.get('partition_description', None) self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) + self.service_dns_name = kwargs.get('service_dns_name', None) self.service_kind = None self.service_kind = 'ServiceResourceProperties' @@ -2582,6 +2730,10 @@ class StatefulServiceProperties(ServiceResourceProperties): package. Possible values include: 'SharedProcess', 'ExclusiveProcess' :type service_package_activation_mode: str or ~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode + :param service_dns_name: Dns name used for the service. If this is + specified, then the service can be accessed via its DNS name instead of + service name. + :type service_dns_name: str :param service_kind: Required. Constant filled by server. :type service_kind: str :param has_persisted_state: A flag indicating whether this is a persistent @@ -2623,6 +2775,7 @@ class StatefulServiceProperties(ServiceResourceProperties): 'service_type_name': {'key': 'serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'partitionDescription', 'type': 'PartitionSchemeDescription'}, 'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'}, 'service_kind': {'key': 'serviceKind', 'type': 'str'}, 'has_persisted_state': {'key': 'hasPersistedState', 'type': 'bool'}, 'target_replica_set_size': {'key': 'targetReplicaSetSize', 'type': 'int'}, @@ -2760,10 +2913,24 @@ class StatelessServiceProperties(ServiceResourceProperties): package. Possible values include: 'SharedProcess', 'ExclusiveProcess' :type service_package_activation_mode: str or ~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode + :param service_dns_name: Dns name used for the service. If this is + specified, then the service can be accessed via its DNS name instead of + service name. + :type service_dns_name: str :param service_kind: Required. Constant filled by server. :type service_kind: str :param instance_count: The instance count. :type instance_count: int + :param instance_close_delay_duration: Delay duration for RequestDrain + feature to ensures that the endpoint advertised by the stateless instance + is removed before the delay starts prior to closing the instance. This + delay enables existing requests to drain gracefully before the instance + actually goes down + (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). + It is first interpreted as a string representing an ISO 8601 duration. If + that fails, then it is interpreted as a number representing the total + number of milliseconds. + :type instance_close_delay_duration: str """ _validation = { @@ -2782,13 +2949,16 @@ class StatelessServiceProperties(ServiceResourceProperties): 'service_type_name': {'key': 'serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'partitionDescription', 'type': 'PartitionSchemeDescription'}, 'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'}, 'service_kind': {'key': 'serviceKind', 'type': 'str'}, 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + 'instance_close_delay_duration': {'key': 'instanceCloseDelayDuration', 'type': 'str'}, } def __init__(self, **kwargs): super(StatelessServiceProperties, self).__init__(**kwargs) self.instance_count = kwargs.get('instance_count', None) + self.instance_close_delay_duration = kwargs.get('instance_close_delay_duration', None) self.service_kind = 'Stateless' @@ -2822,6 +2992,16 @@ class StatelessServiceUpdateProperties(ServiceResourceUpdateProperties): :type service_kind: str :param instance_count: The instance count. :type instance_count: int + :param instance_close_delay_duration: Delay duration for RequestDrain + feature to ensures that the endpoint advertised by the stateless instance + is removed before the delay starts prior to closing the instance. This + delay enables existing requests to drain gracefully before the instance + actually goes down + (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). + It is first interpreted as a string representing an ISO 8601 duration. If + that fails, then it is interpreted as a number representing the total + number of milliseconds. + :type instance_close_delay_duration: str """ _validation = { @@ -2837,11 +3017,13 @@ class StatelessServiceUpdateProperties(ServiceResourceUpdateProperties): 'default_move_cost': {'key': 'defaultMoveCost', 'type': 'str'}, 'service_kind': {'key': 'serviceKind', 'type': 'str'}, 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + 'instance_close_delay_duration': {'key': 'instanceCloseDelayDuration', 'type': 'str'}, } def __init__(self, **kwargs): super(StatelessServiceUpdateProperties, self).__init__(**kwargs) self.instance_count = kwargs.get('instance_count', None) + self.instance_close_delay_duration = kwargs.get('instance_close_delay_duration', None) self.service_kind = 'Stateless' @@ -2857,11 +3039,11 @@ class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): :type count: int :param low_key: Required. String indicating the lower bound of the partition key range that - should be split between the partition ‘Count’ + should be split between the partition ‘count’ :type low_key: str :param high_key: Required. String indicating the upper bound of the partition key range that - should be split between the partition ‘Count’ + should be split between the partition ‘count’ :type high_key: str """ @@ -2874,9 +3056,9 @@ class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): _attribute_map = { 'partition_scheme': {'key': 'partitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'low_key': {'key': 'lowKey', 'type': 'str'}, + 'high_key': {'key': 'highKey', 'type': 'str'}, } def __init__(self, **kwargs): @@ -2885,3 +3067,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..cfb37a4197ff 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): @@ -550,6 +566,29 @@ def __init__(self, *, value=None, **kwargs) -> None: self.next_link = None +class ApplicationTypeVersionsCleanupPolicy(Model): + """ApplicationTypeVersionsCleanupPolicy. + + All required parameters must be populated in order to send to Azure. + + :param max_unused_versions_to_keep: Required. Number of unused versions + per application type to keep. + :type max_unused_versions_to_keep: int + """ + + _validation = { + 'max_unused_versions_to_keep': {'required': True, 'minimum': 0}, + } + + _attribute_map = { + 'max_unused_versions_to_keep': {'key': 'maxUnusedVersionsToKeep', 'type': 'int'}, + } + + def __init__(self, *, max_unused_versions_to_keep: int, **kwargs) -> None: + super(ApplicationTypeVersionsCleanupPolicy, self).__init__(**kwargs) + self.max_unused_versions_to_keep = max_unused_versions_to_keep + + class ApplicationUpgradePolicy(Model): """Describes the policy for a monitored application upgrade. @@ -572,6 +611,12 @@ class ApplicationUpgradePolicy(Model): the health of an application or one of its children entities. :type application_health_policy: ~azure.mgmt.servicefabric.models.ArmApplicationHealthPolicy + :param upgrade_mode: The mode used to monitor health during a rolling + upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored. + Possible values include: 'Invalid', 'UnmonitoredAuto', + 'UnmonitoredManual', 'Monitored'. Default value: "Monitored" . + :type upgrade_mode: str or + ~azure.mgmt.servicefabric.models.RollingUpgradeMode """ _attribute_map = { @@ -579,14 +624,43 @@ class ApplicationUpgradePolicy(Model): 'force_restart': {'key': 'forceRestart', 'type': 'bool'}, 'rolling_upgrade_monitoring_policy': {'key': 'rollingUpgradeMonitoringPolicy', 'type': 'ArmRollingUpgradeMonitoringPolicy'}, 'application_health_policy': {'key': 'applicationHealthPolicy', 'type': 'ArmApplicationHealthPolicy'}, + 'upgrade_mode': {'key': 'upgradeMode', 'type': 'str'}, } - def __init__(self, *, upgrade_replica_set_check_timeout: str=None, force_restart: bool=None, rolling_upgrade_monitoring_policy=None, application_health_policy=None, **kwargs) -> None: + def __init__(self, *, upgrade_replica_set_check_timeout: str=None, force_restart: bool=None, rolling_upgrade_monitoring_policy=None, application_health_policy=None, upgrade_mode="Monitored", **kwargs) -> None: super(ApplicationUpgradePolicy, self).__init__(**kwargs) self.upgrade_replica_set_check_timeout = upgrade_replica_set_check_timeout self.force_restart = force_restart self.rolling_upgrade_monitoring_policy = rolling_upgrade_monitoring_policy self.application_health_policy = application_health_policy + self.upgrade_mode = upgrade_mode + + +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): @@ -1053,7 +1127,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. @@ -1084,6 +1158,10 @@ class Cluster(Resource): **clusterCodeVersion** property in the cluster resource. . Possible values include: 'Automatic', 'Manual' :type upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum + :param application_type_versions_cleanup_policy: The policy used to clean + up unused versions. + :type application_type_versions_cleanup_policy: + ~azure.mgmt.servicefabric.models.ApplicationTypeVersionsCleanupPolicy :param vm_image: The VM image VMSS has been configured with. Generic names such as Windows or Linux can be used. :type vm_image: str @@ -1133,10 +1211,11 @@ class Cluster(Resource): 'reverse_proxy_certificate_common_names': {'key': 'properties.reverseProxyCertificateCommonNames', 'type': 'ServerCertificateCommonNames'}, 'upgrade_description': {'key': 'properties.upgradeDescription', 'type': 'ClusterUpgradePolicy'}, 'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'str'}, + 'application_type_versions_cleanup_policy': {'key': 'properties.applicationTypeVersionsCleanupPolicy', 'type': 'ApplicationTypeVersionsCleanupPolicy'}, 'vm_image': {'key': 'properties.vmImage', 'type': 'str'}, } - def __init__(self, *, location: str, management_endpoint: str, node_types, tags=None, add_on_features=None, azure_active_directory=None, certificate=None, certificate_common_names=None, client_certificate_common_names=None, client_certificate_thumbprints=None, cluster_code_version: str=None, diagnostics_storage_account_config=None, event_store_service_enabled: bool=None, fabric_settings=None, reliability_level=None, reverse_proxy_certificate=None, reverse_proxy_certificate_common_names=None, upgrade_description=None, upgrade_mode=None, vm_image: str=None, **kwargs) -> None: + def __init__(self, *, location: str, management_endpoint: str, node_types, tags=None, add_on_features=None, azure_active_directory=None, certificate=None, certificate_common_names=None, client_certificate_common_names=None, client_certificate_thumbprints=None, cluster_code_version: str=None, diagnostics_storage_account_config=None, event_store_service_enabled: bool=None, fabric_settings=None, reliability_level=None, reverse_proxy_certificate=None, reverse_proxy_certificate_common_names=None, upgrade_description=None, upgrade_mode=None, application_type_versions_cleanup_policy=None, vm_image: str=None, **kwargs) -> None: super(Cluster, self).__init__(location=location, tags=tags, **kwargs) self.add_on_features = add_on_features self.available_cluster_versions = None @@ -1160,6 +1239,7 @@ def __init__(self, *, location: str, management_endpoint: str, node_types, tags= self.reverse_proxy_certificate_common_names = reverse_proxy_certificate_common_names self.upgrade_description = upgrade_description self.upgrade_mode = upgrade_mode + self.application_type_versions_cleanup_policy = application_type_versions_cleanup_policy self.vm_image = vm_image @@ -1345,7 +1425,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. @@ -1371,6 +1451,10 @@ class ClusterUpdateParameters(Model): **clusterCodeVersion** property in the cluster resource. . Possible values include: 'Automatic', 'Manual' :type upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum + :param application_type_versions_cleanup_policy: The policy used to clean + up unused versions. + :type application_type_versions_cleanup_policy: + ~azure.mgmt.servicefabric.models.ApplicationTypeVersionsCleanupPolicy :param tags: Cluster update parameters :type tags: dict[str, str] """ @@ -1389,10 +1473,11 @@ class ClusterUpdateParameters(Model): 'reverse_proxy_certificate': {'key': 'properties.reverseProxyCertificate', 'type': 'CertificateDescription'}, 'upgrade_description': {'key': 'properties.upgradeDescription', 'type': 'ClusterUpgradePolicy'}, 'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'str'}, + 'application_type_versions_cleanup_policy': {'key': 'properties.applicationTypeVersionsCleanupPolicy', 'type': 'ApplicationTypeVersionsCleanupPolicy'}, 'tags': {'key': 'tags', 'type': '{str}'}, } - def __init__(self, *, add_on_features=None, certificate=None, certificate_common_names=None, client_certificate_common_names=None, client_certificate_thumbprints=None, cluster_code_version: str=None, event_store_service_enabled: bool=None, fabric_settings=None, node_types=None, reliability_level=None, reverse_proxy_certificate=None, upgrade_description=None, upgrade_mode=None, tags=None, **kwargs) -> None: + def __init__(self, *, add_on_features=None, certificate=None, certificate_common_names=None, client_certificate_common_names=None, client_certificate_thumbprints=None, cluster_code_version: str=None, event_store_service_enabled: bool=None, fabric_settings=None, node_types=None, reliability_level=None, reverse_proxy_certificate=None, upgrade_description=None, upgrade_mode=None, application_type_versions_cleanup_policy=None, tags=None, **kwargs) -> None: super(ClusterUpdateParameters, self).__init__(**kwargs) self.add_on_features = add_on_features self.certificate = certificate @@ -1407,6 +1492,7 @@ def __init__(self, *, add_on_features=None, certificate=None, certificate_common self.reverse_proxy_certificate = reverse_proxy_certificate self.upgrade_description = upgrade_description self.upgrade_mode = upgrade_mode + self.application_type_versions_cleanup_policy = application_type_versions_cleanup_policy self.tags = tags @@ -1587,6 +1673,10 @@ 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. If one of the storage account keys is rotated the + cluster will fallback to using the other. + :type protected_account_key_name2: str :param blob_endpoint: Required. The blob endpoint of the azure storage account. :type blob_endpoint: str @@ -1609,15 +1699,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 +1790,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. @@ -1738,7 +1874,7 @@ class NamedPartitionSchemeDescription(PartitionSchemeDescription): :type partition_scheme: str :param count: Required. The number of partitions. :type count: int - :param names: Required. Array of size specified by the ‘Count’ parameter, + :param names: Required. Array of size specified by the ‘count’ parameter, for the names of the partitions. :type names: list[str] """ @@ -1751,8 +1887,8 @@ class NamedPartitionSchemeDescription(PartitionSchemeDescription): _attribute_map = { 'partition_scheme': {'key': 'partitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'names': {'key': 'Names', 'type': '[str]'}, + 'count': {'key': 'count', 'type': 'int'}, + 'names': {'key': 'names', 'type': '[str]'}, } def __init__(self, *, count: int, names, **kwargs) -> None: @@ -1786,7 +1922,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. @@ -2029,7 +2165,7 @@ class ServicePlacementPolicyDescription(Model): } _attribute_map = { - 'type': {'key': 'Type', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, } def __init__(self, **kwargs) -> None: @@ -2089,6 +2225,10 @@ class ServiceResource(ProxyResource): package. Possible values include: 'SharedProcess', 'ExclusiveProcess' :type service_package_activation_mode: str or ~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode + :param service_dns_name: Dns name used for the service. If this is + specified, then the service can be accessed via its DNS name instead of + service name. + :type service_dns_name: str """ _validation = { @@ -2115,9 +2255,10 @@ class ServiceResource(ProxyResource): 'service_type_name': {'key': 'properties.serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'properties.partitionDescription', 'type': 'PartitionSchemeDescription'}, 'service_package_activation_mode': {'key': 'properties.servicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'properties.serviceDnsName', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, service_dns_name: str=None, **kwargs) -> None: super(ServiceResource, self).__init__(location=location, tags=tags, **kwargs) self.placement_constraints = placement_constraints self.correlation_scheme = correlation_scheme @@ -2128,6 +2269,7 @@ def __init__(self, *, location: str=None, tags=None, placement_constraints: str= self.service_type_name = service_type_name self.partition_description = partition_description self.service_package_activation_mode = service_package_activation_mode + self.service_dns_name = service_dns_name class ServiceResourceList(Model): @@ -2245,6 +2387,10 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase): package. Possible values include: 'SharedProcess', 'ExclusiveProcess' :type service_package_activation_mode: str or ~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode + :param service_dns_name: Dns name used for the service. If this is + specified, then the service can be accessed via its DNS name instead of + service name. + :type service_dns_name: str :param service_kind: Required. Constant filled by server. :type service_kind: str """ @@ -2264,6 +2410,7 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase): 'service_type_name': {'key': 'serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'partitionDescription', 'type': 'PartitionSchemeDescription'}, 'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'}, 'service_kind': {'key': 'serviceKind', 'type': 'str'}, } @@ -2271,12 +2418,13 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase): 'service_kind': {'Stateful': 'StatefulServiceProperties', 'Stateless': 'StatelessServiceProperties'} } - def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, **kwargs) -> None: + def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, service_dns_name: str=None, **kwargs) -> None: super(ServiceResourceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, **kwargs) self.provisioning_state = None self.service_type_name = service_type_name self.partition_description = partition_description self.service_package_activation_mode = service_package_activation_mode + self.service_dns_name = service_dns_name self.service_kind = None self.service_kind = 'ServiceResourceProperties' @@ -2582,6 +2730,10 @@ class StatefulServiceProperties(ServiceResourceProperties): package. Possible values include: 'SharedProcess', 'ExclusiveProcess' :type service_package_activation_mode: str or ~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode + :param service_dns_name: Dns name used for the service. If this is + specified, then the service can be accessed via its DNS name instead of + service name. + :type service_dns_name: str :param service_kind: Required. Constant filled by server. :type service_kind: str :param has_persisted_state: A flag indicating whether this is a persistent @@ -2623,6 +2775,7 @@ class StatefulServiceProperties(ServiceResourceProperties): 'service_type_name': {'key': 'serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'partitionDescription', 'type': 'PartitionSchemeDescription'}, 'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'}, 'service_kind': {'key': 'serviceKind', 'type': 'str'}, 'has_persisted_state': {'key': 'hasPersistedState', 'type': 'bool'}, 'target_replica_set_size': {'key': 'targetReplicaSetSize', 'type': 'int'}, @@ -2632,8 +2785,8 @@ class StatefulServiceProperties(ServiceResourceProperties): 'stand_by_replica_keep_duration': {'key': 'standByReplicaKeepDuration', 'type': 'iso-8601'}, } - def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, has_persisted_state: bool=None, target_replica_set_size: int=None, min_replica_set_size: int=None, replica_restart_wait_duration=None, quorum_loss_wait_duration=None, stand_by_replica_keep_duration=None, **kwargs) -> None: - super(StatefulServiceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, service_type_name=service_type_name, partition_description=partition_description, service_package_activation_mode=service_package_activation_mode, **kwargs) + def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, service_dns_name: str=None, has_persisted_state: bool=None, target_replica_set_size: int=None, min_replica_set_size: int=None, replica_restart_wait_duration=None, quorum_loss_wait_duration=None, stand_by_replica_keep_duration=None, **kwargs) -> None: + super(StatefulServiceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, service_type_name=service_type_name, partition_description=partition_description, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, **kwargs) self.has_persisted_state = has_persisted_state self.target_replica_set_size = target_replica_set_size self.min_replica_set_size = min_replica_set_size @@ -2760,10 +2913,24 @@ class StatelessServiceProperties(ServiceResourceProperties): package. Possible values include: 'SharedProcess', 'ExclusiveProcess' :type service_package_activation_mode: str or ~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode + :param service_dns_name: Dns name used for the service. If this is + specified, then the service can be accessed via its DNS name instead of + service name. + :type service_dns_name: str :param service_kind: Required. Constant filled by server. :type service_kind: str :param instance_count: The instance count. :type instance_count: int + :param instance_close_delay_duration: Delay duration for RequestDrain + feature to ensures that the endpoint advertised by the stateless instance + is removed before the delay starts prior to closing the instance. This + delay enables existing requests to drain gracefully before the instance + actually goes down + (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). + It is first interpreted as a string representing an ISO 8601 duration. If + that fails, then it is interpreted as a number representing the total + number of milliseconds. + :type instance_close_delay_duration: str """ _validation = { @@ -2782,13 +2949,16 @@ class StatelessServiceProperties(ServiceResourceProperties): 'service_type_name': {'key': 'serviceTypeName', 'type': 'str'}, 'partition_description': {'key': 'partitionDescription', 'type': 'PartitionSchemeDescription'}, 'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'}, + 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'}, 'service_kind': {'key': 'serviceKind', 'type': 'str'}, 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + 'instance_close_delay_duration': {'key': 'instanceCloseDelayDuration', 'type': 'str'}, } - def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, instance_count: int=None, **kwargs) -> None: - super(StatelessServiceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, service_type_name=service_type_name, partition_description=partition_description, service_package_activation_mode=service_package_activation_mode, **kwargs) + def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, service_dns_name: str=None, instance_count: int=None, instance_close_delay_duration: str=None, **kwargs) -> None: + super(StatelessServiceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, service_type_name=service_type_name, partition_description=partition_description, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, **kwargs) self.instance_count = instance_count + self.instance_close_delay_duration = instance_close_delay_duration self.service_kind = 'Stateless' @@ -2822,6 +2992,16 @@ class StatelessServiceUpdateProperties(ServiceResourceUpdateProperties): :type service_kind: str :param instance_count: The instance count. :type instance_count: int + :param instance_close_delay_duration: Delay duration for RequestDrain + feature to ensures that the endpoint advertised by the stateless instance + is removed before the delay starts prior to closing the instance. This + delay enables existing requests to drain gracefully before the instance + actually goes down + (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview). + It is first interpreted as a string representing an ISO 8601 duration. If + that fails, then it is interpreted as a number representing the total + number of milliseconds. + :type instance_close_delay_duration: str """ _validation = { @@ -2837,11 +3017,13 @@ class StatelessServiceUpdateProperties(ServiceResourceUpdateProperties): 'default_move_cost': {'key': 'defaultMoveCost', 'type': 'str'}, 'service_kind': {'key': 'serviceKind', 'type': 'str'}, 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + 'instance_close_delay_duration': {'key': 'instanceCloseDelayDuration', 'type': 'str'}, } - def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, instance_count: int=None, **kwargs) -> None: + def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, instance_count: int=None, instance_close_delay_duration: str=None, **kwargs) -> None: super(StatelessServiceUpdateProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, **kwargs) self.instance_count = instance_count + self.instance_close_delay_duration = instance_close_delay_duration self.service_kind = 'Stateless' @@ -2857,11 +3039,11 @@ class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): :type count: int :param low_key: Required. String indicating the lower bound of the partition key range that - should be split between the partition ‘Count’ + should be split between the partition ‘count’ :type low_key: str :param high_key: Required. String indicating the upper bound of the partition key range that - should be split between the partition ‘Count’ + should be split between the partition ‘count’ :type high_key: str """ @@ -2874,9 +3056,9 @@ class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): _attribute_map = { 'partition_scheme': {'key': 'partitionScheme', 'type': 'str'}, - 'count': {'key': 'Count', 'type': 'int'}, - 'low_key': {'key': 'LowKey', 'type': 'str'}, - 'high_key': {'key': 'HighKey', 'type': 'str'}, + 'count': {'key': 'count', 'type': 'int'}, + 'low_key': {'key': 'lowKey', 'type': 'str'}, + 'high_key': {'key': 'highKey', 'type': 'str'}, } def __init__(self, *, count: int, low_key: str, high_key: str, **kwargs) -> None: @@ -2885,3 +3067,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..0d502c9a7d23 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,12 +20,28 @@ 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. manual = "Manual" #: Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will not proceed to the next upgrade domain automatically. +class RollingUpgradeMode(str, Enum): + + invalid = "Invalid" #: Indicates the upgrade mode is invalid. All Service Fabric enumerations have the invalid type. The value is zero. + unmonitored_auto = "UnmonitoredAuto" #: The upgrade will proceed automatically without performing any health monitoring. The value is 1 + unmonitored_manual = "UnmonitoredManual" #: The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health before proceeding. The value is 2 + monitored = "Monitored" #: The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 3 + + class ServiceCorrelationScheme(str, Enum): invalid = "Invalid" #: An invalid correlation scheme. Cannot be used. The value is zero. 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..48a4e86d7fd3 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 "2020-03-01" for this specification. Constant value: "2020-03-01". """ 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 = "2020-03-01" self.config = config 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..3d7f1765f41d 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 "2020-03-01" for this specification. Constant value: "2020-03-01". """ 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 = "2020-03-01" self.config = config 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..94591a0635e3 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 "2020-03-01" for this specification. Constant value: "2020-03-01". """ 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 = "2020-03-01" self.config = config 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..193c1b1b067f 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 "2020-03-01" for this specification. Constant value: "2020-03-01". """ 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 = "2020-03-01" 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..8ec6e438e21c 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 "2020-03-01" for this specification. Constant value: "2020-03-01". """ 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 = "2020-03-01" self.config = config 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..e57ba6d5a338 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 "2020-03-01" for this specification. Constant value: "2020-03-01". """ 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 = "2020-03-01" self.config = config diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/setup.py b/sdk/servicefabric/azure-mgmt-servicefabric/setup.py index db4169788336..fe749af8ede1 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/setup.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/setup.py @@ -36,7 +36,9 @@ pass # Version extraction inspired from 'requests' -with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: +with open(os.path.join(package_folder_path, 'version.py') + if os.path.exists(os.path.join(package_folder_path, 'version.py')) + else os.path.join(package_folder_path, '_version.py'), 'r') as fd: version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', fd.read(), re.MULTILINE).group(1) @@ -67,6 +69,7 @@ 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', 'License :: OSI Approved :: MIT License', ], zip_safe=False,