diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/CHANGELOG.md b/sdk/servicefabric/azure-mgmt-servicefabric/CHANGELOG.md
index b64ce8949030..05c4fc8228c6 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/CHANGELOG.md
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/CHANGELOG.md
@@ -1,5 +1,26 @@
# Release History
+## 0.5.0 (2020-07-28)
+
+**Features**
+
+ - Model StatelessServiceProperties has a new parameter instance_close_delay_duration
+ - Model StatelessServiceProperties has a new parameter service_dns_name
+ - Model StatelessServiceUpdateProperties has a new parameter instance_close_delay_duration
+ - Model ServiceResource has a new parameter service_dns_name
+ - Model ServiceResourceProperties has a new parameter service_dns_name
+ - Model Cluster has a new parameter application_type_versions_cleanup_policy
+ - Model ApplicationResourceUpdate has a new parameter managed_identities
+ - Model StatefulServiceProperties has a new parameter service_dns_name
+ - Model ApplicationUpgradePolicy has a new parameter upgrade_mode
+ - Model DiagnosticsStorageAccountConfig has a new parameter protected_account_key_name2
+ - Model ApplicationResource has a new parameter identity
+ - Model ApplicationResource has a new parameter managed_identities
+ - Model ClusterUpdateParameters has a new parameter application_type_versions_cleanup_policy
+ - Added operation group NodeTypesOperations
+ - Added operation group ManagedClusterVersionsOperations
+ - Added operation group ManagedClustersOperations
+
## 0.4.0 (2019-08-19)
**Features**
diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/README.md b/sdk/servicefabric/azure-mgmt-servicefabric/README.md
index 486971896332..c54861c1c2d4 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/README.md
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/README.md
@@ -1,29 +1,21 @@
-## Microsoft Azure SDK for Python
+# Microsoft Azure SDK for Python
This is the Microsoft Azure Service Fabric Management Client Library.
+This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
+For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
-Azure Resource Manager (ARM) is the next generation of management APIs
-that replace the old Azure Service Management (ASM).
-This package has been tested with Python 2.7, 3.5, 3.6 and 3.7.
+# Usage
-For the older Azure Service Management (ASM) libraries, see
-[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy)
-library.
-
-For a more complete set of Azure libraries, see the
-[azure](https://pypi.python.org/pypi/azure) bundle package.
-
-## Usage
-
-For code examples, see [Service Fabric
-Management](https://docs.microsoft.com/python/api/overview/azure/servicefabric)
+For code examples, see [Service Fabric Management](https://docs.microsoft.com/python/api/overview/azure/servicefabric)
on docs.microsoft.com.
-## Provide Feedback
-If you encounter any bugs or have suggestions, please file an issue in
-the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
+# Provide Feedback
+
+If you encounter any bugs or have suggestions, please file an issue in the
+[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.
-![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-servicefabric%2FREADME.png)
+
+![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-servicefabric%2FREADME.png)
diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/_service_fabric_management_client.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/_service_fabric_management_client.py
index cda98aa0e4c7..50935647da46 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,6 +20,9 @@
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
@@ -43,6 +46,12 @@ 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
@@ -59,7 +68,6 @@ def __init__(
super(ServiceFabricManagementClient, self).__init__(self.config.credentials, self.config)
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
- self.api_version = '2019-03-01'
self._serialize = Serializer(client_models)
self._deserialize = Deserializer(client_models)
@@ -77,3 +85,9 @@ 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 64315742f6c5..9aca075fdc52 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/__init__.py
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/__init__.py
@@ -20,13 +20,16 @@
from ._models_py3 import ApplicationTypeResourceList
from ._models_py3 import ApplicationTypeVersionResource
from ._models_py3 import ApplicationTypeVersionResourceList
+ from ._models_py3 import ApplicationTypeVersionsCleanupPolicy
from ._models_py3 import ApplicationUpgradePolicy
+ from ._models_py3 import ApplicationUserAssignedIdentity
from ._models_py3 import ArmApplicationHealthPolicy
from ._models_py3 import ArmRollingUpgradeMonitoringPolicy
from ._models_py3 import ArmServiceTypeHealthPolicy
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
@@ -42,8 +45,17 @@
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 OperationResult
from ._models_py3 import PartitionSchemeDescription
from ._models_py3 import ProxyResource
@@ -64,11 +76,17 @@
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 UniformInt64RangePartitionSchemeDescription
+ 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
@@ -80,13 +98,16 @@
from ._models import ApplicationTypeResourceList
from ._models import ApplicationTypeVersionResource
from ._models import ApplicationTypeVersionResourceList
+ from ._models import ApplicationTypeVersionsCleanupPolicy
from ._models import ApplicationUpgradePolicy
+ from ._models import ApplicationUserAssignedIdentity
from ._models import ArmApplicationHealthPolicy
from ._models import ArmRollingUpgradeMonitoringPolicy
from ._models import ArmServiceTypeHealthPolicy
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
@@ -102,8 +123,17 @@
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 OperationResult
from ._models import PartitionSchemeDescription
from ._models import ProxyResource
@@ -124,15 +154,25 @@
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 UniformInt64RangePartitionSchemeDescription
+ 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,
+ ManagedIdentityType,
ArmUpgradeFailureAction,
+ RollingUpgradeMode,
ServiceCorrelationScheme,
MoveCost,
PartitionScheme,
@@ -140,6 +180,8 @@
ServiceLoadMetricWeight,
ServicePlacementPolicyType,
ArmServicePackageActivationMode,
+ Protocol,
+ ProbeProtocol,
)
__all__ = [
@@ -153,13 +195,16 @@
'ApplicationTypeResourceList',
'ApplicationTypeVersionResource',
'ApplicationTypeVersionResourceList',
+ 'ApplicationTypeVersionsCleanupPolicy',
'ApplicationUpgradePolicy',
+ 'ApplicationUserAssignedIdentity',
'ArmApplicationHealthPolicy',
'ArmRollingUpgradeMonitoringPolicy',
'ArmServiceTypeHealthPolicy',
'AvailableOperationDisplay',
'AzureActiveDirectory',
'CertificateDescription',
+ 'ClientCertificate',
'ClientCertificateCommonName',
'ClientCertificateThumbprint',
'Cluster',
@@ -175,8 +220,17 @@
'EndpointRangeDescription',
'ErrorModel', 'ErrorModelException',
'ErrorModelError',
+ 'LoadBalancingRule',
+ 'ManagedCluster',
+ 'ManagedClusterUpdateParameters',
+ 'ManagedClusterVersionDetails',
+ 'ManagedIdentity',
+ 'ManagedProxyResource',
'NamedPartitionSchemeDescription',
+ 'NodeType',
+ 'NodeTypeActionParameters',
'NodeTypeDescription',
+ 'NodeTypeUpdateParameters',
'OperationResult',
'PartitionSchemeDescription',
'ProxyResource',
@@ -197,14 +251,24 @@
'SettingsParameterDescription',
'SettingsSectionDescription',
'SingletonPartitionSchemeDescription',
+ 'Sku',
'StatefulServiceProperties',
'StatefulServiceUpdateProperties',
'StatelessServiceProperties',
'StatelessServiceUpdateProperties',
+ 'SubResource',
'UniformInt64RangePartitionSchemeDescription',
+ 'UserAssignedIdentity',
+ 'VaultCertificate',
+ 'VaultSecretGroup',
+ 'VMSSExtension',
'OperationResultPaged',
+ 'ManagedClusterPaged',
+ 'NodeTypePaged',
'ProvisioningState',
+ 'ManagedIdentityType',
'ArmUpgradeFailureAction',
+ 'RollingUpgradeMode',
'ServiceCorrelationScheme',
'MoveCost',
'PartitionScheme',
@@ -212,4 +276,6 @@
'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 227321db7212..1de2810301ae 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models.py
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models.py
@@ -191,6 +191,8 @@ class ApplicationResource(ProxyResource):
:type tags: dict[str, str]
:ivar etag: Azure resource etag.
:vartype etag: str
+ :param identity: Describes the managed identities for an Azure resource.
+ :type identity: ~azure.mgmt.servicefabric.models.ManagedIdentity
:param type_version: The version of the application type as defined in the
application manifest.
:type type_version: str
@@ -220,6 +222,10 @@ class ApplicationResource(ProxyResource):
:param metrics: List of application capacity metric description.
:type metrics:
list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription]
+ :param managed_identities: List of user assigned identities for the
+ application, each mapped to a friendly name.
+ :type managed_identities:
+ list[~azure.mgmt.servicefabric.models.ApplicationUserAssignedIdentity]
:ivar provisioning_state: The current deployment or provisioning state,
which only appears in the response
:vartype provisioning_state: str
@@ -245,6 +251,7 @@ class ApplicationResource(ProxyResource):
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'etag': {'key': 'etag', 'type': 'str'},
+ 'identity': {'key': 'identity', 'type': 'ManagedIdentity'},
'type_version': {'key': 'properties.typeVersion', 'type': 'str'},
'parameters': {'key': 'properties.parameters', 'type': '{str}'},
'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'ApplicationUpgradePolicy'},
@@ -252,12 +259,14 @@ class ApplicationResource(ProxyResource):
'maximum_nodes': {'key': 'properties.maximumNodes', 'type': 'long'},
'remove_application_capacity': {'key': 'properties.removeApplicationCapacity', 'type': 'bool'},
'metrics': {'key': 'properties.metrics', 'type': '[ApplicationMetricDescription]'},
+ 'managed_identities': {'key': 'properties.managedIdentities', 'type': '[ApplicationUserAssignedIdentity]'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'type_name': {'key': 'properties.typeName', 'type': 'str'},
}
def __init__(self, **kwargs):
super(ApplicationResource, self).__init__(**kwargs)
+ self.identity = kwargs.get('identity', None)
self.type_version = kwargs.get('type_version', None)
self.parameters = kwargs.get('parameters', None)
self.upgrade_policy = kwargs.get('upgrade_policy', None)
@@ -265,6 +274,7 @@ def __init__(self, **kwargs):
self.maximum_nodes = kwargs.get('maximum_nodes', 0)
self.remove_application_capacity = kwargs.get('remove_application_capacity', None)
self.metrics = kwargs.get('metrics', None)
+ self.managed_identities = kwargs.get('managed_identities', None)
self.provisioning_state = None
self.type_name = kwargs.get('type_name', None)
@@ -345,6 +355,10 @@ class ApplicationResourceUpdate(ProxyResource):
:param metrics: List of application capacity metric description.
:type metrics:
list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription]
+ :param managed_identities: List of user assigned identities for the
+ application, each mapped to a friendly name.
+ :type managed_identities:
+ list[~azure.mgmt.servicefabric.models.ApplicationUserAssignedIdentity]
"""
_validation = {
@@ -370,6 +384,7 @@ class ApplicationResourceUpdate(ProxyResource):
'maximum_nodes': {'key': 'properties.maximumNodes', 'type': 'long'},
'remove_application_capacity': {'key': 'properties.removeApplicationCapacity', 'type': 'bool'},
'metrics': {'key': 'properties.metrics', 'type': '[ApplicationMetricDescription]'},
+ 'managed_identities': {'key': 'properties.managedIdentities', 'type': '[ApplicationUserAssignedIdentity]'},
}
def __init__(self, **kwargs):
@@ -381,6 +396,7 @@ def __init__(self, **kwargs):
self.maximum_nodes = kwargs.get('maximum_nodes', 0)
self.remove_application_capacity = kwargs.get('remove_application_capacity', None)
self.metrics = kwargs.get('metrics', None)
+ self.managed_identities = kwargs.get('managed_identities', None)
class ApplicationTypeResource(ProxyResource):
@@ -550,6 +566,29 @@ def __init__(self, **kwargs):
self.next_link = None
+class ApplicationTypeVersionsCleanupPolicy(Model):
+ """ApplicationTypeVersionsCleanupPolicy.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param max_unused_versions_to_keep: Required. Number of unused versions
+ per application type to keep.
+ :type max_unused_versions_to_keep: int
+ """
+
+ _validation = {
+ 'max_unused_versions_to_keep': {'required': True, 'minimum': 0},
+ }
+
+ _attribute_map = {
+ 'max_unused_versions_to_keep': {'key': 'maxUnusedVersionsToKeep', 'type': 'int'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationTypeVersionsCleanupPolicy, self).__init__(**kwargs)
+ self.max_unused_versions_to_keep = kwargs.get('max_unused_versions_to_keep', None)
+
+
class ApplicationUpgradePolicy(Model):
"""Describes the policy for a monitored application upgrade.
@@ -572,6 +611,12 @@ class ApplicationUpgradePolicy(Model):
the health of an application or one of its children entities.
:type application_health_policy:
~azure.mgmt.servicefabric.models.ArmApplicationHealthPolicy
+ :param upgrade_mode: The mode used to monitor health during a rolling
+ upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored.
+ Possible values include: 'Invalid', 'UnmonitoredAuto',
+ 'UnmonitoredManual', 'Monitored'. Default value: "Monitored" .
+ :type upgrade_mode: str or
+ ~azure.mgmt.servicefabric.models.RollingUpgradeMode
"""
_attribute_map = {
@@ -579,6 +624,7 @@ class ApplicationUpgradePolicy(Model):
'force_restart': {'key': 'forceRestart', 'type': 'bool'},
'rolling_upgrade_monitoring_policy': {'key': 'rollingUpgradeMonitoringPolicy', 'type': 'ArmRollingUpgradeMonitoringPolicy'},
'application_health_policy': {'key': 'applicationHealthPolicy', 'type': 'ArmApplicationHealthPolicy'},
+ 'upgrade_mode': {'key': 'upgradeMode', 'type': 'str'},
}
def __init__(self, **kwargs):
@@ -587,6 +633,34 @@ def __init__(self, **kwargs):
self.force_restart = kwargs.get('force_restart', None)
self.rolling_upgrade_monitoring_policy = kwargs.get('rolling_upgrade_monitoring_policy', None)
self.application_health_policy = kwargs.get('application_health_policy', None)
+ self.upgrade_mode = kwargs.get('upgrade_mode', "Monitored")
+
+
+class ApplicationUserAssignedIdentity(Model):
+ """ApplicationUserAssignedIdentity.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Required. The friendly name of user assigned identity.
+ :type name: str
+ :param principal_id: Required. The principal id of user assigned identity.
+ :type principal_id: str
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'principal_id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ApplicationUserAssignedIdentity, self).__init__(**kwargs)
+ self.name = kwargs.get('name', None)
+ self.principal_id = kwargs.get('principal_id', None)
class ArmApplicationHealthPolicy(Model):
@@ -815,6 +889,41 @@ 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.
@@ -1053,7 +1162,7 @@ class Cluster(Resource):
~azure.mgmt.servicefabric.models.ProvisioningState
:param reliability_level: The reliability level sets the replica set size
of system services. Learn about
- [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity).
+ [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- None - Run the System services with a target replica set count of 1.
This should only be used for test clusters.
- Bronze - Run the System services with a target replica set count of 3.
@@ -1084,6 +1193,10 @@ class Cluster(Resource):
**clusterCodeVersion** property in the cluster resource.
. Possible values include: 'Automatic', 'Manual'
:type upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum
+ :param application_type_versions_cleanup_policy: The policy used to clean
+ up unused versions.
+ :type application_type_versions_cleanup_policy:
+ ~azure.mgmt.servicefabric.models.ApplicationTypeVersionsCleanupPolicy
:param vm_image: The VM image VMSS has been configured with. Generic names
such as Windows or Linux can be used.
:type vm_image: str
@@ -1133,6 +1246,7 @@ class Cluster(Resource):
'reverse_proxy_certificate_common_names': {'key': 'properties.reverseProxyCertificateCommonNames', 'type': 'ServerCertificateCommonNames'},
'upgrade_description': {'key': 'properties.upgradeDescription', 'type': 'ClusterUpgradePolicy'},
'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'str'},
+ 'application_type_versions_cleanup_policy': {'key': 'properties.applicationTypeVersionsCleanupPolicy', 'type': 'ApplicationTypeVersionsCleanupPolicy'},
'vm_image': {'key': 'properties.vmImage', 'type': 'str'},
}
@@ -1160,6 +1274,7 @@ def __init__(self, **kwargs):
self.reverse_proxy_certificate_common_names = kwargs.get('reverse_proxy_certificate_common_names', None)
self.upgrade_description = kwargs.get('upgrade_description', None)
self.upgrade_mode = kwargs.get('upgrade_mode', None)
+ self.application_type_versions_cleanup_policy = kwargs.get('application_type_versions_cleanup_policy', None)
self.vm_image = kwargs.get('vm_image', None)
@@ -1345,7 +1460,7 @@ class ClusterUpdateParameters(Model):
list[~azure.mgmt.servicefabric.models.NodeTypeDescription]
:param reliability_level: The reliability level sets the replica set size
of system services. Learn about
- [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity).
+ [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- None - Run the System services with a target replica set count of 1.
This should only be used for test clusters.
- Bronze - Run the System services with a target replica set count of 3.
@@ -1371,6 +1486,10 @@ class ClusterUpdateParameters(Model):
**clusterCodeVersion** property in the cluster resource.
. Possible values include: 'Automatic', 'Manual'
:type upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum
+ :param application_type_versions_cleanup_policy: The policy used to clean
+ up unused versions.
+ :type application_type_versions_cleanup_policy:
+ ~azure.mgmt.servicefabric.models.ApplicationTypeVersionsCleanupPolicy
:param tags: Cluster update parameters
:type tags: dict[str, str]
"""
@@ -1389,6 +1508,7 @@ class ClusterUpdateParameters(Model):
'reverse_proxy_certificate': {'key': 'properties.reverseProxyCertificate', 'type': 'CertificateDescription'},
'upgrade_description': {'key': 'properties.upgradeDescription', 'type': 'ClusterUpgradePolicy'},
'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'str'},
+ 'application_type_versions_cleanup_policy': {'key': 'properties.applicationTypeVersionsCleanupPolicy', 'type': 'ApplicationTypeVersionsCleanupPolicy'},
'tags': {'key': 'tags', 'type': '{str}'},
}
@@ -1407,6 +1527,7 @@ def __init__(self, **kwargs):
self.reverse_proxy_certificate = kwargs.get('reverse_proxy_certificate', None)
self.upgrade_description = kwargs.get('upgrade_description', None)
self.upgrade_mode = kwargs.get('upgrade_mode', None)
+ self.application_type_versions_cleanup_policy = kwargs.get('application_type_versions_cleanup_policy', None)
self.tags = kwargs.get('tags', None)
@@ -1587,6 +1708,10 @@ class DiagnosticsStorageAccountConfig(Model):
:param protected_account_key_name: Required. The protected diagnostics
storage key name.
:type protected_account_key_name: str
+ :param protected_account_key_name2: The secondary protected diagnostics
+ storage key name. If one of the storage account keys is rotated the
+ cluster will fallback to using the other.
+ :type protected_account_key_name2: str
:param blob_endpoint: Required. The blob endpoint of the azure storage
account.
:type blob_endpoint: str
@@ -1609,6 +1734,7 @@ class DiagnosticsStorageAccountConfig(Model):
_attribute_map = {
'storage_account_name': {'key': 'storageAccountName', 'type': 'str'},
'protected_account_key_name': {'key': 'protectedAccountKeyName', 'type': 'str'},
+ 'protected_account_key_name2': {'key': 'protectedAccountKeyName2', 'type': 'str'},
'blob_endpoint': {'key': 'blobEndpoint', 'type': 'str'},
'queue_endpoint': {'key': 'queueEndpoint', 'type': 'str'},
'table_endpoint': {'key': 'tableEndpoint', 'type': 'str'},
@@ -1618,6 +1744,7 @@ def __init__(self, **kwargs):
super(DiagnosticsStorageAccountConfig, self).__init__(**kwargs)
self.storage_account_name = kwargs.get('storage_account_name', None)
self.protected_account_key_name = kwargs.get('protected_account_key_name', None)
+ self.protected_account_key_name2 = kwargs.get('protected_account_key_name2', None)
self.blob_endpoint = kwargs.get('blob_endpoint', None)
self.queue_endpoint = kwargs.get('queue_endpoint', None)
self.table_endpoint = kwargs.get('table_endpoint', None)
@@ -1698,6 +1825,421 @@ 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.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar principal_id: The principal id of the managed identity. This
+ property will only be provided for a system assigned identity.
+ :vartype principal_id: str
+ :ivar tenant_id: The tenant id of the managed identity. This property will
+ only be provided for a system assigned identity.
+ :vartype tenant_id: str
+ :param type: The type of managed identity for the resource. Possible
+ values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned,
+ UserAssigned', 'None'
+ :type type: str or ~azure.mgmt.servicefabric.models.ManagedIdentityType
+ :param user_assigned_identities: The list of user identities associated
+ with the resource. The user identity dictionary key references will be ARM
+ resource ids in the form:
+ '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ :type user_assigned_identities: dict[str,
+ ~azure.mgmt.servicefabric.models.UserAssignedIdentity]
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'ManagedIdentityType'},
+ 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'},
+ }
+
+ def __init__(self, **kwargs):
+ super(ManagedIdentity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.tenant_id = None
+ self.type = kwargs.get('type', None)
+ self.user_assigned_identities = kwargs.get('user_assigned_identities', None)
+
+
+class 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.
@@ -1738,7 +2280,7 @@ class NamedPartitionSchemeDescription(PartitionSchemeDescription):
:type partition_scheme: str
:param count: Required. The number of partitions.
:type count: int
- :param names: Required. Array of size specified by the ‘Count’ parameter,
+ :param names: Required. Array of size specified by the ‘count’ parameter,
for the names of the partitions.
:type names: list[str]
"""
@@ -1751,8 +2293,8 @@ class NamedPartitionSchemeDescription(PartitionSchemeDescription):
_attribute_map = {
'partition_scheme': {'key': 'partitionScheme', 'type': 'str'},
- 'count': {'key': 'Count', 'type': 'int'},
- 'names': {'key': 'Names', 'type': '[str]'},
+ 'count': {'key': 'count', 'type': 'int'},
+ 'names': {'key': 'names', 'type': '[str]'},
}
def __init__(self, **kwargs):
@@ -1762,6 +2304,156 @@ 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.
@@ -1786,7 +2478,7 @@ class NodeTypeDescription(Model):
:type http_gateway_endpoint_port: int
:param durability_level: The durability level of the node type. Learn
about
- [DurabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity).
+ [DurabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- Bronze - No privileges. This is the default.
- Silver - The infrastructure jobs can be paused for a duration of 10
minutes per UD.
@@ -1852,6 +2544,66 @@ def __init__(self, **kwargs):
self.reverse_proxy_endpoint_port = kwargs.get('reverse_proxy_endpoint_port', None)
+class NodeTypeUpdateParameters(Model):
+ """Node type update request.
+
+ :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]
+ """
+
+ _validation = {
+ 'vm_instance_count': {'maximum': 2147483647, 'minimum': 1},
+ }
+
+ _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}'},
+ }
+
+ 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)
+
+
class OperationResult(Model):
"""Available operation list result.
@@ -2029,7 +2781,7 @@ class ServicePlacementPolicyDescription(Model):
}
_attribute_map = {
- 'type': {'key': 'Type', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs):
@@ -2089,6 +2841,10 @@ class ServiceResource(ProxyResource):
package. Possible values include: 'SharedProcess', 'ExclusiveProcess'
:type service_package_activation_mode: str or
~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode
+ :param service_dns_name: Dns name used for the service. If this is
+ specified, then the service can be accessed via its DNS name instead of
+ service name.
+ :type service_dns_name: str
"""
_validation = {
@@ -2115,6 +2871,7 @@ class ServiceResource(ProxyResource):
'service_type_name': {'key': 'properties.serviceTypeName', 'type': 'str'},
'partition_description': {'key': 'properties.partitionDescription', 'type': 'PartitionSchemeDescription'},
'service_package_activation_mode': {'key': 'properties.servicePackageActivationMode', 'type': 'str'},
+ 'service_dns_name': {'key': 'properties.serviceDnsName', 'type': 'str'},
}
def __init__(self, **kwargs):
@@ -2128,6 +2885,7 @@ def __init__(self, **kwargs):
self.service_type_name = kwargs.get('service_type_name', None)
self.partition_description = kwargs.get('partition_description', None)
self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None)
+ self.service_dns_name = kwargs.get('service_dns_name', None)
class ServiceResourceList(Model):
@@ -2245,6 +3003,10 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase):
package. Possible values include: 'SharedProcess', 'ExclusiveProcess'
:type service_package_activation_mode: str or
~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode
+ :param service_dns_name: Dns name used for the service. If this is
+ specified, then the service can be accessed via its DNS name instead of
+ service name.
+ :type service_dns_name: str
:param service_kind: Required. Constant filled by server.
:type service_kind: str
"""
@@ -2264,6 +3026,7 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase):
'service_type_name': {'key': 'serviceTypeName', 'type': 'str'},
'partition_description': {'key': 'partitionDescription', 'type': 'PartitionSchemeDescription'},
'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'},
+ 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'},
'service_kind': {'key': 'serviceKind', 'type': 'str'},
}
@@ -2277,6 +3040,7 @@ def __init__(self, **kwargs):
self.service_type_name = kwargs.get('service_type_name', None)
self.partition_description = kwargs.get('partition_description', None)
self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None)
+ self.service_dns_name = kwargs.get('service_dns_name', None)
self.service_kind = None
self.service_kind = 'ServiceResourceProperties'
@@ -2541,6 +3305,30 @@ 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.
@@ -2582,6 +3370,10 @@ class StatefulServiceProperties(ServiceResourceProperties):
package. Possible values include: 'SharedProcess', 'ExclusiveProcess'
:type service_package_activation_mode: str or
~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode
+ :param service_dns_name: Dns name used for the service. If this is
+ specified, then the service can be accessed via its DNS name instead of
+ service name.
+ :type service_dns_name: str
:param service_kind: Required. Constant filled by server.
:type service_kind: str
:param has_persisted_state: A flag indicating whether this is a persistent
@@ -2623,6 +3415,7 @@ class StatefulServiceProperties(ServiceResourceProperties):
'service_type_name': {'key': 'serviceTypeName', 'type': 'str'},
'partition_description': {'key': 'partitionDescription', 'type': 'PartitionSchemeDescription'},
'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'},
+ 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'},
'service_kind': {'key': 'serviceKind', 'type': 'str'},
'has_persisted_state': {'key': 'hasPersistedState', 'type': 'bool'},
'target_replica_set_size': {'key': 'targetReplicaSetSize', 'type': 'int'},
@@ -2760,10 +3553,24 @@ class StatelessServiceProperties(ServiceResourceProperties):
package. Possible values include: 'SharedProcess', 'ExclusiveProcess'
:type service_package_activation_mode: str or
~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode
+ :param service_dns_name: Dns name used for the service. If this is
+ specified, then the service can be accessed via its DNS name instead of
+ service name.
+ :type service_dns_name: str
:param service_kind: Required. Constant filled by server.
:type service_kind: str
:param instance_count: The instance count.
:type instance_count: int
+ :param instance_close_delay_duration: Delay duration for RequestDrain
+ feature to ensures that the endpoint advertised by the stateless instance
+ is removed before the delay starts prior to closing the instance. This
+ delay enables existing requests to drain gracefully before the instance
+ actually goes down
+ (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview).
+ It is first interpreted as a string representing an ISO 8601 duration. If
+ that fails, then it is interpreted as a number representing the total
+ number of milliseconds.
+ :type instance_close_delay_duration: str
"""
_validation = {
@@ -2782,13 +3589,16 @@ class StatelessServiceProperties(ServiceResourceProperties):
'service_type_name': {'key': 'serviceTypeName', 'type': 'str'},
'partition_description': {'key': 'partitionDescription', 'type': 'PartitionSchemeDescription'},
'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'},
+ 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'},
'service_kind': {'key': 'serviceKind', 'type': 'str'},
'instance_count': {'key': 'instanceCount', 'type': 'int'},
+ 'instance_close_delay_duration': {'key': 'instanceCloseDelayDuration', 'type': 'str'},
}
def __init__(self, **kwargs):
super(StatelessServiceProperties, self).__init__(**kwargs)
self.instance_count = kwargs.get('instance_count', None)
+ self.instance_close_delay_duration = kwargs.get('instance_close_delay_duration', None)
self.service_kind = 'Stateless'
@@ -2822,6 +3632,16 @@ class StatelessServiceUpdateProperties(ServiceResourceUpdateProperties):
:type service_kind: str
:param instance_count: The instance count.
:type instance_count: int
+ :param instance_close_delay_duration: Delay duration for RequestDrain
+ feature to ensures that the endpoint advertised by the stateless instance
+ is removed before the delay starts prior to closing the instance. This
+ delay enables existing requests to drain gracefully before the instance
+ actually goes down
+ (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview).
+ It is first interpreted as a string representing an ISO 8601 duration. If
+ that fails, then it is interpreted as a number representing the total
+ number of milliseconds.
+ :type instance_close_delay_duration: str
"""
_validation = {
@@ -2837,14 +3657,32 @@ class StatelessServiceUpdateProperties(ServiceResourceUpdateProperties):
'default_move_cost': {'key': 'defaultMoveCost', 'type': 'str'},
'service_kind': {'key': 'serviceKind', 'type': 'str'},
'instance_count': {'key': 'instanceCount', 'type': 'int'},
+ 'instance_close_delay_duration': {'key': 'instanceCloseDelayDuration', 'type': 'str'},
}
def __init__(self, **kwargs):
super(StatelessServiceUpdateProperties, self).__init__(**kwargs)
self.instance_count = kwargs.get('instance_count', None)
+ self.instance_close_delay_duration = kwargs.get('instance_close_delay_duration', None)
self.service_kind = 'Stateless'
+class SubResource(Model):
+ """Azure resource identifier.
+
+ :param id: Azure resource identifier.
+ :type id: str
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(SubResource, self).__init__(**kwargs)
+ self.id = kwargs.get('id', None)
+
+
class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription):
"""Describes a partitioning scheme where an integer range is allocated evenly
across a number of partitions.
@@ -2857,11 +3695,11 @@ class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription):
:type count: int
:param low_key: Required. String indicating the lower bound of the
partition key range that
- should be split between the partition ‘Count’
+ should be split between the partition ‘count’
:type low_key: str
:param high_key: Required. String indicating the upper bound of the
partition key range that
- should be split between the partition ‘Count’
+ should be split between the partition ‘count’
:type high_key: str
"""
@@ -2874,9 +3712,9 @@ class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription):
_attribute_map = {
'partition_scheme': {'key': 'partitionScheme', 'type': 'str'},
- 'count': {'key': 'Count', 'type': 'int'},
- 'low_key': {'key': 'LowKey', 'type': 'str'},
- 'high_key': {'key': 'HighKey', 'type': 'str'},
+ 'count': {'key': 'count', 'type': 'int'},
+ 'low_key': {'key': 'lowKey', 'type': 'str'},
+ 'high_key': {'key': 'highKey', 'type': 'str'},
}
def __init__(self, **kwargs):
@@ -2885,3 +3723,181 @@ def __init__(self, **kwargs):
self.low_key = kwargs.get('low_key', None)
self.high_key = kwargs.get('high_key', None)
self.partition_scheme = 'UniformInt64Range'
+
+
+class UserAssignedIdentity(Model):
+ """UserAssignedIdentity.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar principal_id: The principal id of user assigned identity.
+ :vartype principal_id: str
+ :ivar client_id: The client id of user assigned identity.
+ :vartype client_id: str
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'client_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'client_id': {'key': 'clientId', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs):
+ super(UserAssignedIdentity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.client_id = None
+
+
+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
+ """
+
+ _validation = {
+ 'certificate_url': {'required': True},
+ 'certificate_store': {'required': True},
+ }
+
+ _attribute_map = {
+ 'certificate_url': {'key': 'certificateUrl', 'type': 'str'},
+ 'certificate_store': {'key': 'certificateStore', '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)
+
+
+class VaultSecretGroup(Model):
+ """Specifies set of certificates that should be installed onto the virtual
+ machines.
+
+ 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]
+ """
+
+ _validation = {
+ 'source_vault': {'required': True},
+ 'vault_certificates': {'required': True},
+ }
+
+ _attribute_map = {
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'},
+ }
+
+ 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)
+
+
+class VMSSExtension(Model):
+ """Specifies set of extensions that should be installed onto the virtual
+ machines.
+
+ 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]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'publisher': {'required': True},
+ 'type': {'required': True},
+ 'type_handler_version': {'required': True},
+ 'provisioning_state': {'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]'},
+ }
+
+ 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)
diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models_py3.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models_py3.py
index 40255dab3990..742e0cfeef4e 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models_py3.py
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_models_py3.py
@@ -191,6 +191,8 @@ class ApplicationResource(ProxyResource):
:type tags: dict[str, str]
:ivar etag: Azure resource etag.
:vartype etag: str
+ :param identity: Describes the managed identities for an Azure resource.
+ :type identity: ~azure.mgmt.servicefabric.models.ManagedIdentity
:param type_version: The version of the application type as defined in the
application manifest.
:type type_version: str
@@ -220,6 +222,10 @@ class ApplicationResource(ProxyResource):
:param metrics: List of application capacity metric description.
:type metrics:
list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription]
+ :param managed_identities: List of user assigned identities for the
+ application, each mapped to a friendly name.
+ :type managed_identities:
+ list[~azure.mgmt.servicefabric.models.ApplicationUserAssignedIdentity]
:ivar provisioning_state: The current deployment or provisioning state,
which only appears in the response
:vartype provisioning_state: str
@@ -245,6 +251,7 @@ class ApplicationResource(ProxyResource):
'location': {'key': 'location', 'type': 'str'},
'tags': {'key': 'tags', 'type': '{str}'},
'etag': {'key': 'etag', 'type': 'str'},
+ 'identity': {'key': 'identity', 'type': 'ManagedIdentity'},
'type_version': {'key': 'properties.typeVersion', 'type': 'str'},
'parameters': {'key': 'properties.parameters', 'type': '{str}'},
'upgrade_policy': {'key': 'properties.upgradePolicy', 'type': 'ApplicationUpgradePolicy'},
@@ -252,12 +259,14 @@ class ApplicationResource(ProxyResource):
'maximum_nodes': {'key': 'properties.maximumNodes', 'type': 'long'},
'remove_application_capacity': {'key': 'properties.removeApplicationCapacity', 'type': 'bool'},
'metrics': {'key': 'properties.metrics', 'type': '[ApplicationMetricDescription]'},
+ 'managed_identities': {'key': 'properties.managedIdentities', 'type': '[ApplicationUserAssignedIdentity]'},
'provisioning_state': {'key': 'properties.provisioningState', 'type': 'str'},
'type_name': {'key': 'properties.typeName', 'type': 'str'},
}
- def __init__(self, *, location: str=None, tags=None, type_version: str=None, parameters=None, upgrade_policy=None, minimum_nodes: int=None, maximum_nodes: int=0, remove_application_capacity: bool=None, metrics=None, type_name: str=None, **kwargs) -> None:
+ def __init__(self, *, location: str=None, tags=None, identity=None, type_version: str=None, parameters=None, upgrade_policy=None, minimum_nodes: int=None, maximum_nodes: int=0, remove_application_capacity: bool=None, metrics=None, managed_identities=None, type_name: str=None, **kwargs) -> None:
super(ApplicationResource, self).__init__(location=location, tags=tags, **kwargs)
+ self.identity = identity
self.type_version = type_version
self.parameters = parameters
self.upgrade_policy = upgrade_policy
@@ -265,6 +274,7 @@ def __init__(self, *, location: str=None, tags=None, type_version: str=None, par
self.maximum_nodes = maximum_nodes
self.remove_application_capacity = remove_application_capacity
self.metrics = metrics
+ self.managed_identities = managed_identities
self.provisioning_state = None
self.type_name = type_name
@@ -345,6 +355,10 @@ class ApplicationResourceUpdate(ProxyResource):
:param metrics: List of application capacity metric description.
:type metrics:
list[~azure.mgmt.servicefabric.models.ApplicationMetricDescription]
+ :param managed_identities: List of user assigned identities for the
+ application, each mapped to a friendly name.
+ :type managed_identities:
+ list[~azure.mgmt.servicefabric.models.ApplicationUserAssignedIdentity]
"""
_validation = {
@@ -370,9 +384,10 @@ class ApplicationResourceUpdate(ProxyResource):
'maximum_nodes': {'key': 'properties.maximumNodes', 'type': 'long'},
'remove_application_capacity': {'key': 'properties.removeApplicationCapacity', 'type': 'bool'},
'metrics': {'key': 'properties.metrics', 'type': '[ApplicationMetricDescription]'},
+ 'managed_identities': {'key': 'properties.managedIdentities', 'type': '[ApplicationUserAssignedIdentity]'},
}
- def __init__(self, *, location: str=None, tags=None, type_version: str=None, parameters=None, upgrade_policy=None, minimum_nodes: int=None, maximum_nodes: int=0, remove_application_capacity: bool=None, metrics=None, **kwargs) -> None:
+ def __init__(self, *, location: str=None, tags=None, type_version: str=None, parameters=None, upgrade_policy=None, minimum_nodes: int=None, maximum_nodes: int=0, remove_application_capacity: bool=None, metrics=None, managed_identities=None, **kwargs) -> None:
super(ApplicationResourceUpdate, self).__init__(location=location, tags=tags, **kwargs)
self.type_version = type_version
self.parameters = parameters
@@ -381,6 +396,7 @@ def __init__(self, *, location: str=None, tags=None, type_version: str=None, par
self.maximum_nodes = maximum_nodes
self.remove_application_capacity = remove_application_capacity
self.metrics = metrics
+ self.managed_identities = managed_identities
class ApplicationTypeResource(ProxyResource):
@@ -550,6 +566,29 @@ def __init__(self, *, value=None, **kwargs) -> None:
self.next_link = None
+class ApplicationTypeVersionsCleanupPolicy(Model):
+ """ApplicationTypeVersionsCleanupPolicy.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param max_unused_versions_to_keep: Required. Number of unused versions
+ per application type to keep.
+ :type max_unused_versions_to_keep: int
+ """
+
+ _validation = {
+ 'max_unused_versions_to_keep': {'required': True, 'minimum': 0},
+ }
+
+ _attribute_map = {
+ 'max_unused_versions_to_keep': {'key': 'maxUnusedVersionsToKeep', 'type': 'int'},
+ }
+
+ def __init__(self, *, max_unused_versions_to_keep: int, **kwargs) -> None:
+ super(ApplicationTypeVersionsCleanupPolicy, self).__init__(**kwargs)
+ self.max_unused_versions_to_keep = max_unused_versions_to_keep
+
+
class ApplicationUpgradePolicy(Model):
"""Describes the policy for a monitored application upgrade.
@@ -572,6 +611,12 @@ class ApplicationUpgradePolicy(Model):
the health of an application or one of its children entities.
:type application_health_policy:
~azure.mgmt.servicefabric.models.ArmApplicationHealthPolicy
+ :param upgrade_mode: The mode used to monitor health during a rolling
+ upgrade. The values are UnmonitoredAuto, UnmonitoredManual, and Monitored.
+ Possible values include: 'Invalid', 'UnmonitoredAuto',
+ 'UnmonitoredManual', 'Monitored'. Default value: "Monitored" .
+ :type upgrade_mode: str or
+ ~azure.mgmt.servicefabric.models.RollingUpgradeMode
"""
_attribute_map = {
@@ -579,14 +624,43 @@ class ApplicationUpgradePolicy(Model):
'force_restart': {'key': 'forceRestart', 'type': 'bool'},
'rolling_upgrade_monitoring_policy': {'key': 'rollingUpgradeMonitoringPolicy', 'type': 'ArmRollingUpgradeMonitoringPolicy'},
'application_health_policy': {'key': 'applicationHealthPolicy', 'type': 'ArmApplicationHealthPolicy'},
+ 'upgrade_mode': {'key': 'upgradeMode', 'type': 'str'},
}
- def __init__(self, *, upgrade_replica_set_check_timeout: str=None, force_restart: bool=None, rolling_upgrade_monitoring_policy=None, application_health_policy=None, **kwargs) -> None:
+ def __init__(self, *, upgrade_replica_set_check_timeout: str=None, force_restart: bool=None, rolling_upgrade_monitoring_policy=None, application_health_policy=None, upgrade_mode="Monitored", **kwargs) -> None:
super(ApplicationUpgradePolicy, self).__init__(**kwargs)
self.upgrade_replica_set_check_timeout = upgrade_replica_set_check_timeout
self.force_restart = force_restart
self.rolling_upgrade_monitoring_policy = rolling_upgrade_monitoring_policy
self.application_health_policy = application_health_policy
+ self.upgrade_mode = upgrade_mode
+
+
+class ApplicationUserAssignedIdentity(Model):
+ """ApplicationUserAssignedIdentity.
+
+ All required parameters must be populated in order to send to Azure.
+
+ :param name: Required. The friendly name of user assigned identity.
+ :type name: str
+ :param principal_id: Required. The principal id of user assigned identity.
+ :type principal_id: str
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'principal_id': {'required': True},
+ }
+
+ _attribute_map = {
+ 'name': {'key': 'name', 'type': 'str'},
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ }
+
+ def __init__(self, *, name: str, principal_id: str, **kwargs) -> None:
+ super(ApplicationUserAssignedIdentity, self).__init__(**kwargs)
+ self.name = name
+ self.principal_id = principal_id
class ArmApplicationHealthPolicy(Model):
@@ -815,6 +889,41 @@ 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.
@@ -1053,7 +1162,7 @@ class Cluster(Resource):
~azure.mgmt.servicefabric.models.ProvisioningState
:param reliability_level: The reliability level sets the replica set size
of system services. Learn about
- [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity).
+ [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- None - Run the System services with a target replica set count of 1.
This should only be used for test clusters.
- Bronze - Run the System services with a target replica set count of 3.
@@ -1084,6 +1193,10 @@ class Cluster(Resource):
**clusterCodeVersion** property in the cluster resource.
. Possible values include: 'Automatic', 'Manual'
:type upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum
+ :param application_type_versions_cleanup_policy: The policy used to clean
+ up unused versions.
+ :type application_type_versions_cleanup_policy:
+ ~azure.mgmt.servicefabric.models.ApplicationTypeVersionsCleanupPolicy
:param vm_image: The VM image VMSS has been configured with. Generic names
such as Windows or Linux can be used.
:type vm_image: str
@@ -1133,10 +1246,11 @@ class Cluster(Resource):
'reverse_proxy_certificate_common_names': {'key': 'properties.reverseProxyCertificateCommonNames', 'type': 'ServerCertificateCommonNames'},
'upgrade_description': {'key': 'properties.upgradeDescription', 'type': 'ClusterUpgradePolicy'},
'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'str'},
+ 'application_type_versions_cleanup_policy': {'key': 'properties.applicationTypeVersionsCleanupPolicy', 'type': 'ApplicationTypeVersionsCleanupPolicy'},
'vm_image': {'key': 'properties.vmImage', 'type': 'str'},
}
- def __init__(self, *, location: str, management_endpoint: str, node_types, tags=None, add_on_features=None, azure_active_directory=None, certificate=None, certificate_common_names=None, client_certificate_common_names=None, client_certificate_thumbprints=None, cluster_code_version: str=None, diagnostics_storage_account_config=None, event_store_service_enabled: bool=None, fabric_settings=None, reliability_level=None, reverse_proxy_certificate=None, reverse_proxy_certificate_common_names=None, upgrade_description=None, upgrade_mode=None, vm_image: str=None, **kwargs) -> None:
+ def __init__(self, *, location: str, management_endpoint: str, node_types, tags=None, add_on_features=None, azure_active_directory=None, certificate=None, certificate_common_names=None, client_certificate_common_names=None, client_certificate_thumbprints=None, cluster_code_version: str=None, diagnostics_storage_account_config=None, event_store_service_enabled: bool=None, fabric_settings=None, reliability_level=None, reverse_proxy_certificate=None, reverse_proxy_certificate_common_names=None, upgrade_description=None, upgrade_mode=None, application_type_versions_cleanup_policy=None, vm_image: str=None, **kwargs) -> None:
super(Cluster, self).__init__(location=location, tags=tags, **kwargs)
self.add_on_features = add_on_features
self.available_cluster_versions = None
@@ -1160,6 +1274,7 @@ def __init__(self, *, location: str, management_endpoint: str, node_types, tags=
self.reverse_proxy_certificate_common_names = reverse_proxy_certificate_common_names
self.upgrade_description = upgrade_description
self.upgrade_mode = upgrade_mode
+ self.application_type_versions_cleanup_policy = application_type_versions_cleanup_policy
self.vm_image = vm_image
@@ -1345,7 +1460,7 @@ class ClusterUpdateParameters(Model):
list[~azure.mgmt.servicefabric.models.NodeTypeDescription]
:param reliability_level: The reliability level sets the replica set size
of system services. Learn about
- [ReliabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity).
+ [ReliabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- None - Run the System services with a target replica set count of 1.
This should only be used for test clusters.
- Bronze - Run the System services with a target replica set count of 3.
@@ -1371,6 +1486,10 @@ class ClusterUpdateParameters(Model):
**clusterCodeVersion** property in the cluster resource.
. Possible values include: 'Automatic', 'Manual'
:type upgrade_mode: str or ~azure.mgmt.servicefabric.models.enum
+ :param application_type_versions_cleanup_policy: The policy used to clean
+ up unused versions.
+ :type application_type_versions_cleanup_policy:
+ ~azure.mgmt.servicefabric.models.ApplicationTypeVersionsCleanupPolicy
:param tags: Cluster update parameters
:type tags: dict[str, str]
"""
@@ -1389,10 +1508,11 @@ class ClusterUpdateParameters(Model):
'reverse_proxy_certificate': {'key': 'properties.reverseProxyCertificate', 'type': 'CertificateDescription'},
'upgrade_description': {'key': 'properties.upgradeDescription', 'type': 'ClusterUpgradePolicy'},
'upgrade_mode': {'key': 'properties.upgradeMode', 'type': 'str'},
+ 'application_type_versions_cleanup_policy': {'key': 'properties.applicationTypeVersionsCleanupPolicy', 'type': 'ApplicationTypeVersionsCleanupPolicy'},
'tags': {'key': 'tags', 'type': '{str}'},
}
- def __init__(self, *, add_on_features=None, certificate=None, certificate_common_names=None, client_certificate_common_names=None, client_certificate_thumbprints=None, cluster_code_version: str=None, event_store_service_enabled: bool=None, fabric_settings=None, node_types=None, reliability_level=None, reverse_proxy_certificate=None, upgrade_description=None, upgrade_mode=None, tags=None, **kwargs) -> None:
+ def __init__(self, *, add_on_features=None, certificate=None, certificate_common_names=None, client_certificate_common_names=None, client_certificate_thumbprints=None, cluster_code_version: str=None, event_store_service_enabled: bool=None, fabric_settings=None, node_types=None, reliability_level=None, reverse_proxy_certificate=None, upgrade_description=None, upgrade_mode=None, application_type_versions_cleanup_policy=None, tags=None, **kwargs) -> None:
super(ClusterUpdateParameters, self).__init__(**kwargs)
self.add_on_features = add_on_features
self.certificate = certificate
@@ -1407,6 +1527,7 @@ def __init__(self, *, add_on_features=None, certificate=None, certificate_common
self.reverse_proxy_certificate = reverse_proxy_certificate
self.upgrade_description = upgrade_description
self.upgrade_mode = upgrade_mode
+ self.application_type_versions_cleanup_policy = application_type_versions_cleanup_policy
self.tags = tags
@@ -1587,6 +1708,10 @@ class DiagnosticsStorageAccountConfig(Model):
:param protected_account_key_name: Required. The protected diagnostics
storage key name.
:type protected_account_key_name: str
+ :param protected_account_key_name2: The secondary protected diagnostics
+ storage key name. If one of the storage account keys is rotated the
+ cluster will fallback to using the other.
+ :type protected_account_key_name2: str
:param blob_endpoint: Required. The blob endpoint of the azure storage
account.
:type blob_endpoint: str
@@ -1609,15 +1734,17 @@ class DiagnosticsStorageAccountConfig(Model):
_attribute_map = {
'storage_account_name': {'key': 'storageAccountName', 'type': 'str'},
'protected_account_key_name': {'key': 'protectedAccountKeyName', 'type': 'str'},
+ 'protected_account_key_name2': {'key': 'protectedAccountKeyName2', 'type': 'str'},
'blob_endpoint': {'key': 'blobEndpoint', 'type': 'str'},
'queue_endpoint': {'key': 'queueEndpoint', 'type': 'str'},
'table_endpoint': {'key': 'tableEndpoint', 'type': 'str'},
}
- def __init__(self, *, storage_account_name: str, protected_account_key_name: str, blob_endpoint: str, queue_endpoint: str, table_endpoint: str, **kwargs) -> None:
+ def __init__(self, *, storage_account_name: str, protected_account_key_name: str, blob_endpoint: str, queue_endpoint: str, table_endpoint: str, protected_account_key_name2: str=None, **kwargs) -> None:
super(DiagnosticsStorageAccountConfig, self).__init__(**kwargs)
self.storage_account_name = storage_account_name
self.protected_account_key_name = protected_account_key_name
+ self.protected_account_key_name2 = protected_account_key_name2
self.blob_endpoint = blob_endpoint
self.queue_endpoint = queue_endpoint
self.table_endpoint = table_endpoint
@@ -1698,6 +1825,421 @@ 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.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar principal_id: The principal id of the managed identity. This
+ property will only be provided for a system assigned identity.
+ :vartype principal_id: str
+ :ivar tenant_id: The tenant id of the managed identity. This property will
+ only be provided for a system assigned identity.
+ :vartype tenant_id: str
+ :param type: The type of managed identity for the resource. Possible
+ values include: 'SystemAssigned', 'UserAssigned', 'SystemAssigned,
+ UserAssigned', 'None'
+ :type type: str or ~azure.mgmt.servicefabric.models.ManagedIdentityType
+ :param user_assigned_identities: The list of user identities associated
+ with the resource. The user identity dictionary key references will be ARM
+ resource ids in the form:
+ '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
+ :type user_assigned_identities: dict[str,
+ ~azure.mgmt.servicefabric.models.UserAssignedIdentity]
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'tenant_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'tenant_id': {'key': 'tenantId', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'ManagedIdentityType'},
+ 'user_assigned_identities': {'key': 'userAssignedIdentities', 'type': '{UserAssignedIdentity}'},
+ }
+
+ def __init__(self, *, type=None, user_assigned_identities=None, **kwargs) -> None:
+ super(ManagedIdentity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.tenant_id = None
+ self.type = type
+ self.user_assigned_identities = user_assigned_identities
+
+
+class 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.
@@ -1738,7 +2280,7 @@ class NamedPartitionSchemeDescription(PartitionSchemeDescription):
:type partition_scheme: str
:param count: Required. The number of partitions.
:type count: int
- :param names: Required. Array of size specified by the ‘Count’ parameter,
+ :param names: Required. Array of size specified by the ‘count’ parameter,
for the names of the partitions.
:type names: list[str]
"""
@@ -1751,8 +2293,8 @@ class NamedPartitionSchemeDescription(PartitionSchemeDescription):
_attribute_map = {
'partition_scheme': {'key': 'partitionScheme', 'type': 'str'},
- 'count': {'key': 'Count', 'type': 'int'},
- 'names': {'key': 'Names', 'type': '[str]'},
+ 'count': {'key': 'count', 'type': 'int'},
+ 'names': {'key': 'names', 'type': '[str]'},
}
def __init__(self, *, count: int, names, **kwargs) -> None:
@@ -1762,6 +2304,156 @@ 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.
@@ -1786,7 +2478,7 @@ class NodeTypeDescription(Model):
:type http_gateway_endpoint_port: int
:param durability_level: The durability level of the node type. Learn
about
- [DurabilityLevel](https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-cluster-capacity).
+ [DurabilityLevel](https://docs.microsoft.com/azure/service-fabric/service-fabric-cluster-capacity).
- Bronze - No privileges. This is the default.
- Silver - The infrastructure jobs can be paused for a duration of 10
minutes per UD.
@@ -1852,6 +2544,66 @@ def __init__(self, *, name: str, client_connection_endpoint_port: int, http_gate
self.reverse_proxy_endpoint_port = reverse_proxy_endpoint_port
+class NodeTypeUpdateParameters(Model):
+ """Node type update request.
+
+ :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]
+ """
+
+ _validation = {
+ 'vm_instance_count': {'maximum': 2147483647, 'minimum': 1},
+ }
+
+ _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}'},
+ }
+
+ 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
+
+
class OperationResult(Model):
"""Available operation list result.
@@ -2029,7 +2781,7 @@ class ServicePlacementPolicyDescription(Model):
}
_attribute_map = {
- 'type': {'key': 'Type', 'type': 'str'},
+ 'type': {'key': 'type', 'type': 'str'},
}
def __init__(self, **kwargs) -> None:
@@ -2089,6 +2841,10 @@ class ServiceResource(ProxyResource):
package. Possible values include: 'SharedProcess', 'ExclusiveProcess'
:type service_package_activation_mode: str or
~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode
+ :param service_dns_name: Dns name used for the service. If this is
+ specified, then the service can be accessed via its DNS name instead of
+ service name.
+ :type service_dns_name: str
"""
_validation = {
@@ -2115,9 +2871,10 @@ class ServiceResource(ProxyResource):
'service_type_name': {'key': 'properties.serviceTypeName', 'type': 'str'},
'partition_description': {'key': 'properties.partitionDescription', 'type': 'PartitionSchemeDescription'},
'service_package_activation_mode': {'key': 'properties.servicePackageActivationMode', 'type': 'str'},
+ 'service_dns_name': {'key': 'properties.serviceDnsName', 'type': 'str'},
}
- def __init__(self, *, location: str=None, tags=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, **kwargs) -> None:
+ def __init__(self, *, location: str=None, tags=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, service_dns_name: str=None, **kwargs) -> None:
super(ServiceResource, self).__init__(location=location, tags=tags, **kwargs)
self.placement_constraints = placement_constraints
self.correlation_scheme = correlation_scheme
@@ -2128,6 +2885,7 @@ def __init__(self, *, location: str=None, tags=None, placement_constraints: str=
self.service_type_name = service_type_name
self.partition_description = partition_description
self.service_package_activation_mode = service_package_activation_mode
+ self.service_dns_name = service_dns_name
class ServiceResourceList(Model):
@@ -2245,6 +3003,10 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase):
package. Possible values include: 'SharedProcess', 'ExclusiveProcess'
:type service_package_activation_mode: str or
~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode
+ :param service_dns_name: Dns name used for the service. If this is
+ specified, then the service can be accessed via its DNS name instead of
+ service name.
+ :type service_dns_name: str
:param service_kind: Required. Constant filled by server.
:type service_kind: str
"""
@@ -2264,6 +3026,7 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase):
'service_type_name': {'key': 'serviceTypeName', 'type': 'str'},
'partition_description': {'key': 'partitionDescription', 'type': 'PartitionSchemeDescription'},
'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'},
+ 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'},
'service_kind': {'key': 'serviceKind', 'type': 'str'},
}
@@ -2271,12 +3034,13 @@ class ServiceResourceProperties(ServiceResourcePropertiesBase):
'service_kind': {'Stateful': 'StatefulServiceProperties', 'Stateless': 'StatelessServiceProperties'}
}
- def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, **kwargs) -> None:
+ def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, service_dns_name: str=None, **kwargs) -> None:
super(ServiceResourceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, **kwargs)
self.provisioning_state = None
self.service_type_name = service_type_name
self.partition_description = partition_description
self.service_package_activation_mode = service_package_activation_mode
+ self.service_dns_name = service_dns_name
self.service_kind = None
self.service_kind = 'ServiceResourceProperties'
@@ -2541,6 +3305,30 @@ 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.
@@ -2582,6 +3370,10 @@ class StatefulServiceProperties(ServiceResourceProperties):
package. Possible values include: 'SharedProcess', 'ExclusiveProcess'
:type service_package_activation_mode: str or
~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode
+ :param service_dns_name: Dns name used for the service. If this is
+ specified, then the service can be accessed via its DNS name instead of
+ service name.
+ :type service_dns_name: str
:param service_kind: Required. Constant filled by server.
:type service_kind: str
:param has_persisted_state: A flag indicating whether this is a persistent
@@ -2623,6 +3415,7 @@ class StatefulServiceProperties(ServiceResourceProperties):
'service_type_name': {'key': 'serviceTypeName', 'type': 'str'},
'partition_description': {'key': 'partitionDescription', 'type': 'PartitionSchemeDescription'},
'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'},
+ 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'},
'service_kind': {'key': 'serviceKind', 'type': 'str'},
'has_persisted_state': {'key': 'hasPersistedState', 'type': 'bool'},
'target_replica_set_size': {'key': 'targetReplicaSetSize', 'type': 'int'},
@@ -2632,8 +3425,8 @@ class StatefulServiceProperties(ServiceResourceProperties):
'stand_by_replica_keep_duration': {'key': 'standByReplicaKeepDuration', 'type': 'iso-8601'},
}
- def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, has_persisted_state: bool=None, target_replica_set_size: int=None, min_replica_set_size: int=None, replica_restart_wait_duration=None, quorum_loss_wait_duration=None, stand_by_replica_keep_duration=None, **kwargs) -> None:
- super(StatefulServiceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, service_type_name=service_type_name, partition_description=partition_description, service_package_activation_mode=service_package_activation_mode, **kwargs)
+ def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, service_dns_name: str=None, has_persisted_state: bool=None, target_replica_set_size: int=None, min_replica_set_size: int=None, replica_restart_wait_duration=None, quorum_loss_wait_duration=None, stand_by_replica_keep_duration=None, **kwargs) -> None:
+ super(StatefulServiceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, service_type_name=service_type_name, partition_description=partition_description, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, **kwargs)
self.has_persisted_state = has_persisted_state
self.target_replica_set_size = target_replica_set_size
self.min_replica_set_size = min_replica_set_size
@@ -2760,10 +3553,24 @@ class StatelessServiceProperties(ServiceResourceProperties):
package. Possible values include: 'SharedProcess', 'ExclusiveProcess'
:type service_package_activation_mode: str or
~azure.mgmt.servicefabric.models.ArmServicePackageActivationMode
+ :param service_dns_name: Dns name used for the service. If this is
+ specified, then the service can be accessed via its DNS name instead of
+ service name.
+ :type service_dns_name: str
:param service_kind: Required. Constant filled by server.
:type service_kind: str
:param instance_count: The instance count.
:type instance_count: int
+ :param instance_close_delay_duration: Delay duration for RequestDrain
+ feature to ensures that the endpoint advertised by the stateless instance
+ is removed before the delay starts prior to closing the instance. This
+ delay enables existing requests to drain gracefully before the instance
+ actually goes down
+ (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview).
+ It is first interpreted as a string representing an ISO 8601 duration. If
+ that fails, then it is interpreted as a number representing the total
+ number of milliseconds.
+ :type instance_close_delay_duration: str
"""
_validation = {
@@ -2782,13 +3589,16 @@ class StatelessServiceProperties(ServiceResourceProperties):
'service_type_name': {'key': 'serviceTypeName', 'type': 'str'},
'partition_description': {'key': 'partitionDescription', 'type': 'PartitionSchemeDescription'},
'service_package_activation_mode': {'key': 'servicePackageActivationMode', 'type': 'str'},
+ 'service_dns_name': {'key': 'serviceDnsName', 'type': 'str'},
'service_kind': {'key': 'serviceKind', 'type': 'str'},
'instance_count': {'key': 'instanceCount', 'type': 'int'},
+ 'instance_close_delay_duration': {'key': 'instanceCloseDelayDuration', 'type': 'str'},
}
- def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, instance_count: int=None, **kwargs) -> None:
- super(StatelessServiceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, service_type_name=service_type_name, partition_description=partition_description, service_package_activation_mode=service_package_activation_mode, **kwargs)
+ def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, service_type_name: str=None, partition_description=None, service_package_activation_mode=None, service_dns_name: str=None, instance_count: int=None, instance_close_delay_duration: str=None, **kwargs) -> None:
+ super(StatelessServiceProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, service_type_name=service_type_name, partition_description=partition_description, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, **kwargs)
self.instance_count = instance_count
+ self.instance_close_delay_duration = instance_close_delay_duration
self.service_kind = 'Stateless'
@@ -2822,6 +3632,16 @@ class StatelessServiceUpdateProperties(ServiceResourceUpdateProperties):
:type service_kind: str
:param instance_count: The instance count.
:type instance_count: int
+ :param instance_close_delay_duration: Delay duration for RequestDrain
+ feature to ensures that the endpoint advertised by the stateless instance
+ is removed before the delay starts prior to closing the instance. This
+ delay enables existing requests to drain gracefully before the instance
+ actually goes down
+ (https://docs.microsoft.com/en-us/azure/service-fabric/service-fabric-application-upgrade-advanced#avoid-connection-drops-during-stateless-service-planned-downtime-preview).
+ It is first interpreted as a string representing an ISO 8601 duration. If
+ that fails, then it is interpreted as a number representing the total
+ number of milliseconds.
+ :type instance_close_delay_duration: str
"""
_validation = {
@@ -2837,14 +3657,32 @@ class StatelessServiceUpdateProperties(ServiceResourceUpdateProperties):
'default_move_cost': {'key': 'defaultMoveCost', 'type': 'str'},
'service_kind': {'key': 'serviceKind', 'type': 'str'},
'instance_count': {'key': 'instanceCount', 'type': 'int'},
+ 'instance_close_delay_duration': {'key': 'instanceCloseDelayDuration', 'type': 'str'},
}
- def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, instance_count: int=None, **kwargs) -> None:
+ def __init__(self, *, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, instance_count: int=None, instance_close_delay_duration: str=None, **kwargs) -> None:
super(StatelessServiceUpdateProperties, self).__init__(placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, service_load_metrics=service_load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, **kwargs)
self.instance_count = instance_count
+ self.instance_close_delay_duration = instance_close_delay_duration
self.service_kind = 'Stateless'
+class SubResource(Model):
+ """Azure resource identifier.
+
+ :param id: Azure resource identifier.
+ :type id: str
+ """
+
+ _attribute_map = {
+ 'id': {'key': 'id', 'type': 'str'},
+ }
+
+ def __init__(self, *, id: str=None, **kwargs) -> None:
+ super(SubResource, self).__init__(**kwargs)
+ self.id = id
+
+
class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription):
"""Describes a partitioning scheme where an integer range is allocated evenly
across a number of partitions.
@@ -2857,11 +3695,11 @@ class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription):
:type count: int
:param low_key: Required. String indicating the lower bound of the
partition key range that
- should be split between the partition ‘Count’
+ should be split between the partition ‘count’
:type low_key: str
:param high_key: Required. String indicating the upper bound of the
partition key range that
- should be split between the partition ‘Count’
+ should be split between the partition ‘count’
:type high_key: str
"""
@@ -2874,9 +3712,9 @@ class UniformInt64RangePartitionSchemeDescription(PartitionSchemeDescription):
_attribute_map = {
'partition_scheme': {'key': 'partitionScheme', 'type': 'str'},
- 'count': {'key': 'Count', 'type': 'int'},
- 'low_key': {'key': 'LowKey', 'type': 'str'},
- 'high_key': {'key': 'HighKey', 'type': 'str'},
+ 'count': {'key': 'count', 'type': 'int'},
+ 'low_key': {'key': 'lowKey', 'type': 'str'},
+ 'high_key': {'key': 'highKey', 'type': 'str'},
}
def __init__(self, *, count: int, low_key: str, high_key: str, **kwargs) -> None:
@@ -2885,3 +3723,181 @@ def __init__(self, *, count: int, low_key: str, high_key: str, **kwargs) -> None
self.low_key = low_key
self.high_key = high_key
self.partition_scheme = 'UniformInt64Range'
+
+
+class UserAssignedIdentity(Model):
+ """UserAssignedIdentity.
+
+ Variables are only populated by the server, and will be ignored when
+ sending a request.
+
+ :ivar principal_id: The principal id of user assigned identity.
+ :vartype principal_id: str
+ :ivar client_id: The client id of user assigned identity.
+ :vartype client_id: str
+ """
+
+ _validation = {
+ 'principal_id': {'readonly': True},
+ 'client_id': {'readonly': True},
+ }
+
+ _attribute_map = {
+ 'principal_id': {'key': 'principalId', 'type': 'str'},
+ 'client_id': {'key': 'clientId', 'type': 'str'},
+ }
+
+ def __init__(self, **kwargs) -> None:
+ super(UserAssignedIdentity, self).__init__(**kwargs)
+ self.principal_id = None
+ self.client_id = None
+
+
+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
+ """
+
+ _validation = {
+ 'certificate_url': {'required': True},
+ 'certificate_store': {'required': True},
+ }
+
+ _attribute_map = {
+ 'certificate_url': {'key': 'certificateUrl', 'type': 'str'},
+ 'certificate_store': {'key': 'certificateStore', '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
+
+
+class VaultSecretGroup(Model):
+ """Specifies set of certificates that should be installed onto the virtual
+ machines.
+
+ 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]
+ """
+
+ _validation = {
+ 'source_vault': {'required': True},
+ 'vault_certificates': {'required': True},
+ }
+
+ _attribute_map = {
+ 'source_vault': {'key': 'sourceVault', 'type': 'SubResource'},
+ 'vault_certificates': {'key': 'vaultCertificates', 'type': '[VaultCertificate]'},
+ }
+
+ def __init__(self, *, source_vault, vault_certificates, **kwargs) -> None:
+ super(VaultSecretGroup, self).__init__(**kwargs)
+ self.source_vault = source_vault
+ self.vault_certificates = vault_certificates
+
+
+class VMSSExtension(Model):
+ """Specifies set of extensions that should be installed onto the virtual
+ machines.
+
+ 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]
+ """
+
+ _validation = {
+ 'name': {'required': True},
+ 'publisher': {'required': True},
+ 'type': {'required': True},
+ 'type_handler_version': {'required': True},
+ 'provisioning_state': {'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]'},
+ }
+
+ 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
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 dc34c7266213..4f09940f1239 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,3 +25,29 @@ 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 166593097003..f107caa3acbf 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_service_fabric_management_client_enums.py
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/models/_service_fabric_management_client_enums.py
@@ -20,12 +20,28 @@ class ProvisioningState(str, Enum):
canceled = "Canceled"
+class ManagedIdentityType(str, Enum):
+
+ system_assigned = "SystemAssigned" #: Indicates that system assigned identity is associated with the resource.
+ user_assigned = "UserAssigned" #: Indicates that user assigned identity is associated with the resource.
+ system_assigned_user_assigned = "SystemAssigned, UserAssigned" #: Indicates that both system assigned and user assigned identity are associated with the resource.
+ none = "None" #: Indicates that no identity is associated with the resource.
+
+
class ArmUpgradeFailureAction(str, Enum):
rollback = "Rollback" #: Indicates that a rollback of the upgrade will be performed by Service Fabric if the upgrade fails.
manual = "Manual" #: Indicates that a manual repair will need to be performed by the administrator if the upgrade fails. Service Fabric will not proceed to the next upgrade domain automatically.
+class RollingUpgradeMode(str, Enum):
+
+ invalid = "Invalid" #: Indicates the upgrade mode is invalid. All Service Fabric enumerations have the invalid type. The value is zero.
+ unmonitored_auto = "UnmonitoredAuto" #: The upgrade will proceed automatically without performing any health monitoring. The value is 1
+ unmonitored_manual = "UnmonitoredManual" #: The upgrade will stop after completing each upgrade domain, giving the opportunity to manually monitor health before proceeding. The value is 2
+ monitored = "Monitored" #: The upgrade will stop after completing each upgrade domain and automatically monitor health before proceeding. The value is 3
+
+
class ServiceCorrelationScheme(str, Enum):
invalid = "Invalid" #: An invalid correlation scheme. Cannot be used. The value is zero.
@@ -79,3 +95,16 @@ 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 5599adce7c94..8c978f4c4b30 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,6 +16,9 @@
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',
@@ -25,4 +28,7 @@
'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 4328ce62ea90..48a4e86d7fd3 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_type_versions_operations.py
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_type_versions_operations.py
@@ -26,7 +26,7 @@ class ApplicationTypeVersionsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-03-01" for this specification. Constant value: "2019-03-01".
+ :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2020-03-01" for this specification. Constant value: "2020-03-01".
"""
models = models
@@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2019-03-01"
+ self.api_version = "2020-03-01"
self.config = config
diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_types_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_types_operations.py
index bd3b8ed9b9cf..3d7f1765f41d 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_types_operations.py
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_application_types_operations.py
@@ -26,7 +26,7 @@ class ApplicationTypesOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-03-01" for this specification. Constant value: "2019-03-01".
+ :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2020-03-01" for this specification. Constant value: "2020-03-01".
"""
models = models
@@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2019-03-01"
+ self.api_version = "2020-03-01"
self.config = config
diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_applications_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_applications_operations.py
index cc5d71a046af..94591a0635e3 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_applications_operations.py
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_applications_operations.py
@@ -26,7 +26,7 @@ class ApplicationsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-03-01" for this specification. Constant value: "2019-03-01".
+ :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2020-03-01" for this specification. Constant value: "2020-03-01".
"""
models = models
@@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2019-03-01"
+ self.api_version = "2020-03-01"
self.config = config
diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_cluster_versions_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_cluster_versions_operations.py
index cba7391cba03..193c1b1b067f 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_cluster_versions_operations.py
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_cluster_versions_operations.py
@@ -25,7 +25,7 @@ class ClusterVersionsOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-03-01" for this specification. Constant value: "2019-03-01".
+ :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2020-03-01" for this specification. Constant value: "2020-03-01".
"""
models = models
@@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2019-03-01"
+ self.api_version = "2020-03-01"
self.config = config
diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_clusters_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_clusters_operations.py
index f179db760c8f..8ec6e438e21c 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_clusters_operations.py
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_clusters_operations.py
@@ -26,7 +26,7 @@ class ClustersOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-03-01" for this specification. Constant value: "2019-03-01".
+ :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2020-03-01" for this specification. Constant value: "2020-03-01".
"""
models = models
@@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2019-03-01"
+ self.api_version = "2020-03-01"
self.config = config
diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_managed_cluster_versions_operations.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_managed_cluster_versions_operations.py
new file mode 100644
index 000000000000..457f48d5ae51
--- /dev/null
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_managed_cluster_versions_operations.py
@@ -0,0 +1,106 @@
+# 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
new file mode 100644
index 000000000000..85aefb7b0ca4
--- /dev/null
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_managed_clusters_operations.py
@@ -0,0 +1,538 @@
+# 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
new file mode 100644
index 000000000000..08a480546e41
--- /dev/null
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_node_types_operations.py
@@ -0,0 +1,773 @@
+# 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 b253a18ae3f9..e57ba6d5a338 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_services_operations.py
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/operations/_services_operations.py
@@ -26,7 +26,7 @@ class ServicesOperations(object):
:param config: Configuration of service client.
:param serializer: An object model serializer.
:param deserializer: An object model deserializer.
- :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2019-03-01" for this specification. Constant value: "2019-03-01".
+ :ivar api_version: The version of the Service Fabric resource provider API. This is a required parameter and it's value must be "2020-03-01" for this specification. Constant value: "2020-03-01".
"""
models = models
@@ -36,7 +36,7 @@ def __init__(self, client, config, serializer, deserializer):
self._client = client
self._serialize = serializer
self._deserialize = deserializer
- self.api_version = "2019-03-01"
+ self.api_version = "2020-03-01"
self.config = config
diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/version.py b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/version.py
index 85da2c00c1a6..266f5a486d79 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/version.py
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/azure/mgmt/servicefabric/version.py
@@ -9,5 +9,5 @@
# regenerated.
# --------------------------------------------------------------------------
-VERSION = "0.4.0"
+VERSION = "0.5.0"
diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/setup.py b/sdk/servicefabric/azure-mgmt-servicefabric/setup.py
index db4169788336..af643555b211 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/setup.py
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/setup.py
@@ -36,7 +36,9 @@
pass
# Version extraction inspired from 'requests'
-with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd:
+with open(os.path.join(package_folder_path, 'version.py')
+ if os.path.exists(os.path.join(package_folder_path, 'version.py'))
+ else os.path.join(package_folder_path, '_version.py'), 'r') as fd:
version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]',
fd.read(), re.MULTILINE).group(1)
@@ -67,6 +69,7 @@
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
+ 'Programming Language :: Python :: 3.8',
'License :: OSI Approved :: MIT License',
],
zip_safe=False,
diff --git a/sdk/servicefabric/azure-mgmt-servicefabric/tests/recordings/test_cli_mgmt_servicefabric.test_servicefabric.yaml b/sdk/servicefabric/azure-mgmt-servicefabric/tests/recordings/test_cli_mgmt_servicefabric.test_servicefabric.yaml
index f43e4c5894fa..a7c9830b195e 100644
--- a/sdk/servicefabric/azure-mgmt-servicefabric/tests/recordings/test_cli_mgmt_servicefabric.test_servicefabric.yaml
+++ b/sdk/servicefabric/azure-mgmt-servicefabric/tests/recordings/test_cli_mgmt_servicefabric.test_servicefabric.yaml
@@ -23,22 +23,22 @@ interactions:
Content-Type:
- application/json; charset=utf-8
User-Agent:
- - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
- msrest_azure/0.6.2 azure-mgmt-servicefabric/0.4.0 Azure-SDK-For-Python
+ - python/3.6.8 (Linux-4.19.121-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic)
+ msrest/0.6.16 msrest_azure/0.4.34 azure-mgmt-servicefabric/0.5.0 Azure-SDK-For-Python
accept-language:
- en-US
method: PUT
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_servicefabric_test_servicefabricbc4212c8/providers/Microsoft.ServiceFabric/clusters/cluster?api-version=2019-03-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_servicefabric_test_servicefabricbc4212c8/providers/Microsoft.ServiceFabric/clusters/cluster?api-version=2020-03-01
response:
body:
string: "{\r\n \"type\": \"Microsoft.ServiceFabric/clusters\",\r\n \"location\"\
: \"eastus\",\r\n \"id\": \"/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/test_cli_mgmt_servicefabric_test_servicefabricbc4212c8/providers/Microsoft.ServiceFabric/clusters/cluster\"\
- ,\r\n \"name\": \"cluster\",\r\n \"tags\": {},\r\n \"etag\": \"W/\\\"637170011625817427\\\
+ ,\r\n \"name\": \"cluster\",\r\n \"tags\": {},\r\n \"etag\": \"W/\\\"637315183269303595\\\
\"\",\r\n \"properties\": {\r\n \"provisioningState\": \"Succeeded\",\r\
- \n \"clusterId\": \"d48e3e8b-bff1-440e-84e1-9c8167828df5\",\r\n \"clusterCodeVersion\"\
- : \"6.5.676.9590\",\r\n \"clusterState\": \"WaitingForNodes\",\r\n \"\
+ \n \"clusterId\": \"4148ade4-c178-476e-b0b4-183a63941823\",\r\n \"clusterCodeVersion\"\
+ : \"7.1.417.9590\",\r\n \"clusterState\": \"WaitingForNodes\",\r\n \"\
managementEndpoint\": \"http://myCluster.eastus.cloudapp.azure.com:19080\"\
- ,\r\n \"clusterEndpoint\": \"https://eastus.servicefabric.azure.com/runtime/clusters/d48e3e8b-bff1-440e-84e1-9c8167828df5\"\
+ ,\r\n \"clusterEndpoint\": \"https://eastus.servicefabric.azure.com/runtime/clusters/4148ade4-c178-476e-b0b4-183a63941823\"\
,\r\n \"clientCertificateThumbprints\": [],\r\n \"clientCertificateCommonNames\"\
: [],\r\n \"fabricSettings\": [\r\n {\r\n \"name\": \"UpgradeService\"\
,\r\n \"parameters\": [\r\n {\r\n \"name\": \"\
@@ -55,22 +55,21 @@ interactions:
: \"\",\r\n \"secondaryAccessKey\": \"\",\r\n \"protectedAccountKeyName\"\
: \"StorageAccountKey1\",\r\n \"blobEndpoint\": \"https://diag.blob.core.windows.net/\"\
,\r\n \"queueEndpoint\": \"https://diag.queue.core.windows.net/\",\r\n\
- \ \"tableEndpoint\": \"https://diag.table.core.windows.net/\"\r\n \
- \ },\r\n \"upgradeMode\": \"Automatic\",\r\n \"availableClusterVersions\"\
- : [\r\n {\r\n \"codeVersion\": \"6.5.676.9590\",\r\n \"\
- supportExpiryUtc\": \"2020-05-01T00:00:00\",\r\n \"environment\": \"\
- Windows\"\r\n },\r\n {\r\n \"codeVersion\": \"7.0.457.9590\"\
- ,\r\n \"supportExpiryUtc\": \"9999-12-31T23:59:59.9999999\",\r\n \
- \ \"environment\": \"Windows\"\r\n }\r\n ]\r\n }\r\n}"
+ \ \"tableEndpoint\": \"https://diag.table.core.windows.net/\",\r\n \
+ \ \"protectedAccountKeyName2\": \"\"\r\n },\r\n \"upgradeMode\":\
+ \ \"Automatic\",\r\n \"availableClusterVersions\": [\r\n {\r\n \
+ \ \"codeVersion\": \"7.1.417.9590\",\r\n \"supportExpiryUtc\":\
+ \ \"9999-12-31T23:59:59.9999999\",\r\n \"environment\": \"Windows\"\
+ \r\n }\r\n ]\r\n }\r\n}"
headers:
cache-control:
- no-cache
content-length:
- - '2310'
+ - '2204'
content-type:
- application/json
date:
- - Tue, 11 Feb 2020 06:59:23 GMT
+ - Tue, 28 Jul 2020 07:32:08 GMT
expires:
- '-1'
pragma:
@@ -86,7 +85,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- - '1188'
+ - '1199'
status:
code: 200
message: OK
@@ -102,12 +101,12 @@ interactions:
Content-Length:
- '0'
User-Agent:
- - python/3.6.9 (Linux-4.9.184-linuxkit-x86_64-with-Ubuntu-18.04-bionic) msrest/0.6.10
- msrest_azure/0.6.2 azure-mgmt-servicefabric/0.4.0 Azure-SDK-For-Python
+ - python/3.6.8 (Linux-4.19.121-microsoft-standard-x86_64-with-Ubuntu-18.04-bionic)
+ msrest/0.6.16 msrest_azure/0.4.34 azure-mgmt-servicefabric/0.5.0 Azure-SDK-For-Python
accept-language:
- en-US
method: DELETE
- uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_servicefabric_test_servicefabricbc4212c8/providers/Microsoft.ServiceFabric/clusters/cluster?api-version=2019-03-01
+ uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_cli_mgmt_servicefabric_test_servicefabricbc4212c8/providers/Microsoft.ServiceFabric/clusters/cluster?api-version=2020-03-01
response:
body:
string: ''
@@ -117,7 +116,7 @@ interactions:
content-length:
- '0'
date:
- - Tue, 11 Feb 2020 06:59:28 GMT
+ - Tue, 28 Jul 2020 07:32:13 GMT
expires:
- '-1'
pragma:
@@ -129,7 +128,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-deletes:
- - '14996'
+ - '14999'
status:
code: 200
message: OK