From a0b1c1a9c76b698113e1696b0b974b8e08d065e1 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 22 Jun 2021 22:09:01 +0000 Subject: [PATCH] CodeGen from PR 14838 in Azure/azure-rest-api-specs Merge 4ded2736a7ebc15c936757c91eb3d70636c59e31 into f7535f8211b7fe9a8d5e5ebdc09830677b55285c --- .../azure-mgmt-servicefabric/MANIFEST.in | 1 + .../azure-mgmt-servicefabric/_meta.json | 8 + .../_service_fabric_management_client.py | 16 +- .../mgmt/servicefabric/models/__init__.py | 77 +- .../mgmt/servicefabric/models/_models.py | 1386 +++++----------- .../mgmt/servicefabric/models/_models_py3.py | 1436 +++++------------ .../servicefabric/models/_paged_models.py | 26 - ..._service_fabric_management_client_enums.py | 50 +- .../mgmt/servicefabric/operations/__init__.py | 6 - .../_application_type_versions_operations.py | 4 +- .../_application_types_operations.py | 16 +- .../operations/_applications_operations.py | 4 +- .../_cluster_versions_operations.py | 4 +- .../operations/_clusters_operations.py | 84 +- .../_managed_cluster_versions_operations.py | 106 -- .../_managed_clusters_operations.py | 538 ------ .../operations/_node_types_operations.py | 773 --------- .../operations/_services_operations.py | 4 +- 18 files changed, 939 insertions(+), 3600 deletions(-) create mode 100644 sdk/servicefabric/azure-mgmt-servicefabric/_meta.json delete mode 100644 sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_managed_cluster_versions_operations.py delete mode 100644 sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_managed_clusters_operations.py delete mode 100644 sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_node_types_operations.py diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/MANIFEST.in b/sdk/servicefabric/azure-mgmt-servicefabric/MANIFEST.in index a3cb07df8765..3a9b6517412b 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/MANIFEST.in +++ b/sdk/servicefabric/azure-mgmt-servicefabric/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/_meta.json b/sdk/servicefabric/azure-mgmt-servicefabric/_meta.json new file mode 100644 index 000000000000..608aeeece62d --- /dev/null +++ b/sdk/servicefabric/azure-mgmt-servicefabric/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "1a208e021709e7c16ee9daa22b40818cd513e11f", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/servicefabric/resource-manager/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/servicefabric/resource-manager/readme.md" +} \ No newline at end of file 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 50935647da46..20de431bef25 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 @@ -20,9 +20,6 @@ from .operations import ApplicationTypeVersionsOperations from .operations import ApplicationsOperations from .operations import ServicesOperations -from .operations import ManagedClustersOperations -from .operations import ManagedClusterVersionsOperations -from .operations import NodeTypesOperations from . import models @@ -46,12 +43,6 @@ class ServiceFabricManagementClient(SDKClient): :vartype applications: azure.mgmt.servicefabric.operations.ApplicationsOperations :ivar services: Services operations :vartype services: azure.mgmt.servicefabric.operations.ServicesOperations - :ivar managed_clusters: ManagedClusters operations - :vartype managed_clusters: azure.mgmt.servicefabric.operations.ManagedClustersOperations - :ivar managed_cluster_versions: ManagedClusterVersions operations - :vartype managed_cluster_versions: azure.mgmt.servicefabric.operations.ManagedClusterVersionsOperations - :ivar node_types: NodeTypes operations - :vartype node_types: azure.mgmt.servicefabric.operations.NodeTypesOperations :param credentials: Credentials needed for the client to connect to Azure. :type credentials: :mod:`A msrestazure Credentials @@ -68,6 +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 = '2021-06-01' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -85,9 +77,3 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.services = ServicesOperations( self._client, self.config, self._serialize, self._deserialize) - self.managed_clusters = ManagedClustersOperations( - self._client, self.config, self._serialize, self._deserialize) - self.managed_cluster_versions = ManagedClusterVersionsOperations( - self._client, self.config, self._serialize, self._deserialize) - self.node_types = NodeTypesOperations( - self._client, self.config, self._serialize, self._deserialize) 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 9aca075fdc52..cbce2e846475 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 @@ -29,7 +29,6 @@ from ._models_py3 import AvailableOperationDisplay from ._models_py3 import AzureActiveDirectory from ._models_py3 import CertificateDescription - from ._models_py3 import ClientCertificate from ._models_py3 import ClientCertificateCommonName from ._models_py3 import ClientCertificateThumbprint from ._models_py3 import Cluster @@ -45,17 +44,11 @@ from ._models_py3 import EndpointRangeDescription from ._models_py3 import ErrorModel, ErrorModelException from ._models_py3 import ErrorModelError - from ._models_py3 import LoadBalancingRule - from ._models_py3 import ManagedCluster - from ._models_py3 import ManagedClusterUpdateParameters - from ._models_py3 import ManagedClusterVersionDetails from ._models_py3 import ManagedIdentity - from ._models_py3 import ManagedProxyResource from ._models_py3 import NamedPartitionSchemeDescription - from ._models_py3 import NodeType - from ._models_py3 import NodeTypeActionParameters from ._models_py3 import NodeTypeDescription - from ._models_py3 import NodeTypeUpdateParameters + from ._models_py3 import Notification + from ._models_py3 import NotificationTarget from ._models_py3 import OperationResult from ._models_py3 import PartitionSchemeDescription from ._models_py3 import ProxyResource @@ -76,17 +69,15 @@ from ._models_py3 import SettingsParameterDescription from ._models_py3 import SettingsSectionDescription from ._models_py3 import SingletonPartitionSchemeDescription - from ._models_py3 import Sku from ._models_py3 import StatefulServiceProperties from ._models_py3 import StatefulServiceUpdateProperties from ._models_py3 import StatelessServiceProperties from ._models_py3 import StatelessServiceUpdateProperties - from ._models_py3 import SubResource + from ._models_py3 import SystemData from ._models_py3 import UniformInt64RangePartitionSchemeDescription + from ._models_py3 import UpgradableVersionPathResult + from ._models_py3 import UpgradableVersionsDescription from ._models_py3 import UserAssignedIdentity - from ._models_py3 import VaultCertificate - from ._models_py3 import VaultSecretGroup - from ._models_py3 import VMSSExtension except (SyntaxError, ImportError): from ._models import ApplicationDeltaHealthPolicy from ._models import ApplicationHealthPolicy @@ -107,7 +98,6 @@ from ._models import AvailableOperationDisplay from ._models import AzureActiveDirectory from ._models import CertificateDescription - from ._models import ClientCertificate from ._models import ClientCertificateCommonName from ._models import ClientCertificateThumbprint from ._models import Cluster @@ -123,17 +113,11 @@ from ._models import EndpointRangeDescription from ._models import ErrorModel, ErrorModelException from ._models import ErrorModelError - from ._models import LoadBalancingRule - from ._models import ManagedCluster - from ._models import ManagedClusterUpdateParameters - from ._models import ManagedClusterVersionDetails from ._models import ManagedIdentity - from ._models import ManagedProxyResource from ._models import NamedPartitionSchemeDescription - from ._models import NodeType - from ._models import NodeTypeActionParameters from ._models import NodeTypeDescription - from ._models import NodeTypeUpdateParameters + from ._models import Notification + from ._models import NotificationTarget from ._models import OperationResult from ._models import PartitionSchemeDescription from ._models import ProxyResource @@ -154,22 +138,24 @@ from ._models import SettingsParameterDescription from ._models import SettingsSectionDescription from ._models import SingletonPartitionSchemeDescription - from ._models import Sku from ._models import StatefulServiceProperties from ._models import StatefulServiceUpdateProperties from ._models import StatelessServiceProperties from ._models import StatelessServiceUpdateProperties - from ._models import SubResource + from ._models import SystemData from ._models import UniformInt64RangePartitionSchemeDescription + from ._models import UpgradableVersionPathResult + from ._models import UpgradableVersionsDescription from ._models import UserAssignedIdentity - from ._models import VaultCertificate - from ._models import VaultSecretGroup - from ._models import VMSSExtension -from ._paged_models import ManagedClusterPaged -from ._paged_models import NodeTypePaged from ._paged_models import OperationResultPaged from ._service_fabric_management_client_enums import ( ProvisioningState, + UpgradeMode, + SfZonalUpgradeMode, + VmssZonalUpgradeMode, + ClusterUpgradeCadence, + NotificationLevel, + NotificationChannel, ManagedIdentityType, ArmUpgradeFailureAction, RollingUpgradeMode, @@ -180,8 +166,6 @@ ServiceLoadMetricWeight, ServicePlacementPolicyType, ArmServicePackageActivationMode, - Protocol, - ProbeProtocol, ) __all__ = [ @@ -204,7 +188,6 @@ 'AvailableOperationDisplay', 'AzureActiveDirectory', 'CertificateDescription', - 'ClientCertificate', 'ClientCertificateCommonName', 'ClientCertificateThumbprint', 'Cluster', @@ -220,17 +203,11 @@ 'EndpointRangeDescription', 'ErrorModel', 'ErrorModelException', 'ErrorModelError', - 'LoadBalancingRule', - 'ManagedCluster', - 'ManagedClusterUpdateParameters', - 'ManagedClusterVersionDetails', 'ManagedIdentity', - 'ManagedProxyResource', 'NamedPartitionSchemeDescription', - 'NodeType', - 'NodeTypeActionParameters', 'NodeTypeDescription', - 'NodeTypeUpdateParameters', + 'Notification', + 'NotificationTarget', 'OperationResult', 'PartitionSchemeDescription', 'ProxyResource', @@ -251,21 +228,23 @@ 'SettingsParameterDescription', 'SettingsSectionDescription', 'SingletonPartitionSchemeDescription', - 'Sku', 'StatefulServiceProperties', 'StatefulServiceUpdateProperties', 'StatelessServiceProperties', 'StatelessServiceUpdateProperties', - 'SubResource', + 'SystemData', 'UniformInt64RangePartitionSchemeDescription', + 'UpgradableVersionPathResult', + 'UpgradableVersionsDescription', 'UserAssignedIdentity', - 'VaultCertificate', - 'VaultSecretGroup', - 'VMSSExtension', 'OperationResultPaged', - 'ManagedClusterPaged', - 'NodeTypePaged', 'ProvisioningState', + 'UpgradeMode', + 'SfZonalUpgradeMode', + 'VmssZonalUpgradeMode', + 'ClusterUpgradeCadence', + 'NotificationLevel', + 'NotificationChannel', 'ManagedIdentityType', 'ArmUpgradeFailureAction', 'RollingUpgradeMode', @@ -276,6 +255,4 @@ 'ServiceLoadMetricWeight', 'ServicePlacementPolicyType', 'ArmServicePackageActivationMode', - 'Protocol', - 'ProbeProtocol', ] 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 1de2810301ae..ba9dbcf3bcb6 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 @@ -144,6 +144,8 @@ class ProxyResource(Model): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData """ _validation = { @@ -160,6 +162,7 @@ class ProxyResource(Model): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs): @@ -170,6 +173,7 @@ def __init__(self, **kwargs): self.location = kwargs.get('location', None) self.tags = kwargs.get('tags', None) self.etag = None + self.system_data = kwargs.get('system_data', None) class ApplicationResource(ProxyResource): @@ -191,16 +195,15 @@ 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. + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData + :param identity: :type identity: ~azure.mgmt.servicefabric.models.ManagedIdentity - :param type_version: The version of the application type as defined in the - application manifest. + :param type_version: :type type_version: str - :param parameters: List of application parameters with overridden values - from their default values specified in the application manifest. + :param parameters: :type parameters: dict[str, str] - :param upgrade_policy: Describes the policy for a monitored application - upgrade. + :param upgrade_policy: :type upgrade_policy: ~azure.mgmt.servicefabric.models.ApplicationUpgradePolicy :param minimum_nodes: The minimum number of nodes where Service Fabric @@ -219,7 +222,7 @@ class ApplicationResource(ProxyResource): :param remove_application_capacity: Remove the current application capacity settings. :type remove_application_capacity: bool - :param metrics: List of application capacity metric description. + :param metrics: :type metrics: list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription] :param managed_identities: List of user assigned identities for the @@ -229,8 +232,7 @@ class ApplicationResource(ProxyResource): :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str - :param type_name: The application type name as defined in the application - manifest. + :param type_name: :type type_name: str """ @@ -251,6 +253,7 @@ class ApplicationResource(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'identity': {'key': 'identity', 'type': 'ManagedIdentity'}, 'type_version': {'key': 'properties.typeVersion', 'type': 'str'}, 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, @@ -326,14 +329,13 @@ class ApplicationResourceUpdate(ProxyResource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str - :param type_version: The version of the application type as defined in the - application manifest. + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData + :param type_version: :type type_version: str - :param parameters: List of application parameters with overridden values - from their default values specified in the application manifest. + :param parameters: :type parameters: dict[str, str] - :param upgrade_policy: Describes the policy for a monitored application - upgrade. + :param upgrade_policy: :type upgrade_policy: ~azure.mgmt.servicefabric.models.ApplicationUpgradePolicy :param minimum_nodes: The minimum number of nodes where Service Fabric @@ -352,7 +354,7 @@ class ApplicationResourceUpdate(ProxyResource): :param remove_application_capacity: Remove the current application capacity settings. :type remove_application_capacity: bool - :param metrics: List of application capacity metric description. + :param metrics: :type metrics: list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription] :param managed_identities: List of user assigned identities for the @@ -377,6 +379,7 @@ class ApplicationResourceUpdate(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type_version': {'key': 'properties.typeVersion', 'type': 'str'}, 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'ApplicationUpgradePolicy'}, @@ -418,6 +421,8 @@ class ApplicationTypeResource(ProxyResource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response. :vartype provisioning_state: str @@ -438,6 +443,7 @@ class ApplicationTypeResource(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } @@ -497,13 +503,14 @@ class ApplicationTypeVersionResource(ProxyResource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str :param app_package_url: Required. The URL to the application package :type app_package_url: str - :ivar default_parameter_list: List of application type parameters that can - be overridden when creating or updating the application. + :ivar default_parameter_list: :vartype default_parameter_list: dict[str, str] """ @@ -524,6 +531,7 @@ class ApplicationTypeVersionResource(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'app_package_url': {'key': 'properties.appPackageUrl', 'type': 'str'}, 'default_parameter_list': {'key': 'properties.defaultParameterList', 'type': '{str}'}, @@ -573,7 +581,7 @@ class ApplicationTypeVersionsCleanupPolicy(Model): :param max_unused_versions_to_keep: Required. Number of unused versions per application type to keep. - :type max_unused_versions_to_keep: int + :type max_unused_versions_to_keep: long """ _validation = { @@ -581,7 +589,7 @@ class ApplicationTypeVersionsCleanupPolicy(Model): } _attribute_map = { - 'max_unused_versions_to_keep': {'key': 'maxUnusedVersionsToKeep', 'type': 'int'}, + 'max_unused_versions_to_keep': {'key': 'maxUnusedVersionsToKeep', 'type': 'long'}, } def __init__(self, **kwargs): @@ -599,22 +607,17 @@ class ApplicationUpgradePolicy(Model): The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). :type upgrade_replica_set_check_timeout: str - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). + :param force_restart: :type force_restart: bool - :param rolling_upgrade_monitoring_policy: The policy used for monitoring - the application upgrade + :param rolling_upgrade_monitoring_policy: :type rolling_upgrade_monitoring_policy: ~azure.mgmt.servicefabric.models.ArmRollingUpgradeMonitoringPolicy - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. + :param application_health_policy: :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" . + :param upgrade_mode: Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: + "Monitored" . :type upgrade_mode: str or ~azure.mgmt.servicefabric.models.RollingUpgradeMode """ @@ -716,33 +719,15 @@ class ArmRollingUpgradeMonitoringPolicy(Model): Possible values include: 'Rollback', 'Manual' :type failure_action: str or ~azure.mgmt.servicefabric.models.ArmUpgradeFailureAction - :param health_check_wait_duration: The amount of time to wait after - completing an upgrade domain before applying health policies. 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. + :param health_check_wait_duration: :type health_check_wait_duration: str - :param health_check_stable_duration: The amount of time that the - application or cluster must remain healthy before the upgrade proceeds to - the next upgrade domain. 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. + :param health_check_stable_duration: :type health_check_stable_duration: str - :param health_check_retry_timeout: The amount of time to retry health - evaluation when the application or cluster is unhealthy before - FailureAction is executed. 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. + :param health_check_retry_timeout: :type health_check_retry_timeout: str - :param upgrade_timeout: The amount of time the overall upgrade has to - complete before FailureAction is executed. 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. + :param upgrade_timeout: :type upgrade_timeout: str - :param upgrade_domain_timeout: The amount of time each upgrade domain has - to complete before FailureAction is executed. 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. + :param upgrade_domain_timeout: :type upgrade_domain_timeout: str """ @@ -866,9 +851,9 @@ class CertificateDescription(Model): :type thumbprint: str :param thumbprint_secondary: Thumbprint of the secondary certificate. :type thumbprint_secondary: str - :param x509_store_name: The local certificate store location. Possible - values include: 'AddressBook', 'AuthRoot', 'CertificateAuthority', - 'Disallowed', 'My', 'Root', 'TrustedPeople', 'TrustedPublisher' + :param x509_store_name: Possible values include: 'AddressBook', + 'AuthRoot', 'CertificateAuthority', 'Disallowed', 'My', 'Root', + 'TrustedPeople', 'TrustedPublisher' :type x509_store_name: str or ~azure.mgmt.servicefabric.models.enum """ @@ -889,41 +874,6 @@ def __init__(self, **kwargs): self.x509_store_name = kwargs.get('x509_store_name', None) -class ClientCertificate(Model): - """Client Certificate definition. - - All required parameters must be populated in order to send to Azure. - - :param is_admin: Required. Whether the certificate is admin or not. - :type is_admin: bool - :param thumbprint: Certificate Thumbprint. - :type thumbprint: str - :param common_name: Certificate Common name. - :type common_name: str - :param issuer_thumbprint: Issuer thumbprint for the certificate. Its only - use ehn CommonName is used. - :type issuer_thumbprint: str - """ - - _validation = { - 'is_admin': {'required': True}, - } - - _attribute_map = { - 'is_admin': {'key': 'isAdmin', 'type': 'bool'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'common_name': {'key': 'commonName', 'type': 'str'}, - 'issuer_thumbprint': {'key': 'issuerThumbprint', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ClientCertificate, self).__init__(**kwargs) - self.is_admin = kwargs.get('is_admin', None) - self.thumbprint = kwargs.get('thumbprint', None) - self.common_name = kwargs.get('common_name', None) - self.issuer_thumbprint = kwargs.get('issuer_thumbprint', None) - - class ClientCertificateCommonName(Model): """Describes the client certificate details using common name. @@ -1018,6 +968,8 @@ class Resource(Model): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData """ _validation = { @@ -1035,6 +987,7 @@ class Resource(Model): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } def __init__(self, **kwargs): @@ -1045,6 +998,7 @@ def __init__(self, **kwargs): self.location = kwargs.get('location', None) self.tags = kwargs.get('tags', None) self.etag = None + self.system_data = kwargs.get('system_data', None) class Cluster(Resource): @@ -1068,6 +1022,8 @@ class Cluster(Resource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData :param add_on_features: The list of add-on features to enable in the cluster. :type add_on_features: list[str] @@ -1084,8 +1040,7 @@ class Cluster(Resource): cluster, SSL certificate for cluster management endpoint and default admin client. :type certificate: ~azure.mgmt.servicefabric.models.CertificateDescription - :param certificate_common_names: Describes a list of server certificates - referenced by common name that are used to secure the cluster. + :param certificate_common_names: :type certificate_common_names: ~azure.mgmt.servicefabric.models.ServerCertificateCommonNames :param client_certificate_common_names: The list of client certificates @@ -1108,36 +1063,11 @@ class Cluster(Resource): :ivar cluster_id: A service generated unique identifier for the cluster resource. :vartype cluster_id: str - :ivar cluster_state: The current state of the cluster. - - WaitingForNodes - Indicates that the cluster resource is created and the - resource provider is waiting for Service Fabric VM extension to boot up - and report to it. - - Deploying - Indicates that the Service Fabric runtime is being installed - on the VMs. Cluster resource will be in this state until the cluster boots - up and system services are up. - - BaselineUpgrade - Indicates that the cluster is upgrading to establishes - the cluster version. This upgrade is automatically initiated when the - cluster boots up for the first time. - - UpdatingUserConfiguration - Indicates that the cluster is being upgraded - with the user provided configuration. - - UpdatingUserCertificate - Indicates that the cluster is being upgraded - with the user provided certificate. - - UpdatingInfrastructure - Indicates that the cluster is being upgraded - with the latest Service Fabric runtime version. This happens only when the - **upgradeMode** is set to 'Automatic'. - - EnforcingClusterVersion - Indicates that cluster is on a different - version than expected and the cluster is being upgraded to the expected - version. - - UpgradeServiceUnreachable - Indicates that the system service in the - cluster is no longer polling the Resource Provider. Clusters in this state - cannot be managed by the Resource Provider. - - AutoScale - Indicates that the ReliabilityLevel of the cluster is being - adjusted. - - Ready - Indicates that the cluster is in a stable state. - . Possible values include: 'WaitingForNodes', 'Deploying', - 'BaselineUpgrade', 'UpdatingUserConfiguration', 'UpdatingUserCertificate', - 'UpdatingInfrastructure', 'EnforcingClusterVersion', - 'UpgradeServiceUnreachable', 'AutoScale', 'Ready' + :ivar cluster_state: Possible values include: 'WaitingForNodes', + 'Deploying', 'BaselineUpgrade', 'UpdatingUserConfiguration', + 'UpdatingUserCertificate', 'UpdatingInfrastructure', + 'EnforcingClusterVersion', 'UpgradeServiceUnreachable', 'AutoScale', + 'Ready' :vartype cluster_state: str or ~azure.mgmt.servicefabric.models.enum :param diagnostics_storage_account_config: The storage account information for storing Service Fabric diagnostic logs. @@ -1160,39 +1090,22 @@ class Cluster(Resource): Possible values include: 'Updating', 'Succeeded', 'Failed', 'Canceled' :vartype provisioning_state: str or ~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/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. - This should only be used for test clusters. - - Silver - Run the System services with a target replica set count of 5. - - Gold - Run the System services with a target replica set count of 7. - - Platinum - Run the System services with a target replica set count of 9. - . Possible values include: 'None', 'Bronze', 'Silver', 'Gold', 'Platinum' + :param reliability_level: Possible values include: 'None', 'Bronze', + 'Silver', 'Gold', 'Platinum' :type reliability_level: str or ~azure.mgmt.servicefabric.models.enum :param reverse_proxy_certificate: The server certificate used by reverse proxy. :type reverse_proxy_certificate: ~azure.mgmt.servicefabric.models.CertificateDescription - :param reverse_proxy_certificate_common_names: Describes a list of server - certificates referenced by common name that are used to secure the - cluster. + :param reverse_proxy_certificate_common_names: :type reverse_proxy_certificate_common_names: ~azure.mgmt.servicefabric.models.ServerCertificateCommonNames :param upgrade_description: The policy to use when upgrading the cluster. :type upgrade_description: ~azure.mgmt.servicefabric.models.ClusterUpgradePolicy - :param upgrade_mode: The upgrade mode of the cluster when new Service - Fabric runtime version is available. - - Automatic - The cluster will be automatically upgraded to the latest - Service Fabric runtime version as soon as it is available. - - Manual - The cluster will not be automatically upgraded to the latest - Service Fabric runtime version. The cluster is upgraded by setting the - **clusterCodeVersion** property in the cluster resource. - . Possible values include: 'Automatic', 'Manual' - :type upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum + :param upgrade_mode: Possible values include: 'Automatic', 'Manual'. + Default value: "Automatic" . + :type upgrade_mode: str or ~azure.mgmt.servicefabric.models.UpgradeMode :param application_type_versions_cleanup_policy: The policy used to clean up unused versions. :type application_type_versions_cleanup_policy: @@ -1200,6 +1113,37 @@ class Cluster(Resource): :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 + :param sf_zonal_upgrade_mode: Possible values include: 'Parallel', + 'Hierarchical' + :type sf_zonal_upgrade_mode: str or + ~azure.mgmt.servicefabric.models.SfZonalUpgradeMode + :param vmss_zonal_upgrade_mode: Possible values include: 'Parallel', + 'Hierarchical' + :type vmss_zonal_upgrade_mode: str or + ~azure.mgmt.servicefabric.models.VmssZonalUpgradeMode + :param infrastructure_service_manager: Indicates if infrastructure service + manager is enabled. + :type infrastructure_service_manager: bool + :param upgrade_wave: Indicates when new cluster runtime version upgrades + will be applied after they are released. By default is Wave0. Only applies + when **upgradeMode** is set to 'Automatic'. Possible values include: + 'Wave0', 'Wave1', 'Wave2' + :type upgrade_wave: str or + ~azure.mgmt.servicefabric.models.ClusterUpgradeCadence + :param upgrade_pause_start_timestamp_utc: Indicates the start date and + time to pause automatic runtime version upgrades on the cluster for an + specific period of time on the cluster (UTC). + :type upgrade_pause_start_timestamp_utc: datetime + :param upgrade_pause_end_timestamp_utc: Indicates the end date and time to + pause automatic runtime version upgrades on the cluster for an specific + period of time on the cluster (UTC). + :type upgrade_pause_end_timestamp_utc: datetime + :param wave_upgrade_paused: Boolean to pause automatic runtime version + upgrades to the cluster. + :type wave_upgrade_paused: bool + :param notifications: Indicates a list of notification channels for + cluster events. + :type notifications: list[~azure.mgmt.servicefabric.models.Notification] """ _validation = { @@ -1224,6 +1168,7 @@ class Cluster(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'add_on_features': {'key': 'properties.addOnFeatures', 'type': '[str]'}, 'available_cluster_versions': {'key': 'properties.availableClusterVersions', 'type': '[ClusterVersionDetails]'}, 'azure_active_directory': {'key': 'properties.azureActiveDirectory', 'type': 'AzureActiveDirectory'}, @@ -1248,6 +1193,14 @@ class Cluster(Resource): 'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'str'}, 'application_type_versions_cleanup_policy': {'key': 'properties.applicationTypeVersionsCleanupPolicy', 'type': 'ApplicationTypeVersionsCleanupPolicy'}, 'vm_image': {'key': 'properties.vmImage', 'type': 'str'}, + 'sf_zonal_upgrade_mode': {'key': 'properties.sfZonalUpgradeMode', 'type': 'str'}, + 'vmss_zonal_upgrade_mode': {'key': 'properties.vmssZonalUpgradeMode', 'type': 'str'}, + 'infrastructure_service_manager': {'key': 'properties.infrastructureServiceManager', 'type': 'bool'}, + 'upgrade_wave': {'key': 'properties.upgradeWave', 'type': 'str'}, + 'upgrade_pause_start_timestamp_utc': {'key': 'properties.upgradePauseStartTimestampUtc', 'type': 'iso-8601'}, + 'upgrade_pause_end_timestamp_utc': {'key': 'properties.upgradePauseEndTimestampUtc', 'type': 'iso-8601'}, + 'wave_upgrade_paused': {'key': 'properties.waveUpgradePaused', 'type': 'bool'}, + 'notifications': {'key': 'properties.notifications', 'type': '[Notification]'}, } def __init__(self, **kwargs): @@ -1273,9 +1226,17 @@ def __init__(self, **kwargs): self.reverse_proxy_certificate = kwargs.get('reverse_proxy_certificate', None) 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.upgrade_mode = kwargs.get('upgrade_mode', "Automatic") self.application_type_versions_cleanup_policy = kwargs.get('application_type_versions_cleanup_policy', None) self.vm_image = kwargs.get('vm_image', None) + self.sf_zonal_upgrade_mode = kwargs.get('sf_zonal_upgrade_mode', None) + self.vmss_zonal_upgrade_mode = kwargs.get('vmss_zonal_upgrade_mode', None) + self.infrastructure_service_manager = kwargs.get('infrastructure_service_manager', None) + self.upgrade_wave = kwargs.get('upgrade_wave', None) + self.upgrade_pause_start_timestamp_utc = kwargs.get('upgrade_pause_start_timestamp_utc', None) + self.upgrade_pause_end_timestamp_utc = kwargs.get('upgrade_pause_end_timestamp_utc', None) + self.wave_upgrade_paused = kwargs.get('wave_upgrade_paused', None) + self.notifications = kwargs.get('notifications', None) class ClusterCodeVersionsListResult(Model): @@ -1427,8 +1388,7 @@ class ClusterUpdateParameters(Model): cluster, SSL certificate for cluster management endpoint and default admin client. :type certificate: ~azure.mgmt.servicefabric.models.CertificateDescription - :param certificate_common_names: Describes a list of server certificates - referenced by common name that are used to secure the cluster. + :param certificate_common_names: :type certificate_common_names: ~azure.mgmt.servicefabric.models.ServerCertificateCommonNames :param client_certificate_common_names: The list of client certificates @@ -1458,17 +1418,8 @@ class ClusterUpdateParameters(Model): overwrite the existing list. :type node_types: 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/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. - This should only be used for test clusters. - - Silver - Run the System services with a target replica set count of 5. - - Gold - Run the System services with a target replica set count of 7. - - Platinum - Run the System services with a target replica set count of 9. - . Possible values include: 'None', 'Bronze', 'Silver', 'Gold', 'Platinum' + :param reliability_level: Possible values include: 'None', 'Bronze', + 'Silver', 'Gold', 'Platinum' :type reliability_level: str or ~azure.mgmt.servicefabric.models.enum :param reverse_proxy_certificate: The server certificate used by reverse proxy. @@ -1477,19 +1428,42 @@ class ClusterUpdateParameters(Model): :param upgrade_description: The policy to use when upgrading the cluster. :type upgrade_description: ~azure.mgmt.servicefabric.models.ClusterUpgradePolicy - :param upgrade_mode: The upgrade mode of the cluster when new Service - Fabric runtime version is available. - - Automatic - The cluster will be automatically upgraded to the latest - Service Fabric runtime version as soon as it is available. - - Manual - The cluster will not be automatically upgraded to the latest - Service Fabric runtime version. The cluster is upgraded by setting the - **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 upgrade_mode: Possible values include: 'Automatic', 'Manual'. + Default value: "Automatic" . + :type upgrade_mode: str or ~azure.mgmt.servicefabric.models.UpgradeMode + :param sf_zonal_upgrade_mode: Possible values include: 'Parallel', + 'Hierarchical' + :type sf_zonal_upgrade_mode: str or + ~azure.mgmt.servicefabric.models.SfZonalUpgradeMode + :param vmss_zonal_upgrade_mode: Possible values include: 'Parallel', + 'Hierarchical' + :type vmss_zonal_upgrade_mode: str or + ~azure.mgmt.servicefabric.models.VmssZonalUpgradeMode + :param infrastructure_service_manager: Indicates if infrastructure service + manager is enabled. + :type infrastructure_service_manager: bool + :param upgrade_wave: Indicates when new cluster runtime version upgrades + will be applied after they are released. By default is Wave0. Only applies + when **upgradeMode** is set to 'Automatic'. Possible values include: + 'Wave0', 'Wave1', 'Wave2' + :type upgrade_wave: str or + ~azure.mgmt.servicefabric.models.ClusterUpgradeCadence + :param upgrade_pause_start_timestamp_utc: The start timestamp to pause + runtime version upgrades on the cluster (UTC). + :type upgrade_pause_start_timestamp_utc: datetime + :param upgrade_pause_end_timestamp_utc: The end timestamp of pause runtime + version upgrades on the cluster (UTC). + :type upgrade_pause_end_timestamp_utc: datetime + :param wave_upgrade_paused: Boolean to pause automatic runtime version + upgrades to the cluster. + :type wave_upgrade_paused: bool + :param notifications: Indicates a list of notification channels for + cluster events. + :type notifications: list[~azure.mgmt.servicefabric.models.Notification] :param tags: Cluster update parameters :type tags: dict[str, str] """ @@ -1507,8 +1481,16 @@ class ClusterUpdateParameters(Model): 'reliability_level': {'key': 'properties.reliabilityLevel', 'type': 'str'}, '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'}, + 'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'str'}, + 'sf_zonal_upgrade_mode': {'key': 'properties.sfZonalUpgradeMode', 'type': 'str'}, + 'vmss_zonal_upgrade_mode': {'key': 'properties.vmssZonalUpgradeMode', 'type': 'str'}, + 'infrastructure_service_manager': {'key': 'properties.infrastructureServiceManager', 'type': 'bool'}, + 'upgrade_wave': {'key': 'properties.upgradeWave', 'type': 'str'}, + 'upgrade_pause_start_timestamp_utc': {'key': 'properties.upgradePauseStartTimestampUtc', 'type': 'iso-8601'}, + 'upgrade_pause_end_timestamp_utc': {'key': 'properties.upgradePauseEndTimestampUtc', 'type': 'iso-8601'}, + 'wave_upgrade_paused': {'key': 'properties.waveUpgradePaused', 'type': 'bool'}, + 'notifications': {'key': 'properties.notifications', 'type': '[Notification]'}, 'tags': {'key': 'tags', 'type': '{str}'}, } @@ -1526,8 +1508,16 @@ def __init__(self, **kwargs): self.reliability_level = kwargs.get('reliability_level', None) 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.upgrade_mode = kwargs.get('upgrade_mode', "Automatic") + self.sf_zonal_upgrade_mode = kwargs.get('sf_zonal_upgrade_mode', None) + self.vmss_zonal_upgrade_mode = kwargs.get('vmss_zonal_upgrade_mode', None) + self.infrastructure_service_manager = kwargs.get('infrastructure_service_manager', None) + self.upgrade_wave = kwargs.get('upgrade_wave', None) + self.upgrade_pause_start_timestamp_utc = kwargs.get('upgrade_pause_start_timestamp_utc', None) + self.upgrade_pause_end_timestamp_utc = kwargs.get('upgrade_pause_end_timestamp_utc', None) + self.wave_upgrade_paused = kwargs.get('wave_upgrade_paused', None) + self.notifications = kwargs.get('notifications', None) self.tags = kwargs.get('tags', None) @@ -1780,7 +1770,7 @@ def __init__(self, **kwargs): class ErrorModel(Model): """The structure of the error. - :param error: The error details. + :param error: :type error: ~azure.mgmt.servicefabric.models.ErrorModelError """ @@ -1825,340 +1815,6 @@ def __init__(self, **kwargs): self.message = kwargs.get('message', None) -class LoadBalancingRule(Model): - """Describes a load balancing rule. - - All required parameters must be populated in order to send to Azure. - - :param frontend_port: Required. The port for the external endpoint. Port - numbers for each rule must be unique within the Load Balancer. Acceptable - values are between 1 and 65534. - :type frontend_port: int - :param backend_port: Required. The port used for internal connections on - the endpoint. Acceptable values are between 1 and 65535. - :type backend_port: int - :param protocol: Required. The reference to the transport protocol used by - the load balancing rule. Possible values include: 'tcp', 'udp' - :type protocol: str or ~azure.mgmt.servicefabric.models.Protocol - :param probe_protocol: Required. the reference to the load balancer probe - used by the load balancing rule. Possible values include: 'tcp', 'http', - 'https' - :type probe_protocol: str or - ~azure.mgmt.servicefabric.models.ProbeProtocol - :param probe_request_path: The probe request path. Only supported for - HTTP/HTTPS probes. - :type probe_request_path: str - """ - - _validation = { - 'frontend_port': {'required': True, 'maximum': 65534, 'minimum': 1}, - 'backend_port': {'required': True, 'maximum': 65534, 'minimum': 1}, - 'protocol': {'required': True}, - 'probe_protocol': {'required': True}, - } - - _attribute_map = { - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'probe_protocol': {'key': 'probeProtocol', 'type': 'str'}, - 'probe_request_path': {'key': 'probeRequestPath', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(LoadBalancingRule, self).__init__(**kwargs) - self.frontend_port = kwargs.get('frontend_port', None) - self.backend_port = kwargs.get('backend_port', None) - self.protocol = kwargs.get('protocol', None) - self.probe_protocol = kwargs.get('probe_protocol', None) - self.probe_request_path = kwargs.get('probe_request_path', None) - - -class ManagedCluster(Resource): - """The manged cluster resource - . - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource identifier. - :vartype id: str - :ivar name: Azure resource name. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - :param location: Required. Azure resource location. - :type location: str - :param tags: Azure resource tags. - :type tags: dict[str, str] - :ivar etag: Azure resource etag. - :vartype etag: str - :param dns_name: Required. The cluster dns name. - :type dns_name: str - :ivar fqdn: the cluster Fully qualified domain name. - :vartype fqdn: str - :ivar cluster_id: A service generated unique identifier for the cluster - resource. - :vartype cluster_id: str - :ivar cluster_state: The current state of the cluster. - - WaitingForNodes - Indicates that the cluster resource is created and the - resource provider is waiting for Service Fabric VM extension to boot up - and report to it. - - Deploying - Indicates that the Service Fabric runtime is being installed - on the VMs. Cluster resource will be in this state until the cluster boots - up and system services are up. - - BaselineUpgrade - Indicates that the cluster is upgrading to establishes - the cluster version. This upgrade is automatically initiated when the - cluster boots up for the first time. - - UpdatingUserConfiguration - Indicates that the cluster is being upgraded - with the user provided configuration. - - UpdatingUserCertificate - Indicates that the cluster is being upgraded - with the user provided certificate. - - UpdatingInfrastructure - Indicates that the cluster is being upgraded - with the latest Service Fabric runtime version. This happens only when the - **upgradeMode** is set to 'Automatic'. - - EnforcingClusterVersion - Indicates that cluster is on a different - version than expected and the cluster is being upgraded to the expected - version. - - UpgradeServiceUnreachable - Indicates that the system service in the - cluster is no longer polling the Resource Provider. Clusters in this state - cannot be managed by the Resource Provider. - - AutoScale - Indicates that the ReliabilityLevel of the cluster is being - adjusted. - - Ready - Indicates that the cluster is in a stable state. - . Possible values include: 'WaitingForNodes', 'Deploying', - 'BaselineUpgrade', 'UpdatingUserConfiguration', 'UpdatingUserCertificate', - 'UpdatingInfrastructure', 'EnforcingClusterVersion', - 'UpgradeServiceUnreachable', 'AutoScale', 'Ready' - :vartype cluster_state: str or ~azure.mgmt.servicefabric.models.enum - :ivar cluster_certificate_thumbprint: The cluster certificate thumbprint - used node to node communication. - :vartype cluster_certificate_thumbprint: str - :param client_connection_port: The port used for client connections to the - cluster. Default value: 19000 . - :type client_connection_port: int - :param http_gateway_connection_port: The port used for http connections to - the cluster. Default value: 19080 . - :type http_gateway_connection_port: int - :param admin_user_name: Required. vm admin user name. - :type admin_user_name: str - :param admin_password: vm admin user password. - :type admin_password: str - :param load_balancing_rules: Describes load balancing rules. - :type load_balancing_rules: - list[~azure.mgmt.servicefabric.models.LoadBalancingRule] - :param clients: client certificates for the cluster. - :type clients: list[~azure.mgmt.servicefabric.models.ClientCertificate] - :param azure_active_directory: Azure active directory. - :type azure_active_directory: - ~azure.mgmt.servicefabric.models.AzureActiveDirectory - :param fabric_settings: The list of custom fabric settings to configure - the cluster. - :type fabric_settings: - list[~azure.mgmt.servicefabric.models.SettingsSectionDescription] - :param use_test_extension: Use service fabric test vm extension, by - default it's false. - :type use_test_extension: bool - :ivar provisioning_state: The provisioning state of the managed cluster - resource. Possible values include: 'None', 'Creating', 'Created', - 'Updating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'Deleted', - 'Other' - :vartype provisioning_state: str or ~azure.mgmt.servicefabric.models.enum - :param cluster_code_version: The Service Fabric runtime version of the - cluster. This property can only by set the user when **upgradeMode** is - set to 'Manual'. To get list of available Service Fabric versions for new - clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of - available version for existing clusters use **availableClusterVersions**. - :type cluster_code_version: str - :param cluster_upgrade_mode: The upgrade mode of the cluster when new - Service Fabric runtime version is available. - - Automatic - The cluster will be automatically upgraded to the latest - Service Fabric runtime version as soon as it is available. - - Manual - The cluster will not be automatically upgraded to the latest - Service Fabric runtime version. The cluster is upgraded by setting the - **clusterCodeVersion** property in the cluster resource. - . Possible values include: 'Automatic', 'Manual' - :type cluster_upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum - :param cluster_upgrade_description: Describes the policy used when - upgrading the cluster. - :type cluster_upgrade_description: - ~azure.mgmt.servicefabric.models.ClusterUpgradePolicy - :param reverse_proxy_endpoint_port: The endpoint used by reverse proxy. - :type reverse_proxy_endpoint_port: int - :param sku: The sku of the managed cluster - :type sku: ~azure.mgmt.servicefabric.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'etag': {'readonly': True}, - 'dns_name': {'required': True}, - 'fqdn': {'readonly': True}, - 'cluster_id': {'readonly': True}, - 'cluster_state': {'readonly': True}, - 'cluster_certificate_thumbprint': {'readonly': True}, - 'admin_user_name': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'cluster_id': {'key': 'properties.clusterId', 'type': 'str'}, - 'cluster_state': {'key': 'properties.clusterState', 'type': 'str'}, - 'cluster_certificate_thumbprint': {'key': 'properties.clusterCertificateThumbprint', 'type': 'str'}, - 'client_connection_port': {'key': 'properties.clientConnectionPort', 'type': 'int'}, - 'http_gateway_connection_port': {'key': 'properties.httpGatewayConnectionPort', 'type': 'int'}, - 'admin_user_name': {'key': 'properties.adminUserName', 'type': 'str'}, - 'admin_password': {'key': 'properties.adminPassword', 'type': 'str'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, - 'clients': {'key': 'properties.clients', 'type': '[ClientCertificate]'}, - 'azure_active_directory': {'key': 'properties.azureActiveDirectory', 'type': 'AzureActiveDirectory'}, - 'fabric_settings': {'key': 'properties.fabricSettings', 'type': '[SettingsSectionDescription]'}, - 'use_test_extension': {'key': 'properties.useTestExtension', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'cluster_code_version': {'key': 'properties.clusterCodeVersion', 'type': 'str'}, - 'cluster_upgrade_mode': {'key': 'properties.clusterUpgradeMode', 'type': 'str'}, - 'cluster_upgrade_description': {'key': 'properties.clusterUpgradeDescription', 'type': 'ClusterUpgradePolicy'}, - 'reverse_proxy_endpoint_port': {'key': 'properties.reverseProxyEndpointPort', 'type': 'int'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, **kwargs): - super(ManagedCluster, self).__init__(**kwargs) - self.dns_name = kwargs.get('dns_name', None) - self.fqdn = None - self.cluster_id = None - self.cluster_state = None - self.cluster_certificate_thumbprint = None - self.client_connection_port = kwargs.get('client_connection_port', 19000) - self.http_gateway_connection_port = kwargs.get('http_gateway_connection_port', 19080) - self.admin_user_name = kwargs.get('admin_user_name', None) - self.admin_password = kwargs.get('admin_password', None) - self.load_balancing_rules = kwargs.get('load_balancing_rules', None) - self.clients = kwargs.get('clients', None) - self.azure_active_directory = kwargs.get('azure_active_directory', None) - self.fabric_settings = kwargs.get('fabric_settings', None) - self.use_test_extension = kwargs.get('use_test_extension', None) - self.provisioning_state = None - self.cluster_code_version = kwargs.get('cluster_code_version', None) - self.cluster_upgrade_mode = kwargs.get('cluster_upgrade_mode', None) - self.cluster_upgrade_description = kwargs.get('cluster_upgrade_description', None) - self.reverse_proxy_endpoint_port = kwargs.get('reverse_proxy_endpoint_port', None) - self.sku = kwargs.get('sku', None) - - -class ManagedClusterUpdateParameters(Model): - """Managed cluster update request. - - :param client_connection_port: The port used for client connections to the - cluster. - :type client_connection_port: int - :param http_gateway_connection_port: The port used for http connections to - the cluster. - :type http_gateway_connection_port: int - :param load_balancing_rules: Describes a load balancing rule. - :type load_balancing_rules: - list[~azure.mgmt.servicefabric.models.LoadBalancingRule] - :param clients: client certificates for the cluster. - :type clients: list[~azure.mgmt.servicefabric.models.ClientCertificate] - :param azure_active_directory: Azure active directory. - :type azure_active_directory: - ~azure.mgmt.servicefabric.models.AzureActiveDirectory - :param fabric_settings: The list of custom fabric settings to configure - the cluster. - :type fabric_settings: - list[~azure.mgmt.servicefabric.models.SettingsSectionDescription] - :param cluster_code_version: The Service Fabric runtime version of the - cluster. This property can only by set the user when **upgradeMode** is - set to 'Manual'. To get list of available Service Fabric versions for new - clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of - available version for existing clusters use **availableClusterVersions**. - :type cluster_code_version: str - :param cluster_upgrade_mode: The upgrade mode of the cluster when new - Service Fabric runtime version is available. - - Automatic - The cluster will be automatically upgraded to the latest - Service Fabric runtime version as soon as it is available. - - Manual - The cluster will not be automatically upgraded to the latest - Service Fabric runtime version. The cluster is upgraded by setting the - **clusterCodeVersion** property in the cluster resource. - . Possible values include: 'Automatic', 'Manual' - :type cluster_upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum - :param cluster_upgrade_description: Describes the policy used when - upgrading the cluster. - :type cluster_upgrade_description: - ~azure.mgmt.servicefabric.models.ClusterUpgradePolicy - :param reverse_proxy_endpoint_port: The endpoint used by reverse proxy. - :type reverse_proxy_endpoint_port: int - :param tags: Managed cluster update parameters - :type tags: dict[str, str] - """ - - _attribute_map = { - 'client_connection_port': {'key': 'properties.clientConnectionPort', 'type': 'int'}, - 'http_gateway_connection_port': {'key': 'properties.httpGatewayConnectionPort', 'type': 'int'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, - 'clients': {'key': 'properties.clients', 'type': '[ClientCertificate]'}, - 'azure_active_directory': {'key': 'properties.azureActiveDirectory', 'type': 'AzureActiveDirectory'}, - 'fabric_settings': {'key': 'properties.fabricSettings', 'type': '[SettingsSectionDescription]'}, - 'cluster_code_version': {'key': 'properties.clusterCodeVersion', 'type': 'str'}, - 'cluster_upgrade_mode': {'key': 'properties.clusterUpgradeMode', 'type': 'str'}, - 'cluster_upgrade_description': {'key': 'properties.clusterUpgradeDescription', 'type': 'ClusterUpgradePolicy'}, - 'reverse_proxy_endpoint_port': {'key': 'properties.reverseProxyEndpointPort', 'type': 'int'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterUpdateParameters, self).__init__(**kwargs) - self.client_connection_port = kwargs.get('client_connection_port', None) - self.http_gateway_connection_port = kwargs.get('http_gateway_connection_port', None) - self.load_balancing_rules = kwargs.get('load_balancing_rules', None) - self.clients = kwargs.get('clients', None) - self.azure_active_directory = kwargs.get('azure_active_directory', None) - self.fabric_settings = kwargs.get('fabric_settings', None) - self.cluster_code_version = kwargs.get('cluster_code_version', None) - self.cluster_upgrade_mode = kwargs.get('cluster_upgrade_mode', None) - self.cluster_upgrade_description = kwargs.get('cluster_upgrade_description', None) - self.reverse_proxy_endpoint_port = kwargs.get('reverse_proxy_endpoint_port', None) - self.tags = kwargs.get('tags', None) - - -class ManagedClusterVersionDetails(Model): - """The detail of the Service Fabric runtime version. - - :param msi_version: The Service Fabric runtime version of the cluster. - :type msi_version: str - :param support_expiry_utc: The date of expiry of support of the version. - :type support_expiry_utc: str - :param os_type: Indicates the operating system of the cluster. Possible - values include: 'Windows', 'Ubuntu', 'RedHat', 'Ubuntu18_04' - :type os_type: str or ~azure.mgmt.servicefabric.models.enum - """ - - _attribute_map = { - 'msi_version': {'key': 'msiVersion', 'type': 'str'}, - 'support_expiry_utc': {'key': 'supportExpiryUtc', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(ManagedClusterVersionDetails, self).__init__(**kwargs) - self.msi_version = kwargs.get('msi_version', None) - self.support_expiry_utc = kwargs.get('support_expiry_utc', None) - self.os_type = kwargs.get('os_type', None) - - class ManagedIdentity(Model): """Describes the managed identities for an Azure resource. @@ -2171,14 +1827,10 @@ class ManagedIdentity(Model): :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' + :param type: 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}'. + :param user_assigned_identities: :type user_assigned_identities: dict[str, ~azure.mgmt.servicefabric.models.UserAssignedIdentity] """ @@ -2203,43 +1855,6 @@ def __init__(self, **kwargs): self.user_assigned_identities = kwargs.get('user_assigned_identities', None) -class ManagedProxyResource(Model): - """The resource model definition for proxy-only resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource identifier. - :vartype id: str - :ivar name: Azure resource name. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - :param tags: Azure resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, **kwargs): - super(ManagedProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = kwargs.get('tags', None) - - class PartitionSchemeDescription(Model): """Describes how the service is partitioned. @@ -2304,156 +1919,6 @@ def __init__(self, **kwargs): self.partition_scheme = 'Named' -class NodeType(ManagedProxyResource): - """Describes a node type in the cluster, each node type represents sub set of - nodes in the cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource identifier. - :vartype id: str - :ivar name: Azure resource name. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - :param tags: Azure resource tags. - :type tags: dict[str, str] - :param is_primary: Required. The node type on which system services will - run. Only one node type should be marked as primary. Primary node type - cannot be deleted or changed for existing clusters. - :type is_primary: bool - :param vm_instance_count: Required. The number of nodes in the node type. - This count should match the capacity property in the corresponding - VirtualMachineScaleSet resource. - :type vm_instance_count: int - :param data_disk_size_gb: Required. Disk size for each vm in the node type - in GBs. - :type data_disk_size_gb: int - :param placement_properties: The placement tags applied to nodes in the - node type, which can be used to indicate where certain services (workload) - should run. - :type placement_properties: dict[str, str] - :param capacities: The capacity tags applied to the nodes in the node - type, the cluster resource manager uses these tags to understand how much - resource a node has. - :type capacities: dict[str, str] - :param application_ports: The range of ports from which cluster assigned - port to Service Fabric applications. - :type application_ports: - ~azure.mgmt.servicefabric.models.EndpointRangeDescription - :param ephemeral_ports: The range of ephemeral ports that nodes in this - node type should be configured with. - :type ephemeral_ports: - ~azure.mgmt.servicefabric.models.EndpointRangeDescription - :param vm_size: The size of virtual machines in the pool. All virtual - machines in a pool are the same size. For example, Standard_D3. - :type vm_size: str - :param vm_image_publisher: The publisher of the Azure Virtual Machines - Marketplace image. For example, Canonical or MicrosoftWindowsServer. - :type vm_image_publisher: str - :param vm_image_offer: The offer type of the Azure Virtual Machines - Marketplace image. For example, UbuntuServer or WindowsServer. - :type vm_image_offer: str - :param vm_image_sku: The SKU of the Azure Virtual Machines Marketplace - image. For example, 14.04.0-LTS or 2012-R2-Datacenter. - :type vm_image_sku: str - :param vm_image_version: The version of the Azure Virtual Machines - Marketplace image. A value of 'latest' can be specified to select the - latest version of an image. If omitted, the default is 'latest'. - :type vm_image_version: str - :param vm_secrets: virtual machine secretes. The secrets to install in the - virtual machines. - :type vm_secrets: list[~azure.mgmt.servicefabric.models.VaultSecretGroup] - :param vm_extensions: virtual machine extensions. Set of extensions that - should be installed onto the virtual machines. - :type vm_extensions: list[~azure.mgmt.servicefabric.models.VMSSExtension] - :ivar provisioning_state: The provisioning state of the managed cluster - resource. Possible values include: 'None', 'Creating', 'Created', - 'Updating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'Deleted', - 'Other' - :vartype provisioning_state: str or ~azure.mgmt.servicefabric.models.enum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'is_primary': {'required': True}, - 'vm_instance_count': {'required': True, 'maximum': 2147483647, 'minimum': 1}, - 'data_disk_size_gb': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'is_primary': {'key': 'properties.isPrimary', 'type': 'bool'}, - 'vm_instance_count': {'key': 'properties.vmInstanceCount', 'type': 'int'}, - 'data_disk_size_gb': {'key': 'properties.dataDiskSizeGB', 'type': 'int'}, - 'placement_properties': {'key': 'properties.placementProperties', 'type': '{str}'}, - 'capacities': {'key': 'properties.capacities', 'type': '{str}'}, - 'application_ports': {'key': 'properties.applicationPorts', 'type': 'EndpointRangeDescription'}, - 'ephemeral_ports': {'key': 'properties.ephemeralPorts', 'type': 'EndpointRangeDescription'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'vm_image_publisher': {'key': 'properties.vmImagePublisher', 'type': 'str'}, - 'vm_image_offer': {'key': 'properties.vmImageOffer', 'type': 'str'}, - 'vm_image_sku': {'key': 'properties.vmImageSku', 'type': 'str'}, - 'vm_image_version': {'key': 'properties.vmImageVersion', 'type': 'str'}, - 'vm_secrets': {'key': 'properties.vmSecrets', 'type': '[VaultSecretGroup]'}, - 'vm_extensions': {'key': 'properties.vmExtensions', 'type': '[VMSSExtension]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(NodeType, self).__init__(**kwargs) - self.is_primary = kwargs.get('is_primary', None) - self.vm_instance_count = kwargs.get('vm_instance_count', None) - self.data_disk_size_gb = kwargs.get('data_disk_size_gb', None) - self.placement_properties = kwargs.get('placement_properties', None) - self.capacities = kwargs.get('capacities', None) - self.application_ports = kwargs.get('application_ports', None) - self.ephemeral_ports = kwargs.get('ephemeral_ports', None) - self.vm_size = kwargs.get('vm_size', None) - self.vm_image_publisher = kwargs.get('vm_image_publisher', None) - self.vm_image_offer = kwargs.get('vm_image_offer', None) - self.vm_image_sku = kwargs.get('vm_image_sku', None) - self.vm_image_version = kwargs.get('vm_image_version', None) - self.vm_secrets = kwargs.get('vm_secrets', None) - self.vm_extensions = kwargs.get('vm_extensions', None) - self.provisioning_state = None - - -class NodeTypeActionParameters(Model): - """Parameters for Node type action. - - All required parameters must be populated in order to send to Azure. - - :param nodes: Required. List of node names from the node type. - :type nodes: list[str] - :param force: Force the action to go through. - :type force: bool - """ - - _validation = { - 'nodes': {'required': True}, - } - - _attribute_map = { - 'nodes': {'key': 'nodes', 'type': '[str]'}, - 'force': {'key': 'force', 'type': 'bool'}, - } - - def __init__(self, **kwargs): - super(NodeTypeActionParameters, self).__init__(**kwargs) - self.nodes = kwargs.get('nodes', None) - self.force = kwargs.get('force', None) - - class NodeTypeDescription(Model): """Describes a node type in the cluster, each node type represents sub set of nodes in the cluster. @@ -2476,16 +1941,8 @@ class NodeTypeDescription(Model): :param http_gateway_endpoint_port: Required. The HTTP cluster management endpoint port. :type http_gateway_endpoint_port: int - :param durability_level: The durability level of the node type. Learn - about - [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. - - Gold - The infrastructure jobs can be paused for a duration of 2 hours - per UD. Gold durability can be enabled only on full node VM skus like - D15_V2, G5 etc. - . Possible values include: 'Bronze', 'Silver', 'Gold' + :param durability_level: Possible values include: 'Bronze', 'Silver', + 'Gold' :type durability_level: str or ~azure.mgmt.servicefabric.models.enum :param application_ports: The range of ports from which cluster assigned port to Service Fabric applications. @@ -2499,12 +1956,22 @@ class NodeTypeDescription(Model): run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters. :type is_primary: bool - :param vm_instance_count: Required. The number of nodes in the node type. - This count should match the capacity property in the corresponding - VirtualMachineScaleSet resource. + :param vm_instance_count: Required. VMInstanceCount should be 1 to n, + where n indicates the number of VM instances corresponding to this + nodeType. VMInstanceCount = 0 can be done only in these scenarios: + NodeType is a secondary nodeType. Durability = Bronze or Durability >= + Bronze and InfrastructureServiceManager = true. If VMInstanceCount = 0, + implies the VMs for this nodeType will not be used for the initial cluster + size computation. :type vm_instance_count: int :param reverse_proxy_endpoint_port: The endpoint used by reverse proxy. :type reverse_proxy_endpoint_port: int + :param is_stateless: Indicates if the node type can only host Stateless + workloads. + :type is_stateless: bool + :param multiple_availability_zones: Indicates if the node type is enabled + to support multiple zones. + :type multiple_availability_zones: bool """ _validation = { @@ -2512,7 +1979,7 @@ class NodeTypeDescription(Model): 'client_connection_endpoint_port': {'required': True}, 'http_gateway_endpoint_port': {'required': True}, 'is_primary': {'required': True}, - 'vm_instance_count': {'required': True, 'maximum': 2147483647, 'minimum': 1}, + 'vm_instance_count': {'required': True, 'maximum': 2147483647, 'minimum': 0}, } _attribute_map = { @@ -2527,6 +1994,8 @@ class NodeTypeDescription(Model): 'is_primary': {'key': 'isPrimary', 'type': 'bool'}, 'vm_instance_count': {'key': 'vmInstanceCount', 'type': 'int'}, 'reverse_proxy_endpoint_port': {'key': 'reverseProxyEndpointPort', 'type': 'int'}, + 'is_stateless': {'key': 'isStateless', 'type': 'bool'}, + 'multiple_availability_zones': {'key': 'multipleAvailabilityZones', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -2542,66 +2011,85 @@ def __init__(self, **kwargs): self.is_primary = kwargs.get('is_primary', None) self.vm_instance_count = kwargs.get('vm_instance_count', None) self.reverse_proxy_endpoint_port = kwargs.get('reverse_proxy_endpoint_port', None) + self.is_stateless = kwargs.get('is_stateless', None) + self.multiple_availability_zones = kwargs.get('multiple_availability_zones', None) -class NodeTypeUpdateParameters(Model): - """Node type update request. +class Notification(Model): + """Describes the notification channel for cluster events. - :param vm_instance_count: The number of nodes in the node type. This count - should match the capacity property in the corresponding - VirtualMachineScaleSet resource. - :type vm_instance_count: int - :param placement_properties: The placement tags applied to nodes in the - node type, which can be used to indicate where certain services (workload) - should run. - :type placement_properties: dict[str, str] - :param capacities: The capacity tags applied to the nodes in the node - type, the cluster resource manager uses these tags to understand how much - resource a node has. - :type capacities: dict[str, str] - :param application_ports: The range of ports from which cluster assigned - port to Service Fabric applications. - :type application_ports: - ~azure.mgmt.servicefabric.models.EndpointRangeDescription - :param ephemeral_ports: The range of ephemeral ports that nodes in this - node type should be configured with. - :type ephemeral_ports: - ~azure.mgmt.servicefabric.models.EndpointRangeDescription - :param vm_secrets: virtual machine secretes. The secrets to install in the - virtual machines. - :type vm_secrets: list[~azure.mgmt.servicefabric.models.VaultSecretGroup] - :param vm_extensions: virtual machine extensions. Set of extensions that - should be installed onto the virtual machines. - :type vm_extensions: list[~azure.mgmt.servicefabric.models.VMSSExtension] - :param tags: Node type update parameters - :type tags: dict[str, str] + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param is_enabled: Required. Indicates if the notification is enabled. + :type is_enabled: bool + :ivar notification_category: Required. The category of notification. + Default value: "WaveProgress" . + :vartype notification_category: str + :param notification_level: Required. The level of notification. Possible + values include: 'Critical', 'All' + :type notification_level: str or + ~azure.mgmt.servicefabric.models.NotificationLevel + :param notification_targets: Required. List of targets that subscribe to + the notification. + :type notification_targets: + list[~azure.mgmt.servicefabric.models.NotificationTarget] """ _validation = { - 'vm_instance_count': {'maximum': 2147483647, 'minimum': 1}, + 'is_enabled': {'required': True}, + 'notification_category': {'required': True, 'constant': True}, + 'notification_level': {'required': True}, + 'notification_targets': {'required': True}, } _attribute_map = { - 'vm_instance_count': {'key': 'properties.vmInstanceCount', 'type': 'int'}, - 'placement_properties': {'key': 'properties.placementProperties', 'type': '{str}'}, - 'capacities': {'key': 'properties.capacities', 'type': '{str}'}, - 'application_ports': {'key': 'properties.applicationPorts', 'type': 'EndpointRangeDescription'}, - 'ephemeral_ports': {'key': 'properties.ephemeralPorts', 'type': 'EndpointRangeDescription'}, - 'vm_secrets': {'key': 'properties.vmSecrets', 'type': '[VaultSecretGroup]'}, - 'vm_extensions': {'key': 'properties.vmExtensions', 'type': '[VMSSExtension]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'notification_category': {'key': 'notificationCategory', 'type': 'str'}, + 'notification_level': {'key': 'notificationLevel', 'type': 'str'}, + 'notification_targets': {'key': 'notificationTargets', 'type': '[NotificationTarget]'}, } + notification_category = "WaveProgress" + def __init__(self, **kwargs): - super(NodeTypeUpdateParameters, self).__init__(**kwargs) - self.vm_instance_count = kwargs.get('vm_instance_count', None) - self.placement_properties = kwargs.get('placement_properties', None) - self.capacities = kwargs.get('capacities', None) - self.application_ports = kwargs.get('application_ports', None) - self.ephemeral_ports = kwargs.get('ephemeral_ports', None) - self.vm_secrets = kwargs.get('vm_secrets', None) - self.vm_extensions = kwargs.get('vm_extensions', None) - self.tags = kwargs.get('tags', None) + super(Notification, self).__init__(**kwargs) + self.is_enabled = kwargs.get('is_enabled', None) + self.notification_level = kwargs.get('notification_level', None) + self.notification_targets = kwargs.get('notification_targets', None) + + +class NotificationTarget(Model): + """Describes the notification target properties. + + All required parameters must be populated in order to send to Azure. + + :param notification_channel: Required. The notification channel indicates + the type of receivers subscribed to the notification, either user or + subscription. Possible values include: 'EmailUser', 'EmailSubscription' + :type notification_channel: str or + ~azure.mgmt.servicefabric.models.NotificationChannel + :param receivers: Required. List of targets that subscribe to the + notification. + :type receivers: list[str] + """ + + _validation = { + 'notification_channel': {'required': True}, + 'receivers': {'required': True}, + } + + _attribute_map = { + 'notification_channel': {'key': 'notificationChannel', 'type': 'str'}, + 'receivers': {'key': 'receivers', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NotificationTarget, self).__init__(**kwargs) + self.notification_channel = kwargs.get('notification_channel', None) + self.receivers = kwargs.get('receivers', None) class OperationResult(Model): @@ -2609,6 +2097,8 @@ class OperationResult(Model): :param name: The name of the operation. :type name: str + :param is_data_action: Indicates whether the operation is a data action + :type is_data_action: bool :param display: The object that represents the operation. :type display: ~azure.mgmt.servicefabric.models.AvailableOperationDisplay :param origin: Origin result @@ -2619,6 +2109,7 @@ class OperationResult(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, 'display': {'key': 'display', 'type': 'AvailableOperationDisplay'}, 'origin': {'key': 'origin', 'type': 'str'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, @@ -2627,6 +2118,7 @@ class OperationResult(Model): def __init__(self, **kwargs): super(OperationResult, self).__init__(**kwargs) self.name = kwargs.get('name', None) + self.is_data_action = kwargs.get('is_data_action', None) self.display = kwargs.get('display', None) self.origin = kwargs.get('origin', None) self.next_link = kwargs.get('next_link', None) @@ -2669,9 +2161,9 @@ class ServerCertificateCommonNames(Model): name that are used to secure the cluster. :type common_names: list[~azure.mgmt.servicefabric.models.ServerCertificateCommonName] - :param x509_store_name: The local certificate store location. Possible - values include: 'AddressBook', 'AuthRoot', 'CertificateAuthority', - 'Disallowed', 'My', 'Root', 'TrustedPeople', 'TrustedPublisher' + :param x509_store_name: Possible values include: 'AddressBook', + 'AuthRoot', 'CertificateAuthority', 'Disallowed', 'My', 'Root', + 'TrustedPeople', 'TrustedPublisher' :type x509_store_name: str or ~azure.mgmt.servicefabric.models.enum """ @@ -2808,33 +2300,32 @@ class ServiceResource(ProxyResource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str :param service_type_name: The name of the service type :type service_type_name: str - :param partition_description: Describes how the service is partitioned. + :param partition_description: :type partition_description: ~azure.mgmt.servicefabric.models.PartitionSchemeDescription :param service_package_activation_mode: The activation Mode of the service @@ -2862,6 +2353,7 @@ class ServiceResource(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'placement_constraints': {'key': 'properties.placementConstraints', 'type': 'str'}, 'correlation_scheme': {'key': 'properties.correlationScheme', 'type': '[ServiceCorrelationDescription]'}, 'service_load_metrics': {'key': 'properties.serviceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, @@ -2925,20 +2417,17 @@ class ServiceResourcePropertiesBase(Model): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost """ @@ -2976,27 +2465,24 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str :param service_type_name: The name of the service type :type service_type_name: str - :param partition_description: Describes how the service is partitioned. + :param partition_description: :type partition_description: ~azure.mgmt.servicefabric.models.PartitionSchemeDescription :param service_package_activation_mode: The activation Mode of the service @@ -3064,26 +2550,25 @@ class ServiceResourceUpdate(ProxyResource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost """ @@ -3101,6 +2586,7 @@ class ServiceResourceUpdate(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'placement_constraints': {'key': 'properties.placementConstraints', 'type': 'str'}, 'correlation_scheme': {'key': 'properties.correlationScheme', 'type': '[ServiceCorrelationDescription]'}, 'service_load_metrics': {'key': 'properties.serviceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, @@ -3132,20 +2618,17 @@ class ServiceResourceUpdateProperties(ServiceResourcePropertiesBase): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :param service_kind: Required. Constant filled by server. :type service_kind: str @@ -3305,30 +2788,6 @@ def __init__(self, **kwargs): self.partition_scheme = 'Singleton' -class Sku(Model): - """Sku definition. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Sku Name. Basic will hav a minimum of 3 seed nodes - and Standard a minimum of 5. Basic only allows 1 node type. Possible - values include: 'Basic', 'Standard' - :type name: str or ~azure.mgmt.servicefabric.models.enum - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, **kwargs): - super(Sku, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - - class StatefulServiceProperties(ServiceResourceProperties): """The properties of a stateful service resource. @@ -3343,27 +2802,24 @@ class StatefulServiceProperties(ServiceResourceProperties): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str :param service_type_name: The name of the service type :type service_type_name: str - :param partition_description: Describes how the service is partitioned. + :param partition_description: :type partition_description: ~azure.mgmt.servicefabric.models.PartitionSchemeDescription :param service_package_activation_mode: The activation Mode of the service @@ -3447,20 +2903,17 @@ class StatefulServiceUpdateProperties(ServiceResourceUpdateProperties): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :param service_kind: Required. Constant filled by server. :type service_kind: str @@ -3526,27 +2979,24 @@ class StatelessServiceProperties(ServiceResourceProperties): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str :param service_type_name: The name of the service type :type service_type_name: str - :param partition_description: Describes how the service is partitioned. + :param partition_description: :type partition_description: ~azure.mgmt.servicefabric.models.PartitionSchemeDescription :param service_package_activation_mode: The activation Mode of the service @@ -3613,20 +3063,17 @@ class StatelessServiceUpdateProperties(ServiceResourceUpdateProperties): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :param service_kind: Required. Constant filled by server. :type service_kind: str @@ -3667,20 +3114,42 @@ def __init__(self, **kwargs): self.service_kind = 'Stateless' -class SubResource(Model): - """Azure resource identifier. +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. - :param id: Azure resource identifier. - :type id: str + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + :type created_by_type: str + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. + :type last_modified_by_type: str + :param last_modified_at: The timestamp of resource last modification + (UTC). + :type last_modified_at: datetime """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, } def __init__(self, **kwargs): - super(SubResource, self).__init__(**kwargs) - self.id = kwargs.get('id', None) + super(SystemData, self).__init__(**kwargs) + self.created_by = kwargs.get('created_by', None) + self.created_by_type = kwargs.get('created_by_type', None) + self.created_at = kwargs.get('created_at', None) + self.last_modified_by = kwargs.get('last_modified_by', None) + self.last_modified_by_type = kwargs.get('last_modified_by_type', None) + self.last_modified_at = kwargs.get('last_modified_at', None) class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): @@ -3725,179 +3194,68 @@ def __init__(self, **kwargs): 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 - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. +class UpgradableVersionPathResult(Model): + """The list of intermediate cluster code versions for an upgrade or downgrade. + Or minimum and maximum upgradable version if no target was given. - All required parameters must be populated in order to send to Azure. - - :param certificate_url: Required. This is the URL of a certificate that - has been uploaded to Key Vault as a secret. For adding a secret to the Key - Vault, see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

{
- "data":"",
"dataType":"pfx",
- "password":""
} - :type certificate_url: str - :param certificate_store: Required. For Windows VMs, specifies the - certificate store on the Virtual Machine to which the certificate should - be added. The specified certificate store is implicitly in the - LocalMachine account.

For Linux VMs, the certificate file is - placed under the /var/lib/waagent directory, with the file name - .crt for the X509 certificate file and - .prv for private key. Both of these files are .pem - formatted. - :type certificate_store: str + :param supported_path: + :type supported_path: list[str] """ - _validation = { - 'certificate_url': {'required': True}, - 'certificate_store': {'required': True}, - } - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + 'supported_path': {'key': 'supportedPath', 'type': '[str]'}, } def __init__(self, **kwargs): - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = kwargs.get('certificate_url', None) - self.certificate_store = kwargs.get('certificate_store', None) + super(UpgradableVersionPathResult, self).__init__(**kwargs) + self.supported_path = kwargs.get('supported_path', None) -class VaultSecretGroup(Model): - """Specifies set of certificates that should be installed onto the virtual - machines. +class UpgradableVersionsDescription(Model): + """UpgradableVersionsDescription. All required parameters must be populated in order to send to Azure. - :param source_vault: Required. The relative URL of the Key Vault - containing all of the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.servicefabric.models.SubResource - :param vault_certificates: Required. The list of key vault references in - SourceVault which contain certificates. - :type vault_certificates: - list[~azure.mgmt.servicefabric.models.VaultCertificate] + :param target_version: Required. The target code version. + :type target_version: str """ _validation = { - 'source_vault': {'required': True}, - 'vault_certificates': {'required': True}, + 'target_version': {'required': True}, } _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + 'target_version': {'key': 'targetVersion', 'type': 'str'}, } def __init__(self, **kwargs): - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = kwargs.get('source_vault', None) - self.vault_certificates = kwargs.get('vault_certificates', None) + super(UpgradableVersionsDescription, self).__init__(**kwargs) + self.target_version = kwargs.get('target_version', None) -class VMSSExtension(Model): - """Specifies set of extensions that should be installed onto the virtual - machines. +class UserAssignedIdentity(Model): + """UserAssignedIdentity. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: Required. The name of the extension handler publisher. - :type publisher: str - :param type: Required. Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Required. Specifies the version of the script - handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param provision_after_extensions: Collection of extension names after - which this extension needs to be provisioned. - :type provision_after_extensions: list[str] + :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 = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'type': {'required': True}, - 'type_handler_version': {'required': True}, - 'provisioning_state': {'readonly': True}, + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, } def __init__(self, **kwargs): - super(VMSSExtension, self).__init__(**kwargs) - self.name = kwargs.get('name', None) - self.force_update_tag = kwargs.get('force_update_tag', None) - self.publisher = kwargs.get('publisher', None) - self.type = kwargs.get('type', None) - self.type_handler_version = kwargs.get('type_handler_version', None) - self.auto_upgrade_minor_version = kwargs.get('auto_upgrade_minor_version', None) - self.settings = kwargs.get('settings', None) - self.protected_settings = kwargs.get('protected_settings', None) - self.provisioning_state = None - self.provision_after_extensions = kwargs.get('provision_after_extensions', 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/_models_py3.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models_py3.py index 742e0cfeef4e..4adfa518409f 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 @@ -144,6 +144,8 @@ class ProxyResource(Model): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData """ _validation = { @@ -160,9 +162,10 @@ class ProxyResource(Model): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + def __init__(self, *, location: str=None, tags=None, system_data=None, **kwargs) -> None: super(ProxyResource, self).__init__(**kwargs) self.id = None self.name = None @@ -170,6 +173,7 @@ def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: self.location = location self.tags = tags self.etag = None + self.system_data = system_data class ApplicationResource(ProxyResource): @@ -191,16 +195,15 @@ 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. + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData + :param identity: :type identity: ~azure.mgmt.servicefabric.models.ManagedIdentity - :param type_version: The version of the application type as defined in the - application manifest. + :param type_version: :type type_version: str - :param parameters: List of application parameters with overridden values - from their default values specified in the application manifest. + :param parameters: :type parameters: dict[str, str] - :param upgrade_policy: Describes the policy for a monitored application - upgrade. + :param upgrade_policy: :type upgrade_policy: ~azure.mgmt.servicefabric.models.ApplicationUpgradePolicy :param minimum_nodes: The minimum number of nodes where Service Fabric @@ -219,7 +222,7 @@ class ApplicationResource(ProxyResource): :param remove_application_capacity: Remove the current application capacity settings. :type remove_application_capacity: bool - :param metrics: List of application capacity metric description. + :param metrics: :type metrics: list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription] :param managed_identities: List of user assigned identities for the @@ -229,8 +232,7 @@ class ApplicationResource(ProxyResource): :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str - :param type_name: The application type name as defined in the application - manifest. + :param type_name: :type type_name: str """ @@ -251,6 +253,7 @@ class ApplicationResource(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'identity': {'key': 'identity', 'type': 'ManagedIdentity'}, 'type_version': {'key': 'properties.typeVersion', 'type': 'str'}, 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, @@ -264,8 +267,8 @@ class ApplicationResource(ProxyResource): 'type_name': {'key': 'properties.typeName', 'type': 'str'}, } - 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) + def __init__(self, *, location: str=None, tags=None, system_data=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, system_data=system_data, **kwargs) self.identity = identity self.type_version = type_version self.parameters = parameters @@ -326,14 +329,13 @@ class ApplicationResourceUpdate(ProxyResource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str - :param type_version: The version of the application type as defined in the - application manifest. + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData + :param type_version: :type type_version: str - :param parameters: List of application parameters with overridden values - from their default values specified in the application manifest. + :param parameters: :type parameters: dict[str, str] - :param upgrade_policy: Describes the policy for a monitored application - upgrade. + :param upgrade_policy: :type upgrade_policy: ~azure.mgmt.servicefabric.models.ApplicationUpgradePolicy :param minimum_nodes: The minimum number of nodes where Service Fabric @@ -352,7 +354,7 @@ class ApplicationResourceUpdate(ProxyResource): :param remove_application_capacity: Remove the current application capacity settings. :type remove_application_capacity: bool - :param metrics: List of application capacity metric description. + :param metrics: :type metrics: list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription] :param managed_identities: List of user assigned identities for the @@ -377,6 +379,7 @@ class ApplicationResourceUpdate(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'type_version': {'key': 'properties.typeVersion', 'type': 'str'}, 'parameters': {'key': 'properties.parameters', 'type': '{str}'}, 'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'ApplicationUpgradePolicy'}, @@ -387,8 +390,8 @@ class ApplicationResourceUpdate(ProxyResource): '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, managed_identities=None, **kwargs) -> None: - super(ApplicationResourceUpdate, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, location: str=None, tags=None, system_data=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, system_data=system_data, **kwargs) self.type_version = type_version self.parameters = parameters self.upgrade_policy = upgrade_policy @@ -418,6 +421,8 @@ class ApplicationTypeResource(ProxyResource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response. :vartype provisioning_state: str @@ -438,11 +443,12 @@ class ApplicationTypeResource(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, } - def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: - super(ApplicationTypeResource, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, location: str=None, tags=None, system_data=None, **kwargs) -> None: + super(ApplicationTypeResource, self).__init__(location=location, tags=tags, system_data=system_data, **kwargs) self.provisioning_state = None @@ -497,13 +503,14 @@ class ApplicationTypeVersionResource(ProxyResource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str :param app_package_url: Required. The URL to the application package :type app_package_url: str - :ivar default_parameter_list: List of application type parameters that can - be overridden when creating or updating the application. + :ivar default_parameter_list: :vartype default_parameter_list: dict[str, str] """ @@ -524,13 +531,14 @@ class ApplicationTypeVersionResource(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, 'app_package_url': {'key': 'properties.appPackageUrl', 'type': 'str'}, 'default_parameter_list': {'key': 'properties.defaultParameterList', 'type': '{str}'}, } - def __init__(self, *, app_package_url: str, location: str=None, tags=None, **kwargs) -> None: - super(ApplicationTypeVersionResource, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, app_package_url: str, location: str=None, tags=None, system_data=None, **kwargs) -> None: + super(ApplicationTypeVersionResource, self).__init__(location=location, tags=tags, system_data=system_data, **kwargs) self.provisioning_state = None self.app_package_url = app_package_url self.default_parameter_list = None @@ -573,7 +581,7 @@ class ApplicationTypeVersionsCleanupPolicy(Model): :param max_unused_versions_to_keep: Required. Number of unused versions per application type to keep. - :type max_unused_versions_to_keep: int + :type max_unused_versions_to_keep: long """ _validation = { @@ -581,7 +589,7 @@ class ApplicationTypeVersionsCleanupPolicy(Model): } _attribute_map = { - 'max_unused_versions_to_keep': {'key': 'maxUnusedVersionsToKeep', 'type': 'int'}, + 'max_unused_versions_to_keep': {'key': 'maxUnusedVersionsToKeep', 'type': 'long'}, } def __init__(self, *, max_unused_versions_to_keep: int, **kwargs) -> None: @@ -599,22 +607,17 @@ class ApplicationUpgradePolicy(Model): The timeout is reset at the start of each upgrade domain. Valid values are between 0 and 42949672925 inclusive. (unsigned 32-bit integer). :type upgrade_replica_set_check_timeout: str - :param force_restart: If true, then processes are forcefully restarted - during upgrade even when the code version has not changed (the upgrade - only changes configuration or data). + :param force_restart: :type force_restart: bool - :param rolling_upgrade_monitoring_policy: The policy used for monitoring - the application upgrade + :param rolling_upgrade_monitoring_policy: :type rolling_upgrade_monitoring_policy: ~azure.mgmt.servicefabric.models.ArmRollingUpgradeMonitoringPolicy - :param application_health_policy: Defines a health policy used to evaluate - the health of an application or one of its children entities. + :param application_health_policy: :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" . + :param upgrade_mode: Possible values include: 'Invalid', + 'UnmonitoredAuto', 'UnmonitoredManual', 'Monitored'. Default value: + "Monitored" . :type upgrade_mode: str or ~azure.mgmt.servicefabric.models.RollingUpgradeMode """ @@ -716,33 +719,15 @@ class ArmRollingUpgradeMonitoringPolicy(Model): Possible values include: 'Rollback', 'Manual' :type failure_action: str or ~azure.mgmt.servicefabric.models.ArmUpgradeFailureAction - :param health_check_wait_duration: The amount of time to wait after - completing an upgrade domain before applying health policies. 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. + :param health_check_wait_duration: :type health_check_wait_duration: str - :param health_check_stable_duration: The amount of time that the - application or cluster must remain healthy before the upgrade proceeds to - the next upgrade domain. 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. + :param health_check_stable_duration: :type health_check_stable_duration: str - :param health_check_retry_timeout: The amount of time to retry health - evaluation when the application or cluster is unhealthy before - FailureAction is executed. 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. + :param health_check_retry_timeout: :type health_check_retry_timeout: str - :param upgrade_timeout: The amount of time the overall upgrade has to - complete before FailureAction is executed. 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. + :param upgrade_timeout: :type upgrade_timeout: str - :param upgrade_domain_timeout: The amount of time each upgrade domain has - to complete before FailureAction is executed. 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. + :param upgrade_domain_timeout: :type upgrade_domain_timeout: str """ @@ -866,9 +851,9 @@ class CertificateDescription(Model): :type thumbprint: str :param thumbprint_secondary: Thumbprint of the secondary certificate. :type thumbprint_secondary: str - :param x509_store_name: The local certificate store location. Possible - values include: 'AddressBook', 'AuthRoot', 'CertificateAuthority', - 'Disallowed', 'My', 'Root', 'TrustedPeople', 'TrustedPublisher' + :param x509_store_name: Possible values include: 'AddressBook', + 'AuthRoot', 'CertificateAuthority', 'Disallowed', 'My', 'Root', + 'TrustedPeople', 'TrustedPublisher' :type x509_store_name: str or ~azure.mgmt.servicefabric.models.enum """ @@ -889,41 +874,6 @@ def __init__(self, *, thumbprint: str, thumbprint_secondary: str=None, x509_stor self.x509_store_name = x509_store_name -class ClientCertificate(Model): - """Client Certificate definition. - - All required parameters must be populated in order to send to Azure. - - :param is_admin: Required. Whether the certificate is admin or not. - :type is_admin: bool - :param thumbprint: Certificate Thumbprint. - :type thumbprint: str - :param common_name: Certificate Common name. - :type common_name: str - :param issuer_thumbprint: Issuer thumbprint for the certificate. Its only - use ehn CommonName is used. - :type issuer_thumbprint: str - """ - - _validation = { - 'is_admin': {'required': True}, - } - - _attribute_map = { - 'is_admin': {'key': 'isAdmin', 'type': 'bool'}, - 'thumbprint': {'key': 'thumbprint', 'type': 'str'}, - 'common_name': {'key': 'commonName', 'type': 'str'}, - 'issuer_thumbprint': {'key': 'issuerThumbprint', 'type': 'str'}, - } - - def __init__(self, *, is_admin: bool, thumbprint: str=None, common_name: str=None, issuer_thumbprint: str=None, **kwargs) -> None: - super(ClientCertificate, self).__init__(**kwargs) - self.is_admin = is_admin - self.thumbprint = thumbprint - self.common_name = common_name - self.issuer_thumbprint = issuer_thumbprint - - class ClientCertificateCommonName(Model): """Describes the client certificate details using common name. @@ -1018,6 +968,8 @@ class Resource(Model): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData """ _validation = { @@ -1035,9 +987,10 @@ class Resource(Model): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, } - def __init__(self, *, location: str, tags=None, **kwargs) -> None: + def __init__(self, *, location: str, tags=None, system_data=None, **kwargs) -> None: super(Resource, self).__init__(**kwargs) self.id = None self.name = None @@ -1045,6 +998,7 @@ def __init__(self, *, location: str, tags=None, **kwargs) -> None: self.location = location self.tags = tags self.etag = None + self.system_data = system_data class Cluster(Resource): @@ -1068,6 +1022,8 @@ class Cluster(Resource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData :param add_on_features: The list of add-on features to enable in the cluster. :type add_on_features: list[str] @@ -1084,8 +1040,7 @@ class Cluster(Resource): cluster, SSL certificate for cluster management endpoint and default admin client. :type certificate: ~azure.mgmt.servicefabric.models.CertificateDescription - :param certificate_common_names: Describes a list of server certificates - referenced by common name that are used to secure the cluster. + :param certificate_common_names: :type certificate_common_names: ~azure.mgmt.servicefabric.models.ServerCertificateCommonNames :param client_certificate_common_names: The list of client certificates @@ -1108,36 +1063,11 @@ class Cluster(Resource): :ivar cluster_id: A service generated unique identifier for the cluster resource. :vartype cluster_id: str - :ivar cluster_state: The current state of the cluster. - - WaitingForNodes - Indicates that the cluster resource is created and the - resource provider is waiting for Service Fabric VM extension to boot up - and report to it. - - Deploying - Indicates that the Service Fabric runtime is being installed - on the VMs. Cluster resource will be in this state until the cluster boots - up and system services are up. - - BaselineUpgrade - Indicates that the cluster is upgrading to establishes - the cluster version. This upgrade is automatically initiated when the - cluster boots up for the first time. - - UpdatingUserConfiguration - Indicates that the cluster is being upgraded - with the user provided configuration. - - UpdatingUserCertificate - Indicates that the cluster is being upgraded - with the user provided certificate. - - UpdatingInfrastructure - Indicates that the cluster is being upgraded - with the latest Service Fabric runtime version. This happens only when the - **upgradeMode** is set to 'Automatic'. - - EnforcingClusterVersion - Indicates that cluster is on a different - version than expected and the cluster is being upgraded to the expected - version. - - UpgradeServiceUnreachable - Indicates that the system service in the - cluster is no longer polling the Resource Provider. Clusters in this state - cannot be managed by the Resource Provider. - - AutoScale - Indicates that the ReliabilityLevel of the cluster is being - adjusted. - - Ready - Indicates that the cluster is in a stable state. - . Possible values include: 'WaitingForNodes', 'Deploying', - 'BaselineUpgrade', 'UpdatingUserConfiguration', 'UpdatingUserCertificate', - 'UpdatingInfrastructure', 'EnforcingClusterVersion', - 'UpgradeServiceUnreachable', 'AutoScale', 'Ready' + :ivar cluster_state: Possible values include: 'WaitingForNodes', + 'Deploying', 'BaselineUpgrade', 'UpdatingUserConfiguration', + 'UpdatingUserCertificate', 'UpdatingInfrastructure', + 'EnforcingClusterVersion', 'UpgradeServiceUnreachable', 'AutoScale', + 'Ready' :vartype cluster_state: str or ~azure.mgmt.servicefabric.models.enum :param diagnostics_storage_account_config: The storage account information for storing Service Fabric diagnostic logs. @@ -1160,39 +1090,22 @@ class Cluster(Resource): Possible values include: 'Updating', 'Succeeded', 'Failed', 'Canceled' :vartype provisioning_state: str or ~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/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. - This should only be used for test clusters. - - Silver - Run the System services with a target replica set count of 5. - - Gold - Run the System services with a target replica set count of 7. - - Platinum - Run the System services with a target replica set count of 9. - . Possible values include: 'None', 'Bronze', 'Silver', 'Gold', 'Platinum' + :param reliability_level: Possible values include: 'None', 'Bronze', + 'Silver', 'Gold', 'Platinum' :type reliability_level: str or ~azure.mgmt.servicefabric.models.enum :param reverse_proxy_certificate: The server certificate used by reverse proxy. :type reverse_proxy_certificate: ~azure.mgmt.servicefabric.models.CertificateDescription - :param reverse_proxy_certificate_common_names: Describes a list of server - certificates referenced by common name that are used to secure the - cluster. + :param reverse_proxy_certificate_common_names: :type reverse_proxy_certificate_common_names: ~azure.mgmt.servicefabric.models.ServerCertificateCommonNames :param upgrade_description: The policy to use when upgrading the cluster. :type upgrade_description: ~azure.mgmt.servicefabric.models.ClusterUpgradePolicy - :param upgrade_mode: The upgrade mode of the cluster when new Service - Fabric runtime version is available. - - Automatic - The cluster will be automatically upgraded to the latest - Service Fabric runtime version as soon as it is available. - - Manual - The cluster will not be automatically upgraded to the latest - Service Fabric runtime version. The cluster is upgraded by setting the - **clusterCodeVersion** property in the cluster resource. - . Possible values include: 'Automatic', 'Manual' - :type upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum + :param upgrade_mode: Possible values include: 'Automatic', 'Manual'. + Default value: "Automatic" . + :type upgrade_mode: str or ~azure.mgmt.servicefabric.models.UpgradeMode :param application_type_versions_cleanup_policy: The policy used to clean up unused versions. :type application_type_versions_cleanup_policy: @@ -1200,6 +1113,37 @@ class Cluster(Resource): :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 + :param sf_zonal_upgrade_mode: Possible values include: 'Parallel', + 'Hierarchical' + :type sf_zonal_upgrade_mode: str or + ~azure.mgmt.servicefabric.models.SfZonalUpgradeMode + :param vmss_zonal_upgrade_mode: Possible values include: 'Parallel', + 'Hierarchical' + :type vmss_zonal_upgrade_mode: str or + ~azure.mgmt.servicefabric.models.VmssZonalUpgradeMode + :param infrastructure_service_manager: Indicates if infrastructure service + manager is enabled. + :type infrastructure_service_manager: bool + :param upgrade_wave: Indicates when new cluster runtime version upgrades + will be applied after they are released. By default is Wave0. Only applies + when **upgradeMode** is set to 'Automatic'. Possible values include: + 'Wave0', 'Wave1', 'Wave2' + :type upgrade_wave: str or + ~azure.mgmt.servicefabric.models.ClusterUpgradeCadence + :param upgrade_pause_start_timestamp_utc: Indicates the start date and + time to pause automatic runtime version upgrades on the cluster for an + specific period of time on the cluster (UTC). + :type upgrade_pause_start_timestamp_utc: datetime + :param upgrade_pause_end_timestamp_utc: Indicates the end date and time to + pause automatic runtime version upgrades on the cluster for an specific + period of time on the cluster (UTC). + :type upgrade_pause_end_timestamp_utc: datetime + :param wave_upgrade_paused: Boolean to pause automatic runtime version + upgrades to the cluster. + :type wave_upgrade_paused: bool + :param notifications: Indicates a list of notification channels for + cluster events. + :type notifications: list[~azure.mgmt.servicefabric.models.Notification] """ _validation = { @@ -1224,6 +1168,7 @@ class Cluster(Resource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'add_on_features': {'key': 'properties.addOnFeatures', 'type': '[str]'}, 'available_cluster_versions': {'key': 'properties.availableClusterVersions', 'type': '[ClusterVersionDetails]'}, 'azure_active_directory': {'key': 'properties.azureActiveDirectory', 'type': 'AzureActiveDirectory'}, @@ -1248,10 +1193,18 @@ class Cluster(Resource): '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, application_type_versions_cleanup_policy=None, vm_image: str=None, **kwargs) -> None: - super(Cluster, self).__init__(location=location, tags=tags, **kwargs) + 'sf_zonal_upgrade_mode': {'key': 'properties.sfZonalUpgradeMode', 'type': 'str'}, + 'vmss_zonal_upgrade_mode': {'key': 'properties.vmssZonalUpgradeMode', 'type': 'str'}, + 'infrastructure_service_manager': {'key': 'properties.infrastructureServiceManager', 'type': 'bool'}, + 'upgrade_wave': {'key': 'properties.upgradeWave', 'type': 'str'}, + 'upgrade_pause_start_timestamp_utc': {'key': 'properties.upgradePauseStartTimestampUtc', 'type': 'iso-8601'}, + 'upgrade_pause_end_timestamp_utc': {'key': 'properties.upgradePauseEndTimestampUtc', 'type': 'iso-8601'}, + 'wave_upgrade_paused': {'key': 'properties.waveUpgradePaused', 'type': 'bool'}, + 'notifications': {'key': 'properties.notifications', 'type': '[Notification]'}, + } + + def __init__(self, *, location: str, management_endpoint: str, node_types, tags=None, system_data=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="Automatic", application_type_versions_cleanup_policy=None, vm_image: str=None, sf_zonal_upgrade_mode=None, vmss_zonal_upgrade_mode=None, infrastructure_service_manager: bool=None, upgrade_wave=None, upgrade_pause_start_timestamp_utc=None, upgrade_pause_end_timestamp_utc=None, wave_upgrade_paused: bool=None, notifications=None, **kwargs) -> None: + super(Cluster, self).__init__(location=location, tags=tags, system_data=system_data, **kwargs) self.add_on_features = add_on_features self.available_cluster_versions = None self.azure_active_directory = azure_active_directory @@ -1276,6 +1229,14 @@ def __init__(self, *, location: str, management_endpoint: str, node_types, tags= self.upgrade_mode = upgrade_mode self.application_type_versions_cleanup_policy = application_type_versions_cleanup_policy self.vm_image = vm_image + self.sf_zonal_upgrade_mode = sf_zonal_upgrade_mode + self.vmss_zonal_upgrade_mode = vmss_zonal_upgrade_mode + self.infrastructure_service_manager = infrastructure_service_manager + self.upgrade_wave = upgrade_wave + self.upgrade_pause_start_timestamp_utc = upgrade_pause_start_timestamp_utc + self.upgrade_pause_end_timestamp_utc = upgrade_pause_end_timestamp_utc + self.wave_upgrade_paused = wave_upgrade_paused + self.notifications = notifications class ClusterCodeVersionsListResult(Model): @@ -1427,8 +1388,7 @@ class ClusterUpdateParameters(Model): cluster, SSL certificate for cluster management endpoint and default admin client. :type certificate: ~azure.mgmt.servicefabric.models.CertificateDescription - :param certificate_common_names: Describes a list of server certificates - referenced by common name that are used to secure the cluster. + :param certificate_common_names: :type certificate_common_names: ~azure.mgmt.servicefabric.models.ServerCertificateCommonNames :param client_certificate_common_names: The list of client certificates @@ -1458,17 +1418,8 @@ class ClusterUpdateParameters(Model): overwrite the existing list. :type node_types: 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/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. - This should only be used for test clusters. - - Silver - Run the System services with a target replica set count of 5. - - Gold - Run the System services with a target replica set count of 7. - - Platinum - Run the System services with a target replica set count of 9. - . Possible values include: 'None', 'Bronze', 'Silver', 'Gold', 'Platinum' + :param reliability_level: Possible values include: 'None', 'Bronze', + 'Silver', 'Gold', 'Platinum' :type reliability_level: str or ~azure.mgmt.servicefabric.models.enum :param reverse_proxy_certificate: The server certificate used by reverse proxy. @@ -1477,19 +1428,42 @@ class ClusterUpdateParameters(Model): :param upgrade_description: The policy to use when upgrading the cluster. :type upgrade_description: ~azure.mgmt.servicefabric.models.ClusterUpgradePolicy - :param upgrade_mode: The upgrade mode of the cluster when new Service - Fabric runtime version is available. - - Automatic - The cluster will be automatically upgraded to the latest - Service Fabric runtime version as soon as it is available. - - Manual - The cluster will not be automatically upgraded to the latest - Service Fabric runtime version. The cluster is upgraded by setting the - **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 upgrade_mode: Possible values include: 'Automatic', 'Manual'. + Default value: "Automatic" . + :type upgrade_mode: str or ~azure.mgmt.servicefabric.models.UpgradeMode + :param sf_zonal_upgrade_mode: Possible values include: 'Parallel', + 'Hierarchical' + :type sf_zonal_upgrade_mode: str or + ~azure.mgmt.servicefabric.models.SfZonalUpgradeMode + :param vmss_zonal_upgrade_mode: Possible values include: 'Parallel', + 'Hierarchical' + :type vmss_zonal_upgrade_mode: str or + ~azure.mgmt.servicefabric.models.VmssZonalUpgradeMode + :param infrastructure_service_manager: Indicates if infrastructure service + manager is enabled. + :type infrastructure_service_manager: bool + :param upgrade_wave: Indicates when new cluster runtime version upgrades + will be applied after they are released. By default is Wave0. Only applies + when **upgradeMode** is set to 'Automatic'. Possible values include: + 'Wave0', 'Wave1', 'Wave2' + :type upgrade_wave: str or + ~azure.mgmt.servicefabric.models.ClusterUpgradeCadence + :param upgrade_pause_start_timestamp_utc: The start timestamp to pause + runtime version upgrades on the cluster (UTC). + :type upgrade_pause_start_timestamp_utc: datetime + :param upgrade_pause_end_timestamp_utc: The end timestamp of pause runtime + version upgrades on the cluster (UTC). + :type upgrade_pause_end_timestamp_utc: datetime + :param wave_upgrade_paused: Boolean to pause automatic runtime version + upgrades to the cluster. + :type wave_upgrade_paused: bool + :param notifications: Indicates a list of notification channels for + cluster events. + :type notifications: list[~azure.mgmt.servicefabric.models.Notification] :param tags: Cluster update parameters :type tags: dict[str, str] """ @@ -1507,12 +1481,20 @@ class ClusterUpdateParameters(Model): 'reliability_level': {'key': 'properties.reliabilityLevel', 'type': 'str'}, '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'}, + 'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'str'}, + 'sf_zonal_upgrade_mode': {'key': 'properties.sfZonalUpgradeMode', 'type': 'str'}, + 'vmss_zonal_upgrade_mode': {'key': 'properties.vmssZonalUpgradeMode', 'type': 'str'}, + 'infrastructure_service_manager': {'key': 'properties.infrastructureServiceManager', 'type': 'bool'}, + 'upgrade_wave': {'key': 'properties.upgradeWave', 'type': 'str'}, + 'upgrade_pause_start_timestamp_utc': {'key': 'properties.upgradePauseStartTimestampUtc', 'type': 'iso-8601'}, + 'upgrade_pause_end_timestamp_utc': {'key': 'properties.upgradePauseEndTimestampUtc', 'type': 'iso-8601'}, + 'wave_upgrade_paused': {'key': 'properties.waveUpgradePaused', 'type': 'bool'}, + 'notifications': {'key': 'properties.notifications', 'type': '[Notification]'}, '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, application_type_versions_cleanup_policy=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, application_type_versions_cleanup_policy=None, upgrade_mode="Automatic", sf_zonal_upgrade_mode=None, vmss_zonal_upgrade_mode=None, infrastructure_service_manager: bool=None, upgrade_wave=None, upgrade_pause_start_timestamp_utc=None, upgrade_pause_end_timestamp_utc=None, wave_upgrade_paused: bool=None, notifications=None, tags=None, **kwargs) -> None: super(ClusterUpdateParameters, self).__init__(**kwargs) self.add_on_features = add_on_features self.certificate = certificate @@ -1526,8 +1508,16 @@ def __init__(self, *, add_on_features=None, certificate=None, certificate_common self.reliability_level = reliability_level 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.upgrade_mode = upgrade_mode + self.sf_zonal_upgrade_mode = sf_zonal_upgrade_mode + self.vmss_zonal_upgrade_mode = vmss_zonal_upgrade_mode + self.infrastructure_service_manager = infrastructure_service_manager + self.upgrade_wave = upgrade_wave + self.upgrade_pause_start_timestamp_utc = upgrade_pause_start_timestamp_utc + self.upgrade_pause_end_timestamp_utc = upgrade_pause_end_timestamp_utc + self.wave_upgrade_paused = wave_upgrade_paused + self.notifications = notifications self.tags = tags @@ -1780,7 +1770,7 @@ def __init__(self, *, start_port: int, end_port: int, **kwargs) -> None: class ErrorModel(Model): """The structure of the error. - :param error: The error details. + :param error: :type error: ~azure.mgmt.servicefabric.models.ErrorModelError """ @@ -1825,340 +1815,6 @@ def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: self.message = message -class LoadBalancingRule(Model): - """Describes a load balancing rule. - - All required parameters must be populated in order to send to Azure. - - :param frontend_port: Required. The port for the external endpoint. Port - numbers for each rule must be unique within the Load Balancer. Acceptable - values are between 1 and 65534. - :type frontend_port: int - :param backend_port: Required. The port used for internal connections on - the endpoint. Acceptable values are between 1 and 65535. - :type backend_port: int - :param protocol: Required. The reference to the transport protocol used by - the load balancing rule. Possible values include: 'tcp', 'udp' - :type protocol: str or ~azure.mgmt.servicefabric.models.Protocol - :param probe_protocol: Required. the reference to the load balancer probe - used by the load balancing rule. Possible values include: 'tcp', 'http', - 'https' - :type probe_protocol: str or - ~azure.mgmt.servicefabric.models.ProbeProtocol - :param probe_request_path: The probe request path. Only supported for - HTTP/HTTPS probes. - :type probe_request_path: str - """ - - _validation = { - 'frontend_port': {'required': True, 'maximum': 65534, 'minimum': 1}, - 'backend_port': {'required': True, 'maximum': 65534, 'minimum': 1}, - 'protocol': {'required': True}, - 'probe_protocol': {'required': True}, - } - - _attribute_map = { - 'frontend_port': {'key': 'frontendPort', 'type': 'int'}, - 'backend_port': {'key': 'backendPort', 'type': 'int'}, - 'protocol': {'key': 'protocol', 'type': 'str'}, - 'probe_protocol': {'key': 'probeProtocol', 'type': 'str'}, - 'probe_request_path': {'key': 'probeRequestPath', 'type': 'str'}, - } - - def __init__(self, *, frontend_port: int, backend_port: int, protocol, probe_protocol, probe_request_path: str=None, **kwargs) -> None: - super(LoadBalancingRule, self).__init__(**kwargs) - self.frontend_port = frontend_port - self.backend_port = backend_port - self.protocol = protocol - self.probe_protocol = probe_protocol - self.probe_request_path = probe_request_path - - -class ManagedCluster(Resource): - """The manged cluster resource - . - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource identifier. - :vartype id: str - :ivar name: Azure resource name. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - :param location: Required. Azure resource location. - :type location: str - :param tags: Azure resource tags. - :type tags: dict[str, str] - :ivar etag: Azure resource etag. - :vartype etag: str - :param dns_name: Required. The cluster dns name. - :type dns_name: str - :ivar fqdn: the cluster Fully qualified domain name. - :vartype fqdn: str - :ivar cluster_id: A service generated unique identifier for the cluster - resource. - :vartype cluster_id: str - :ivar cluster_state: The current state of the cluster. - - WaitingForNodes - Indicates that the cluster resource is created and the - resource provider is waiting for Service Fabric VM extension to boot up - and report to it. - - Deploying - Indicates that the Service Fabric runtime is being installed - on the VMs. Cluster resource will be in this state until the cluster boots - up and system services are up. - - BaselineUpgrade - Indicates that the cluster is upgrading to establishes - the cluster version. This upgrade is automatically initiated when the - cluster boots up for the first time. - - UpdatingUserConfiguration - Indicates that the cluster is being upgraded - with the user provided configuration. - - UpdatingUserCertificate - Indicates that the cluster is being upgraded - with the user provided certificate. - - UpdatingInfrastructure - Indicates that the cluster is being upgraded - with the latest Service Fabric runtime version. This happens only when the - **upgradeMode** is set to 'Automatic'. - - EnforcingClusterVersion - Indicates that cluster is on a different - version than expected and the cluster is being upgraded to the expected - version. - - UpgradeServiceUnreachable - Indicates that the system service in the - cluster is no longer polling the Resource Provider. Clusters in this state - cannot be managed by the Resource Provider. - - AutoScale - Indicates that the ReliabilityLevel of the cluster is being - adjusted. - - Ready - Indicates that the cluster is in a stable state. - . Possible values include: 'WaitingForNodes', 'Deploying', - 'BaselineUpgrade', 'UpdatingUserConfiguration', 'UpdatingUserCertificate', - 'UpdatingInfrastructure', 'EnforcingClusterVersion', - 'UpgradeServiceUnreachable', 'AutoScale', 'Ready' - :vartype cluster_state: str or ~azure.mgmt.servicefabric.models.enum - :ivar cluster_certificate_thumbprint: The cluster certificate thumbprint - used node to node communication. - :vartype cluster_certificate_thumbprint: str - :param client_connection_port: The port used for client connections to the - cluster. Default value: 19000 . - :type client_connection_port: int - :param http_gateway_connection_port: The port used for http connections to - the cluster. Default value: 19080 . - :type http_gateway_connection_port: int - :param admin_user_name: Required. vm admin user name. - :type admin_user_name: str - :param admin_password: vm admin user password. - :type admin_password: str - :param load_balancing_rules: Describes load balancing rules. - :type load_balancing_rules: - list[~azure.mgmt.servicefabric.models.LoadBalancingRule] - :param clients: client certificates for the cluster. - :type clients: list[~azure.mgmt.servicefabric.models.ClientCertificate] - :param azure_active_directory: Azure active directory. - :type azure_active_directory: - ~azure.mgmt.servicefabric.models.AzureActiveDirectory - :param fabric_settings: The list of custom fabric settings to configure - the cluster. - :type fabric_settings: - list[~azure.mgmt.servicefabric.models.SettingsSectionDescription] - :param use_test_extension: Use service fabric test vm extension, by - default it's false. - :type use_test_extension: bool - :ivar provisioning_state: The provisioning state of the managed cluster - resource. Possible values include: 'None', 'Creating', 'Created', - 'Updating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'Deleted', - 'Other' - :vartype provisioning_state: str or ~azure.mgmt.servicefabric.models.enum - :param cluster_code_version: The Service Fabric runtime version of the - cluster. This property can only by set the user when **upgradeMode** is - set to 'Manual'. To get list of available Service Fabric versions for new - clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of - available version for existing clusters use **availableClusterVersions**. - :type cluster_code_version: str - :param cluster_upgrade_mode: The upgrade mode of the cluster when new - Service Fabric runtime version is available. - - Automatic - The cluster will be automatically upgraded to the latest - Service Fabric runtime version as soon as it is available. - - Manual - The cluster will not be automatically upgraded to the latest - Service Fabric runtime version. The cluster is upgraded by setting the - **clusterCodeVersion** property in the cluster resource. - . Possible values include: 'Automatic', 'Manual' - :type cluster_upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum - :param cluster_upgrade_description: Describes the policy used when - upgrading the cluster. - :type cluster_upgrade_description: - ~azure.mgmt.servicefabric.models.ClusterUpgradePolicy - :param reverse_proxy_endpoint_port: The endpoint used by reverse proxy. - :type reverse_proxy_endpoint_port: int - :param sku: The sku of the managed cluster - :type sku: ~azure.mgmt.servicefabric.models.Sku - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'location': {'required': True}, - 'etag': {'readonly': True}, - 'dns_name': {'required': True}, - 'fqdn': {'readonly': True}, - 'cluster_id': {'readonly': True}, - 'cluster_state': {'readonly': True}, - 'cluster_certificate_thumbprint': {'readonly': True}, - 'admin_user_name': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'location': {'key': 'location', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'etag': {'key': 'etag', 'type': 'str'}, - 'dns_name': {'key': 'properties.dnsName', 'type': 'str'}, - 'fqdn': {'key': 'properties.fqdn', 'type': 'str'}, - 'cluster_id': {'key': 'properties.clusterId', 'type': 'str'}, - 'cluster_state': {'key': 'properties.clusterState', 'type': 'str'}, - 'cluster_certificate_thumbprint': {'key': 'properties.clusterCertificateThumbprint', 'type': 'str'}, - 'client_connection_port': {'key': 'properties.clientConnectionPort', 'type': 'int'}, - 'http_gateway_connection_port': {'key': 'properties.httpGatewayConnectionPort', 'type': 'int'}, - 'admin_user_name': {'key': 'properties.adminUserName', 'type': 'str'}, - 'admin_password': {'key': 'properties.adminPassword', 'type': 'str'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, - 'clients': {'key': 'properties.clients', 'type': '[ClientCertificate]'}, - 'azure_active_directory': {'key': 'properties.azureActiveDirectory', 'type': 'AzureActiveDirectory'}, - 'fabric_settings': {'key': 'properties.fabricSettings', 'type': '[SettingsSectionDescription]'}, - 'use_test_extension': {'key': 'properties.useTestExtension', 'type': 'bool'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'cluster_code_version': {'key': 'properties.clusterCodeVersion', 'type': 'str'}, - 'cluster_upgrade_mode': {'key': 'properties.clusterUpgradeMode', 'type': 'str'}, - 'cluster_upgrade_description': {'key': 'properties.clusterUpgradeDescription', 'type': 'ClusterUpgradePolicy'}, - 'reverse_proxy_endpoint_port': {'key': 'properties.reverseProxyEndpointPort', 'type': 'int'}, - 'sku': {'key': 'sku', 'type': 'Sku'}, - } - - def __init__(self, *, location: str, dns_name: str, admin_user_name: str, tags=None, client_connection_port: int=19000, http_gateway_connection_port: int=19080, admin_password: str=None, load_balancing_rules=None, clients=None, azure_active_directory=None, fabric_settings=None, use_test_extension: bool=None, cluster_code_version: str=None, cluster_upgrade_mode=None, cluster_upgrade_description=None, reverse_proxy_endpoint_port: int=None, sku=None, **kwargs) -> None: - super(ManagedCluster, self).__init__(location=location, tags=tags, **kwargs) - self.dns_name = dns_name - self.fqdn = None - self.cluster_id = None - self.cluster_state = None - self.cluster_certificate_thumbprint = None - self.client_connection_port = client_connection_port - self.http_gateway_connection_port = http_gateway_connection_port - self.admin_user_name = admin_user_name - self.admin_password = admin_password - self.load_balancing_rules = load_balancing_rules - self.clients = clients - self.azure_active_directory = azure_active_directory - self.fabric_settings = fabric_settings - self.use_test_extension = use_test_extension - self.provisioning_state = None - self.cluster_code_version = cluster_code_version - self.cluster_upgrade_mode = cluster_upgrade_mode - self.cluster_upgrade_description = cluster_upgrade_description - self.reverse_proxy_endpoint_port = reverse_proxy_endpoint_port - self.sku = sku - - -class ManagedClusterUpdateParameters(Model): - """Managed cluster update request. - - :param client_connection_port: The port used for client connections to the - cluster. - :type client_connection_port: int - :param http_gateway_connection_port: The port used for http connections to - the cluster. - :type http_gateway_connection_port: int - :param load_balancing_rules: Describes a load balancing rule. - :type load_balancing_rules: - list[~azure.mgmt.servicefabric.models.LoadBalancingRule] - :param clients: client certificates for the cluster. - :type clients: list[~azure.mgmt.servicefabric.models.ClientCertificate] - :param azure_active_directory: Azure active directory. - :type azure_active_directory: - ~azure.mgmt.servicefabric.models.AzureActiveDirectory - :param fabric_settings: The list of custom fabric settings to configure - the cluster. - :type fabric_settings: - list[~azure.mgmt.servicefabric.models.SettingsSectionDescription] - :param cluster_code_version: The Service Fabric runtime version of the - cluster. This property can only by set the user when **upgradeMode** is - set to 'Manual'. To get list of available Service Fabric versions for new - clusters use [ClusterVersion API](./ClusterVersion.md). To get the list of - available version for existing clusters use **availableClusterVersions**. - :type cluster_code_version: str - :param cluster_upgrade_mode: The upgrade mode of the cluster when new - Service Fabric runtime version is available. - - Automatic - The cluster will be automatically upgraded to the latest - Service Fabric runtime version as soon as it is available. - - Manual - The cluster will not be automatically upgraded to the latest - Service Fabric runtime version. The cluster is upgraded by setting the - **clusterCodeVersion** property in the cluster resource. - . Possible values include: 'Automatic', 'Manual' - :type cluster_upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum - :param cluster_upgrade_description: Describes the policy used when - upgrading the cluster. - :type cluster_upgrade_description: - ~azure.mgmt.servicefabric.models.ClusterUpgradePolicy - :param reverse_proxy_endpoint_port: The endpoint used by reverse proxy. - :type reverse_proxy_endpoint_port: int - :param tags: Managed cluster update parameters - :type tags: dict[str, str] - """ - - _attribute_map = { - 'client_connection_port': {'key': 'properties.clientConnectionPort', 'type': 'int'}, - 'http_gateway_connection_port': {'key': 'properties.httpGatewayConnectionPort', 'type': 'int'}, - 'load_balancing_rules': {'key': 'properties.loadBalancingRules', 'type': '[LoadBalancingRule]'}, - 'clients': {'key': 'properties.clients', 'type': '[ClientCertificate]'}, - 'azure_active_directory': {'key': 'properties.azureActiveDirectory', 'type': 'AzureActiveDirectory'}, - 'fabric_settings': {'key': 'properties.fabricSettings', 'type': '[SettingsSectionDescription]'}, - 'cluster_code_version': {'key': 'properties.clusterCodeVersion', 'type': 'str'}, - 'cluster_upgrade_mode': {'key': 'properties.clusterUpgradeMode', 'type': 'str'}, - 'cluster_upgrade_description': {'key': 'properties.clusterUpgradeDescription', 'type': 'ClusterUpgradePolicy'}, - 'reverse_proxy_endpoint_port': {'key': 'properties.reverseProxyEndpointPort', 'type': 'int'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, client_connection_port: int=None, http_gateway_connection_port: int=None, load_balancing_rules=None, clients=None, azure_active_directory=None, fabric_settings=None, cluster_code_version: str=None, cluster_upgrade_mode=None, cluster_upgrade_description=None, reverse_proxy_endpoint_port: int=None, tags=None, **kwargs) -> None: - super(ManagedClusterUpdateParameters, self).__init__(**kwargs) - self.client_connection_port = client_connection_port - self.http_gateway_connection_port = http_gateway_connection_port - self.load_balancing_rules = load_balancing_rules - self.clients = clients - self.azure_active_directory = azure_active_directory - self.fabric_settings = fabric_settings - self.cluster_code_version = cluster_code_version - self.cluster_upgrade_mode = cluster_upgrade_mode - self.cluster_upgrade_description = cluster_upgrade_description - self.reverse_proxy_endpoint_port = reverse_proxy_endpoint_port - self.tags = tags - - -class ManagedClusterVersionDetails(Model): - """The detail of the Service Fabric runtime version. - - :param msi_version: The Service Fabric runtime version of the cluster. - :type msi_version: str - :param support_expiry_utc: The date of expiry of support of the version. - :type support_expiry_utc: str - :param os_type: Indicates the operating system of the cluster. Possible - values include: 'Windows', 'Ubuntu', 'RedHat', 'Ubuntu18_04' - :type os_type: str or ~azure.mgmt.servicefabric.models.enum - """ - - _attribute_map = { - 'msi_version': {'key': 'msiVersion', 'type': 'str'}, - 'support_expiry_utc': {'key': 'supportExpiryUtc', 'type': 'str'}, - 'os_type': {'key': 'osType', 'type': 'str'}, - } - - def __init__(self, *, msi_version: str=None, support_expiry_utc: str=None, os_type=None, **kwargs) -> None: - super(ManagedClusterVersionDetails, self).__init__(**kwargs) - self.msi_version = msi_version - self.support_expiry_utc = support_expiry_utc - self.os_type = os_type - - class ManagedIdentity(Model): """Describes the managed identities for an Azure resource. @@ -2171,14 +1827,10 @@ class ManagedIdentity(Model): :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' + :param type: 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}'. + :param user_assigned_identities: :type user_assigned_identities: dict[str, ~azure.mgmt.servicefabric.models.UserAssignedIdentity] """ @@ -2203,43 +1855,6 @@ def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> Non self.user_assigned_identities = user_assigned_identities -class ManagedProxyResource(Model): - """The resource model definition for proxy-only resource. - - Variables are only populated by the server, and will be ignored when - sending a request. - - :ivar id: Azure resource identifier. - :vartype id: str - :ivar name: Azure resource name. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - :param tags: Azure resource tags. - :type tags: dict[str, str] - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - } - - def __init__(self, *, tags=None, **kwargs) -> None: - super(ManagedProxyResource, self).__init__(**kwargs) - self.id = None - self.name = None - self.type = None - self.tags = tags - - class PartitionSchemeDescription(Model): """Describes how the service is partitioned. @@ -2304,156 +1919,6 @@ def __init__(self, *, count: int, names, **kwargs) -> None: self.partition_scheme = 'Named' -class NodeType(ManagedProxyResource): - """Describes a node type in the cluster, each node type represents sub set of - nodes in the cluster. - - Variables are only populated by the server, and will be ignored when - sending a request. - - All required parameters must be populated in order to send to Azure. - - :ivar id: Azure resource identifier. - :vartype id: str - :ivar name: Azure resource name. - :vartype name: str - :ivar type: Azure resource type. - :vartype type: str - :param tags: Azure resource tags. - :type tags: dict[str, str] - :param is_primary: Required. The node type on which system services will - run. Only one node type should be marked as primary. Primary node type - cannot be deleted or changed for existing clusters. - :type is_primary: bool - :param vm_instance_count: Required. The number of nodes in the node type. - This count should match the capacity property in the corresponding - VirtualMachineScaleSet resource. - :type vm_instance_count: int - :param data_disk_size_gb: Required. Disk size for each vm in the node type - in GBs. - :type data_disk_size_gb: int - :param placement_properties: The placement tags applied to nodes in the - node type, which can be used to indicate where certain services (workload) - should run. - :type placement_properties: dict[str, str] - :param capacities: The capacity tags applied to the nodes in the node - type, the cluster resource manager uses these tags to understand how much - resource a node has. - :type capacities: dict[str, str] - :param application_ports: The range of ports from which cluster assigned - port to Service Fabric applications. - :type application_ports: - ~azure.mgmt.servicefabric.models.EndpointRangeDescription - :param ephemeral_ports: The range of ephemeral ports that nodes in this - node type should be configured with. - :type ephemeral_ports: - ~azure.mgmt.servicefabric.models.EndpointRangeDescription - :param vm_size: The size of virtual machines in the pool. All virtual - machines in a pool are the same size. For example, Standard_D3. - :type vm_size: str - :param vm_image_publisher: The publisher of the Azure Virtual Machines - Marketplace image. For example, Canonical or MicrosoftWindowsServer. - :type vm_image_publisher: str - :param vm_image_offer: The offer type of the Azure Virtual Machines - Marketplace image. For example, UbuntuServer or WindowsServer. - :type vm_image_offer: str - :param vm_image_sku: The SKU of the Azure Virtual Machines Marketplace - image. For example, 14.04.0-LTS or 2012-R2-Datacenter. - :type vm_image_sku: str - :param vm_image_version: The version of the Azure Virtual Machines - Marketplace image. A value of 'latest' can be specified to select the - latest version of an image. If omitted, the default is 'latest'. - :type vm_image_version: str - :param vm_secrets: virtual machine secretes. The secrets to install in the - virtual machines. - :type vm_secrets: list[~azure.mgmt.servicefabric.models.VaultSecretGroup] - :param vm_extensions: virtual machine extensions. Set of extensions that - should be installed onto the virtual machines. - :type vm_extensions: list[~azure.mgmt.servicefabric.models.VMSSExtension] - :ivar provisioning_state: The provisioning state of the managed cluster - resource. Possible values include: 'None', 'Creating', 'Created', - 'Updating', 'Succeeded', 'Failed', 'Canceled', 'Deleting', 'Deleted', - 'Other' - :vartype provisioning_state: str or ~azure.mgmt.servicefabric.models.enum - """ - - _validation = { - 'id': {'readonly': True}, - 'name': {'readonly': True}, - 'type': {'readonly': True}, - 'is_primary': {'required': True}, - 'vm_instance_count': {'required': True, 'maximum': 2147483647, 'minimum': 1}, - 'data_disk_size_gb': {'required': True}, - 'provisioning_state': {'readonly': True}, - } - - _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, - 'name': {'key': 'name', 'type': 'str'}, - 'type': {'key': 'type', 'type': 'str'}, - 'tags': {'key': 'tags', 'type': '{str}'}, - 'is_primary': {'key': 'properties.isPrimary', 'type': 'bool'}, - 'vm_instance_count': {'key': 'properties.vmInstanceCount', 'type': 'int'}, - 'data_disk_size_gb': {'key': 'properties.dataDiskSizeGB', 'type': 'int'}, - 'placement_properties': {'key': 'properties.placementProperties', 'type': '{str}'}, - 'capacities': {'key': 'properties.capacities', 'type': '{str}'}, - 'application_ports': {'key': 'properties.applicationPorts', 'type': 'EndpointRangeDescription'}, - 'ephemeral_ports': {'key': 'properties.ephemeralPorts', 'type': 'EndpointRangeDescription'}, - 'vm_size': {'key': 'properties.vmSize', 'type': 'str'}, - 'vm_image_publisher': {'key': 'properties.vmImagePublisher', 'type': 'str'}, - 'vm_image_offer': {'key': 'properties.vmImageOffer', 'type': 'str'}, - 'vm_image_sku': {'key': 'properties.vmImageSku', 'type': 'str'}, - 'vm_image_version': {'key': 'properties.vmImageVersion', 'type': 'str'}, - 'vm_secrets': {'key': 'properties.vmSecrets', 'type': '[VaultSecretGroup]'}, - 'vm_extensions': {'key': 'properties.vmExtensions', 'type': '[VMSSExtension]'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - } - - def __init__(self, *, is_primary: bool, vm_instance_count: int, data_disk_size_gb: int, tags=None, placement_properties=None, capacities=None, application_ports=None, ephemeral_ports=None, vm_size: str=None, vm_image_publisher: str=None, vm_image_offer: str=None, vm_image_sku: str=None, vm_image_version: str=None, vm_secrets=None, vm_extensions=None, **kwargs) -> None: - super(NodeType, self).__init__(tags=tags, **kwargs) - self.is_primary = is_primary - self.vm_instance_count = vm_instance_count - self.data_disk_size_gb = data_disk_size_gb - self.placement_properties = placement_properties - self.capacities = capacities - self.application_ports = application_ports - self.ephemeral_ports = ephemeral_ports - self.vm_size = vm_size - self.vm_image_publisher = vm_image_publisher - self.vm_image_offer = vm_image_offer - self.vm_image_sku = vm_image_sku - self.vm_image_version = vm_image_version - self.vm_secrets = vm_secrets - self.vm_extensions = vm_extensions - self.provisioning_state = None - - -class NodeTypeActionParameters(Model): - """Parameters for Node type action. - - All required parameters must be populated in order to send to Azure. - - :param nodes: Required. List of node names from the node type. - :type nodes: list[str] - :param force: Force the action to go through. - :type force: bool - """ - - _validation = { - 'nodes': {'required': True}, - } - - _attribute_map = { - 'nodes': {'key': 'nodes', 'type': '[str]'}, - 'force': {'key': 'force', 'type': 'bool'}, - } - - def __init__(self, *, nodes, force: bool=None, **kwargs) -> None: - super(NodeTypeActionParameters, self).__init__(**kwargs) - self.nodes = nodes - self.force = force - - class NodeTypeDescription(Model): """Describes a node type in the cluster, each node type represents sub set of nodes in the cluster. @@ -2476,16 +1941,8 @@ class NodeTypeDescription(Model): :param http_gateway_endpoint_port: Required. The HTTP cluster management endpoint port. :type http_gateway_endpoint_port: int - :param durability_level: The durability level of the node type. Learn - about - [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. - - Gold - The infrastructure jobs can be paused for a duration of 2 hours - per UD. Gold durability can be enabled only on full node VM skus like - D15_V2, G5 etc. - . Possible values include: 'Bronze', 'Silver', 'Gold' + :param durability_level: Possible values include: 'Bronze', 'Silver', + 'Gold' :type durability_level: str or ~azure.mgmt.servicefabric.models.enum :param application_ports: The range of ports from which cluster assigned port to Service Fabric applications. @@ -2499,12 +1956,22 @@ class NodeTypeDescription(Model): run. Only one node type should be marked as primary. Primary node type cannot be deleted or changed for existing clusters. :type is_primary: bool - :param vm_instance_count: Required. The number of nodes in the node type. - This count should match the capacity property in the corresponding - VirtualMachineScaleSet resource. + :param vm_instance_count: Required. VMInstanceCount should be 1 to n, + where n indicates the number of VM instances corresponding to this + nodeType. VMInstanceCount = 0 can be done only in these scenarios: + NodeType is a secondary nodeType. Durability = Bronze or Durability >= + Bronze and InfrastructureServiceManager = true. If VMInstanceCount = 0, + implies the VMs for this nodeType will not be used for the initial cluster + size computation. :type vm_instance_count: int :param reverse_proxy_endpoint_port: The endpoint used by reverse proxy. :type reverse_proxy_endpoint_port: int + :param is_stateless: Indicates if the node type can only host Stateless + workloads. + :type is_stateless: bool + :param multiple_availability_zones: Indicates if the node type is enabled + to support multiple zones. + :type multiple_availability_zones: bool """ _validation = { @@ -2512,7 +1979,7 @@ class NodeTypeDescription(Model): 'client_connection_endpoint_port': {'required': True}, 'http_gateway_endpoint_port': {'required': True}, 'is_primary': {'required': True}, - 'vm_instance_count': {'required': True, 'maximum': 2147483647, 'minimum': 1}, + 'vm_instance_count': {'required': True, 'maximum': 2147483647, 'minimum': 0}, } _attribute_map = { @@ -2527,9 +1994,11 @@ class NodeTypeDescription(Model): 'is_primary': {'key': 'isPrimary', 'type': 'bool'}, 'vm_instance_count': {'key': 'vmInstanceCount', 'type': 'int'}, 'reverse_proxy_endpoint_port': {'key': 'reverseProxyEndpointPort', 'type': 'int'}, + 'is_stateless': {'key': 'isStateless', 'type': 'bool'}, + 'multiple_availability_zones': {'key': 'multipleAvailabilityZones', 'type': 'bool'}, } - def __init__(self, *, name: str, client_connection_endpoint_port: int, http_gateway_endpoint_port: int, is_primary: bool, vm_instance_count: int, placement_properties=None, capacities=None, durability_level=None, application_ports=None, ephemeral_ports=None, reverse_proxy_endpoint_port: int=None, **kwargs) -> None: + def __init__(self, *, name: str, client_connection_endpoint_port: int, http_gateway_endpoint_port: int, is_primary: bool, vm_instance_count: int, placement_properties=None, capacities=None, durability_level=None, application_ports=None, ephemeral_ports=None, reverse_proxy_endpoint_port: int=None, is_stateless: bool=None, multiple_availability_zones: bool=None, **kwargs) -> None: super(NodeTypeDescription, self).__init__(**kwargs) self.name = name self.placement_properties = placement_properties @@ -2542,66 +2011,85 @@ def __init__(self, *, name: str, client_connection_endpoint_port: int, http_gate self.is_primary = is_primary self.vm_instance_count = vm_instance_count self.reverse_proxy_endpoint_port = reverse_proxy_endpoint_port + self.is_stateless = is_stateless + self.multiple_availability_zones = multiple_availability_zones -class NodeTypeUpdateParameters(Model): - """Node type update request. +class Notification(Model): + """Describes the notification channel for cluster events. - :param vm_instance_count: The number of nodes in the node type. This count - should match the capacity property in the corresponding - VirtualMachineScaleSet resource. - :type vm_instance_count: int - :param placement_properties: The placement tags applied to nodes in the - node type, which can be used to indicate where certain services (workload) - should run. - :type placement_properties: dict[str, str] - :param capacities: The capacity tags applied to the nodes in the node - type, the cluster resource manager uses these tags to understand how much - resource a node has. - :type capacities: dict[str, str] - :param application_ports: The range of ports from which cluster assigned - port to Service Fabric applications. - :type application_ports: - ~azure.mgmt.servicefabric.models.EndpointRangeDescription - :param ephemeral_ports: The range of ephemeral ports that nodes in this - node type should be configured with. - :type ephemeral_ports: - ~azure.mgmt.servicefabric.models.EndpointRangeDescription - :param vm_secrets: virtual machine secretes. The secrets to install in the - virtual machines. - :type vm_secrets: list[~azure.mgmt.servicefabric.models.VaultSecretGroup] - :param vm_extensions: virtual machine extensions. Set of extensions that - should be installed onto the virtual machines. - :type vm_extensions: list[~azure.mgmt.servicefabric.models.VMSSExtension] - :param tags: Node type update parameters - :type tags: dict[str, str] + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param is_enabled: Required. Indicates if the notification is enabled. + :type is_enabled: bool + :ivar notification_category: Required. The category of notification. + Default value: "WaveProgress" . + :vartype notification_category: str + :param notification_level: Required. The level of notification. Possible + values include: 'Critical', 'All' + :type notification_level: str or + ~azure.mgmt.servicefabric.models.NotificationLevel + :param notification_targets: Required. List of targets that subscribe to + the notification. + :type notification_targets: + list[~azure.mgmt.servicefabric.models.NotificationTarget] """ _validation = { - 'vm_instance_count': {'maximum': 2147483647, 'minimum': 1}, + 'is_enabled': {'required': True}, + 'notification_category': {'required': True, 'constant': True}, + 'notification_level': {'required': True}, + 'notification_targets': {'required': True}, } _attribute_map = { - 'vm_instance_count': {'key': 'properties.vmInstanceCount', 'type': 'int'}, - 'placement_properties': {'key': 'properties.placementProperties', 'type': '{str}'}, - 'capacities': {'key': 'properties.capacities', 'type': '{str}'}, - 'application_ports': {'key': 'properties.applicationPorts', 'type': 'EndpointRangeDescription'}, - 'ephemeral_ports': {'key': 'properties.ephemeralPorts', 'type': 'EndpointRangeDescription'}, - 'vm_secrets': {'key': 'properties.vmSecrets', 'type': '[VaultSecretGroup]'}, - 'vm_extensions': {'key': 'properties.vmExtensions', 'type': '[VMSSExtension]'}, - 'tags': {'key': 'tags', 'type': '{str}'}, + 'is_enabled': {'key': 'isEnabled', 'type': 'bool'}, + 'notification_category': {'key': 'notificationCategory', 'type': 'str'}, + 'notification_level': {'key': 'notificationLevel', 'type': 'str'}, + 'notification_targets': {'key': 'notificationTargets', 'type': '[NotificationTarget]'}, } - def __init__(self, *, vm_instance_count: int=None, placement_properties=None, capacities=None, application_ports=None, ephemeral_ports=None, vm_secrets=None, vm_extensions=None, tags=None, **kwargs) -> None: - super(NodeTypeUpdateParameters, self).__init__(**kwargs) - self.vm_instance_count = vm_instance_count - self.placement_properties = placement_properties - self.capacities = capacities - self.application_ports = application_ports - self.ephemeral_ports = ephemeral_ports - self.vm_secrets = vm_secrets - self.vm_extensions = vm_extensions - self.tags = tags + notification_category = "WaveProgress" + + def __init__(self, *, is_enabled: bool, notification_level, notification_targets, **kwargs) -> None: + super(Notification, self).__init__(**kwargs) + self.is_enabled = is_enabled + self.notification_level = notification_level + self.notification_targets = notification_targets + + +class NotificationTarget(Model): + """Describes the notification target properties. + + All required parameters must be populated in order to send to Azure. + + :param notification_channel: Required. The notification channel indicates + the type of receivers subscribed to the notification, either user or + subscription. Possible values include: 'EmailUser', 'EmailSubscription' + :type notification_channel: str or + ~azure.mgmt.servicefabric.models.NotificationChannel + :param receivers: Required. List of targets that subscribe to the + notification. + :type receivers: list[str] + """ + + _validation = { + 'notification_channel': {'required': True}, + 'receivers': {'required': True}, + } + + _attribute_map = { + 'notification_channel': {'key': 'notificationChannel', 'type': 'str'}, + 'receivers': {'key': 'receivers', 'type': '[str]'}, + } + + def __init__(self, *, notification_channel, receivers, **kwargs) -> None: + super(NotificationTarget, self).__init__(**kwargs) + self.notification_channel = notification_channel + self.receivers = receivers class OperationResult(Model): @@ -2609,6 +2097,8 @@ class OperationResult(Model): :param name: The name of the operation. :type name: str + :param is_data_action: Indicates whether the operation is a data action + :type is_data_action: bool :param display: The object that represents the operation. :type display: ~azure.mgmt.servicefabric.models.AvailableOperationDisplay :param origin: Origin result @@ -2619,14 +2109,16 @@ class OperationResult(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, + 'is_data_action': {'key': 'isDataAction', 'type': 'bool'}, 'display': {'key': 'display', 'type': 'AvailableOperationDisplay'}, 'origin': {'key': 'origin', 'type': 'str'}, 'next_link': {'key': 'nextLink', 'type': 'str'}, } - def __init__(self, *, name: str=None, display=None, origin: str=None, next_link: str=None, **kwargs) -> None: + def __init__(self, *, name: str=None, is_data_action: bool=None, display=None, origin: str=None, next_link: str=None, **kwargs) -> None: super(OperationResult, self).__init__(**kwargs) self.name = name + self.is_data_action = is_data_action self.display = display self.origin = origin self.next_link = next_link @@ -2669,9 +2161,9 @@ class ServerCertificateCommonNames(Model): name that are used to secure the cluster. :type common_names: list[~azure.mgmt.servicefabric.models.ServerCertificateCommonName] - :param x509_store_name: The local certificate store location. Possible - values include: 'AddressBook', 'AuthRoot', 'CertificateAuthority', - 'Disallowed', 'My', 'Root', 'TrustedPeople', 'TrustedPublisher' + :param x509_store_name: Possible values include: 'AddressBook', + 'AuthRoot', 'CertificateAuthority', 'Disallowed', 'My', 'Root', + 'TrustedPeople', 'TrustedPublisher' :type x509_store_name: str or ~azure.mgmt.servicefabric.models.enum """ @@ -2808,33 +2300,32 @@ class ServiceResource(ProxyResource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str :param service_type_name: The name of the service type :type service_type_name: str - :param partition_description: Describes how the service is partitioned. + :param partition_description: :type partition_description: ~azure.mgmt.servicefabric.models.PartitionSchemeDescription :param service_package_activation_mode: The activation Mode of the service @@ -2862,6 +2353,7 @@ class ServiceResource(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'placement_constraints': {'key': 'properties.placementConstraints', 'type': 'str'}, 'correlation_scheme': {'key': 'properties.correlationScheme', 'type': '[ServiceCorrelationDescription]'}, 'service_load_metrics': {'key': 'properties.serviceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, @@ -2874,8 +2366,8 @@ class ServiceResource(ProxyResource): '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, service_dns_name: str=None, **kwargs) -> None: - super(ServiceResource, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, location: str=None, tags=None, system_data=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, system_data=system_data, **kwargs) self.placement_constraints = placement_constraints self.correlation_scheme = correlation_scheme self.service_load_metrics = service_load_metrics @@ -2925,20 +2417,17 @@ class ServiceResourcePropertiesBase(Model): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost """ @@ -2976,27 +2465,24 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str :param service_type_name: The name of the service type :type service_type_name: str - :param partition_description: Describes how the service is partitioned. + :param partition_description: :type partition_description: ~azure.mgmt.servicefabric.models.PartitionSchemeDescription :param service_package_activation_mode: The activation Mode of the service @@ -3064,26 +2550,25 @@ class ServiceResourceUpdate(ProxyResource): :type tags: dict[str, str] :ivar etag: Azure resource etag. :vartype etag: str + :param system_data: + :type system_data: ~azure.mgmt.servicefabric.models.SystemData :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost """ @@ -3101,6 +2586,7 @@ class ServiceResourceUpdate(ProxyResource): 'location': {'key': 'location', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '{str}'}, 'etag': {'key': 'etag', 'type': 'str'}, + 'system_data': {'key': 'systemData', 'type': 'SystemData'}, 'placement_constraints': {'key': 'properties.placementConstraints', 'type': 'str'}, 'correlation_scheme': {'key': 'properties.correlationScheme', 'type': '[ServiceCorrelationDescription]'}, 'service_load_metrics': {'key': 'properties.serviceLoadMetrics', 'type': '[ServiceLoadMetricDescription]'}, @@ -3108,8 +2594,8 @@ class ServiceResourceUpdate(ProxyResource): 'default_move_cost': {'key': 'properties.defaultMoveCost', '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, **kwargs) -> None: - super(ServiceResourceUpdate, self).__init__(location=location, tags=tags, **kwargs) + def __init__(self, *, location: str=None, tags=None, system_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, **kwargs) -> None: + super(ServiceResourceUpdate, self).__init__(location=location, tags=tags, system_data=system_data, **kwargs) self.placement_constraints = placement_constraints self.correlation_scheme = correlation_scheme self.service_load_metrics = service_load_metrics @@ -3132,20 +2618,17 @@ class ServiceResourceUpdateProperties(ServiceResourcePropertiesBase): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :param service_kind: Required. Constant filled by server. :type service_kind: str @@ -3305,30 +2788,6 @@ def __init__(self, **kwargs) -> None: self.partition_scheme = 'Singleton' -class Sku(Model): - """Sku definition. - - All required parameters must be populated in order to send to Azure. - - :param name: Required. Sku Name. Basic will hav a minimum of 3 seed nodes - and Standard a minimum of 5. Basic only allows 1 node type. Possible - values include: 'Basic', 'Standard' - :type name: str or ~azure.mgmt.servicefabric.models.enum - """ - - _validation = { - 'name': {'required': True}, - } - - _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - } - - def __init__(self, *, name, **kwargs) -> None: - super(Sku, self).__init__(**kwargs) - self.name = name - - class StatefulServiceProperties(ServiceResourceProperties): """The properties of a stateful service resource. @@ -3343,27 +2802,24 @@ class StatefulServiceProperties(ServiceResourceProperties): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str :param service_type_name: The name of the service type :type service_type_name: str - :param partition_description: Describes how the service is partitioned. + :param partition_description: :type partition_description: ~azure.mgmt.servicefabric.models.PartitionSchemeDescription :param service_package_activation_mode: The activation Mode of the service @@ -3447,20 +2903,17 @@ class StatefulServiceUpdateProperties(ServiceResourceUpdateProperties): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :param service_kind: Required. Constant filled by server. :type service_kind: str @@ -3526,27 +2979,24 @@ class StatelessServiceProperties(ServiceResourceProperties): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :ivar provisioning_state: The current deployment or provisioning state, which only appears in the response :vartype provisioning_state: str :param service_type_name: The name of the service type :type service_type_name: str - :param partition_description: Describes how the service is partitioned. + :param partition_description: :type partition_description: ~azure.mgmt.servicefabric.models.PartitionSchemeDescription :param service_package_activation_mode: The activation Mode of the service @@ -3613,20 +3063,17 @@ class StatelessServiceUpdateProperties(ServiceResourceUpdateProperties): requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)". :type placement_constraints: str - :param correlation_scheme: A list that describes the correlation of the - service with other services. + :param correlation_scheme: :type correlation_scheme: list[~azure.mgmt.servicefabric.models.ServiceCorrelationDescription] - :param service_load_metrics: The service load metrics is given as an array - of ServiceLoadMetricDescription objects. + :param service_load_metrics: :type service_load_metrics: list[~azure.mgmt.servicefabric.models.ServiceLoadMetricDescription] - :param service_placement_policies: A list that describes the correlation - of the service with other services. + :param service_placement_policies: :type service_placement_policies: list[~azure.mgmt.servicefabric.models.ServicePlacementPolicyDescription] - :param default_move_cost: Specifies the move cost for the service. - Possible values include: 'Zero', 'Low', 'Medium', 'High' + :param default_move_cost: Possible values include: 'Zero', 'Low', + 'Medium', 'High' :type default_move_cost: str or ~azure.mgmt.servicefabric.models.MoveCost :param service_kind: Required. Constant filled by server. :type service_kind: str @@ -3667,20 +3114,42 @@ def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, self.service_kind = 'Stateless' -class SubResource(Model): - """Azure resource identifier. +class SystemData(Model): + """Metadata pertaining to creation and last modification of the resource. - :param id: Azure resource identifier. - :type id: str + :param created_by: The identity that created the resource. + :type created_by: str + :param created_by_type: The type of identity that created the resource. + :type created_by_type: str + :param created_at: The timestamp of resource creation (UTC). + :type created_at: datetime + :param last_modified_by: The identity that last modified the resource. + :type last_modified_by: str + :param last_modified_by_type: The type of identity that last modified the + resource. + :type last_modified_by_type: str + :param last_modified_at: The timestamp of resource last modification + (UTC). + :type last_modified_at: datetime """ _attribute_map = { - 'id': {'key': 'id', 'type': 'str'}, + 'created_by': {'key': 'createdBy', 'type': 'str'}, + 'created_by_type': {'key': 'createdByType', 'type': 'str'}, + 'created_at': {'key': 'createdAt', 'type': 'iso-8601'}, + 'last_modified_by': {'key': 'lastModifiedBy', 'type': 'str'}, + 'last_modified_by_type': {'key': 'lastModifiedByType', 'type': 'str'}, + 'last_modified_at': {'key': 'lastModifiedAt', 'type': 'iso-8601'}, } - def __init__(self, *, id: str=None, **kwargs) -> None: - super(SubResource, self).__init__(**kwargs) - self.id = id + def __init__(self, *, created_by: str=None, created_by_type: str=None, created_at=None, last_modified_by: str=None, last_modified_by_type: str=None, last_modified_at=None, **kwargs) -> None: + super(SystemData, self).__init__(**kwargs) + self.created_by = created_by + self.created_by_type = created_by_type + self.created_at = created_at + self.last_modified_by = last_modified_by + self.last_modified_by_type = last_modified_by_type + self.last_modified_at = last_modified_at class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription): @@ -3725,179 +3194,68 @@ def __init__(self, *, count: int, low_key: str, high_key: str, **kwargs) -> 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'}, - } +class UpgradableVersionPathResult(Model): + """The list of intermediate cluster code versions for an upgrade or downgrade. + Or minimum and maximum upgradable version if no target was given. - def __init__(self, **kwargs) -> None: - super(UserAssignedIdentity, self).__init__(**kwargs) - self.principal_id = None - self.client_id = None - - -class VaultCertificate(Model): - """Describes a single certificate reference in a Key Vault, and where the - certificate should reside on the VM. - - All required parameters must be populated in order to send to Azure. - - :param certificate_url: Required. This is the URL of a certificate that - has been uploaded to Key Vault as a secret. For adding a secret to the Key - Vault, see [Add a key or secret to the key - vault](https://docs.microsoft.com/azure/key-vault/key-vault-get-started/#add). - In this case, your certificate needs to be It is the Base64 encoding of - the following JSON Object which is encoded in UTF-8:

{
- "data":"",
"dataType":"pfx",
- "password":""
} - :type certificate_url: str - :param certificate_store: Required. For Windows VMs, specifies the - certificate store on the Virtual Machine to which the certificate should - be added. The specified certificate store is implicitly in the - LocalMachine account.

For Linux VMs, the certificate file is - placed under the /var/lib/waagent directory, with the file name - .crt for the X509 certificate file and - .prv for private key. Both of these files are .pem - formatted. - :type certificate_store: str + :param supported_path: + :type supported_path: list[str] """ - _validation = { - 'certificate_url': {'required': True}, - 'certificate_store': {'required': True}, - } - _attribute_map = { - 'certificate_url': {'key': 'certificateUrl', 'type': 'str'}, - 'certificate_store': {'key': 'certificateStore', 'type': 'str'}, + 'supported_path': {'key': 'supportedPath', 'type': '[str]'}, } - def __init__(self, *, certificate_url: str, certificate_store: str, **kwargs) -> None: - super(VaultCertificate, self).__init__(**kwargs) - self.certificate_url = certificate_url - self.certificate_store = certificate_store + def __init__(self, *, supported_path=None, **kwargs) -> None: + super(UpgradableVersionPathResult, self).__init__(**kwargs) + self.supported_path = supported_path -class VaultSecretGroup(Model): - """Specifies set of certificates that should be installed onto the virtual - machines. +class UpgradableVersionsDescription(Model): + """UpgradableVersionsDescription. All required parameters must be populated in order to send to Azure. - :param source_vault: Required. The relative URL of the Key Vault - containing all of the certificates in VaultCertificates. - :type source_vault: ~azure.mgmt.servicefabric.models.SubResource - :param vault_certificates: Required. The list of key vault references in - SourceVault which contain certificates. - :type vault_certificates: - list[~azure.mgmt.servicefabric.models.VaultCertificate] + :param target_version: Required. The target code version. + :type target_version: str """ _validation = { - 'source_vault': {'required': True}, - 'vault_certificates': {'required': True}, + 'target_version': {'required': True}, } _attribute_map = { - 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'}, - 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'}, + 'target_version': {'key': 'targetVersion', 'type': 'str'}, } - def __init__(self, *, source_vault, vault_certificates, **kwargs) -> None: - super(VaultSecretGroup, self).__init__(**kwargs) - self.source_vault = source_vault - self.vault_certificates = vault_certificates + def __init__(self, *, target_version: str, **kwargs) -> None: + super(UpgradableVersionsDescription, self).__init__(**kwargs) + self.target_version = target_version -class VMSSExtension(Model): - """Specifies set of extensions that should be installed onto the virtual - machines. +class UserAssignedIdentity(Model): + """UserAssignedIdentity. Variables are only populated by the server, and will be ignored when sending a request. - All required parameters must be populated in order to send to Azure. - - :param name: Required. The name of the extension. - :type name: str - :param force_update_tag: If a value is provided and is different from the - previous value, the extension handler will be forced to update even if the - extension configuration has not changed. - :type force_update_tag: str - :param publisher: Required. The name of the extension handler publisher. - :type publisher: str - :param type: Required. Specifies the type of the extension; an example is - "CustomScriptExtension". - :type type: str - :param type_handler_version: Required. Specifies the version of the script - handler. - :type type_handler_version: str - :param auto_upgrade_minor_version: Indicates whether the extension should - use a newer minor version if one is available at deployment time. Once - deployed, however, the extension will not upgrade minor versions unless - redeployed, even with this property set to true. - :type auto_upgrade_minor_version: bool - :param settings: Json formatted public settings for the extension. - :type settings: object - :param protected_settings: The extension can contain either - protectedSettings or protectedSettingsFromKeyVault or no protected - settings at all. - :type protected_settings: object - :ivar provisioning_state: The provisioning state, which only appears in - the response. - :vartype provisioning_state: str - :param provision_after_extensions: Collection of extension names after - which this extension needs to be provisioned. - :type provision_after_extensions: list[str] + :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 = { - 'name': {'required': True}, - 'publisher': {'required': True}, - 'type': {'required': True}, - 'type_handler_version': {'required': True}, - 'provisioning_state': {'readonly': True}, + 'principal_id': {'readonly': True}, + 'client_id': {'readonly': True}, } _attribute_map = { - 'name': {'key': 'name', 'type': 'str'}, - 'force_update_tag': {'key': 'properties.forceUpdateTag', 'type': 'str'}, - 'publisher': {'key': 'properties.publisher', 'type': 'str'}, - 'type': {'key': 'properties.type', 'type': 'str'}, - 'type_handler_version': {'key': 'properties.typeHandlerVersion', 'type': 'str'}, - 'auto_upgrade_minor_version': {'key': 'properties.autoUpgradeMinorVersion', 'type': 'bool'}, - 'settings': {'key': 'properties.settings', 'type': 'object'}, - 'protected_settings': {'key': 'properties.protectedSettings', 'type': 'object'}, - 'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'}, - 'provision_after_extensions': {'key': 'properties.provisionAfterExtensions', 'type': '[str]'}, + 'principal_id': {'key': 'principalId', 'type': 'str'}, + 'client_id': {'key': 'clientId', 'type': 'str'}, } - def __init__(self, *, name: str, publisher: str, type: str, type_handler_version: str, force_update_tag: str=None, auto_upgrade_minor_version: bool=None, settings=None, protected_settings=None, provision_after_extensions=None, **kwargs) -> None: - super(VMSSExtension, self).__init__(**kwargs) - self.name = name - self.force_update_tag = force_update_tag - self.publisher = publisher - self.type = type - self.type_handler_version = type_handler_version - self.auto_upgrade_minor_version = auto_upgrade_minor_version - self.settings = settings - self.protected_settings = protected_settings - self.provisioning_state = None - self.provision_after_extensions = provision_after_extensions + 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/_paged_models.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_paged_models.py index 4f09940f1239..dc34c7266213 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_paged_models.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_paged_models.py @@ -25,29 +25,3 @@ class OperationResultPaged(Paged): def __init__(self, *args, **kwargs): super(OperationResultPaged, self).__init__(*args, **kwargs) -class ManagedClusterPaged(Paged): - """ - A paging container for iterating over a list of :class:`ManagedCluster ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[ManagedCluster]'} - } - - def __init__(self, *args, **kwargs): - - super(ManagedClusterPaged, self).__init__(*args, **kwargs) -class NodeTypePaged(Paged): - """ - A paging container for iterating over a list of :class:`NodeType ` object - """ - - _attribute_map = { - 'next_link': {'key': 'nextLink', 'type': 'str'}, - 'current_page': {'key': 'value', 'type': '[NodeType]'} - } - - def __init__(self, *args, **kwargs): - - super(NodeTypePaged, self).__init__(*args, **kwargs) 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 f107caa3acbf..671225d80c2d 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,43 @@ class ProvisioningState(str, Enum): canceled = "Canceled" +class UpgradeMode(str, Enum): + + automatic = "Automatic" #: The cluster will be automatically upgraded to the latest Service Fabric runtime version, **upgradeWave** will determine when the upgrade starts after the new version becomes available. + manual = "Manual" #: The cluster will not be automatically upgraded to the latest Service Fabric runtime version. The cluster is upgraded by setting the **clusterCodeVersion** property in the cluster resource. + + +class SfZonalUpgradeMode(str, Enum): + + parallel = "Parallel" #: VMs under the node type are grouped into UDs and ignore the zone info in five UDs. This setting causes UDs across all zones to be upgraded at the same time. This deployment mode is faster for upgrades, we don't recommend it because it goes against the SDP guidelines, which state that the updates should be applied to one zone at a time. + hierarchical = "Hierarchical" #: If this value is omitted or set to Hierarchical, VMs are grouped to reflect the zonal distribution in up to 15 UDs. Each of the three zones has five UDs. This ensures that the zones are updated one at a time, moving to next zone only after completing five UDs within the first zone. This update process is safer for the cluster and the user application. + + +class VmssZonalUpgradeMode(str, Enum): + + parallel = "Parallel" #: Updates will happen in all Availability Zones at once for the virtual machine scale sets. + hierarchical = "Hierarchical" #: VMs are grouped to reflect the zonal distribution in up to 15 UDs. Each of the three zones has five UDs. This ensures that the zones are updated one at a time, moving to next zone only after completing five UDs within the first zone. + + +class ClusterUpgradeCadence(str, Enum): + + wave0 = "Wave0" #: Cluster upgrade starts immediately after a new version is rolled out. Recommended for Test/Dev clusters. + wave1 = "Wave1" #: Cluster upgrade starts 7 days after a new version is rolled out. Recommended for Pre-prod clusters. + wave2 = "Wave2" #: Cluster upgrade starts 14 days after a new version is rolled out. Recommended for Production clusters. + + +class NotificationLevel(str, Enum): + + critical = "Critical" #: Receive only critical notifications. + all = "All" #: Receive all notifications. + + +class NotificationChannel(str, Enum): + + email_user = "EmailUser" #: For email user receivers. In this case, the parameter receivers should be a list of email addresses that will receive the notifications. + email_subscription = "EmailSubscription" #: For subscription receivers. In this case, the parameter receivers should be a list of roles of the subscription for the cluster (eg. Owner, AccountAdmin, etc) that will receive the notifications. + + class ManagedIdentityType(str, Enum): system_assigned = "SystemAssigned" #: Indicates that system assigned identity is associated with the resource. @@ -95,16 +132,3 @@ class ArmServicePackageActivationMode(str, Enum): shared_process = "SharedProcess" #: Indicates the application package activation mode will use shared process. exclusive_process = "ExclusiveProcess" #: Indicates the application package activation mode will use exclusive process. - - -class Protocol(str, Enum): - - tcp = "tcp" - udp = "udp" - - -class ProbeProtocol(str, Enum): - - tcp = "tcp" - http = "http" - https = "https" diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/__init__.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/__init__.py index 8c978f4c4b30..5599adce7c94 100644 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/__init__.py +++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/__init__.py @@ -16,9 +16,6 @@ from ._application_type_versions_operations import ApplicationTypeVersionsOperations from ._applications_operations import ApplicationsOperations from ._services_operations import ServicesOperations -from ._managed_clusters_operations import ManagedClustersOperations -from ._managed_cluster_versions_operations import ManagedClusterVersionsOperations -from ._node_types_operations import NodeTypesOperations __all__ = [ 'ClustersOperations', @@ -28,7 +25,4 @@ 'ApplicationTypeVersionsOperations', 'ApplicationsOperations', 'ServicesOperations', - 'ManagedClustersOperations', - 'ManagedClusterVersionsOperations', - 'NodeTypesOperations', ] 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 48a4e86d7fd3..511d96433e8b 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 "2020-03-01" for this specification. Constant value: "2020-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 "2021-06-01" for this specification. Constant value: "2021-06-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 = "2020-03-01" + self.api_version = "2021-06-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 3d7f1765f41d..c22e9ecc61d0 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 "2020-03-01" for this specification. Constant value: "2020-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 "2021-06-01" for this specification. Constant value: "2021-06-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 = "2020-03-01" + self.api_version = "2021-06-01" self.config = config @@ -108,7 +108,7 @@ def get( get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/applicationTypes/{applicationTypeName}'} def create_or_update( - self, resource_group_name, cluster_name, application_type_name, location=None, tags=None, custom_headers=None, raw=False, **operation_config): + self, resource_group_name, cluster_name, application_type_name, parameters, custom_headers=None, raw=False, **operation_config): """Creates or updates a Service Fabric application type name resource. Create or update a Service Fabric application type name resource with @@ -121,11 +121,9 @@ def create_or_update( :param application_type_name: The name of the application type name resource. :type application_type_name: str - :param location: It will be deprecated in New API, resource location - depends on the parent resource. - :type location: str - :param tags: Azure resource tags. - :type tags: dict[str, str] + :param parameters: The application type name resource. + :type parameters: + ~azure.mgmt.servicefabric.models.ApplicationTypeResource :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -137,8 +135,6 @@ def create_or_update( :raises: :class:`ErrorModelException` """ - parameters = models.ApplicationTypeResource(location=location, tags=tags) - # Construct URL url = self.create_or_update.metadata['url'] path_format_arguments = { 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 94591a0635e3..8da0a75ad69f 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 "2020-03-01" for this specification. Constant value: "2020-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 "2021-06-01" for this specification. Constant value: "2021-06-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 = "2020-03-01" + self.api_version = "2021-06-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 193c1b1b067f..6420454ddeea 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 "2020-03-01" for this specification. Constant value: "2020-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 "2021-06-01" for this specification. Constant value: "2021-06-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 = "2020-03-01" + self.api_version = "2021-06-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 8ec6e438e21c..65502e0b524b 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 "2020-03-01" for this specification. Constant value: "2020-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 "2021-06-01" for this specification. Constant value: "2021-06-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 = "2020-03-01" + self.api_version = "2021-06-01" self.config = config @@ -485,3 +485,83 @@ def list( return deserialized list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/clusters'} + + def list_upgradable_versions( + self, resource_group_name, cluster_name, target_version, custom_headers=None, raw=False, **operation_config): + """Operation to get the minimum and maximum upgradable version from the + current cluster version, or the required path to get to the an specific + target version. + + If a target is not provided, it will get the minimum and maximum + versions available from the current cluster version. If a target is + given, it will provide the required path to get from the current + cluster version to the target version. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster resource. + :type cluster_name: str + :param target_version: The target code version. + :type target_version: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UpgradableVersionPathResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.servicefabric.models.UpgradableVersionPathResult + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorModelException` + """ + versions_description = None + if target_version is not None: + versions_description = models.UpgradableVersionsDescription(target_version=target_version) + + # Construct URL + url = self.list_upgradable_versions.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'), + 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + if versions_description is not None: + body_content = self._serialize.body(versions_description, 'UpgradableVersionsDescription') + else: + body_content = None + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorModelException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('UpgradableVersionPathResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_upgradable_versions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/clusters/{clusterName}/listUpgradableVersions'} diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_managed_cluster_versions_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_managed_cluster_versions_operations.py deleted file mode 100644 index 457f48d5ae51..000000000000 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_managed_cluster_versions_operations.py +++ /dev/null @@ -1,106 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse - -from .. import models - - -class ManagedClusterVersionsOperations(object): - """ManagedClusterVersionsOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2020-01-01-preview" for this specification. Constant value: "2020-01-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-01-01-preview" - - self.config = config - - def list_by_os( - self, location, os_type, custom_headers=None, raw=False, **operation_config): - """Gets the list of Service Fabric cluster code versions available for the - specified OS type. - - Gets all available code versions for Service Fabric cluster resources - by OS type. - - :param location: The location for the cluster code versions. This is - different from cluster location. - :type location: str - :param os_type: The operating system of the cluster. Possible values - include: 'Windows', 'Ubuntu', 'RedHat', 'Ubuntu18_04' - :type os_type: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.mgmt.servicefabric.models.ManagedClusterVersionDetails] or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.list_by_os.metadata['url'] - path_format_arguments = { - 'location': self._serialize.url("location", location, 'str'), - 'osType': self._serialize.url("os_type", os_type, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('[ManagedClusterVersionDetails]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - list_by_os.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedclusters/locations/{location}/osType/{osType}/clusterVersions'} diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_managed_clusters_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_managed_clusters_operations.py deleted file mode 100644 index 85aefb7b0ca4..000000000000 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_managed_clusters_operations.py +++ /dev/null @@ -1,538 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class ManagedClustersOperations(object): - """ManagedClustersOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2020-01-01-preview" for this specification. Constant value: "2020-01-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-01-01-preview" - - self.config = config - - def list_by_resource_group( - self, resource_group_name, custom_headers=None, raw=False, **operation_config): - """Gets the list of Service Fabric cluster resources created in the - specified resource group. - - Gets all Service Fabric cluster resources created or in the process of - being created in the resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.servicefabric.models.ManagedClusterPaged[~azure.mgmt.servicefabric.models.ManagedCluster] - :raises: - :class:`ErrorModelException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_resource_group.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters'} - - def list_by_subscription( - self, custom_headers=None, raw=False, **operation_config): - """Gets the list of Service Fabric cluster resources created in the - specified subscription. - - Gets all Service Fabric cluster resources created or in the process of - being created in the subscription. - - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of ManagedCluster - :rtype: - ~azure.mgmt.servicefabric.models.ManagedClusterPaged[~azure.mgmt.servicefabric.models.ManagedCluster] - :raises: - :class:`ErrorModelException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_subscription.metadata['url'] - path_format_arguments = { - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.ManagedClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_subscription.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.ServiceFabric/managedClusters'} - - def get( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): - """Gets a Service Fabric managed cluster resource. - - Get a Service Fabric managed cluster resource created or in the process - of being created in the specified resource group. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cluster_name: The name of the cluster resource. - :type cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: ManagedCluster or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.servicefabric.models.ManagedCluster or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.get.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'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}'} - - - def _create_or_update_initial( - self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.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'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedCluster') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 201: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 202: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a Service Fabric managed cluster resource. - - Create or update a Service Fabric managed cluster resource with the - specified name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cluster_name: The name of the cluster resource. - :type cluster_name: str - :param parameters: The cluster resource. - :type parameters: ~azure.mgmt.servicefabric.models.ManagedCluster - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servicefabric.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servicefabric.models.ManagedCluster]] - :raises: - :class:`ErrorModelException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - 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/managedClusters/{clusterName}'} - - - def _update_initial( - self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.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'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'ManagedClusterUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ManagedCluster', response) - if response.status_code == 202: - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates the configuration of a Service Fabric managed cluster resource. - - Update the configuration of a Service Fabric managed cluster resource - with the specified name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cluster_name: The name of the cluster resource. - :type cluster_name: str - :param parameters: The parameters to update the managed cluster - configuration. - :type parameters: - ~azure.mgmt.servicefabric.models.ManagedClusterUpdateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns ManagedCluster or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servicefabric.models.ManagedCluster] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servicefabric.models.ManagedCluster]] - :raises: - :class:`ErrorModelException` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('ManagedCluster', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}'} - - - def _delete_initial( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.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'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.ErrorModelException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a Service Fabric managed cluster resource. - - Delete a Service Fabric managed cluster resource with the specified - name. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cluster_name: The name of the cluster resource. - :type cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorModelException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}'} diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_node_types_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_node_types_operations.py deleted file mode 100644 index 08a480546e41..000000000000 --- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_node_types_operations.py +++ /dev/null @@ -1,773 +0,0 @@ -# coding=utf-8 -# -------------------------------------------------------------------------- -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. See License.txt in the project root for -# license information. -# -# Code generated by Microsoft (R) AutoRest Code Generator. -# Changes may cause incorrect behavior and will be lost if the code is -# regenerated. -# -------------------------------------------------------------------------- - -import uuid -from msrest.pipeline import ClientRawResponse -from msrest.polling import LROPoller, NoPolling -from msrestazure.polling.arm_polling import ARMPolling - -from .. import models - - -class NodeTypesOperations(object): - """NodeTypesOperations operations. - - You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute. - - :param client: Client for service requests. - :param config: Configuration of service client. - :param serializer: An object model serializer. - :param deserializer: An object model deserializer. - :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2020-01-01-preview" for this specification. Constant value: "2020-01-01-preview". - """ - - models = models - - def __init__(self, client, config, serializer, deserializer): - - self._client = client - self._serialize = serializer - self._deserialize = deserializer - self.api_version = "2020-01-01-preview" - - self.config = config - - def list_by_managed_clusters( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): - """Gets the list of Node types of the specified managed cluster. - - Gets all Node types of the specified managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cluster_name: The name of the cluster resource. - :type cluster_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: An iterator like instance of NodeType - :rtype: - ~azure.mgmt.servicefabric.models.NodeTypePaged[~azure.mgmt.servicefabric.models.NodeType] - :raises: - :class:`ErrorModelException` - """ - def prepare_request(next_link=None): - if not next_link: - # Construct URL - url = self.list_by_managed_clusters.metadata['url'] - path_format_arguments = { - 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), - 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - else: - url = next_link - query_parameters = {} - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - return request - - def internal_paging(next_link=None): - request = prepare_request(next_link) - - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - return response - - # Deserialize response - header_dict = None - if raw: - header_dict = {} - deserialized = models.NodeTypePaged(internal_paging, self._deserialize.dependencies, header_dict) - - return deserialized - list_by_managed_clusters.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes'} - - - def _restart_initial( - self, resource_group_name, cluster_name, node_type_name, nodes, force=None, custom_headers=None, raw=False, **operation_config): - parameters = models.NodeTypeActionParameters(nodes=nodes, force=force) - - # Construct URL - url = self.restart.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'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'nodeTypeName': self._serialize.url("node_type_name", node_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'NodeTypeActionParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.ErrorModelException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def restart( - self, resource_group_name, cluster_name, node_type_name, nodes, force=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Restarts one or more nodes on the node type. - - Restarts one or more nodes on the node type. It will disable the fabric - nodes, trigger a restart on the VMs and activate the nodes back again. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cluster_name: The name of the cluster resource. - :type cluster_name: str - :param node_type_name: The name of the node type. - :type node_type_name: str - :param nodes: List of node names from the node type. - :type nodes: list[str] - :param force: Force the action to go through. - :type force: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorModelException` - """ - raw_result = self._restart_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - node_type_name=node_type_name, - nodes=nodes, - force=force, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - restart.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/restart'} - - - def _reimage_initial( - self, resource_group_name, cluster_name, node_type_name, nodes, force=None, custom_headers=None, raw=False, **operation_config): - parameters = models.NodeTypeActionParameters(nodes=nodes, force=force) - - # Construct URL - url = self.reimage.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'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'nodeTypeName': self._serialize.url("node_type_name", node_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'NodeTypeActionParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.ErrorModelException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def reimage( - self, resource_group_name, cluster_name, node_type_name, nodes, force=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Reimages one or more nodes on the node type. - - Reimages one or more nodes on the node type. It will disable the fabric - nodes, trigger a reimage on the VMs and activate the nodes back again. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cluster_name: The name of the cluster resource. - :type cluster_name: str - :param node_type_name: The name of the node type. - :type node_type_name: str - :param nodes: List of node names from the node type. - :type nodes: list[str] - :param force: Force the action to go through. - :type force: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorModelException` - """ - raw_result = self._reimage_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - node_type_name=node_type_name, - nodes=nodes, - force=force, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - reimage.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/reimage'} - - - def _delete_node_initial( - self, resource_group_name, cluster_name, node_type_name, nodes, force=None, custom_headers=None, raw=False, **operation_config): - parameters = models.NodeTypeActionParameters(nodes=nodes, force=force) - - # Construct URL - url = self.delete_node.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'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'nodeTypeName': self._serialize.url("node_type_name", node_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'NodeTypeActionParameters') - - # Construct and send request - request = self._client.post(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.ErrorModelException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete_node( - self, resource_group_name, cluster_name, node_type_name, nodes, force=None, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes one or more nodes on the node type. - - Deletes one or more nodes on the node type. It will disable the fabric - nodes, trigger a delete on the VMs and removes the state from the - cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cluster_name: The name of the cluster resource. - :type cluster_name: str - :param node_type_name: The name of the node type. - :type node_type_name: str - :param nodes: List of node names from the node type. - :type nodes: list[str] - :param force: Force the action to go through. - :type force: bool - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorModelException` - """ - raw_result = self._delete_node_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - node_type_name=node_type_name, - nodes=nodes, - force=force, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete_node.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}/deleteNode'} - - def get( - self, resource_group_name, cluster_name, node_type_name, custom_headers=None, raw=False, **operation_config): - """Gets a Service Fabric node type. - - Get a Service Fabric node type of a given managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cluster_name: The name of the cluster resource. - :type cluster_name: str - :param node_type_name: The name of the node type. - :type node_type_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: NodeType or ClientRawResponse if raw=true - :rtype: ~azure.mgmt.servicefabric.models.NodeType or - ~msrest.pipeline.ClientRawResponse - :raises: - :class:`ErrorModelException` - """ - # Construct URL - url = self.get.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'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'nodeTypeName': self._serialize.url("node_type_name", node_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - if response.status_code == 200: - deserialized = self._deserialize('NodeType', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}'} - - - def _create_or_update_initial( - self, resource_group_name, cluster_name, node_type_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.create_or_update.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'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'nodeTypeName': self._serialize.url("node_type_name", node_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'NodeType') - - # Construct and send request - request = self._client.put(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 201, 202]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('NodeType', response) - if response.status_code == 201: - deserialized = self._deserialize('NodeType', response) - if response.status_code == 202: - deserialized = self._deserialize('NodeType', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def create_or_update( - self, resource_group_name, cluster_name, node_type_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Creates or updates a Service Fabric node type. - - Create or update a Service Fabric node type of a given managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cluster_name: The name of the cluster resource. - :type cluster_name: str - :param node_type_name: The name of the node type. - :type node_type_name: str - :param parameters: The node type resource. - :type parameters: ~azure.mgmt.servicefabric.models.NodeType - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns NodeType or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servicefabric.models.NodeType] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servicefabric.models.NodeType]] - :raises: - :class:`ErrorModelException` - """ - raw_result = self._create_or_update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - node_type_name=node_type_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('NodeType', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - 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/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}'} - - - def _update_initial( - self, resource_group_name, cluster_name, node_type_name, parameters, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.update.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'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'nodeTypeName': self._serialize.url("node_type_name", node_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - header_parameters['Accept'] = 'application/json' - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct body - body_content = self._serialize.body(parameters, 'NodeTypeUpdateParameters') - - # Construct and send request - request = self._client.patch(url, query_parameters, header_parameters, body_content) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202]: - raise models.ErrorModelException(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('NodeType', response) - if response.status_code == 202: - deserialized = self._deserialize('NodeType', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - def update( - self, resource_group_name, cluster_name, node_type_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): - """Updates the configuration of a node type of a given managed cluster. - - Update the configuration of a node type of a given managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cluster_name: The name of the cluster resource. - :type cluster_name: str - :param node_type_name: The name of the node type. - :type node_type_name: str - :param parameters: The parameters to update the node type - configuration. - :type parameters: - ~azure.mgmt.servicefabric.models.NodeTypeUpdateParameters - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns NodeType or - ClientRawResponse if raw==True - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servicefabric.models.NodeType] - or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servicefabric.models.NodeType]] - :raises: - :class:`ErrorModelException` - """ - raw_result = self._update_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - node_type_name=node_type_name, - parameters=parameters, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - deserialized = self._deserialize('NodeType', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}'} - - - def _delete_initial( - self, resource_group_name, cluster_name, node_type_name, custom_headers=None, raw=False, **operation_config): - # Construct URL - url = self.delete.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'), - 'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'), - 'nodeTypeName': self._serialize.url("node_type_name", node_type_name, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') - - # Construct headers - header_parameters = {} - if self.config.generate_client_request_id: - header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) - if custom_headers: - header_parameters.update(custom_headers) - if self.config.accept_language is not None: - header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') - - # Construct and send request - request = self._client.delete(url, query_parameters, header_parameters) - response = self._client.send(request, stream=False, **operation_config) - - if response.status_code not in [200, 202, 204]: - raise models.ErrorModelException(self._deserialize, response) - - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - def delete( - self, resource_group_name, cluster_name, node_type_name, custom_headers=None, raw=False, polling=True, **operation_config): - """Deletes a Service Fabric node type. - - Delete a Service Fabric node type of a given managed cluster. - - :param resource_group_name: The name of the resource group. - :type resource_group_name: str - :param cluster_name: The name of the cluster resource. - :type cluster_name: str - :param node_type_name: The name of the node type. - :type node_type_name: str - :param dict custom_headers: headers that will be added to the request - :param bool raw: The poller return type is ClientRawResponse, the - direct response alongside the deserialized response - :param polling: True for ARMPolling, False for no polling, or a - polling object for personal polling strategy - :return: An instance of LROPoller that returns None or - ClientRawResponse if raw==True - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] - :raises: - :class:`ErrorModelException` - """ - raw_result = self._delete_initial( - resource_group_name=resource_group_name, - cluster_name=cluster_name, - node_type_name=node_type_name, - custom_headers=custom_headers, - raw=True, - **operation_config - ) - - def get_long_running_output(response): - if raw: - client_raw_response = ClientRawResponse(None, response) - return client_raw_response - - lro_delay = operation_config.get( - 'long_running_operation_timeout', - self.config.long_running_operation_timeout) - if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) - elif polling is False: polling_method = NoPolling() - else: polling_method = polling - return LROPoller(self._client, raw_result, get_long_running_output, polling_method) - delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ServiceFabric/managedClusters/{clusterName}/nodeTypes/{nodeTypeName}'} 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 e57ba6d5a338..7710c41dcf05 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 "2020-03-01" for this specification. Constant value: "2020-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 "2021-06-01" for this specification. Constant value: "2021-06-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 = "2020-03-01" + self.api_version = "2021-06-01" self.config = config