diff --git a/sdk/servicefabric/azure-servicefabric/MANIFEST.in b/sdk/servicefabric/azure-servicefabric/MANIFEST.in index cad40fe06b5f..3db884ff9656 100644 --- a/sdk/servicefabric/azure-servicefabric/MANIFEST.in +++ b/sdk/servicefabric/azure-servicefabric/MANIFEST.in @@ -1,3 +1,4 @@ +include _meta.json recursive-include tests *.py *.yaml include *.md include azure/__init__.py diff --git a/sdk/servicefabric/azure-servicefabric/_meta.json b/sdk/servicefabric/azure-servicefabric/_meta.json new file mode 100644 index 000000000000..fab0fd4a1f69 --- /dev/null +++ b/sdk/servicefabric/azure-servicefabric/_meta.json @@ -0,0 +1,8 @@ +{ + "autorest": "V2", + "use": "@microsoft.azure/autorest.python@~4.0.71", + "commit": "70626b932d16a97361673e0bcba7570284fe0813", + "repository_url": "https://github.com/Azure/azure-rest-api-specs", + "autorest_command": "autorest specification/servicefabric/data-plane/readme.md --keep-version-file --multiapi --no-async --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --use=@microsoft.azure/autorest.python@~4.0.71 --version=V2", + "readme": "specification/servicefabric/data-plane/readme.md" +} \ No newline at end of file diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/_service_fabric_client_ap_is.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/_service_fabric_client_ap_is.py index 92dba0aa8b7c..ce4c26b4399f 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/_service_fabric_client_ap_is.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/_service_fabric_client_ap_is.py @@ -64,7 +64,7 @@ def __init__( super(ServiceFabricClientAPIs, 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 = '7.1.0.45' + self.api_version = '8.1' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/__init__.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/__init__.py index 191a733e5688..42520ef26d84 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/__init__.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/__init__.py @@ -28,6 +28,7 @@ from ._models_py3 import ApplicationHealthPolicies from ._models_py3 import ApplicationHealthPolicy from ._models_py3 import ApplicationHealthPolicyMapItem + from ._models_py3 import ApplicationHealthPolicyMapObject from ._models_py3 import ApplicationHealthReportExpiredEvent from ._models_py3 import ApplicationHealthState from ._models_py3 import ApplicationHealthStateChunk @@ -52,6 +53,7 @@ from ._models_py3 import ApplicationTypeImageStorePath from ._models_py3 import ApplicationTypeInfo from ._models_py3 import ApplicationTypeManifest + from ._models_py3 import ApplicationUpdateDescription from ._models_py3 import ApplicationUpgradeCompletedEvent from ._models_py3 import ApplicationUpgradeDescription from ._models_py3 import ApplicationUpgradeDomainCompletedEvent @@ -183,6 +185,7 @@ from ._models_py3 import DisableBackupDescription from ._models_py3 import DiskInfo from ._models_py3 import DoublePropertyValue + from ._models_py3 import DsmsAzureBlobBackupStorageDescription from ._models_py3 import EnableBackupDescription from ._models_py3 import EndpointProperties from ._models_py3 import EndpointRef @@ -237,17 +240,23 @@ from ._models_py3 import ImageStoreCopyDescription from ._models_py3 import ImageStoreInfo from ._models_py3 import InlinedValueSecretResourceProperties + from ._models_py3 import InstanceLifecycleDescription from ._models_py3 import Int64PropertyValue from ._models_py3 import Int64RangePartitionInformation from ._models_py3 import InvokeDataLossResult from ._models_py3 import InvokeQuorumLossResult from ._models_py3 import KeyValueStoreReplicaStatus + from ._models_py3 import LoadedPartitionInformationQueryDescription + from ._models_py3 import LoadedPartitionInformationResult + from ._models_py3 import LoadedPartitionInformationResultList from ._models_py3 import LoadMetricInformation from ._models_py3 import LoadMetricReport from ._models_py3 import LoadMetricReportInfo from ._models_py3 import LocalNetworkResourceProperties from ._models_py3 import ManagedApplicationIdentity from ._models_py3 import ManagedApplicationIdentityDescription + from ._models_py3 import ManagedIdentityAzureBlobBackupStorageDescription + from ._models_py3 import MetricLoadDescription from ._models_py3 import MonitoringPolicyDescription from ._models_py3 import NameDescription from ._models_py3 import NamedPartitionInformation @@ -286,8 +295,11 @@ from ._models_py3 import NodeRepairTargetDescription from ._models_py3 import NodeResult from ._models_py3 import NodesHealthEvaluation + from ._models_py3 import NodeTagsDescription from ._models_py3 import NodeTransitionProgress from ._models_py3 import NodeTransitionResult + from ._models_py3 import NodeTypeHealthPolicyMapItem + from ._models_py3 import NodeTypeNodesHealthEvaluation from ._models_py3 import NodeUpEvent from ._models_py3 import NodeUpgradeProgressInfo from ._models_py3 import OperationStatus @@ -313,6 +325,7 @@ from ._models_py3 import PagedServiceReplicaDescriptionList from ._models_py3 import PagedServiceResourceDescriptionList from ._models_py3 import PagedSubNameInfoList + from ._models_py3 import PagedUpdatePartitionLoadResultList from ._models_py3 import PagedVolumeResourceDescriptionList from ._models_py3 import PartitionAnalysisEvent from ._models_py3 import PartitionBackupConfigurationInfo @@ -329,6 +342,7 @@ from ._models_py3 import PartitionInformation from ._models_py3 import PartitionInstanceCountScaleMechanism from ._models_py3 import PartitionLoadInformation + from ._models_py3 import PartitionMetricLoadDescription from ._models_py3 import PartitionNewHealthReportEvent from ._models_py3 import PartitionPrimaryMoveAnalysisEvent from ._models_py3 import PartitionQuorumLossProgress @@ -377,6 +391,8 @@ from ._models_py3 import ReplicaHealthStateChunkList from ._models_py3 import ReplicaHealthStateFilter from ._models_py3 import ReplicaInfo + from ._models_py3 import ReplicaLifecycleDescription + from ._models_py3 import ReplicaMetricLoadDescription from ._models_py3 import ReplicasHealthEvaluation from ._models_py3 import ReplicaStatusBase from ._models_py3 import ReplicatorQueueStatus @@ -433,6 +449,7 @@ from ._models_py3 import ServiceNameInfo from ._models_py3 import ServiceNewHealthReportEvent from ._models_py3 import ServicePartitionInfo + from ._models_py3 import ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription from ._models_py3 import ServicePlacementInvalidDomainPolicyDescription from ._models_py3 import ServicePlacementNonPartiallyPlaceServicePolicyDescription from ._models_py3 import ServicePlacementPolicyDescription @@ -491,7 +508,9 @@ from ._models_py3 import UnprovisionApplicationTypeDescriptionInfo from ._models_py3 import UnprovisionFabricDescription from ._models_py3 import UpdateClusterUpgradeDescription + from ._models_py3 import UpdatePartitionLoadResult from ._models_py3 import UpgradeDomainDeltaNodesCheckHealthEvaluation + from ._models_py3 import UpgradeDomainDeployedApplicationsHealthEvaluation from ._models_py3 import UpgradeDomainInfo from ._models_py3 import UpgradeDomainNodesHealthEvaluation from ._models_py3 import UpgradeOrchestrationServiceState @@ -528,6 +547,7 @@ from ._models import ApplicationHealthPolicies from ._models import ApplicationHealthPolicy from ._models import ApplicationHealthPolicyMapItem + from ._models import ApplicationHealthPolicyMapObject from ._models import ApplicationHealthReportExpiredEvent from ._models import ApplicationHealthState from ._models import ApplicationHealthStateChunk @@ -552,6 +572,7 @@ from ._models import ApplicationTypeImageStorePath from ._models import ApplicationTypeInfo from ._models import ApplicationTypeManifest + from ._models import ApplicationUpdateDescription from ._models import ApplicationUpgradeCompletedEvent from ._models import ApplicationUpgradeDescription from ._models import ApplicationUpgradeDomainCompletedEvent @@ -683,6 +704,7 @@ from ._models import DisableBackupDescription from ._models import DiskInfo from ._models import DoublePropertyValue + from ._models import DsmsAzureBlobBackupStorageDescription from ._models import EnableBackupDescription from ._models import EndpointProperties from ._models import EndpointRef @@ -737,17 +759,23 @@ from ._models import ImageStoreCopyDescription from ._models import ImageStoreInfo from ._models import InlinedValueSecretResourceProperties + from ._models import InstanceLifecycleDescription from ._models import Int64PropertyValue from ._models import Int64RangePartitionInformation from ._models import InvokeDataLossResult from ._models import InvokeQuorumLossResult from ._models import KeyValueStoreReplicaStatus + from ._models import LoadedPartitionInformationQueryDescription + from ._models import LoadedPartitionInformationResult + from ._models import LoadedPartitionInformationResultList from ._models import LoadMetricInformation from ._models import LoadMetricReport from ._models import LoadMetricReportInfo from ._models import LocalNetworkResourceProperties from ._models import ManagedApplicationIdentity from ._models import ManagedApplicationIdentityDescription + from ._models import ManagedIdentityAzureBlobBackupStorageDescription + from ._models import MetricLoadDescription from ._models import MonitoringPolicyDescription from ._models import NameDescription from ._models import NamedPartitionInformation @@ -786,8 +814,11 @@ from ._models import NodeRepairTargetDescription from ._models import NodeResult from ._models import NodesHealthEvaluation + from ._models import NodeTagsDescription from ._models import NodeTransitionProgress from ._models import NodeTransitionResult + from ._models import NodeTypeHealthPolicyMapItem + from ._models import NodeTypeNodesHealthEvaluation from ._models import NodeUpEvent from ._models import NodeUpgradeProgressInfo from ._models import OperationStatus @@ -813,6 +844,7 @@ from ._models import PagedServiceReplicaDescriptionList from ._models import PagedServiceResourceDescriptionList from ._models import PagedSubNameInfoList + from ._models import PagedUpdatePartitionLoadResultList from ._models import PagedVolumeResourceDescriptionList from ._models import PartitionAnalysisEvent from ._models import PartitionBackupConfigurationInfo @@ -829,6 +861,7 @@ from ._models import PartitionInformation from ._models import PartitionInstanceCountScaleMechanism from ._models import PartitionLoadInformation + from ._models import PartitionMetricLoadDescription from ._models import PartitionNewHealthReportEvent from ._models import PartitionPrimaryMoveAnalysisEvent from ._models import PartitionQuorumLossProgress @@ -877,6 +910,8 @@ from ._models import ReplicaHealthStateChunkList from ._models import ReplicaHealthStateFilter from ._models import ReplicaInfo + from ._models import ReplicaLifecycleDescription + from ._models import ReplicaMetricLoadDescription from ._models import ReplicasHealthEvaluation from ._models import ReplicaStatusBase from ._models import ReplicatorQueueStatus @@ -933,6 +968,7 @@ from ._models import ServiceNameInfo from ._models import ServiceNewHealthReportEvent from ._models import ServicePartitionInfo + from ._models import ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription from ._models import ServicePlacementInvalidDomainPolicyDescription from ._models import ServicePlacementNonPartiallyPlaceServicePolicyDescription from ._models import ServicePlacementPolicyDescription @@ -991,7 +1027,9 @@ from ._models import UnprovisionApplicationTypeDescriptionInfo from ._models import UnprovisionFabricDescription from ._models import UpdateClusterUpgradeDescription + from ._models import UpdatePartitionLoadResult from ._models import UpgradeDomainDeltaNodesCheckHealthEvaluation + from ._models import UpgradeDomainDeployedApplicationsHealthEvaluation from ._models import UpgradeDomainInfo from ._models import UpgradeDomainNodesHealthEvaluation from ._models import UpgradeOrchestrationServiceState @@ -1057,6 +1095,7 @@ HostType, ImageRegistryPasswordType, ImpactLevel, + ManagedIdentityType, MoveCost, NetworkKind, NodeDeactivationIntent, @@ -1069,6 +1108,7 @@ OperatingSystemType, OperationState, OperationType, + Ordering, PackageSharingPolicyScope, PartitionAccessStatus, PartitionScheme, @@ -1141,6 +1181,7 @@ 'ApplicationHealthPolicies', 'ApplicationHealthPolicy', 'ApplicationHealthPolicyMapItem', + 'ApplicationHealthPolicyMapObject', 'ApplicationHealthReportExpiredEvent', 'ApplicationHealthState', 'ApplicationHealthStateChunk', @@ -1165,6 +1206,7 @@ 'ApplicationTypeImageStorePath', 'ApplicationTypeInfo', 'ApplicationTypeManifest', + 'ApplicationUpdateDescription', 'ApplicationUpgradeCompletedEvent', 'ApplicationUpgradeDescription', 'ApplicationUpgradeDomainCompletedEvent', @@ -1296,6 +1338,7 @@ 'DisableBackupDescription', 'DiskInfo', 'DoublePropertyValue', + 'DsmsAzureBlobBackupStorageDescription', 'EnableBackupDescription', 'EndpointProperties', 'EndpointRef', @@ -1350,17 +1393,23 @@ 'ImageStoreCopyDescription', 'ImageStoreInfo', 'InlinedValueSecretResourceProperties', + 'InstanceLifecycleDescription', 'Int64PropertyValue', 'Int64RangePartitionInformation', 'InvokeDataLossResult', 'InvokeQuorumLossResult', 'KeyValueStoreReplicaStatus', + 'LoadedPartitionInformationQueryDescription', + 'LoadedPartitionInformationResult', + 'LoadedPartitionInformationResultList', 'LoadMetricInformation', 'LoadMetricReport', 'LoadMetricReportInfo', 'LocalNetworkResourceProperties', 'ManagedApplicationIdentity', 'ManagedApplicationIdentityDescription', + 'ManagedIdentityAzureBlobBackupStorageDescription', + 'MetricLoadDescription', 'MonitoringPolicyDescription', 'NameDescription', 'NamedPartitionInformation', @@ -1399,8 +1448,11 @@ 'NodeRepairTargetDescription', 'NodeResult', 'NodesHealthEvaluation', + 'NodeTagsDescription', 'NodeTransitionProgress', 'NodeTransitionResult', + 'NodeTypeHealthPolicyMapItem', + 'NodeTypeNodesHealthEvaluation', 'NodeUpEvent', 'NodeUpgradeProgressInfo', 'OperationStatus', @@ -1426,6 +1478,7 @@ 'PagedServiceReplicaDescriptionList', 'PagedServiceResourceDescriptionList', 'PagedSubNameInfoList', + 'PagedUpdatePartitionLoadResultList', 'PagedVolumeResourceDescriptionList', 'PartitionAnalysisEvent', 'PartitionBackupConfigurationInfo', @@ -1442,6 +1495,7 @@ 'PartitionInformation', 'PartitionInstanceCountScaleMechanism', 'PartitionLoadInformation', + 'PartitionMetricLoadDescription', 'PartitionNewHealthReportEvent', 'PartitionPrimaryMoveAnalysisEvent', 'PartitionQuorumLossProgress', @@ -1490,6 +1544,8 @@ 'ReplicaHealthStateChunkList', 'ReplicaHealthStateFilter', 'ReplicaInfo', + 'ReplicaLifecycleDescription', + 'ReplicaMetricLoadDescription', 'ReplicasHealthEvaluation', 'ReplicaStatusBase', 'ReplicatorQueueStatus', @@ -1546,6 +1602,7 @@ 'ServiceNameInfo', 'ServiceNewHealthReportEvent', 'ServicePartitionInfo', + 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'ServicePlacementInvalidDomainPolicyDescription', 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'ServicePlacementPolicyDescription', @@ -1604,7 +1661,9 @@ 'UnprovisionApplicationTypeDescriptionInfo', 'UnprovisionFabricDescription', 'UpdateClusterUpgradeDescription', + 'UpdatePartitionLoadResult', 'UpgradeDomainDeltaNodesCheckHealthEvaluation', + 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainInfo', 'UpgradeDomainNodesHealthEvaluation', 'UpgradeOrchestrationServiceState', @@ -1646,6 +1705,7 @@ 'EntityKind', 'FabricEventKind', 'HealthEvaluationKind', + 'Ordering', 'NodeDeactivationIntent', 'NodeDeactivationStatus', 'NodeDeactivationTaskType', @@ -1693,6 +1753,7 @@ 'BackupSuspensionScope', 'RestoreState', 'BackupType', + 'ManagedIdentityType', 'BackupScheduleFrequencyType', 'DayOfWeek', 'BackupState', diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models.py index 6e0869fad2b6..b3314e3eb2ff 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models.py @@ -936,7 +936,8 @@ class HealthEvaluation(Model): ReplicasHealthEvaluation, ServiceHealthEvaluation, ServicesHealthEvaluation, SystemApplicationHealthEvaluation, UpgradeDomainDeltaNodesCheckHealthEvaluation, - UpgradeDomainNodesHealthEvaluation + UpgradeDomainDeployedApplicationsHealthEvaluation, + UpgradeDomainNodesHealthEvaluation, NodeTypeNodesHealthEvaluation All required parameters must be populated in order to send to Azure. @@ -964,7 +965,7 @@ class HealthEvaluation(Model): } _subtype_map = { - 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation'} + 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainDeployedApplications': 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation'} } def __init__(self, **kwargs): @@ -1115,6 +1116,32 @@ def __init__(self, **kwargs): self.value = kwargs.get('value', None) +class ApplicationHealthPolicyMapObject(Model): + """Represents the map of application health policies for a ServiceFabric + cluster upgrade. + + :param application_health_policy_map: Defines a map that contains specific + application health policies for different applications. + Each entry specifies as key the application name and as value an + ApplicationHealthPolicy used to evaluate the application health. + If an application is not specified in the map, the application health + evaluation uses the ApplicationHealthPolicy found in its application + manifest or the default application health policy (if no health policy is + defined in the manifest). + The map is empty by default. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__(self, **kwargs): + super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) + self.application_health_policy_map = kwargs.get('application_health_policy_map', None) + + class ApplicationHealthReportExpiredEvent(ApplicationEvent): """Application Health Report Expired event. @@ -1491,6 +1518,10 @@ class ApplicationInfo(Model): 'ServiceFabricApplicationDescription', 'Compose' :type application_definition_kind: str or ~azure.servicefabric.models.ApplicationDefinitionKind + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription """ _attribute_map = { @@ -1502,6 +1533,7 @@ class ApplicationInfo(Model): 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, 'health_state': {'key': 'HealthState', 'type': 'str'}, 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, } def __init__(self, **kwargs): @@ -1514,6 +1546,7 @@ def __init__(self, **kwargs): self.parameters = kwargs.get('parameters', None) self.health_state = kwargs.get('health_state', None) self.application_definition_kind = kwargs.get('application_definition_kind', None) + self.managed_application_identity = kwargs.get('managed_application_identity', None) class ApplicationLoadInfo(Model): @@ -2450,6 +2483,73 @@ def __init__(self, **kwargs): self.manifest = kwargs.get('manifest', None) +class ApplicationUpdateDescription(Model): + """Describes the parameters for updating an application instance. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + If flags are not specified for a certain property, the property will not + be updated even if the new value is provided. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. Exception is RemoveApplicationCapacity which cannot be + specified along with other parameters. + For example, if the provided value is 3 then the flags for MinimumNodes + (1) and MaximumNodes (2) are set. + - None - Does not indicate any other properties are set. The value is 0. + - MinimumNodes - Indicates whether the MinimumNodes property is set. The + value is 1. + - MaximumNodes - Indicates whether the MinimumNodes property is set. The + value is 2. + - ApplicationMetrics - Indicates whether the ApplicationMetrics property + is set. The value is 4. + :type flags: str + :param remove_application_capacity: Used to clear all parameters related + to Application Capacity for this application. | + It is not possible to specify this parameter together with other + Application Capacity parameters. Default value: False . + :type remove_application_capacity: bool + :param minimum_nodes: The minimum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. If this property is set to zero, no capacity will be reserved. The + value of this property cannot be more than the value of the MaximumNodes + property. + :type minimum_nodes: long + :param maximum_nodes: The maximum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. Default value: 0 . + :type maximum_nodes: long + :param application_metrics: List of application capacity metric + description. + :type application_metrics: + list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + + _validation = { + 'minimum_nodes': {'minimum': 0}, + 'maximum_nodes': {'minimum': 0}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'remove_application_capacity': {'key': 'RemoveApplicationCapacity', 'type': 'bool'}, + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + } + + def __init__(self, **kwargs): + super(ApplicationUpdateDescription, self).__init__(**kwargs) + self.flags = kwargs.get('flags', None) + self.remove_application_capacity = kwargs.get('remove_application_capacity', False) + self.minimum_nodes = kwargs.get('minimum_nodes', None) + self.maximum_nodes = kwargs.get('maximum_nodes', 0) + self.application_metrics = kwargs.get('application_metrics', None) + + class ApplicationUpgradeCompletedEvent(ApplicationEvent): """Application Upgrade Completed event. @@ -2583,6 +2683,10 @@ class ApplicationUpgradeDescription(Model): 4294967295, which indicates that the behavior will entirely depend on the delay configured in the stateless service description. :type instance_close_delay_duration_in_seconds: long + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription """ _validation = { @@ -2603,6 +2707,7 @@ class ApplicationUpgradeDescription(Model): 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, } def __init__(self, **kwargs): @@ -2618,6 +2723,7 @@ def __init__(self, **kwargs): self.monitoring_policy = kwargs.get('monitoring_policy', None) self.application_health_policy = kwargs.get('application_health_policy', None) self.instance_close_delay_duration_in_seconds = kwargs.get('instance_close_delay_duration_in_seconds', None) + self.managed_application_identity = kwargs.get('managed_application_identity', None) class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): @@ -3346,6 +3452,13 @@ class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): :param scale_interval_in_seconds: Required. The period in seconds on which a decision is made whether to scale or not. :type scale_interval_in_seconds: long + :param use_only_primary_load: Required. Flag determines whether only the + load of primary replica should be considered for scaling. + If set to true, then trigger will only consider the load of primary + replicas of stateful service. + If set to false, trigger will consider load of all replicas. + This parameter cannot be set to true for stateless service. + :type use_only_primary_load: bool """ _validation = { @@ -3354,6 +3467,7 @@ class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): 'lower_load_threshold': {'required': True}, 'upper_load_threshold': {'required': True}, 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + 'use_only_primary_load': {'required': True}, } _attribute_map = { @@ -3362,6 +3476,7 @@ class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, } def __init__(self, **kwargs): @@ -3370,6 +3485,7 @@ def __init__(self, **kwargs): self.lower_load_threshold = kwargs.get('lower_load_threshold', None) self.upper_load_threshold = kwargs.get('upper_load_threshold', None) self.scale_interval_in_seconds = kwargs.get('scale_interval_in_seconds', None) + self.use_only_primary_load = kwargs.get('use_only_primary_load', None) self.kind = 'AverageServiceLoad' @@ -3378,7 +3494,8 @@ class BackupStorageDescription(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: AzureBlobBackupStorageDescription, - FileShareBackupStorageDescription + FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, + ManagedIdentityAzureBlobBackupStorageDescription All required parameters must be populated in order to send to Azure. @@ -3398,7 +3515,7 @@ class BackupStorageDescription(Model): } _subtype_map = { - 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription'} + 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} } def __init__(self, **kwargs): @@ -5662,6 +5779,45 @@ class ClusterHealthPolicy(Model): HealthManager/EnableApplicationTypeHealthEvaluation. :type application_type_health_policy_map: list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] + :param node_type_health_policy_map: Defines a map with max percentage + unhealthy nodes for specific node types. + Each entry specifies as key the node type name and as value an integer + that represents the MaxPercentUnhealthyNodes percentage used to evaluate + the nodes of the specified node type. + The node type health policy map can be used during cluster health + evaluation to describe special node types. + They are evaluated against the percentages associated with their node type + name in the map. + Setting this has no impact on the global pool of nodes used for + MaxPercentUnhealthyNodes. + The node type health policy map is used only if the cluster manifest + enables node type health evaluation using the configuration entry for + HealthManager/EnableNodeTypeHealthEvaluation. + For example, given a cluster with many nodes of different types, with + important work hosted on node type "SpecialNodeType" that should not + tolerate any nodes down. + You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some + failures for all nodes, but for the node type "SpecialNodeType", set the + MaxPercentUnhealthyNodes to 0 by + setting the value in the key value pair in NodeTypeHealthPolicyMapItem. + The key is the node type name. + This way, as long as no nodes of type "SpecialNodeType" are in Error + state, + even if some of the many nodes in the global pool are in Error state, but + below the global unhealthy percentage, the cluster would be evaluated to + Warning. + A Warning health state does not impact cluster upgrade or other monitoring + triggered by Error health state. + But even one node of type SpecialNodeType in Error would make cluster + unhealthy (in Error rather than Warning/Ok), which triggers rollback or + pauses the cluster upgrade, depending on the upgrade configuration. + Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting + SpecialNodeType's max percent unhealthy nodes to 100, + with one node of type SpecialNodeType in Error state would still put the + cluster in an Error state, since the global restriction is more strict in + this case. + :type node_type_health_policy_map: + list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] """ _attribute_map = { @@ -5669,6 +5825,7 @@ class ClusterHealthPolicy(Model): 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, + 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, } def __init__(self, **kwargs): @@ -5677,6 +5834,7 @@ def __init__(self, **kwargs): self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', 0) self.max_percent_unhealthy_applications = kwargs.get('max_percent_unhealthy_applications', 0) self.application_type_health_policy_map = kwargs.get('application_type_health_policy_map', None) + self.node_type_health_policy_map = kwargs.get('node_type_health_policy_map', None) class ClusterHealthReportExpiredEvent(ClusterEvent): @@ -5981,17 +6139,10 @@ class ClusterUpgradeDescriptionObject(Model): evaluate the health of the cluster during a cluster upgrade. :type cluster_upgrade_health_policy: ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Defines a map that contains specific - application health policies for different applications. - Each entry specifies as key the application name and as value an - ApplicationHealthPolicy used to evaluate the application health. - If an application is not specified in the map, the application health - evaluation uses the ApplicationHealthPolicy found in its application - manifest or the default application health policy (if no health policy is - defined in the manifest). - The map is empty by default. + :param application_health_policy_map: Represents the map of application + health policies for a ServiceFabric cluster upgrade :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + ~azure.servicefabric.models.ApplicationHealthPolicyMapObject """ _attribute_map = { @@ -6006,7 +6157,7 @@ class ClusterUpgradeDescriptionObject(Model): 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, } def __init__(self, **kwargs): @@ -8967,7 +9118,7 @@ class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): :type replica_id: str :param replica_role: The role of a replica of a stateful service. Possible values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - 'ActiveSecondary' + 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', 'PrimaryAuxiliary' :type replica_role: str or ~azure.servicefabric.models.ReplicaRole :param reconfiguration_information: Information about current reconfiguration like phase, type, previous configuration role of replica @@ -9307,6 +9458,44 @@ def __init__(self, **kwargs): self.kind = 'Double' +class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Dsms Azure blob store used for storing and + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param storage_credentials_source_location: Required. The source location + of the storage credentials to connect to the Dsms Azure blob store. + :type storage_credentials_source_location: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'storage_credentials_source_location': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(DsmsAzureBlobBackupStorageDescription, self).__init__(**kwargs) + self.storage_credentials_source_location = kwargs.get('storage_credentials_source_location', None) + self.container_name = kwargs.get('container_name', None) + self.storage_kind = 'DsmsAzureBlobStore' + + class EnableBackupDescription(Model): """Specifies the parameters needed to enable periodic backup. @@ -11373,6 +11562,23 @@ def __init__(self, **kwargs): self.kind = 'inlinedValue' +class InstanceLifecycleDescription(Model): + """Describes how the instance will behave. + + :param restore_replica_location_after_upgrade: If set to true, move/swap + replica to original location after upgrade. + :type restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(InstanceLifecycleDescription, self).__init__(**kwargs) + self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) + + class Int64PropertyValue(PropertyValue): """Describes a Service Fabric property value of type Int64. @@ -11602,6 +11808,117 @@ def __init__(self, **kwargs): self.kind = 'KeyValueStore' +class LoadedPartitionInformationQueryDescription(Model): + """Represents data structure that contains query information. + + :param metric_name: Name of the metric for which this information is + provided. + :type metric_name: str + :param service_name: Name of the service this partition belongs to. + :type service_name: str + :param ordering: Ordering of partitions' load. Possible values include: + 'Desc', 'Asc'. Default value: "Desc" . + :type ordering: str or ~azure.servicefabric.models.Ordering + :param max_results: The maximum number of results to be returned as part + of the paged queries. This parameter defines the upper bound on the number + of results returned. The results returned can be less than the specified + maximum results if they do not fit in the message as per the max message + size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible + that fit in the return message. + :type max_results: long + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'ordering': {'key': 'Ordering', 'type': 'str'}, + 'max_results': {'key': 'MaxResults', 'type': 'long'}, + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.service_name = kwargs.get('service_name', None) + self.ordering = kwargs.get('ordering', "Desc") + self.max_results = kwargs.get('max_results', None) + self.continuation_token = kwargs.get('continuation_token', None) + + +class LoadedPartitionInformationResult(Model): + """Represents partition information. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Required. Name of the service this partition belongs + to. + :type service_name: str + :param partition_id: Required. Id of the partition. + :type partition_id: str + :param metric_name: Required. Name of the metric for which this + information is provided. + :type metric_name: str + :param load: Required. Load for metric. + :type load: long + """ + + _validation = { + 'service_name': {'required': True}, + 'partition_id': {'required': True}, + 'metric_name': {'required': True}, + 'load': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'load': {'key': 'Load', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(LoadedPartitionInformationResult, self).__init__(**kwargs) + self.service_name = kwargs.get('service_name', None) + self.partition_id = kwargs.get('partition_id', None) + self.metric_name = kwargs.get('metric_name', None) + self.load = kwargs.get('load', None) + + +class LoadedPartitionInformationResultList(Model): + """Represents data structure that contains top/least loaded partitions for a + certain metric. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application information. + :type items: + list[~azure.servicefabric.models.LoadedPartitionInformationResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, + } + + def __init__(self, **kwargs): + super(LoadedPartitionInformationResultList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + class LoadMetricInformation(Model): """Represents data structure that contains load information for a certain metric in a cluster. @@ -11969,6 +12286,76 @@ def __init__(self, **kwargs): self.managed_identities = kwargs.get('managed_identities', None) +class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store (connected using managed + identity) used for storing and enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param managed_identity_type: Required. The type of managed identity to be + used to connect to Azure Blob Store via Managed Identity. Possible values + include: 'Invalid', 'VMSS', 'Cluster' + :type managed_identity_type: str or + ~azure.servicefabric.models.ManagedIdentityType + :param blob_service_uri: Required. The Blob Service Uri to connect to the + Azure blob store.. + :type blob_service_uri: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'managed_identity_type': {'required': True}, + 'blob_service_uri': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, + 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(**kwargs) + self.managed_identity_type = kwargs.get('managed_identity_type', None) + self.blob_service_uri = kwargs.get('blob_service_uri', None) + self.container_name = kwargs.get('container_name', None) + self.storage_kind = 'ManagedIdentityAzureBlobStore' + + +class MetricLoadDescription(Model): + """Specifies metric load information. + + :param metric_name: The name of the reported metric. + :type metric_name: str + :param current_load: The current value of the metric load. + :type current_load: long + :param predicted_load: The predicted value of the metric load. + :type predicted_load: long + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, + 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(MetricLoadDescription, self).__init__(**kwargs) + self.metric_name = kwargs.get('metric_name', None) + self.current_load = kwargs.get('current_load', None) + self.predicted_load = kwargs.get('predicted_load', None) + + class MonitoringPolicyDescription(Model): """Describes the parameters for monitoring an upgrade in Monitored mode. @@ -13073,6 +13460,9 @@ class NodeInfo(Model): :param node_down_at: Date time in UTC when the node went down. If node has never been down then this value will be zero date time. :type node_down_at: datetime + :param node_tags: List that contains tags, which will be applied to the + nodes. + :type node_tags: list[str] """ _attribute_map = { @@ -13094,6 +13484,7 @@ class NodeInfo(Model): 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, + 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, } def __init__(self, **kwargs): @@ -13116,6 +13507,7 @@ def __init__(self, **kwargs): self.node_down_time_in_seconds = kwargs.get('node_down_time_in_seconds', None) self.node_up_at = kwargs.get('node_up_at', None) self.node_down_at = kwargs.get('node_down_at', None) + self.node_tags = kwargs.get('node_tags', None) class NodeLoadInfo(Model): @@ -13735,6 +14127,34 @@ def __init__(self, **kwargs): self.kind = 'Nodes' +class NodeTagsDescription(Model): + """Describes the tags required for placement or running of the service. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. The number of tags. + :type count: int + :param tags: Required. Array of size specified by the ‘Count’ parameter, + for the placement tags of the service. + :type tags: list[str] + """ + + _validation = { + 'count': {'required': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'Count', 'type': 'int'}, + 'tags': {'key': 'Tags', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(NodeTagsDescription, self).__init__(**kwargs) + self.count = kwargs.get('count', None) + self.tags = kwargs.get('tags', None) + + class NodeTransitionProgress(Model): """Information about an NodeTransition operation. This class contains an OperationState and a NodeTransitionResult. The NodeTransitionResult is not @@ -13785,6 +14205,103 @@ def __init__(self, **kwargs): self.node_result = kwargs.get('node_result', None) +class NodeTypeHealthPolicyMapItem(Model): + """Defines an item in NodeTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the node type health policy map item. + This is the name of the node type. + :type key: str + :param value: Required. The value of the node type health policy map item. + If the percentage is respected but there is at least one unhealthy node in + the node type, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes + over the total number of nodes in the node type. + The computation rounds up to tolerate one failure on small numbers of + nodes. + The max percent unhealthy nodes allowed for the node type. Must be between + zero and 100. + :type value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = kwargs.get('key', None) + self.value = kwargs.get('value', None) + + +class NodeTypeNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes of a particular node type. The node + type nodes evaluation can be returned when cluster health evaluation + returns unhealthy aggregated health state, either Error or Warning. It + contains health evaluations for each unhealthy node of the included node + type that impacted current aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_type_name: The node type name as defined in the cluster + manifest. + :type node_type_name: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes for the node type, specified as an entry in + NodeTypeHealthPolicyMap. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes of the node type found in the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation of this node type that impacted the aggregated + health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(NodeTypeNodesHealthEvaluation, self).__init__(**kwargs) + self.node_type_name = kwargs.get('node_type_name', None) + self.max_percent_unhealthy_nodes = kwargs.get('max_percent_unhealthy_nodes', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'NodeTypeNodes' + + class NodeUpEvent(NodeEvent): """Node Up event. @@ -14516,6 +15033,34 @@ def __init__(self, **kwargs): self.sub_names = kwargs.get('sub_names', None) +class PagedUpdatePartitionLoadResultList(Model): + """The list of results of the call UpdatePartitionLoad. The list is paged when + all of the results cannot fit in a single message. The next set of results + can be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of partition load update information. + :type items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, + } + + def __init__(self, **kwargs): + super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) + self.continuation_token = kwargs.get('continuation_token', None) + self.items = kwargs.get('items', None) + + class PagedVolumeResourceDescriptionList(Model): """The list of volume resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by @@ -15070,8 +15615,8 @@ def __init__(self, **kwargs): class PartitionLoadInformation(Model): - """Represents load information for a partition, which contains the primary and - secondary reported load metrics. + """Represents load information for a partition, which contains the primary, + secondary and auxiliary reported load metrics. In case there is no load reported, PartitionLoadInformation will contain the default load for the service of the partition. For default loads, LoadMetricReport's LastReportedUtc is set to 0. @@ -15087,12 +15632,18 @@ class PartitionLoadInformation(Model): Array only contains the latest reported load for each metric. :type secondary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + :param auxiliary_load_metric_reports: Array of aggregated load reports + from all auxiliary replicas for this partition. + Array only contains the latest reported load for each metric. + :type auxiliary_load_metric_reports: + list[~azure.servicefabric.models.LoadMetricReport] """ _attribute_map = { 'partition_id': {'key': 'PartitionId', 'type': 'str'}, 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + 'auxiliary_load_metric_reports': {'key': 'AuxiliaryLoadMetricReports', 'type': '[LoadMetricReport]'}, } def __init__(self, **kwargs): @@ -15100,6 +15651,57 @@ def __init__(self, **kwargs): self.partition_id = kwargs.get('partition_id', None) self.primary_load_metric_reports = kwargs.get('primary_load_metric_reports', None) self.secondary_load_metric_reports = kwargs.get('secondary_load_metric_reports', None) + self.auxiliary_load_metric_reports = kwargs.get('auxiliary_load_metric_reports', None) + + +class PartitionMetricLoadDescription(Model): + """Represents load information for a partition, which contains the metrics + load information about primary, all secondary replicas/instances or a + specific secondary replica/instance on a specific node , all auxiliary + replicas or a specific auxiliary replica on a specific node. + + :param partition_id: Id of the partition. + :type partition_id: str + :param primary_replica_load_entries: Partition's load information for + primary replica, in case partition is from a stateful service. + :type primary_replica_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param secondary_replicas_or_instances_load_entries: Partition's load + information for all secondary replicas or instances. + :type secondary_replicas_or_instances_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param secondary_replica_or_instance_load_entries_per_node: Partition's + load information for a specific secondary replica or instance located on a + specific node. + :type secondary_replica_or_instance_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + :param auxiliary_replicas_load_entries: Partition's load information for + all auxiliary replicas. + :type auxiliary_replicas_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param auxiliary_replica_load_entries_per_node: Partition's load + information for a specific auxiliary replica located on a specific node. + :type auxiliary_replica_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + 'auxiliary_replicas_load_entries': {'key': 'AuxiliaryReplicasLoadEntries', 'type': '[MetricLoadDescription]'}, + 'auxiliary_replica_load_entries_per_node': {'key': 'AuxiliaryReplicaLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + } + + def __init__(self, **kwargs): + super(PartitionMetricLoadDescription, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.primary_replica_load_entries = kwargs.get('primary_replica_load_entries', None) + self.secondary_replicas_or_instances_load_entries = kwargs.get('secondary_replicas_or_instances_load_entries', None) + self.secondary_replica_or_instance_load_entries_per_node = kwargs.get('secondary_replica_or_instance_load_entries_per_node', None) + self.auxiliary_replicas_load_entries = kwargs.get('auxiliary_replicas_load_entries', None) + self.auxiliary_replica_load_entries_per_node = kwargs.get('auxiliary_replica_load_entries_per_node', None) class PartitionNewHealthReportEvent(PartitionEvent): @@ -15937,7 +16539,8 @@ class ReconfigurationInformation(Model): :param previous_configuration_role: Replica role before reconfiguration started. Possible values include: 'Unknown', 'None', 'Primary', - 'IdleSecondary', 'ActiveSecondary' + 'IdleSecondary', 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', + 'PrimaryAuxiliary' :type previous_configuration_role: str or ~azure.servicefabric.models.ReplicaRole :param reconfiguration_phase: Current phase of ongoing reconfiguration. If @@ -16856,6 +17459,52 @@ def __init__(self, **kwargs): self.service_kind = None +class ReplicaLifecycleDescription(Model): + """Describes how the replica will behave. + + :param is_singleton_replica_move_allowed_during_upgrade: If set to true, + replicas with a target replica set size of 1 will be permitted to move + during upgrade. + :type is_singleton_replica_move_allowed_during_upgrade: bool + :param restore_replica_location_after_upgrade: If set to true, move/swap + replica to original location after upgrade. + :type restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ReplicaLifecycleDescription, self).__init__(**kwargs) + self.is_singleton_replica_move_allowed_during_upgrade = kwargs.get('is_singleton_replica_move_allowed_during_upgrade', None) + self.restore_replica_location_after_upgrade = kwargs.get('restore_replica_location_after_upgrade', None) + + +class ReplicaMetricLoadDescription(Model): + """Specifies metric loads of a partition's specific secondary replica or + instance. + + :param node_name: Node name of a specific secondary replica or instance. + :type node_name: str + :param replica_or_instance_load_entries: Loads of a different metrics for + a partition's secondary replica or instance. + :type replica_or_instance_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, + } + + def __init__(self, **kwargs): + super(ReplicaMetricLoadDescription, self).__init__(**kwargs) + self.node_name = kwargs.get('node_name', None) + self.replica_or_instance_load_entries = kwargs.get('replica_or_instance_load_entries', None) + + class ReplicasHealthEvaluation(HealthEvaluation): """Represents health evaluation for replicas, containing health evaluations for each unhealthy replica that impacted current aggregated health state. @@ -18256,6 +18905,12 @@ class ServiceDescription(Model): :param scaling_policies: Scaling policies for this service. :type scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription :param service_kind: Required. Constant filled by server. :type service_kind: str """ @@ -18282,6 +18937,8 @@ class ServiceDescription(Model): 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, } @@ -18305,6 +18962,8 @@ def __init__(self, **kwargs): self.service_package_activation_mode = kwargs.get('service_package_activation_mode', None) self.service_dns_name = kwargs.get('service_dns_name', None) self.scaling_policies = kwargs.get('scaling_policies', None) + self.tags_required_to_place = kwargs.get('tags_required_to_place', None) + self.tags_required_to_run = kwargs.get('tags_required_to_run', None) self.service_kind = None @@ -18803,6 +19462,10 @@ class ServiceLoadMetricDescription(Model): default amount of load, as a number, that this service creates for this metric when it is a Secondary replica. :type secondary_default_load: int + :param auxiliary_default_load: Used only for Stateful services. The + default amount of load, as a number, that this service creates for this + metric when it is an Auxiliary replica. + :type auxiliary_default_load: int :param default_load: Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric. :type default_load: int @@ -18817,6 +19480,7 @@ class ServiceLoadMetricDescription(Model): 'weight': {'key': 'Weight', 'type': 'str'}, 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, + 'auxiliary_default_load': {'key': 'AuxiliaryDefaultLoad', 'type': 'int'}, 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, } @@ -18826,6 +19490,7 @@ def __init__(self, **kwargs): self.weight = kwargs.get('weight', None) self.primary_default_load = kwargs.get('primary_default_load', None) self.secondary_default_load = kwargs.get('secondary_default_load', None) + self.auxiliary_default_load = kwargs.get('auxiliary_default_load', None) self.default_load = kwargs.get('default_load', None) @@ -19004,6 +19669,7 @@ class ServicePlacementPolicyDescription(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: ServicePlacementInvalidDomainPolicyDescription, ServicePlacementNonPartiallyPlaceServicePolicyDescription, + ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, ServicePlacementPreferPrimaryDomainPolicyDescription, ServicePlacementRequiredDomainPolicyDescription, ServicePlacementRequireDomainDistributionPolicyDescription @@ -19023,7 +19689,7 @@ class ServicePlacementPolicyDescription(Model): } _subtype_map = { - 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} + 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} } def __init__(self, **kwargs): @@ -19031,6 +19697,36 @@ def __init__(self, **kwargs): self.type = None +class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + allowing multiple stateless instances of a partition of the service to be + placed on a node. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: Holdover from other policy descriptions, not used for + this policy, values are ignored by runtime. Keeping it for any + backwards-compatibility with clients. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) + self.domain_name = kwargs.get('domain_name', None) + self.type = 'AllowMultipleStatelessInstancesOnNode' + + class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): """Describes the policy to be used for placement of a Service Fabric service where a particular fault or upgrade domain should not be used for placement @@ -19766,6 +20462,16 @@ class ServiceUpdateDescription(Model): set. The value is 8192. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. :type flags: str :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow @@ -19788,6 +20494,12 @@ class ServiceUpdateDescription(Model): :param scaling_policies: Scaling policies for this service. :type scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription :param service_kind: Required. Constant filled by server. :type service_kind: str """ @@ -19804,6 +20516,9 @@ class ServiceUpdateDescription(Model): 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, } @@ -19820,6 +20535,9 @@ def __init__(self, **kwargs): self.service_placement_policies = kwargs.get('service_placement_policies', None) self.default_move_cost = kwargs.get('default_move_cost', None) self.scaling_policies = kwargs.get('scaling_policies', None) + self.service_dns_name = kwargs.get('service_dns_name', None) + self.tags_for_placement = kwargs.get('tags_for_placement', None) + self.tags_for_running = kwargs.get('tags_for_running', None) self.service_kind = None @@ -20324,6 +21042,12 @@ class StatefulServiceDescription(ServiceDescription): :param scaling_policies: Scaling policies for this service. :type scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription :param service_kind: Required. Constant filled by server. :type service_kind: str :param target_replica_set_size: Required. The target replica set size as a @@ -20353,6 +21077,8 @@ class StatefulServiceDescription(ServiceDescription): property is set. The value is 4. - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The value is 8. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 16. :type flags: int :param replica_restart_wait_duration_seconds: The duration, in seconds, between when a replica goes down and when a new replica is created. @@ -20366,6 +21092,20 @@ class StatefulServiceDescription(ServiceDescription): :param service_placement_time_limit_seconds: The duration for which replicas can stay InBuild before reporting that build is stuck. :type service_placement_time_limit_seconds: long + :param drop_source_replica_on_move: Indicates whether to drop source + Secondary replica even if the target replica has not finished build. If + desired behavior is to drop it as soon as possible the value of this + property is true, if not it is false. + :type drop_source_replica_on_move: bool + :param replica_lifecycle_description: Defines how replicas of this service + will behave during their lifecycle. + :type replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + :param auxiliary_replica_count: The auxiliary replica count as a number. + To use Auxiliary replicas, the following must be true: + AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :type auxiliary_replica_count: int """ _validation = { @@ -20380,6 +21120,7 @@ class StatefulServiceDescription(ServiceDescription): 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'auxiliary_replica_count': {'minimum': 0}, } _attribute_map = { @@ -20397,6 +21138,8 @@ class StatefulServiceDescription(ServiceDescription): 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, @@ -20406,6 +21149,9 @@ class StatefulServiceDescription(ServiceDescription): 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, } def __init__(self, **kwargs): @@ -20418,6 +21164,9 @@ def __init__(self, **kwargs): self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) + self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) + self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) + self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) self.service_kind = 'Stateful' @@ -20503,6 +21252,11 @@ class StatefulServicePartitionInfo(ServicePartitionInfo): :type target_replica_set_size: long :param min_replica_set_size: The minimum replica set size as a number. :type min_replica_set_size: long + :param auxiliary_replica_count: The auxiliary replica count as a number. + To use Auxiliary replicas the following must be true, + AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :type auxiliary_replica_count: long :param last_quorum_loss_duration: The duration for which this partition was in quorum loss. If the partition is currently in quorum loss, it returns the duration since it has been in that state. This field is using @@ -20527,6 +21281,7 @@ class StatefulServicePartitionInfo(ServicePartitionInfo): 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'long'}, 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, } @@ -20535,6 +21290,7 @@ def __init__(self, **kwargs): super(StatefulServicePartitionInfo, self).__init__(**kwargs) self.target_replica_set_size = kwargs.get('target_replica_set_size', None) self.min_replica_set_size = kwargs.get('min_replica_set_size', None) + self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) self.last_quorum_loss_duration = kwargs.get('last_quorum_loss_duration', None) self.primary_epoch = kwargs.get('primary_epoch', None) self.service_kind = 'Stateful' @@ -20668,7 +21424,7 @@ class StatefulServiceReplicaInfo(ReplicaInfo): :type service_kind: str :param replica_role: The role of a replica of a stateful service. Possible values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - 'ActiveSecondary' + 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', 'PrimaryAuxiliary' :type replica_role: str or ~azure.servicefabric.models.ReplicaRole :param replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique @@ -20803,6 +21559,16 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): set. The value is 8192. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. :type flags: str :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow @@ -20825,6 +21591,12 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): :param scaling_policies: Scaling policies for this service. :type scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription :param service_kind: Required. Constant filled by server. :type service_kind: str :param target_replica_set_size: The target replica set size as a number. @@ -20843,12 +21615,27 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): :param service_placement_time_limit_seconds: The duration for which replicas can stay InBuild before reporting that build is stuck. :type service_placement_time_limit_seconds: str + :param drop_source_replica_on_move: Indicates whether to drop source + Secondary replica even if the target replica has not finished build. If + desired behavior is to drop it as soon as possible the value of this + property is true, if not it is false. + :type drop_source_replica_on_move: bool + :param replica_lifecycle_description: Defines how replicas of this service + will behave during their lifecycle. + :type replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + :param auxiliary_replica_count: The auxiliary replica count as a number. + To use Auxiliary replicas, the following must be true: + AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :type auxiliary_replica_count: int """ _validation = { 'service_kind': {'required': True}, 'target_replica_set_size': {'minimum': 1}, 'min_replica_set_size': {'minimum': 1}, + 'auxiliary_replica_count': {'minimum': 0}, } _attribute_map = { @@ -20859,6 +21646,9 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, @@ -20866,6 +21656,9 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, } def __init__(self, **kwargs): @@ -20876,6 +21669,9 @@ def __init__(self, **kwargs): self.quorum_loss_wait_duration_seconds = kwargs.get('quorum_loss_wait_duration_seconds', None) self.stand_by_replica_keep_duration_seconds = kwargs.get('stand_by_replica_keep_duration_seconds', None) self.service_placement_time_limit_seconds = kwargs.get('service_placement_time_limit_seconds', None) + self.drop_source_replica_on_move = kwargs.get('drop_source_replica_on_move', None) + self.replica_lifecycle_description = kwargs.get('replica_lifecycle_description', None) + self.auxiliary_replica_count = kwargs.get('auxiliary_replica_count', None) self.service_kind = 'Stateful' @@ -21127,6 +21923,12 @@ class StatelessServiceDescription(ServiceDescription): :param scaling_policies: Scaling policies for this service. :type scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription :param service_kind: Required. Constant filled by server. :type service_kind: str :param instance_count: Required. The instance count. @@ -21162,6 +21964,8 @@ class StatelessServiceDescription(ServiceDescription): zero. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 1. + - InstanceRestartWaitDuration - Indicates the + InstanceRestartWaitDurationSeconds property is set. The value is 2. :type flags: int :param instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to @@ -21181,6 +21985,19 @@ class StatelessServiceDescription(ServiceDescription): indicates that there won't be any delay or removal of the endpoint prior to closing the instance. :type instance_close_delay_duration_seconds: long + :param instance_lifecycle_description: Defines how instances of this + service will behave during their lifecycle. + :type instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :param instance_restart_wait_duration_seconds: When a stateless instance + goes down, this timer starts. When it expires Service Fabric will create a + new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in + situations where the instance going down is likely to recover in a short + time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes + down, Service Fabric will immediately start building its replacement. + :type instance_restart_wait_duration_seconds: long """ _validation = { @@ -21190,6 +22007,7 @@ class StatelessServiceDescription(ServiceDescription): 'service_kind': {'required': True}, 'instance_count': {'required': True, 'minimum': -1}, 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, } _attribute_map = { @@ -21207,12 +22025,16 @@ class StatelessServiceDescription(ServiceDescription): 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, 'flags': {'key': 'Flags', 'type': 'int'}, 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, } def __init__(self, **kwargs): @@ -21222,6 +22044,8 @@ def __init__(self, **kwargs): self.min_instance_percentage = kwargs.get('min_instance_percentage', None) self.flags = kwargs.get('flags', None) self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) + self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) + self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) self.service_kind = 'Stateless' @@ -21594,6 +22418,16 @@ class StatelessServiceUpdateDescription(ServiceUpdateDescription): set. The value is 8192. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. :type flags: str :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow @@ -21616,6 +22450,12 @@ class StatelessServiceUpdateDescription(ServiceUpdateDescription): :param scaling_policies: Scaling policies for this service. :type scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription :param service_kind: Required. Constant filled by server. :type service_kind: str :param instance_count: The instance count. @@ -21655,6 +22495,19 @@ class StatelessServiceUpdateDescription(ServiceUpdateDescription): - Connect to a different instance of the service partition for future requests. :type instance_close_delay_duration_seconds: str + :param instance_lifecycle_description: Defines how instances of this + service will behave during their lifecycle. + :type instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :param instance_restart_wait_duration_seconds: When a stateless instance + goes down, this timer starts. When it expires Service Fabric will create a + new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in + situations where the instance going down is likely to recover in a short + time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes + down, Service Fabric will immediately start building its replacement. + :type instance_restart_wait_duration_seconds: str """ _validation = { @@ -21670,11 +22523,16 @@ class StatelessServiceUpdateDescription(ServiceUpdateDescription): 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, } def __init__(self, **kwargs): @@ -21683,6 +22541,8 @@ def __init__(self, **kwargs): self.min_instance_count = kwargs.get('min_instance_count', None) self.min_instance_percentage = kwargs.get('min_instance_percentage', None) self.instance_close_delay_duration_seconds = kwargs.get('instance_close_delay_duration_seconds', None) + self.instance_lifecycle_description = kwargs.get('instance_lifecycle_description', None) + self.instance_restart_wait_duration_seconds = kwargs.get('instance_restart_wait_duration_seconds', None) self.service_kind = 'Stateless' @@ -22153,6 +23013,29 @@ def __init__(self, **kwargs): self.application_health_policy_map = kwargs.get('application_health_policy_map', None) +class UpdatePartitionLoadResult(Model): + """Specifies result of updating load for specified partitions. The output will + be ordered based on the partition ID. + + :param partition_id: Id of the partition. + :type partition_id: str + :param partition_error_code: If OperationState is Completed - this is 0. + If OperationState is Faulted - this is an error code indicating the + reason. + :type partition_error_code: int + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(UpdatePartitionLoadResult, self).__init__(**kwargs) + self.partition_id = kwargs.get('partition_id', None) + self.partition_error_code = kwargs.get('partition_error_code', None) + + class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): """Represents health evaluation for delta unhealthy cluster nodes in an upgrade domain, containing health evaluations for each unhealthy node that @@ -22223,6 +23106,66 @@ def __init__(self, **kwargs): self.kind = 'UpgradeDomainDeltaNodesCheck' +class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed applications in an upgrade + domain, containing health evaluations for each unhealthy deployed + application that impacted current aggregated health state. Can be returned + when evaluating cluster health during cluster upgrade and the aggregated + health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param upgrade_domain_name: Name of the upgrade domain where deployed + applications health is currently evaluated. + :type upgrade_domain_name: str + :param max_percent_unhealthy_deployed_applications: Maximum allowed + percentage of unhealthy deployed applications from the + ClusterHealthPolicy. + :type max_percent_unhealthy_deployed_applications: int + :param total_count: Total number of deployed applications in the current + upgrade domain. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + DeployedApplicationHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, **kwargs): + super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__(**kwargs) + self.upgrade_domain_name = kwargs.get('upgrade_domain_name', None) + self.max_percent_unhealthy_deployed_applications = kwargs.get('max_percent_unhealthy_deployed_applications', None) + self.total_count = kwargs.get('total_count', None) + self.unhealthy_evaluations = kwargs.get('unhealthy_evaluations', None) + self.kind = 'UpgradeDomainDeployedApplications' + + class UpgradeDomainInfo(Model): """Information about an upgrade domain. diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models_py3.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models_py3.py index 66eec5039866..f2e53d4e2d04 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models_py3.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models_py3.py @@ -936,7 +936,8 @@ class HealthEvaluation(Model): ReplicasHealthEvaluation, ServiceHealthEvaluation, ServicesHealthEvaluation, SystemApplicationHealthEvaluation, UpgradeDomainDeltaNodesCheckHealthEvaluation, - UpgradeDomainNodesHealthEvaluation + UpgradeDomainDeployedApplicationsHealthEvaluation, + UpgradeDomainNodesHealthEvaluation, NodeTypeNodesHealthEvaluation All required parameters must be populated in order to send to Azure. @@ -964,7 +965,7 @@ class HealthEvaluation(Model): } _subtype_map = { - 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation'} + 'kind': {'Application': 'ApplicationHealthEvaluation', 'Applications': 'ApplicationsHealthEvaluation', 'ApplicationTypeApplications': 'ApplicationTypeApplicationsHealthEvaluation', 'DeltaNodesCheck': 'DeltaNodesCheckHealthEvaluation', 'DeployedApplication': 'DeployedApplicationHealthEvaluation', 'DeployedApplications': 'DeployedApplicationsHealthEvaluation', 'DeployedServicePackage': 'DeployedServicePackageHealthEvaluation', 'DeployedServicePackages': 'DeployedServicePackagesHealthEvaluation', 'Event': 'EventHealthEvaluation', 'Node': 'NodeHealthEvaluation', 'Nodes': 'NodesHealthEvaluation', 'Partition': 'PartitionHealthEvaluation', 'Partitions': 'PartitionsHealthEvaluation', 'Replica': 'ReplicaHealthEvaluation', 'Replicas': 'ReplicasHealthEvaluation', 'Service': 'ServiceHealthEvaluation', 'Services': 'ServicesHealthEvaluation', 'SystemApplication': 'SystemApplicationHealthEvaluation', 'UpgradeDomainDeltaNodesCheck': 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainDeployedApplications': 'UpgradeDomainDeployedApplicationsHealthEvaluation', 'UpgradeDomainNodes': 'UpgradeDomainNodesHealthEvaluation', 'NodeTypeNodes': 'NodeTypeNodesHealthEvaluation'} } def __init__(self, *, aggregated_health_state=None, description: str=None, **kwargs) -> None: @@ -1115,6 +1116,32 @@ def __init__(self, *, key: str, value, **kwargs) -> None: self.value = value +class ApplicationHealthPolicyMapObject(Model): + """Represents the map of application health policies for a ServiceFabric + cluster upgrade. + + :param application_health_policy_map: Defines a map that contains specific + application health policies for different applications. + Each entry specifies as key the application name and as value an + ApplicationHealthPolicy used to evaluate the application health. + If an application is not specified in the map, the application health + evaluation uses the ApplicationHealthPolicy found in its application + manifest or the default application health policy (if no health policy is + defined in the manifest). + The map is empty by default. + :type application_health_policy_map: + list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + """ + + _attribute_map = { + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + } + + def __init__(self, *, application_health_policy_map=None, **kwargs) -> None: + super(ApplicationHealthPolicyMapObject, self).__init__(**kwargs) + self.application_health_policy_map = application_health_policy_map + + class ApplicationHealthReportExpiredEvent(ApplicationEvent): """Application Health Report Expired event. @@ -1491,6 +1518,10 @@ class ApplicationInfo(Model): 'ServiceFabricApplicationDescription', 'Compose' :type application_definition_kind: str or ~azure.servicefabric.models.ApplicationDefinitionKind + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription """ _attribute_map = { @@ -1502,9 +1533,10 @@ class ApplicationInfo(Model): 'parameters': {'key': 'Parameters', 'type': '[ApplicationParameter]'}, 'health_state': {'key': 'HealthState', 'type': 'str'}, 'application_definition_kind': {'key': 'ApplicationDefinitionKind', 'type': 'str'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, } - def __init__(self, *, id: str=None, name: str=None, type_name: str=None, type_version: str=None, status=None, parameters=None, health_state=None, application_definition_kind=None, **kwargs) -> None: + def __init__(self, *, id: str=None, name: str=None, type_name: str=None, type_version: str=None, status=None, parameters=None, health_state=None, application_definition_kind=None, managed_application_identity=None, **kwargs) -> None: super(ApplicationInfo, self).__init__(**kwargs) self.id = id self.name = name @@ -1514,6 +1546,7 @@ def __init__(self, *, id: str=None, name: str=None, type_name: str=None, type_ve self.parameters = parameters self.health_state = health_state self.application_definition_kind = application_definition_kind + self.managed_application_identity = managed_application_identity class ApplicationLoadInfo(Model): @@ -2450,6 +2483,73 @@ def __init__(self, *, manifest: str=None, **kwargs) -> None: self.manifest = manifest +class ApplicationUpdateDescription(Model): + """Describes the parameters for updating an application instance. + + :param flags: Flags indicating whether other properties are set. Each of + the associated properties corresponds to a flag, specified below, which, + if set, indicate that the property is specified. + If flags are not specified for a certain property, the property will not + be updated even if the new value is provided. + This property can be a combination of those flags obtained using bitwise + 'OR' operator. Exception is RemoveApplicationCapacity which cannot be + specified along with other parameters. + For example, if the provided value is 3 then the flags for MinimumNodes + (1) and MaximumNodes (2) are set. + - None - Does not indicate any other properties are set. The value is 0. + - MinimumNodes - Indicates whether the MinimumNodes property is set. The + value is 1. + - MaximumNodes - Indicates whether the MinimumNodes property is set. The + value is 2. + - ApplicationMetrics - Indicates whether the ApplicationMetrics property + is set. The value is 4. + :type flags: str + :param remove_application_capacity: Used to clear all parameters related + to Application Capacity for this application. | + It is not possible to specify this parameter together with other + Application Capacity parameters. Default value: False . + :type remove_application_capacity: bool + :param minimum_nodes: The minimum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. If this property is set to zero, no capacity will be reserved. The + value of this property cannot be more than the value of the MaximumNodes + property. + :type minimum_nodes: long + :param maximum_nodes: The maximum number of nodes where Service Fabric + will reserve capacity for this application. Note that this does not mean + that the services of this application will be placed on all of those + nodes. By default, the value of this property is zero and it means that + the services can be placed on any node. Default value: 0 . + :type maximum_nodes: long + :param application_metrics: List of application capacity metric + description. + :type application_metrics: + list[~azure.servicefabric.models.ApplicationMetricDescription] + """ + + _validation = { + 'minimum_nodes': {'minimum': 0}, + 'maximum_nodes': {'minimum': 0}, + } + + _attribute_map = { + 'flags': {'key': 'Flags', 'type': 'str'}, + 'remove_application_capacity': {'key': 'RemoveApplicationCapacity', 'type': 'bool'}, + 'minimum_nodes': {'key': 'MinimumNodes', 'type': 'long'}, + 'maximum_nodes': {'key': 'MaximumNodes', 'type': 'long'}, + 'application_metrics': {'key': 'ApplicationMetrics', 'type': '[ApplicationMetricDescription]'}, + } + + def __init__(self, *, flags: str=None, remove_application_capacity: bool=False, minimum_nodes: int=None, maximum_nodes: int=0, application_metrics=None, **kwargs) -> None: + super(ApplicationUpdateDescription, self).__init__(**kwargs) + self.flags = flags + self.remove_application_capacity = remove_application_capacity + self.minimum_nodes = minimum_nodes + self.maximum_nodes = maximum_nodes + self.application_metrics = application_metrics + + class ApplicationUpgradeCompletedEvent(ApplicationEvent): """Application Upgrade Completed event. @@ -2583,6 +2683,10 @@ class ApplicationUpgradeDescription(Model): 4294967295, which indicates that the behavior will entirely depend on the delay configured in the stateless service description. :type instance_close_delay_duration_in_seconds: long + :param managed_application_identity: Managed application identity + description. + :type managed_application_identity: + ~azure.servicefabric.models.ManagedApplicationIdentityDescription """ _validation = { @@ -2603,9 +2707,10 @@ class ApplicationUpgradeDescription(Model): 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, 'application_health_policy': {'key': 'ApplicationHealthPolicy', 'type': 'ApplicationHealthPolicy'}, 'instance_close_delay_duration_in_seconds': {'key': 'InstanceCloseDelayDurationInSeconds', 'type': 'long'}, + 'managed_application_identity': {'key': 'ManagedApplicationIdentity', 'type': 'ManagedApplicationIdentityDescription'}, } - def __init__(self, *, name: str, target_application_type_version: str, parameters=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", monitoring_policy=None, application_health_policy=None, instance_close_delay_duration_in_seconds: int=None, **kwargs) -> None: + def __init__(self, *, name: str, target_application_type_version: str, parameters=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", monitoring_policy=None, application_health_policy=None, instance_close_delay_duration_in_seconds: int=None, managed_application_identity=None, **kwargs) -> None: super(ApplicationUpgradeDescription, self).__init__(**kwargs) self.name = name self.target_application_type_version = target_application_type_version @@ -2618,6 +2723,7 @@ def __init__(self, *, name: str, target_application_type_version: str, parameter self.monitoring_policy = monitoring_policy self.application_health_policy = application_health_policy self.instance_close_delay_duration_in_seconds = instance_close_delay_duration_in_seconds + self.managed_application_identity = managed_application_identity class ApplicationUpgradeDomainCompletedEvent(ApplicationEvent): @@ -3346,6 +3452,13 @@ class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): :param scale_interval_in_seconds: Required. The period in seconds on which a decision is made whether to scale or not. :type scale_interval_in_seconds: long + :param use_only_primary_load: Required. Flag determines whether only the + load of primary replica should be considered for scaling. + If set to true, then trigger will only consider the load of primary + replicas of stateful service. + If set to false, trigger will consider load of all replicas. + This parameter cannot be set to true for stateless service. + :type use_only_primary_load: bool """ _validation = { @@ -3354,6 +3467,7 @@ class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): 'lower_load_threshold': {'required': True}, 'upper_load_threshold': {'required': True}, 'scale_interval_in_seconds': {'required': True, 'maximum': 4294967295, 'minimum': 0}, + 'use_only_primary_load': {'required': True}, } _attribute_map = { @@ -3362,14 +3476,16 @@ class AverageServiceLoadScalingTrigger(ScalingTriggerDescription): 'lower_load_threshold': {'key': 'LowerLoadThreshold', 'type': 'str'}, 'upper_load_threshold': {'key': 'UpperLoadThreshold', 'type': 'str'}, 'scale_interval_in_seconds': {'key': 'ScaleIntervalInSeconds', 'type': 'long'}, + 'use_only_primary_load': {'key': 'UseOnlyPrimaryLoad', 'type': 'bool'}, } - def __init__(self, *, metric_name: str, lower_load_threshold: str, upper_load_threshold: str, scale_interval_in_seconds: int, **kwargs) -> None: + def __init__(self, *, metric_name: str, lower_load_threshold: str, upper_load_threshold: str, scale_interval_in_seconds: int, use_only_primary_load: bool, **kwargs) -> None: super(AverageServiceLoadScalingTrigger, self).__init__(**kwargs) self.metric_name = metric_name self.lower_load_threshold = lower_load_threshold self.upper_load_threshold = upper_load_threshold self.scale_interval_in_seconds = scale_interval_in_seconds + self.use_only_primary_load = use_only_primary_load self.kind = 'AverageServiceLoad' @@ -3378,7 +3494,8 @@ class BackupStorageDescription(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: AzureBlobBackupStorageDescription, - FileShareBackupStorageDescription + FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription, + ManagedIdentityAzureBlobBackupStorageDescription All required parameters must be populated in order to send to Azure. @@ -3398,7 +3515,7 @@ class BackupStorageDescription(Model): } _subtype_map = { - 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription'} + 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription', 'ManagedIdentityAzureBlobStore': 'ManagedIdentityAzureBlobBackupStorageDescription'} } def __init__(self, *, friendly_name: str=None, **kwargs) -> None: @@ -5662,6 +5779,45 @@ class ClusterHealthPolicy(Model): HealthManager/EnableApplicationTypeHealthEvaluation. :type application_type_health_policy_map: list[~azure.servicefabric.models.ApplicationTypeHealthPolicyMapItem] + :param node_type_health_policy_map: Defines a map with max percentage + unhealthy nodes for specific node types. + Each entry specifies as key the node type name and as value an integer + that represents the MaxPercentUnhealthyNodes percentage used to evaluate + the nodes of the specified node type. + The node type health policy map can be used during cluster health + evaluation to describe special node types. + They are evaluated against the percentages associated with their node type + name in the map. + Setting this has no impact on the global pool of nodes used for + MaxPercentUnhealthyNodes. + The node type health policy map is used only if the cluster manifest + enables node type health evaluation using the configuration entry for + HealthManager/EnableNodeTypeHealthEvaluation. + For example, given a cluster with many nodes of different types, with + important work hosted on node type "SpecialNodeType" that should not + tolerate any nodes down. + You can specify global MaxPercentUnhealthyNodes to 20% to tolerate some + failures for all nodes, but for the node type "SpecialNodeType", set the + MaxPercentUnhealthyNodes to 0 by + setting the value in the key value pair in NodeTypeHealthPolicyMapItem. + The key is the node type name. + This way, as long as no nodes of type "SpecialNodeType" are in Error + state, + even if some of the many nodes in the global pool are in Error state, but + below the global unhealthy percentage, the cluster would be evaluated to + Warning. + A Warning health state does not impact cluster upgrade or other monitoring + triggered by Error health state. + But even one node of type SpecialNodeType in Error would make cluster + unhealthy (in Error rather than Warning/Ok), which triggers rollback or + pauses the cluster upgrade, depending on the upgrade configuration. + Conversely, setting the global MaxPercentUnhealthyNodes to 0, and setting + SpecialNodeType's max percent unhealthy nodes to 100, + with one node of type SpecialNodeType in Error state would still put the + cluster in an Error state, since the global restriction is more strict in + this case. + :type node_type_health_policy_map: + list[~azure.servicefabric.models.NodeTypeHealthPolicyMapItem] """ _attribute_map = { @@ -5669,14 +5825,16 @@ class ClusterHealthPolicy(Model): 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, 'max_percent_unhealthy_applications': {'key': 'MaxPercentUnhealthyApplications', 'type': 'int'}, 'application_type_health_policy_map': {'key': 'ApplicationTypeHealthPolicyMap', 'type': '[ApplicationTypeHealthPolicyMapItem]'}, + 'node_type_health_policy_map': {'key': 'NodeTypeHealthPolicyMap', 'type': '[NodeTypeHealthPolicyMapItem]'}, } - def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_nodes: int=0, max_percent_unhealthy_applications: int=0, application_type_health_policy_map=None, **kwargs) -> None: + def __init__(self, *, consider_warning_as_error: bool=False, max_percent_unhealthy_nodes: int=0, max_percent_unhealthy_applications: int=0, application_type_health_policy_map=None, node_type_health_policy_map=None, **kwargs) -> None: super(ClusterHealthPolicy, self).__init__(**kwargs) self.consider_warning_as_error = consider_warning_as_error self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes self.max_percent_unhealthy_applications = max_percent_unhealthy_applications self.application_type_health_policy_map = application_type_health_policy_map + self.node_type_health_policy_map = node_type_health_policy_map class ClusterHealthReportExpiredEvent(ClusterEvent): @@ -5981,17 +6139,10 @@ class ClusterUpgradeDescriptionObject(Model): evaluate the health of the cluster during a cluster upgrade. :type cluster_upgrade_health_policy: ~azure.servicefabric.models.ClusterUpgradeHealthPolicyObject - :param application_health_policy_map: Defines a map that contains specific - application health policies for different applications. - Each entry specifies as key the application name and as value an - ApplicationHealthPolicy used to evaluate the application health. - If an application is not specified in the map, the application health - evaluation uses the ApplicationHealthPolicy found in its application - manifest or the default application health policy (if no health policy is - defined in the manifest). - The map is empty by default. + :param application_health_policy_map: Represents the map of application + health policies for a ServiceFabric cluster upgrade :type application_health_policy_map: - list[~azure.servicefabric.models.ApplicationHealthPolicyMapItem] + ~azure.servicefabric.models.ApplicationHealthPolicyMapObject """ _attribute_map = { @@ -6006,7 +6157,7 @@ class ClusterUpgradeDescriptionObject(Model): 'monitoring_policy': {'key': 'MonitoringPolicy', 'type': 'MonitoringPolicyDescription'}, 'cluster_health_policy': {'key': 'ClusterHealthPolicy', 'type': 'ClusterHealthPolicy'}, 'cluster_upgrade_health_policy': {'key': 'ClusterUpgradeHealthPolicy', 'type': 'ClusterUpgradeHealthPolicyObject'}, - 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': '[ApplicationHealthPolicyMapItem]'}, + 'application_health_policy_map': {'key': 'ApplicationHealthPolicyMap', 'type': 'ApplicationHealthPolicyMapObject'}, } def __init__(self, *, config_version: str=None, code_version: str=None, upgrade_kind="Rolling", rolling_upgrade_mode="UnmonitoredAuto", upgrade_replica_set_check_timeout_in_seconds: int=None, force_restart: bool=None, sort_order="Default", enable_delta_health_evaluation: bool=None, monitoring_policy=None, cluster_health_policy=None, cluster_upgrade_health_policy=None, application_health_policy_map=None, **kwargs) -> None: @@ -8967,7 +9118,7 @@ class DeployedStatefulServiceReplicaInfo(DeployedServiceReplicaInfo): :type replica_id: str :param replica_role: The role of a replica of a stateful service. Possible values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - 'ActiveSecondary' + 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', 'PrimaryAuxiliary' :type replica_role: str or ~azure.servicefabric.models.ReplicaRole :param reconfiguration_information: Information about current reconfiguration like phase, type, previous configuration role of replica @@ -9307,6 +9458,44 @@ def __init__(self, *, data: float, **kwargs) -> None: self.kind = 'Double' +class DsmsAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Dsms Azure blob store used for storing and + enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param storage_credentials_source_location: Required. The source location + of the storage credentials to connect to the Dsms Azure blob store. + :type storage_credentials_source_location: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'storage_credentials_source_location': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'storage_credentials_source_location': {'key': 'StorageCredentialsSourceLocation', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, *, storage_credentials_source_location: str, container_name: str, friendly_name: str=None, **kwargs) -> None: + super(DsmsAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.storage_credentials_source_location = storage_credentials_source_location + self.container_name = container_name + self.storage_kind = 'DsmsAzureBlobStore' + + class EnableBackupDescription(Model): """Specifies the parameters needed to enable periodic backup. @@ -11373,6 +11562,23 @@ def __init__(self, *, description: str=None, content_type: str=None, **kwargs) - self.kind = 'inlinedValue' +class InstanceLifecycleDescription(Model): + """Describes how the instance will behave. + + :param restore_replica_location_after_upgrade: If set to true, move/swap + replica to original location after upgrade. + :type restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__(self, *, restore_replica_location_after_upgrade: bool=None, **kwargs) -> None: + super(InstanceLifecycleDescription, self).__init__(**kwargs) + self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade + + class Int64PropertyValue(PropertyValue): """Describes a Service Fabric property value of type Int64. @@ -11602,6 +11808,117 @@ def __init__(self, *, database_row_count_estimate: str=None, database_logical_si self.kind = 'KeyValueStore' +class LoadedPartitionInformationQueryDescription(Model): + """Represents data structure that contains query information. + + :param metric_name: Name of the metric for which this information is + provided. + :type metric_name: str + :param service_name: Name of the service this partition belongs to. + :type service_name: str + :param ordering: Ordering of partitions' load. Possible values include: + 'Desc', 'Asc'. Default value: "Desc" . + :type ordering: str or ~azure.servicefabric.models.Ordering + :param max_results: The maximum number of results to be returned as part + of the paged queries. This parameter defines the upper bound on the number + of results returned. The results returned can be less than the specified + maximum results if they do not fit in the message as per the max message + size restrictions defined in the configuration. If this parameter is zero + or not specified, the paged query includes as many results as possible + that fit in the return message. + :type max_results: long + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'ordering': {'key': 'Ordering', 'type': 'str'}, + 'max_results': {'key': 'MaxResults', 'type': 'long'}, + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + } + + def __init__(self, *, metric_name: str=None, service_name: str=None, ordering="Desc", max_results: int=None, continuation_token: str=None, **kwargs) -> None: + super(LoadedPartitionInformationQueryDescription, self).__init__(**kwargs) + self.metric_name = metric_name + self.service_name = service_name + self.ordering = ordering + self.max_results = max_results + self.continuation_token = continuation_token + + +class LoadedPartitionInformationResult(Model): + """Represents partition information. + + All required parameters must be populated in order to send to Azure. + + :param service_name: Required. Name of the service this partition belongs + to. + :type service_name: str + :param partition_id: Required. Id of the partition. + :type partition_id: str + :param metric_name: Required. Name of the metric for which this + information is provided. + :type metric_name: str + :param load: Required. Load for metric. + :type load: long + """ + + _validation = { + 'service_name': {'required': True}, + 'partition_id': {'required': True}, + 'metric_name': {'required': True}, + 'load': {'required': True}, + } + + _attribute_map = { + 'service_name': {'key': 'ServiceName', 'type': 'str'}, + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'load': {'key': 'Load', 'type': 'long'}, + } + + def __init__(self, *, service_name: str, partition_id: str, metric_name: str, load: int, **kwargs) -> None: + super(LoadedPartitionInformationResult, self).__init__(**kwargs) + self.service_name = service_name + self.partition_id = partition_id + self.metric_name = metric_name + self.load = load + + +class LoadedPartitionInformationResultList(Model): + """Represents data structure that contains top/least loaded partitions for a + certain metric. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of application information. + :type items: + list[~azure.servicefabric.models.LoadedPartitionInformationResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[LoadedPartitionInformationResult]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(LoadedPartitionInformationResultList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + class LoadMetricInformation(Model): """Represents data structure that contains load information for a certain metric in a cluster. @@ -11969,6 +12286,76 @@ def __init__(self, *, token_service_endpoint: str=None, managed_identities=None, self.managed_identities = managed_identities +class ManagedIdentityAzureBlobBackupStorageDescription(BackupStorageDescription): + """Describes the parameters for Azure blob store (connected using managed + identity) used for storing and enumerating backups. + + All required parameters must be populated in order to send to Azure. + + :param friendly_name: Friendly name for this backup storage. + :type friendly_name: str + :param storage_kind: Required. Constant filled by server. + :type storage_kind: str + :param managed_identity_type: Required. The type of managed identity to be + used to connect to Azure Blob Store via Managed Identity. Possible values + include: 'Invalid', 'VMSS', 'Cluster' + :type managed_identity_type: str or + ~azure.servicefabric.models.ManagedIdentityType + :param blob_service_uri: Required. The Blob Service Uri to connect to the + Azure blob store.. + :type blob_service_uri: str + :param container_name: Required. The name of the container in the blob + store to store and enumerate backups from. + :type container_name: str + """ + + _validation = { + 'storage_kind': {'required': True}, + 'managed_identity_type': {'required': True}, + 'blob_service_uri': {'required': True}, + 'container_name': {'required': True}, + } + + _attribute_map = { + 'friendly_name': {'key': 'FriendlyName', 'type': 'str'}, + 'storage_kind': {'key': 'StorageKind', 'type': 'str'}, + 'managed_identity_type': {'key': 'ManagedIdentityType', 'type': 'str'}, + 'blob_service_uri': {'key': 'BlobServiceUri', 'type': 'str'}, + 'container_name': {'key': 'ContainerName', 'type': 'str'}, + } + + def __init__(self, *, managed_identity_type, blob_service_uri: str, container_name: str, friendly_name: str=None, **kwargs) -> None: + super(ManagedIdentityAzureBlobBackupStorageDescription, self).__init__(friendly_name=friendly_name, **kwargs) + self.managed_identity_type = managed_identity_type + self.blob_service_uri = blob_service_uri + self.container_name = container_name + self.storage_kind = 'ManagedIdentityAzureBlobStore' + + +class MetricLoadDescription(Model): + """Specifies metric load information. + + :param metric_name: The name of the reported metric. + :type metric_name: str + :param current_load: The current value of the metric load. + :type current_load: long + :param predicted_load: The predicted value of the metric load. + :type predicted_load: long + """ + + _attribute_map = { + 'metric_name': {'key': 'MetricName', 'type': 'str'}, + 'current_load': {'key': 'CurrentLoad', 'type': 'long'}, + 'predicted_load': {'key': 'PredictedLoad', 'type': 'long'}, + } + + def __init__(self, *, metric_name: str=None, current_load: int=None, predicted_load: int=None, **kwargs) -> None: + super(MetricLoadDescription, self).__init__(**kwargs) + self.metric_name = metric_name + self.current_load = current_load + self.predicted_load = predicted_load + + class MonitoringPolicyDescription(Model): """Describes the parameters for monitoring an upgrade in Monitored mode. @@ -13073,6 +13460,9 @@ class NodeInfo(Model): :param node_down_at: Date time in UTC when the node went down. If node has never been down then this value will be zero date time. :type node_down_at: datetime + :param node_tags: List that contains tags, which will be applied to the + nodes. + :type node_tags: list[str] """ _attribute_map = { @@ -13094,9 +13484,10 @@ class NodeInfo(Model): 'node_down_time_in_seconds': {'key': 'NodeDownTimeInSeconds', 'type': 'str'}, 'node_up_at': {'key': 'NodeUpAt', 'type': 'iso-8601'}, 'node_down_at': {'key': 'NodeDownAt', 'type': 'iso-8601'}, + 'node_tags': {'key': 'NodeTags', 'type': '[str]'}, } - def __init__(self, *, name: str=None, ip_address_or_fqdn: str=None, type: str=None, code_version: str=None, config_version: str=None, node_status=None, node_up_time_in_seconds: str=None, health_state=None, is_seed_node: bool=None, upgrade_domain: str=None, fault_domain: str=None, id=None, instance_id: str=None, node_deactivation_info=None, is_stopped: bool=None, node_down_time_in_seconds: str=None, node_up_at=None, node_down_at=None, **kwargs) -> None: + def __init__(self, *, name: str=None, ip_address_or_fqdn: str=None, type: str=None, code_version: str=None, config_version: str=None, node_status=None, node_up_time_in_seconds: str=None, health_state=None, is_seed_node: bool=None, upgrade_domain: str=None, fault_domain: str=None, id=None, instance_id: str=None, node_deactivation_info=None, is_stopped: bool=None, node_down_time_in_seconds: str=None, node_up_at=None, node_down_at=None, node_tags=None, **kwargs) -> None: super(NodeInfo, self).__init__(**kwargs) self.name = name self.ip_address_or_fqdn = ip_address_or_fqdn @@ -13116,6 +13507,7 @@ def __init__(self, *, name: str=None, ip_address_or_fqdn: str=None, type: str=No self.node_down_time_in_seconds = node_down_time_in_seconds self.node_up_at = node_up_at self.node_down_at = node_down_at + self.node_tags = node_tags class NodeLoadInfo(Model): @@ -13735,6 +14127,34 @@ def __init__(self, *, aggregated_health_state=None, description: str=None, max_p self.kind = 'Nodes' +class NodeTagsDescription(Model): + """Describes the tags required for placement or running of the service. + + All required parameters must be populated in order to send to Azure. + + :param count: Required. The number of tags. + :type count: int + :param tags: Required. Array of size specified by the ‘Count’ parameter, + for the placement tags of the service. + :type tags: list[str] + """ + + _validation = { + 'count': {'required': True}, + 'tags': {'required': True}, + } + + _attribute_map = { + 'count': {'key': 'Count', 'type': 'int'}, + 'tags': {'key': 'Tags', 'type': '[str]'}, + } + + def __init__(self, *, count: int, tags, **kwargs) -> None: + super(NodeTagsDescription, self).__init__(**kwargs) + self.count = count + self.tags = tags + + class NodeTransitionProgress(Model): """Information about an NodeTransition operation. This class contains an OperationState and a NodeTransitionResult. The NodeTransitionResult is not @@ -13785,6 +14205,103 @@ def __init__(self, *, error_code: int=None, node_result=None, **kwargs) -> None: self.node_result = node_result +class NodeTypeHealthPolicyMapItem(Model): + """Defines an item in NodeTypeHealthPolicyMap. + + All required parameters must be populated in order to send to Azure. + + :param key: Required. The key of the node type health policy map item. + This is the name of the node type. + :type key: str + :param value: Required. The value of the node type health policy map item. + If the percentage is respected but there is at least one unhealthy node in + the node type, the health is evaluated as Warning. + The percentage is calculated by dividing the number of unhealthy nodes + over the total number of nodes in the node type. + The computation rounds up to tolerate one failure on small numbers of + nodes. + The max percent unhealthy nodes allowed for the node type. Must be between + zero and 100. + :type value: int + """ + + _validation = { + 'key': {'required': True}, + 'value': {'required': True}, + } + + _attribute_map = { + 'key': {'key': 'Key', 'type': 'str'}, + 'value': {'key': 'Value', 'type': 'int'}, + } + + def __init__(self, *, key: str, value: int, **kwargs) -> None: + super(NodeTypeHealthPolicyMapItem, self).__init__(**kwargs) + self.key = key + self.value = value + + +class NodeTypeNodesHealthEvaluation(HealthEvaluation): + """Represents health evaluation for nodes of a particular node type. The node + type nodes evaluation can be returned when cluster health evaluation + returns unhealthy aggregated health state, either Error or Warning. It + contains health evaluations for each unhealthy node of the included node + type that impacted current aggregated health state. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param node_type_name: The node type name as defined in the cluster + manifest. + :type node_type_name: str + :param max_percent_unhealthy_nodes: Maximum allowed percentage of + unhealthy nodes for the node type, specified as an entry in + NodeTypeHealthPolicyMap. + :type max_percent_unhealthy_nodes: int + :param total_count: Total number of nodes of the node type found in the + health store. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + NodeHealthEvaluation of this node type that impacted the aggregated + health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'node_type_name': {'key': 'NodeTypeName', 'type': 'str'}, + 'max_percent_unhealthy_nodes': {'key': 'MaxPercentUnhealthyNodes', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, node_type_name: str=None, max_percent_unhealthy_nodes: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(NodeTypeNodesHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.node_type_name = node_type_name + self.max_percent_unhealthy_nodes = max_percent_unhealthy_nodes + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'NodeTypeNodes' + + class NodeUpEvent(NodeEvent): """Node Up event. @@ -14516,6 +15033,34 @@ def __init__(self, *, continuation_token: str=None, is_consistent: bool=None, su self.sub_names = sub_names +class PagedUpdatePartitionLoadResultList(Model): + """The list of results of the call UpdatePartitionLoad. The list is paged when + all of the results cannot fit in a single message. The next set of results + can be obtained by executing the same query with the continuation token + provided in this list. + + :param continuation_token: The continuation token parameter is used to + obtain next set of results. The continuation token is included in the + response of the API when the results from the system do not fit in a + single response. When this value is passed to the next API call, the API + returns next set of results. If there are no further results, then the + continuation token is not included in the response. + :type continuation_token: str + :param items: List of partition load update information. + :type items: list[~azure.servicefabric.models.UpdatePartitionLoadResult] + """ + + _attribute_map = { + 'continuation_token': {'key': 'ContinuationToken', 'type': 'str'}, + 'items': {'key': 'Items', 'type': '[UpdatePartitionLoadResult]'}, + } + + def __init__(self, *, continuation_token: str=None, items=None, **kwargs) -> None: + super(PagedUpdatePartitionLoadResultList, self).__init__(**kwargs) + self.continuation_token = continuation_token + self.items = items + + class PagedVolumeResourceDescriptionList(Model): """The list of volume resources. The list is paged when all of the results cannot fit in a single message. The next set of results can be obtained by @@ -15070,8 +15615,8 @@ def __init__(self, *, min_instance_count: int, max_instance_count: int, scale_in class PartitionLoadInformation(Model): - """Represents load information for a partition, which contains the primary and - secondary reported load metrics. + """Represents load information for a partition, which contains the primary, + secondary and auxiliary reported load metrics. In case there is no load reported, PartitionLoadInformation will contain the default load for the service of the partition. For default loads, LoadMetricReport's LastReportedUtc is set to 0. @@ -15087,19 +15632,76 @@ class PartitionLoadInformation(Model): Array only contains the latest reported load for each metric. :type secondary_load_metric_reports: list[~azure.servicefabric.models.LoadMetricReport] + :param auxiliary_load_metric_reports: Array of aggregated load reports + from all auxiliary replicas for this partition. + Array only contains the latest reported load for each metric. + :type auxiliary_load_metric_reports: + list[~azure.servicefabric.models.LoadMetricReport] """ _attribute_map = { 'partition_id': {'key': 'PartitionId', 'type': 'str'}, 'primary_load_metric_reports': {'key': 'PrimaryLoadMetricReports', 'type': '[LoadMetricReport]'}, 'secondary_load_metric_reports': {'key': 'SecondaryLoadMetricReports', 'type': '[LoadMetricReport]'}, + 'auxiliary_load_metric_reports': {'key': 'AuxiliaryLoadMetricReports', 'type': '[LoadMetricReport]'}, } - def __init__(self, *, partition_id: str=None, primary_load_metric_reports=None, secondary_load_metric_reports=None, **kwargs) -> None: + def __init__(self, *, partition_id: str=None, primary_load_metric_reports=None, secondary_load_metric_reports=None, auxiliary_load_metric_reports=None, **kwargs) -> None: super(PartitionLoadInformation, self).__init__(**kwargs) self.partition_id = partition_id self.primary_load_metric_reports = primary_load_metric_reports self.secondary_load_metric_reports = secondary_load_metric_reports + self.auxiliary_load_metric_reports = auxiliary_load_metric_reports + + +class PartitionMetricLoadDescription(Model): + """Represents load information for a partition, which contains the metrics + load information about primary, all secondary replicas/instances or a + specific secondary replica/instance on a specific node , all auxiliary + replicas or a specific auxiliary replica on a specific node. + + :param partition_id: Id of the partition. + :type partition_id: str + :param primary_replica_load_entries: Partition's load information for + primary replica, in case partition is from a stateful service. + :type primary_replica_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param secondary_replicas_or_instances_load_entries: Partition's load + information for all secondary replicas or instances. + :type secondary_replicas_or_instances_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param secondary_replica_or_instance_load_entries_per_node: Partition's + load information for a specific secondary replica or instance located on a + specific node. + :type secondary_replica_or_instance_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + :param auxiliary_replicas_load_entries: Partition's load information for + all auxiliary replicas. + :type auxiliary_replicas_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + :param auxiliary_replica_load_entries_per_node: Partition's load + information for a specific auxiliary replica located on a specific node. + :type auxiliary_replica_load_entries_per_node: + list[~azure.servicefabric.models.ReplicaMetricLoadDescription] + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'primary_replica_load_entries': {'key': 'PrimaryReplicaLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replicas_or_instances_load_entries': {'key': 'SecondaryReplicasOrInstancesLoadEntries', 'type': '[MetricLoadDescription]'}, + 'secondary_replica_or_instance_load_entries_per_node': {'key': 'SecondaryReplicaOrInstanceLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + 'auxiliary_replicas_load_entries': {'key': 'AuxiliaryReplicasLoadEntries', 'type': '[MetricLoadDescription]'}, + 'auxiliary_replica_load_entries_per_node': {'key': 'AuxiliaryReplicaLoadEntriesPerNode', 'type': '[ReplicaMetricLoadDescription]'}, + } + + def __init__(self, *, partition_id: str=None, primary_replica_load_entries=None, secondary_replicas_or_instances_load_entries=None, secondary_replica_or_instance_load_entries_per_node=None, auxiliary_replicas_load_entries=None, auxiliary_replica_load_entries_per_node=None, **kwargs) -> None: + super(PartitionMetricLoadDescription, self).__init__(**kwargs) + self.partition_id = partition_id + self.primary_replica_load_entries = primary_replica_load_entries + self.secondary_replicas_or_instances_load_entries = secondary_replicas_or_instances_load_entries + self.secondary_replica_or_instance_load_entries_per_node = secondary_replica_or_instance_load_entries_per_node + self.auxiliary_replicas_load_entries = auxiliary_replicas_load_entries + self.auxiliary_replica_load_entries_per_node = auxiliary_replica_load_entries_per_node class PartitionNewHealthReportEvent(PartitionEvent): @@ -15937,7 +16539,8 @@ class ReconfigurationInformation(Model): :param previous_configuration_role: Replica role before reconfiguration started. Possible values include: 'Unknown', 'None', 'Primary', - 'IdleSecondary', 'ActiveSecondary' + 'IdleSecondary', 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', + 'PrimaryAuxiliary' :type previous_configuration_role: str or ~azure.servicefabric.models.ReplicaRole :param reconfiguration_phase: Current phase of ongoing reconfiguration. If @@ -16856,6 +17459,52 @@ def __init__(self, *, replica_status=None, health_state=None, node_name: str=Non self.service_kind = None +class ReplicaLifecycleDescription(Model): + """Describes how the replica will behave. + + :param is_singleton_replica_move_allowed_during_upgrade: If set to true, + replicas with a target replica set size of 1 will be permitted to move + during upgrade. + :type is_singleton_replica_move_allowed_during_upgrade: bool + :param restore_replica_location_after_upgrade: If set to true, move/swap + replica to original location after upgrade. + :type restore_replica_location_after_upgrade: bool + """ + + _attribute_map = { + 'is_singleton_replica_move_allowed_during_upgrade': {'key': 'IsSingletonReplicaMoveAllowedDuringUpgrade', 'type': 'bool'}, + 'restore_replica_location_after_upgrade': {'key': 'RestoreReplicaLocationAfterUpgrade', 'type': 'bool'}, + } + + def __init__(self, *, is_singleton_replica_move_allowed_during_upgrade: bool=None, restore_replica_location_after_upgrade: bool=None, **kwargs) -> None: + super(ReplicaLifecycleDescription, self).__init__(**kwargs) + self.is_singleton_replica_move_allowed_during_upgrade = is_singleton_replica_move_allowed_during_upgrade + self.restore_replica_location_after_upgrade = restore_replica_location_after_upgrade + + +class ReplicaMetricLoadDescription(Model): + """Specifies metric loads of a partition's specific secondary replica or + instance. + + :param node_name: Node name of a specific secondary replica or instance. + :type node_name: str + :param replica_or_instance_load_entries: Loads of a different metrics for + a partition's secondary replica or instance. + :type replica_or_instance_load_entries: + list[~azure.servicefabric.models.MetricLoadDescription] + """ + + _attribute_map = { + 'node_name': {'key': 'NodeName', 'type': 'str'}, + 'replica_or_instance_load_entries': {'key': 'ReplicaOrInstanceLoadEntries', 'type': '[MetricLoadDescription]'}, + } + + def __init__(self, *, node_name: str=None, replica_or_instance_load_entries=None, **kwargs) -> None: + super(ReplicaMetricLoadDescription, self).__init__(**kwargs) + self.node_name = node_name + self.replica_or_instance_load_entries = replica_or_instance_load_entries + + class ReplicasHealthEvaluation(HealthEvaluation): """Represents health evaluation for replicas, containing health evaluations for each unhealthy replica that impacted current aggregated health state. @@ -18256,6 +18905,12 @@ class ServiceDescription(Model): :param scaling_policies: Scaling policies for this service. :type scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription :param service_kind: Required. Constant filled by server. :type service_kind: str """ @@ -18282,6 +18937,8 @@ class ServiceDescription(Model): 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, } @@ -18289,7 +18946,7 @@ class ServiceDescription(Model): 'service_kind': {'Stateful': 'StatefulServiceDescription', 'Stateless': 'StatelessServiceDescription'} } - def __init__(self, *, service_name: str, service_type_name: str, partition_description, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, **kwargs) -> None: + def __init__(self, *, service_name: str, service_type_name: str, partition_description, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, **kwargs) -> None: super(ServiceDescription, self).__init__(**kwargs) self.application_name = application_name self.service_name = service_name @@ -18305,6 +18962,8 @@ def __init__(self, *, service_name: str, service_type_name: str, partition_descr self.service_package_activation_mode = service_package_activation_mode self.service_dns_name = service_dns_name self.scaling_policies = scaling_policies + self.tags_required_to_place = tags_required_to_place + self.tags_required_to_run = tags_required_to_run self.service_kind = None @@ -18803,6 +19462,10 @@ class ServiceLoadMetricDescription(Model): default amount of load, as a number, that this service creates for this metric when it is a Secondary replica. :type secondary_default_load: int + :param auxiliary_default_load: Used only for Stateful services. The + default amount of load, as a number, that this service creates for this + metric when it is an Auxiliary replica. + :type auxiliary_default_load: int :param default_load: Used only for Stateless services. The default amount of load, as a number, that this service creates for this metric. :type default_load: int @@ -18817,15 +19480,17 @@ class ServiceLoadMetricDescription(Model): 'weight': {'key': 'Weight', 'type': 'str'}, 'primary_default_load': {'key': 'PrimaryDefaultLoad', 'type': 'int'}, 'secondary_default_load': {'key': 'SecondaryDefaultLoad', 'type': 'int'}, + 'auxiliary_default_load': {'key': 'AuxiliaryDefaultLoad', 'type': 'int'}, 'default_load': {'key': 'DefaultLoad', 'type': 'int'}, } - def __init__(self, *, name: str, weight=None, primary_default_load: int=None, secondary_default_load: int=None, default_load: int=None, **kwargs) -> None: + def __init__(self, *, name: str, weight=None, primary_default_load: int=None, secondary_default_load: int=None, auxiliary_default_load: int=None, default_load: int=None, **kwargs) -> None: super(ServiceLoadMetricDescription, self).__init__(**kwargs) self.name = name self.weight = weight self.primary_default_load = primary_default_load self.secondary_default_load = secondary_default_load + self.auxiliary_default_load = auxiliary_default_load self.default_load = default_load @@ -19004,6 +19669,7 @@ class ServicePlacementPolicyDescription(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: ServicePlacementInvalidDomainPolicyDescription, ServicePlacementNonPartiallyPlaceServicePolicyDescription, + ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, ServicePlacementPreferPrimaryDomainPolicyDescription, ServicePlacementRequiredDomainPolicyDescription, ServicePlacementRequireDomainDistributionPolicyDescription @@ -19023,7 +19689,7 @@ class ServicePlacementPolicyDescription(Model): } _subtype_map = { - 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} + 'type': {'InvalidDomain': 'ServicePlacementInvalidDomainPolicyDescription', 'NonPartiallyPlaceService': 'ServicePlacementNonPartiallyPlaceServicePolicyDescription', 'AllowMultipleStatelessInstancesOnNode': 'ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription', 'PreferPrimaryDomain': 'ServicePlacementPreferPrimaryDomainPolicyDescription', 'RequireDomain': 'ServicePlacementRequiredDomainPolicyDescription', 'RequireDomainDistribution': 'ServicePlacementRequireDomainDistributionPolicyDescription'} } def __init__(self, **kwargs) -> None: @@ -19031,6 +19697,36 @@ def __init__(self, **kwargs) -> None: self.type = None +class ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription(ServicePlacementPolicyDescription): + """Describes the policy to be used for placement of a Service Fabric service + allowing multiple stateless instances of a partition of the service to be + placed on a node. + + All required parameters must be populated in order to send to Azure. + + :param type: Required. Constant filled by server. + :type type: str + :param domain_name: Holdover from other policy descriptions, not used for + this policy, values are ignored by runtime. Keeping it for any + backwards-compatibility with clients. + :type domain_name: str + """ + + _validation = { + 'type': {'required': True}, + } + + _attribute_map = { + 'type': {'key': 'Type', 'type': 'str'}, + 'domain_name': {'key': 'DomainName', 'type': 'str'}, + } + + def __init__(self, *, domain_name: str=None, **kwargs) -> None: + super(ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, self).__init__(**kwargs) + self.domain_name = domain_name + self.type = 'AllowMultipleStatelessInstancesOnNode' + + class ServicePlacementInvalidDomainPolicyDescription(ServicePlacementPolicyDescription): """Describes the policy to be used for placement of a Service Fabric service where a particular fault or upgrade domain should not be used for placement @@ -19766,6 +20462,16 @@ class ServiceUpdateDescription(Model): set. The value is 8192. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. :type flags: str :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow @@ -19788,6 +20494,12 @@ class ServiceUpdateDescription(Model): :param scaling_policies: Scaling policies for this service. :type scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription :param service_kind: Required. Constant filled by server. :type service_kind: str """ @@ -19804,6 +20516,9 @@ class ServiceUpdateDescription(Model): 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, } @@ -19811,7 +20526,7 @@ class ServiceUpdateDescription(Model): 'service_kind': {'Stateful': 'StatefulServiceUpdateDescription', 'Stateless': 'StatelessServiceUpdateDescription'} } - def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, **kwargs) -> None: + def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, **kwargs) -> None: super(ServiceUpdateDescription, self).__init__(**kwargs) self.flags = flags self.placement_constraints = placement_constraints @@ -19820,6 +20535,9 @@ def __init__(self, *, flags: str=None, placement_constraints: str=None, correlat self.service_placement_policies = service_placement_policies self.default_move_cost = default_move_cost self.scaling_policies = scaling_policies + self.service_dns_name = service_dns_name + self.tags_for_placement = tags_for_placement + self.tags_for_running = tags_for_running self.service_kind = None @@ -20324,6 +21042,12 @@ class StatefulServiceDescription(ServiceDescription): :param scaling_policies: Scaling policies for this service. :type scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription :param service_kind: Required. Constant filled by server. :type service_kind: str :param target_replica_set_size: Required. The target replica set size as a @@ -20353,6 +21077,8 @@ class StatefulServiceDescription(ServiceDescription): property is set. The value is 4. - ServicePlacementTimeLimit - Indicates the ServicePlacementTimeLimit property is set. The value is 8. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 16. :type flags: int :param replica_restart_wait_duration_seconds: The duration, in seconds, between when a replica goes down and when a new replica is created. @@ -20366,6 +21092,20 @@ class StatefulServiceDescription(ServiceDescription): :param service_placement_time_limit_seconds: The duration for which replicas can stay InBuild before reporting that build is stuck. :type service_placement_time_limit_seconds: long + :param drop_source_replica_on_move: Indicates whether to drop source + Secondary replica even if the target replica has not finished build. If + desired behavior is to drop it as soon as possible the value of this + property is true, if not it is false. + :type drop_source_replica_on_move: bool + :param replica_lifecycle_description: Defines how replicas of this service + will behave during their lifecycle. + :type replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + :param auxiliary_replica_count: The auxiliary replica count as a number. + To use Auxiliary replicas, the following must be true: + AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :type auxiliary_replica_count: int """ _validation = { @@ -20380,6 +21120,7 @@ class StatefulServiceDescription(ServiceDescription): 'quorum_loss_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, 'stand_by_replica_keep_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, 'service_placement_time_limit_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'auxiliary_replica_count': {'minimum': 0}, } _attribute_map = { @@ -20397,6 +21138,8 @@ class StatefulServiceDescription(ServiceDescription): 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, @@ -20406,10 +21149,13 @@ class StatefulServiceDescription(ServiceDescription): 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'long'}, 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'long'}, 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'long'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, } - def __init__(self, *, service_name: str, service_type_name: str, partition_description, target_replica_set_size: int, min_replica_set_size: int, has_persisted_state: bool, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, flags: int=None, replica_restart_wait_duration_seconds: int=None, quorum_loss_wait_duration_seconds: int=None, stand_by_replica_keep_duration_seconds: int=None, service_placement_time_limit_seconds: int=None, **kwargs) -> None: - super(StatefulServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, 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, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, **kwargs) + def __init__(self, *, service_name: str, service_type_name: str, partition_description, target_replica_set_size: int, min_replica_set_size: int, has_persisted_state: bool, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, flags: int=None, replica_restart_wait_duration_seconds: int=None, quorum_loss_wait_duration_seconds: int=None, stand_by_replica_keep_duration_seconds: int=None, service_placement_time_limit_seconds: int=None, drop_source_replica_on_move: bool=None, replica_lifecycle_description=None, auxiliary_replica_count: int=None, **kwargs) -> None: + super(StatefulServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, 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, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) self.target_replica_set_size = target_replica_set_size self.min_replica_set_size = min_replica_set_size self.has_persisted_state = has_persisted_state @@ -20418,6 +21164,9 @@ def __init__(self, *, service_name: str, service_type_name: str, partition_descr self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds self.service_placement_time_limit_seconds = service_placement_time_limit_seconds + self.drop_source_replica_on_move = drop_source_replica_on_move + self.replica_lifecycle_description = replica_lifecycle_description + self.auxiliary_replica_count = auxiliary_replica_count self.service_kind = 'Stateful' @@ -20503,6 +21252,11 @@ class StatefulServicePartitionInfo(ServicePartitionInfo): :type target_replica_set_size: long :param min_replica_set_size: The minimum replica set size as a number. :type min_replica_set_size: long + :param auxiliary_replica_count: The auxiliary replica count as a number. + To use Auxiliary replicas the following must be true, + AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :type auxiliary_replica_count: long :param last_quorum_loss_duration: The duration for which this partition was in quorum loss. If the partition is currently in quorum loss, it returns the duration since it has been in that state. This field is using @@ -20527,14 +21281,16 @@ class StatefulServicePartitionInfo(ServicePartitionInfo): 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'long'}, 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'long'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'long'}, 'last_quorum_loss_duration': {'key': 'LastQuorumLossDuration', 'type': 'duration'}, 'primary_epoch': {'key': 'PrimaryEpoch', 'type': 'Epoch'}, } - def __init__(self, *, health_state=None, partition_status=None, partition_information=None, target_replica_set_size: int=None, min_replica_set_size: int=None, last_quorum_loss_duration=None, primary_epoch=None, **kwargs) -> None: + def __init__(self, *, health_state=None, partition_status=None, partition_information=None, target_replica_set_size: int=None, min_replica_set_size: int=None, auxiliary_replica_count: int=None, last_quorum_loss_duration=None, primary_epoch=None, **kwargs) -> None: super(StatefulServicePartitionInfo, self).__init__(health_state=health_state, partition_status=partition_status, partition_information=partition_information, **kwargs) self.target_replica_set_size = target_replica_set_size self.min_replica_set_size = min_replica_set_size + self.auxiliary_replica_count = auxiliary_replica_count self.last_quorum_loss_duration = last_quorum_loss_duration self.primary_epoch = primary_epoch self.service_kind = 'Stateful' @@ -20668,7 +21424,7 @@ class StatefulServiceReplicaInfo(ReplicaInfo): :type service_kind: str :param replica_role: The role of a replica of a stateful service. Possible values include: 'Unknown', 'None', 'Primary', 'IdleSecondary', - 'ActiveSecondary' + 'ActiveSecondary', 'IdleAuxiliary', 'ActiveAuxiliary', 'PrimaryAuxiliary' :type replica_role: str or ~azure.servicefabric.models.ReplicaRole :param replica_id: Id of a stateful service replica. ReplicaId is used by Service Fabric to uniquely identify a replica of a partition. It is unique @@ -20803,6 +21559,16 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): set. The value is 8192. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. :type flags: str :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow @@ -20825,6 +21591,12 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): :param scaling_policies: Scaling policies for this service. :type scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription :param service_kind: Required. Constant filled by server. :type service_kind: str :param target_replica_set_size: The target replica set size as a number. @@ -20843,12 +21615,27 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): :param service_placement_time_limit_seconds: The duration for which replicas can stay InBuild before reporting that build is stuck. :type service_placement_time_limit_seconds: str + :param drop_source_replica_on_move: Indicates whether to drop source + Secondary replica even if the target replica has not finished build. If + desired behavior is to drop it as soon as possible the value of this + property is true, if not it is false. + :type drop_source_replica_on_move: bool + :param replica_lifecycle_description: Defines how replicas of this service + will behave during their lifecycle. + :type replica_lifecycle_description: + ~azure.servicefabric.models.ReplicaLifecycleDescription + :param auxiliary_replica_count: The auxiliary replica count as a number. + To use Auxiliary replicas, the following must be true: + AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and + TargetReplicaSetSize >=3. + :type auxiliary_replica_count: int """ _validation = { 'service_kind': {'required': True}, 'target_replica_set_size': {'minimum': 1}, 'min_replica_set_size': {'minimum': 1}, + 'auxiliary_replica_count': {'minimum': 0}, } _attribute_map = { @@ -20859,6 +21646,9 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, 'target_replica_set_size': {'key': 'TargetReplicaSetSize', 'type': 'int'}, 'min_replica_set_size': {'key': 'MinReplicaSetSize', 'type': 'int'}, @@ -20866,16 +21656,22 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): 'quorum_loss_wait_duration_seconds': {'key': 'QuorumLossWaitDurationSeconds', 'type': 'str'}, 'stand_by_replica_keep_duration_seconds': {'key': 'StandByReplicaKeepDurationSeconds', 'type': 'str'}, 'service_placement_time_limit_seconds': {'key': 'ServicePlacementTimeLimitSeconds', 'type': 'str'}, + 'drop_source_replica_on_move': {'key': 'DropSourceReplicaOnMove', 'type': 'bool'}, + 'replica_lifecycle_description': {'key': 'ReplicaLifecycleDescription', 'type': 'ReplicaLifecycleDescription'}, + 'auxiliary_replica_count': {'key': 'AuxiliaryReplicaCount', 'type': 'int'}, } - def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, target_replica_set_size: int=None, min_replica_set_size: int=None, replica_restart_wait_duration_seconds: str=None, quorum_loss_wait_duration_seconds: str=None, stand_by_replica_keep_duration_seconds: str=None, service_placement_time_limit_seconds: str=None, **kwargs) -> None: - super(StatefulServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, **kwargs) + def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, target_replica_set_size: int=None, min_replica_set_size: int=None, replica_restart_wait_duration_seconds: str=None, quorum_loss_wait_duration_seconds: str=None, stand_by_replica_keep_duration_seconds: str=None, service_placement_time_limit_seconds: str=None, drop_source_replica_on_move: bool=None, replica_lifecycle_description=None, auxiliary_replica_count: int=None, **kwargs) -> None: + super(StatefulServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) self.target_replica_set_size = target_replica_set_size self.min_replica_set_size = min_replica_set_size self.replica_restart_wait_duration_seconds = replica_restart_wait_duration_seconds self.quorum_loss_wait_duration_seconds = quorum_loss_wait_duration_seconds self.stand_by_replica_keep_duration_seconds = stand_by_replica_keep_duration_seconds self.service_placement_time_limit_seconds = service_placement_time_limit_seconds + self.drop_source_replica_on_move = drop_source_replica_on_move + self.replica_lifecycle_description = replica_lifecycle_description + self.auxiliary_replica_count = auxiliary_replica_count self.service_kind = 'Stateful' @@ -21127,6 +21923,12 @@ class StatelessServiceDescription(ServiceDescription): :param scaling_policies: Scaling policies for this service. :type scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :param tags_required_to_place: Tags for placement of this service. + :type tags_required_to_place: + ~azure.servicefabric.models.NodeTagsDescription + :param tags_required_to_run: Tags for running of this service. + :type tags_required_to_run: + ~azure.servicefabric.models.NodeTagsDescription :param service_kind: Required. Constant filled by server. :type service_kind: str :param instance_count: Required. The instance count. @@ -21162,6 +21964,8 @@ class StatelessServiceDescription(ServiceDescription): zero. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 1. + - InstanceRestartWaitDuration - Indicates the + InstanceRestartWaitDurationSeconds property is set. The value is 2. :type flags: int :param instance_close_delay_duration_seconds: Duration in seconds, to wait before a stateless instance is closed, to allow the active requests to @@ -21181,6 +21985,19 @@ class StatelessServiceDescription(ServiceDescription): indicates that there won't be any delay or removal of the endpoint prior to closing the instance. :type instance_close_delay_duration_seconds: long + :param instance_lifecycle_description: Defines how instances of this + service will behave during their lifecycle. + :type instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :param instance_restart_wait_duration_seconds: When a stateless instance + goes down, this timer starts. When it expires Service Fabric will create a + new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in + situations where the instance going down is likely to recover in a short + time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes + down, Service Fabric will immediately start building its replacement. + :type instance_restart_wait_duration_seconds: long """ _validation = { @@ -21190,6 +22007,7 @@ class StatelessServiceDescription(ServiceDescription): 'service_kind': {'required': True}, 'instance_count': {'required': True, 'minimum': -1}, 'instance_close_delay_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, + 'instance_restart_wait_duration_seconds': {'maximum': 4294967295, 'minimum': 0}, } _attribute_map = { @@ -21207,21 +22025,27 @@ class StatelessServiceDescription(ServiceDescription): 'service_package_activation_mode': {'key': 'ServicePackageActivationMode', 'type': 'str'}, 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'tags_required_to_place': {'key': 'TagsRequiredToPlace', 'type': 'NodeTagsDescription'}, + 'tags_required_to_run': {'key': 'TagsRequiredToRun', 'type': 'NodeTagsDescription'}, 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, 'flags': {'key': 'Flags', 'type': 'int'}, 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'long'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'long'}, } - def __init__(self, *, service_name: str, service_type_name: str, partition_description, instance_count: int, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, min_instance_count: int=None, min_instance_percentage: int=None, flags: int=None, instance_close_delay_duration_seconds: int=None, **kwargs) -> None: - super(StatelessServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, 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, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, **kwargs) + def __init__(self, *, service_name: str, service_type_name: str, partition_description, instance_count: int, application_name: str=None, initialization_data=None, placement_constraints: str=None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: bool=None, service_package_activation_mode=None, service_dns_name: str=None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, min_instance_count: int=None, min_instance_percentage: int=None, flags: int=None, instance_close_delay_duration_seconds: int=None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: int=None, **kwargs) -> None: + super(StatelessServiceDescription, self).__init__(application_name=application_name, service_name=service_name, service_type_name=service_type_name, initialization_data=initialization_data, partition_description=partition_description, 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, is_default_move_cost_specified=is_default_move_cost_specified, service_package_activation_mode=service_package_activation_mode, service_dns_name=service_dns_name, scaling_policies=scaling_policies, tags_required_to_place=tags_required_to_place, tags_required_to_run=tags_required_to_run, **kwargs) self.instance_count = instance_count self.min_instance_count = min_instance_count self.min_instance_percentage = min_instance_percentage self.flags = flags self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds + self.instance_lifecycle_description = instance_lifecycle_description + self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds self.service_kind = 'Stateless' @@ -21594,6 +22418,16 @@ class StatelessServiceUpdateDescription(ServiceUpdateDescription): set. The value is 8192. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + - InstanceRestartWaitDuration - Indicates the InstanceCloseDelayDuration + property is set. The value is 32768. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 65536. + - ServiceDnsName - Indicates the ServiceDnsName property is set. The value + is 131072. + - TagsForPlacement - Indicates the TagsForPlacement property is set. The + value is 1048576. + - TagsForRunning - Indicates the TagsForRunning property is set. The value + is 2097152. :type flags: str :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow @@ -21616,6 +22450,12 @@ class StatelessServiceUpdateDescription(ServiceUpdateDescription): :param scaling_policies: Scaling policies for this service. :type scaling_policies: list[~azure.servicefabric.models.ScalingPolicyDescription] + :param service_dns_name: The DNS name of the service. + :type service_dns_name: str + :param tags_for_placement: Tags for placement of this service. + :type tags_for_placement: ~azure.servicefabric.models.NodeTagsDescription + :param tags_for_running: Tags for running of this service. + :type tags_for_running: ~azure.servicefabric.models.NodeTagsDescription :param service_kind: Required. Constant filled by server. :type service_kind: str :param instance_count: The instance count. @@ -21655,6 +22495,19 @@ class StatelessServiceUpdateDescription(ServiceUpdateDescription): - Connect to a different instance of the service partition for future requests. :type instance_close_delay_duration_seconds: str + :param instance_lifecycle_description: Defines how instances of this + service will behave during their lifecycle. + :type instance_lifecycle_description: + ~azure.servicefabric.models.InstanceLifecycleDescription + :param instance_restart_wait_duration_seconds: When a stateless instance + goes down, this timer starts. When it expires Service Fabric will create a + new instance on any node in the cluster. + This configuration is to reduce unnecessary creation of a new instance in + situations where the instance going down is likely to recover in a short + time. For example, during an upgrade. + The default value is 0, which indicates that when stateless instance goes + down, Service Fabric will immediately start building its replacement. + :type instance_restart_wait_duration_seconds: str """ _validation = { @@ -21670,19 +22523,26 @@ class StatelessServiceUpdateDescription(ServiceUpdateDescription): 'service_placement_policies': {'key': 'ServicePlacementPolicies', 'type': '[ServicePlacementPolicyDescription]'}, 'default_move_cost': {'key': 'DefaultMoveCost', 'type': 'str'}, 'scaling_policies': {'key': 'ScalingPolicies', 'type': '[ScalingPolicyDescription]'}, + 'service_dns_name': {'key': 'ServiceDnsName', 'type': 'str'}, + 'tags_for_placement': {'key': 'TagsForPlacement', 'type': 'NodeTagsDescription'}, + 'tags_for_running': {'key': 'TagsForRunning', 'type': 'NodeTagsDescription'}, 'service_kind': {'key': 'ServiceKind', 'type': 'str'}, 'instance_count': {'key': 'InstanceCount', 'type': 'int'}, 'min_instance_count': {'key': 'MinInstanceCount', 'type': 'int'}, 'min_instance_percentage': {'key': 'MinInstancePercentage', 'type': 'int'}, 'instance_close_delay_duration_seconds': {'key': 'InstanceCloseDelayDurationSeconds', 'type': 'str'}, + 'instance_lifecycle_description': {'key': 'InstanceLifecycleDescription', 'type': 'InstanceLifecycleDescription'}, + 'instance_restart_wait_duration_seconds': {'key': 'InstanceRestartWaitDurationSeconds', 'type': 'str'}, } - def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, instance_count: int=None, min_instance_count: int=None, min_instance_percentage: int=None, instance_close_delay_duration_seconds: str=None, **kwargs) -> None: - super(StatelessServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, **kwargs) + def __init__(self, *, flags: str=None, placement_constraints: str=None, correlation_scheme=None, load_metrics=None, service_placement_policies=None, default_move_cost=None, scaling_policies=None, service_dns_name: str=None, tags_for_placement=None, tags_for_running=None, instance_count: int=None, min_instance_count: int=None, min_instance_percentage: int=None, instance_close_delay_duration_seconds: str=None, instance_lifecycle_description=None, instance_restart_wait_duration_seconds: str=None, **kwargs) -> None: + super(StatelessServiceUpdateDescription, self).__init__(flags=flags, placement_constraints=placement_constraints, correlation_scheme=correlation_scheme, load_metrics=load_metrics, service_placement_policies=service_placement_policies, default_move_cost=default_move_cost, scaling_policies=scaling_policies, service_dns_name=service_dns_name, tags_for_placement=tags_for_placement, tags_for_running=tags_for_running, **kwargs) self.instance_count = instance_count self.min_instance_count = min_instance_count self.min_instance_percentage = min_instance_percentage self.instance_close_delay_duration_seconds = instance_close_delay_duration_seconds + self.instance_lifecycle_description = instance_lifecycle_description + self.instance_restart_wait_duration_seconds = instance_restart_wait_duration_seconds self.service_kind = 'Stateless' @@ -22153,6 +23013,29 @@ def __init__(self, *, upgrade_kind="Rolling", update_description=None, cluster_h self.application_health_policy_map = application_health_policy_map +class UpdatePartitionLoadResult(Model): + """Specifies result of updating load for specified partitions. The output will + be ordered based on the partition ID. + + :param partition_id: Id of the partition. + :type partition_id: str + :param partition_error_code: If OperationState is Completed - this is 0. + If OperationState is Faulted - this is an error code indicating the + reason. + :type partition_error_code: int + """ + + _attribute_map = { + 'partition_id': {'key': 'PartitionId', 'type': 'str'}, + 'partition_error_code': {'key': 'PartitionErrorCode', 'type': 'int'}, + } + + def __init__(self, *, partition_id: str=None, partition_error_code: int=None, **kwargs) -> None: + super(UpdatePartitionLoadResult, self).__init__(**kwargs) + self.partition_id = partition_id + self.partition_error_code = partition_error_code + + class UpgradeDomainDeltaNodesCheckHealthEvaluation(HealthEvaluation): """Represents health evaluation for delta unhealthy cluster nodes in an upgrade domain, containing health evaluations for each unhealthy node that @@ -22223,6 +23106,66 @@ def __init__(self, *, aggregated_health_state=None, description: str=None, upgra self.kind = 'UpgradeDomainDeltaNodesCheck' +class UpgradeDomainDeployedApplicationsHealthEvaluation(HealthEvaluation): + """Represents health evaluation for deployed applications in an upgrade + domain, containing health evaluations for each unhealthy deployed + application that impacted current aggregated health state. Can be returned + when evaluating cluster health during cluster upgrade and the aggregated + health state is either Error or Warning. + + All required parameters must be populated in order to send to Azure. + + :param aggregated_health_state: The health state of a Service Fabric + entity such as Cluster, Node, Application, Service, Partition, Replica + etc. Possible values include: 'Invalid', 'Ok', 'Warning', 'Error', + 'Unknown' + :type aggregated_health_state: str or + ~azure.servicefabric.models.HealthState + :param description: Description of the health evaluation, which represents + a summary of the evaluation process. + :type description: str + :param kind: Required. Constant filled by server. + :type kind: str + :param upgrade_domain_name: Name of the upgrade domain where deployed + applications health is currently evaluated. + :type upgrade_domain_name: str + :param max_percent_unhealthy_deployed_applications: Maximum allowed + percentage of unhealthy deployed applications from the + ClusterHealthPolicy. + :type max_percent_unhealthy_deployed_applications: int + :param total_count: Total number of deployed applications in the current + upgrade domain. + :type total_count: long + :param unhealthy_evaluations: List of unhealthy evaluations that led to + the aggregated health state. Includes all the unhealthy + DeployedApplicationHealthEvaluation that impacted the aggregated health. + :type unhealthy_evaluations: + list[~azure.servicefabric.models.HealthEvaluationWrapper] + """ + + _validation = { + 'kind': {'required': True}, + } + + _attribute_map = { + 'aggregated_health_state': {'key': 'AggregatedHealthState', 'type': 'str'}, + 'description': {'key': 'Description', 'type': 'str'}, + 'kind': {'key': 'Kind', 'type': 'str'}, + 'upgrade_domain_name': {'key': 'UpgradeDomainName', 'type': 'str'}, + 'max_percent_unhealthy_deployed_applications': {'key': 'MaxPercentUnhealthyDeployedApplications', 'type': 'int'}, + 'total_count': {'key': 'TotalCount', 'type': 'long'}, + 'unhealthy_evaluations': {'key': 'UnhealthyEvaluations', 'type': '[HealthEvaluationWrapper]'}, + } + + def __init__(self, *, aggregated_health_state=None, description: str=None, upgrade_domain_name: str=None, max_percent_unhealthy_deployed_applications: int=None, total_count: int=None, unhealthy_evaluations=None, **kwargs) -> None: + super(UpgradeDomainDeployedApplicationsHealthEvaluation, self).__init__(aggregated_health_state=aggregated_health_state, description=description, **kwargs) + self.upgrade_domain_name = upgrade_domain_name + self.max_percent_unhealthy_deployed_applications = max_percent_unhealthy_deployed_applications + self.total_count = total_count + self.unhealthy_evaluations = unhealthy_evaluations + self.kind = 'UpgradeDomainDeployedApplications' + + class UpgradeDomainInfo(Model): """Information about an upgrade domain. diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_service_fabric_client_ap_is_enums.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_service_fabric_client_ap_is_enums.py index ed96764ff68e..3d849ffcb94c 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_service_fabric_client_ap_is_enums.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_service_fabric_client_ap_is_enums.py @@ -251,6 +251,9 @@ class ReplicaRole(str, Enum): primary = "Primary" #: Refers to the replica in the set on which all read and write operations are complete in order to enforce strong consistency semantics. Read operations are handled directly by the Primary replica, while write operations must be acknowledged by a quorum of the replicas in the replica set. There can only be one Primary replica in a replica set at a time. The value is 2. idle_secondary = "IdleSecondary" #: Refers to a replica in the set that receives a state transfer from the Primary replica to prepare for becoming an active Secondary replica. There can be multiple Idle Secondary replicas in a replica set at a time. Idle Secondary replicas do not count as a part of a write quorum. The value is 3. active_secondary = "ActiveSecondary" #: Refers to a replica in the set that receives state updates from the Primary replica, applies them, and sends acknowledgements back. Secondary replicas must participate in the write quorum for a replica set. There can be multiple active Secondary replicas in a replica set at a time. The number of active Secondary replicas is configurable that the reliability subsystem should maintain. The value is 4. + idle_auxiliary = "IdleAuxiliary" #: Refers to a replica in the set that receives a state transfer from the Primary replica to prepare for becoming an ActiveAuxiliary replica. There can be multiple IdleAuxiliary replicas in a replica set at a time. IdleAuxiliary replicas do not count as a part of a write quorum. The value is 5. + active_auxiliary = "ActiveAuxiliary" #: Refers to a replica in the set that receives state updates from the Primary replica, applies them, and sends acknowledgements back. ActiveAuxiliary replicas must participate in the write quorum for a replica set. There can be multiple active ActiveAuxiliary replicas in a replica set at a time. The number of active ActiveAuxiliary replicas is configurable that the reliability subsystem should maintain. The value is 6. + primary_auxiliary = "PrimaryAuxiliary" #: Refers to the replica in the set that is used to rebuild a new Secondary replica to relinquish primary status to. It cannot field read or write requests. The value is 7. class ReconfigurationPhase(str, Enum): @@ -376,6 +379,13 @@ class HealthEvaluationKind(str, Enum): delta_nodes_check = "DeltaNodesCheck" #: Indicates that the health evaluation is for the delta of unhealthy cluster nodes. The value is 19. upgrade_domain_delta_nodes_check = "UpgradeDomainDeltaNodesCheck" #: Indicates that the health evaluation is for the delta of unhealthy upgrade domain cluster nodes. The value is 20. application_type_applications = "ApplicationTypeApplications" #: – Indicates that the health evaluation is for applications of an application type. The value is 21. + node_type_nodes = "NodeTypeNodes" #: – Indicates that the health evaluation is for nodes of a node type. The value is 22. + + +class Ordering(str, Enum): + + desc = "Desc" #: Descending sort order. + asc = "Asc" #: Ascending sort order. class NodeDeactivationIntent(str, Enum): @@ -496,6 +506,7 @@ class ServicePlacementPolicyType(str, Enum): prefer_primary_domain = "PreferPrimaryDomain" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementPreferPrimaryDomainPolicyDescription, which indicates that if possible the Primary replica for the partitions of the service should be located in a particular domain as an optimization. The value is 3. require_domain_distribution = "RequireDomainDistribution" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementRequireDomainDistributionPolicyDescription, indicating that the system will disallow placement of any two replicas from the same partition in the same domain at any time. The value is 4. non_partially_place_service = "NonPartiallyPlaceService" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementNonPartiallyPlaceServicePolicyDescription, which indicates that if possible all replicas of a particular partition of the service should be placed atomically. The value is 5. + allow_multiple_stateless_instances_on_node = "AllowMultipleStatelessInstancesOnNode" #: Indicates that the ServicePlacementPolicyDescription is of type ServicePlacementAllowMultipleStatelessInstancesOnNodePolicyDescription, which indicates that multiple stateless instances of a particular partition of the service can be placed on a node. The value is 6. class ServiceLoadMetricWeight(str, Enum): @@ -750,6 +761,8 @@ class BackupStorageKind(str, Enum): invalid = "Invalid" #: Indicates an invalid backup storage kind. All Service Fabric enumerations have the invalid type. file_share = "FileShare" #: Indicates file/ SMB share to be used as backup storage. azure_blob_store = "AzureBlobStore" #: Indicates Azure blob store to be used as backup storage. + dsms_azure_blob_store = "DsmsAzureBlobStore" #: Indicates Dsms Azure blob store to be used as backup storage. + managed_identity_azure_blob_store = "ManagedIdentityAzureBlobStore" #: Indicates Azure blob store to be used as backup storage using managed identity. class BackupScheduleKind(str, Enum): @@ -792,6 +805,13 @@ class BackupType(str, Enum): incremental = "Incremental" #: Indicates an incremental backup. A backup chain is comprised of a full backup followed by 0 or more incremental backups. +class ManagedIdentityType(str, Enum): + + invalid = "Invalid" #: Indicates an invalid managed identity type. All Service Fabric enumerations have the invalid type. + vmss = "VMSS" #: Indicates VMSS managed identity should be used to connect to Azure blob store. + cluster = "Cluster" #: Indicates cluster managed identity should be used to connect to Azure blob store. + + class BackupScheduleFrequencyType(str, Enum): invalid = "Invalid" #: Indicates an invalid backup schedule frequency type. All Service Fabric enumerations have the invalid type. diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_service_fabric_client_ap_is_operations.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_service_fabric_client_ap_is_operations.py index 28ef749c2ff5..0748af2ef283 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_service_fabric_client_ap_is_operations.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/operations/_service_fabric_client_ap_is_operations.py @@ -2751,6 +2751,114 @@ def add_configuration_parameter_overrides( return client_raw_response add_configuration_parameter_overrides.metadata = {'url': '/Nodes/{nodeName}/$/AddConfigurationParameterOverrides'} + def remove_node_tags( + self, node_name, node_tags, custom_headers=None, raw=False, **operation_config): + """Removes the list of tags from the specified node. + + This api allows removing set of tags from the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param node_tags: Description for adding list of node tags. + :type node_tags: list[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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "7.0" + + # Construct URL + url = self.remove_node_tags.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(node_tags, '[str]') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + remove_node_tags.metadata = {'url': '/Nodes/{nodeName}/$/RemoveNodeTags'} + + def add_node_tags( + self, node_name, node_tags, custom_headers=None, raw=False, **operation_config): + """Adds the list of tags on the specified node. + + This api allows adding tags to the specified node. + + :param node_name: The name of the node. + :type node_name: str + :param node_tags: Description for adding list of node tags. + :type node_tags: list[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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "7.2" + + # Construct URL + url = self.add_node_tags.metadata['url'] + path_format_arguments = { + 'nodeName': self._serialize.url("node_name", node_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(node_tags, '[str]') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + add_node_tags.metadata = {'url': '/Nodes/{nodeName}/$/AddNodeTags'} + def get_application_type_info_list( self, application_type_definition_kind_filter=0, exclude_application_parameters=False, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the list of application types in the Service Fabric cluster. @@ -4349,6 +4457,13 @@ def start_application_upgrade( Validates the supplied application upgrade parameters and starts upgrading the application if the parameters are valid. + Note, + [ApplicationParameter](https://docs.microsoft.com/dotnet/api/system.fabric.description.applicationdescription.applicationparameters)s + are not preserved across an application upgrade. + In order to preserve current application parameters, the user should + get the parameters using [GetApplicationInfo](./GetApplicationInfo.md) + operation first and pass them into the upgrade API call as shown in the + example. :param application_id: The identity of the application. This is typically the full name of the application without the 'fabric:' URI @@ -4559,6 +4674,78 @@ def update_application_upgrade( return client_raw_response update_application_upgrade.metadata = {'url': '/Applications/{applicationId}/$/UpdateUpgrade'} + def update_application( + self, application_id, application_update_description, timeout=60, custom_headers=None, raw=False, **operation_config): + """Updates a Service Fabric application. + + Updates a Service Fabric application instance. The set of properties + that can be updated are a subset of the properties that were specified + at the time of creating the application. + + :param application_id: The identity of the application. This is + typically the full name of the application without the 'fabric:' URI + scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the application name is "fabric:/myapp/app1", the + application identity would be "myapp~app1" in 6.0+ and "myapp/app1" in + previous versions. + :type application_id: str + :param application_update_description: Parameters for updating an + existing application instance. + :type application_update_description: + ~azure.servicefabric.models.ApplicationUpdateDescription + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "8.1" + + # Construct URL + url = self.update_application.metadata['url'] + path_format_arguments = { + 'applicationId': self._serialize.url("application_id", application_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(application_update_description, 'ApplicationUpdateDescription') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + update_application.metadata = {'url': '/Applications/{applicationId}/$/Update'} + def resume_application_upgrade( self, application_id, upgrade_domain_name, timeout=60, custom_headers=None, raw=False, **operation_config): """Resumes upgrading an application in the Service Fabric cluster. @@ -6560,6 +6747,92 @@ def get_unplaced_replica_information( return deserialized get_unplaced_replica_information.metadata = {'url': '/Services/{serviceId}/$/GetUnplacedReplicaInformation'} + def get_loaded_partition_info_list( + self, metric_name, service_name=None, ordering="Desc", max_results=0, continuation_token=None, custom_headers=None, raw=False, **operation_config): + """Gets ordered list of partitions. + + Retrieves partitions which are most/least loaded according to specified + metric. + + :param metric_name: Name of the metric based on which to get ordered + list of partitions. + :type metric_name: str + :param service_name: The name of a service. + :type service_name: str + :param ordering: Ordering of partitions' load. Possible values + include: 'Desc', 'Asc' + :type ordering: str or ~azure.servicefabric.models.Ordering + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: 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: LoadedPartitionInformationResultList or ClientRawResponse if + raw=true + :rtype: + ~azure.servicefabric.models.LoadedPartitionInformationResultList or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "8.0" + + # Construct URL + url = self.get_loaded_partition_info_list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + query_parameters['MetricName'] = self._serialize.query("metric_name", metric_name, 'str') + if service_name is not None: + query_parameters['ServiceName'] = self._serialize.query("service_name", service_name, 'str') + if ordering is not None: + query_parameters['Ordering'] = self._serialize.query("ordering", ordering, 'str') + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if custom_headers: + header_parameters.update(custom_headers) + + # 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.FabricErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('LoadedPartitionInformationResultList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_loaded_partition_info_list.metadata = {'url': '/$/GetLoadedPartitionInfoList'} + def get_partition_info_list( self, service_id, continuation_token=None, timeout=60, custom_headers=None, raw=False, **operation_config): """Gets the list of partitions of a Service Fabric service. @@ -7518,8 +7791,9 @@ def move_primary_replica( :type partition_id: str :param node_name: The name of the node. :type node_name: str - :param ignore_constraints: Ignore constraints when moving a replica. - If this parameter is not specified, all constraints are honored. + :param ignore_constraints: Ignore constraints when moving a replica or + instance. If this parameter is not specified, all constraints are + honored. :type ignore_constraints: bool :param timeout: The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is @@ -7591,10 +7865,12 @@ def move_secondary_replica( replica move. :type current_node_name: str :param new_node_name: The name of the target node for secondary - replica move. If not specified, replica is moved to a random node. + replica or instance move. If not specified, replica or instance is + moved to a random node. :type new_node_name: str - :param ignore_constraints: Ignore constraints when moving a replica. - If this parameter is not specified, all constraints are honored. + :param ignore_constraints: Ignore constraints when moving a replica or + instance. If this parameter is not specified, all constraints are + honored. :type ignore_constraints: bool :param timeout: The server timeout for performing the operation in seconds. This timeout specifies the time duration that the client is @@ -7648,6 +7924,271 @@ def move_secondary_replica( return client_raw_response move_secondary_replica.metadata = {'url': '/Partitions/{partitionId}/$/MoveSecondaryReplica'} + def update_partition_load( + self, partition_metric_load_description_list, continuation_token=None, max_results=0, timeout=60, custom_headers=None, raw=False, **operation_config): + """Update the loads of provided partitions for specific metrics. + + Updates the load value and predicted load value for all the partitions + provided for specified metrics. + + :param partition_metric_load_description_list: Description of updating + load for list of partitions. + :type partition_metric_load_description_list: + list[~azure.servicefabric.models.PartitionMetricLoadDescription] + :param continuation_token: The continuation token parameter is used to + obtain next set of results. A continuation token with a non-empty + value is included in the response of the API when the results from the + system do not fit in a single response. When this value is passed to + the next API call, the API returns next set of results. If there are + no further results, then the continuation token does not contain a + value. The value of this parameter should not be URL encoded. + :type continuation_token: str + :param max_results: The maximum number of results to be returned as + part of the paged queries. This parameter defines the upper bound on + the number of results returned. The results returned can be less than + the specified maximum results if they do not fit in the message as per + the max message size restrictions defined in the configuration. If + this parameter is zero or not specified, the paged query includes as + many results as possible that fit in the return message. + :type max_results: long + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :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: PagedUpdatePartitionLoadResultList or ClientRawResponse if + raw=true + :rtype: ~azure.servicefabric.models.PagedUpdatePartitionLoadResultList + or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "7.2" + + # Construct URL + url = self.update_partition_load.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if continuation_token is not None: + query_parameters['ContinuationToken'] = self._serialize.query("continuation_token", continuation_token, 'str', skip_quote=True) + if max_results is not None: + query_parameters['MaxResults'] = self._serialize.query("max_results", max_results, 'long', minimum=0) + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if custom_headers: + header_parameters.update(custom_headers) + + # Construct body + body_content = self._serialize.body(partition_metric_load_description_list, '[PartitionMetricLoadDescription]') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + deserialized = None + if response.status_code == 200: + deserialized = self._deserialize('PagedUpdatePartitionLoadResultList', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update_partition_load.metadata = {'url': '/$/UpdatePartitionLoad'} + + def move_instance( + self, service_id, partition_id, current_node_name=None, new_node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Moves the instance of a partition of a stateless service. + + This command moves the instance of a partition of a stateless service, + respecting all constraints. + Partition id and service name must be specified to be able to move the + instance. + CurrentNodeName when specified identifies the instance that is moved. + If not specified, random instance will be moved + New node name can be omitted, and in that case instance is moved to a + random node. + If IgnoreConstraints parameter is specified and set to true, then + instance will be moved regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for instance + move. If not specified, instance is moved from a random node. + :type current_node_name: str + :param new_node_name: The name of the target node for secondary + replica or instance move. If not specified, replica or instance is + moved to a random node. + :type new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or + instance. If this parameter is not specified, all constraints are + honored. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "8.0" + + # Construct URL + url = self.move_instance.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if current_node_name is not None: + query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') + if new_node_name is not None: + query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') + if ignore_constraints is not None: + query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move_instance.metadata = {'url': '/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveInstance'} + + def move_auxiliary_replica( + self, service_id, partition_id, current_node_name=None, new_node_name=None, ignore_constraints=False, timeout=60, custom_headers=None, raw=False, **operation_config): + """Moves the auxiliary replica of a partition of a stateful service. + + This command moves the auxiliary replica of a partition of a stateful + service, respecting all constraints. + CurrentNodeName can be omitted, and in that case a random auxiliary + replica is chosen. + NewNodeName can be omitted, and in that case the auxiliary replica is + moved to a random node. + If IgnoreConstraints parameter is specified and set to true, then + auxiliary will be moved regardless of the constraints. + + :param service_id: The identity of the service. This ID is typically + the full name of the service without the 'fabric:' URI scheme. + Starting from version 6.0, hierarchical names are delimited with the + "~" character. + For example, if the service name is "fabric:/myapp/app1/svc1", the + service identity would be "myapp~app1~svc1" in 6.0+ and + "myapp/app1/svc1" in previous versions. + :type service_id: str + :param partition_id: The identity of the partition. + :type partition_id: str + :param current_node_name: The name of the source node for instance + move. If not specified, instance is moved from a random node. + :type current_node_name: str + :param new_node_name: The name of the target node for secondary + replica or instance move. If not specified, replica or instance is + moved to a random node. + :type new_node_name: str + :param ignore_constraints: Ignore constraints when moving a replica or + instance. If this parameter is not specified, all constraints are + honored. + :type ignore_constraints: bool + :param timeout: The server timeout for performing the operation in + seconds. This timeout specifies the time duration that the client is + willing to wait for the requested operation to complete. The default + value for this parameter is 60 seconds. + :type timeout: long + :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: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`FabricErrorException` + """ + api_version = "8.1" + + # Construct URL + url = self.move_auxiliary_replica.metadata['url'] + path_format_arguments = { + 'serviceId': self._serialize.url("service_id", service_id, 'str', skip_quote=True), + 'partitionId': self._serialize.url("partition_id", partition_id, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') + if current_node_name is not None: + query_parameters['CurrentNodeName'] = self._serialize.query("current_node_name", current_node_name, 'str') + if new_node_name is not None: + query_parameters['NewNodeName'] = self._serialize.query("new_node_name", new_node_name, 'str') + if ignore_constraints is not None: + query_parameters['IgnoreConstraints'] = self._serialize.query("ignore_constraints", ignore_constraints, 'bool') + if timeout is not None: + query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + + # Construct headers + header_parameters = {} + if custom_headers: + header_parameters.update(custom_headers) + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.FabricErrorException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + move_auxiliary_replica.metadata = {'url': '/Services/{serviceId}/$/GetPartitions/{partitionId}/$/MoveAuxiliaryReplica'} + def create_repair_task( self, repair_task, custom_headers=None, raw=False, **operation_config): """Creates a new repair task. @@ -12443,7 +12984,7 @@ def cancel_operation( cancel_operation.metadata = {'url': '/Faults/$/Cancel'} def create_backup_policy( - self, backup_policy_description, timeout=60, custom_headers=None, raw=False, **operation_config): + self, backup_policy_description, timeout=60, validate_connection=False, custom_headers=None, raw=False, **operation_config): """Creates a backup policy. Creates a backup policy which can be associated later with a Service @@ -12457,6 +12998,10 @@ def create_backup_policy( willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. :type timeout: long + :param validate_connection: Specifies whether to validate the storage + connection and credentials before creating or updating the backup + policies. + :type validate_connection: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -12477,6 +13022,8 @@ def create_backup_policy( query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if timeout is not None: query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if validate_connection is not None: + query_parameters['ValidateConnection'] = self._serialize.query("validate_connection", validate_connection, 'bool') # Construct headers header_parameters = {} @@ -12783,7 +13330,7 @@ def get_all_entities_backed_up_by_policy( get_all_entities_backed_up_by_policy.metadata = {'url': '/BackupRestore/BackupPolicies/{backupPolicyName}/$/GetBackupEnabledEntities'} def update_backup_policy( - self, backup_policy_description, backup_policy_name, timeout=60, custom_headers=None, raw=False, **operation_config): + self, backup_policy_description, backup_policy_name, timeout=60, validate_connection=False, custom_headers=None, raw=False, **operation_config): """Updates the backup policy. Updates the backup policy identified by {backupPolicyName}. @@ -12798,6 +13345,10 @@ def update_backup_policy( willing to wait for the requested operation to complete. The default value for this parameter is 60 seconds. :type timeout: long + :param validate_connection: Specifies whether to validate the storage + connection and credentials before creating or updating the backup + policies. + :type validate_connection: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -12822,6 +13373,8 @@ def update_backup_policy( query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') if timeout is not None: query_parameters['timeout'] = self._serialize.query("timeout", timeout, 'long', maximum=4294967295, minimum=1) + if validate_connection is not None: + query_parameters['ValidateConnection'] = self._serialize.query("validate_connection", validate_connection, 'bool') # Construct headers header_parameters = {}