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..babf96112b84 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 = '7.2.0.46' 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..4b8b0c07a61e 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 @@ -183,6 +184,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 @@ -248,6 +250,7 @@ from ._models_py3 import LocalNetworkResourceProperties from ._models_py3 import ManagedApplicationIdentity from ._models_py3 import ManagedApplicationIdentityDescription + from ._models_py3 import MetricLoadDescription from ._models_py3 import MonitoringPolicyDescription from ._models_py3 import NameDescription from ._models_py3 import NamedPartitionInformation @@ -313,6 +316,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 +333,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 +382,7 @@ from ._models_py3 import ReplicaHealthStateChunkList from ._models_py3 import ReplicaHealthStateFilter from ._models_py3 import ReplicaInfo + from ._models_py3 import ReplicaMetricLoadDescription from ._models_py3 import ReplicasHealthEvaluation from ._models_py3 import ReplicaStatusBase from ._models_py3 import ReplicatorQueueStatus @@ -491,6 +497,7 @@ 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 UpgradeDomainInfo from ._models_py3 import UpgradeDomainNodesHealthEvaluation @@ -528,6 +535,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 @@ -683,6 +691,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 @@ -748,6 +757,7 @@ from ._models import LocalNetworkResourceProperties from ._models import ManagedApplicationIdentity from ._models import ManagedApplicationIdentityDescription + from ._models import MetricLoadDescription from ._models import MonitoringPolicyDescription from ._models import NameDescription from ._models import NamedPartitionInformation @@ -813,6 +823,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 +840,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 +889,7 @@ from ._models import ReplicaHealthStateChunkList from ._models import ReplicaHealthStateFilter from ._models import ReplicaInfo + from ._models import ReplicaMetricLoadDescription from ._models import ReplicasHealthEvaluation from ._models import ReplicaStatusBase from ._models import ReplicatorQueueStatus @@ -991,6 +1004,7 @@ from ._models import UnprovisionApplicationTypeDescriptionInfo from ._models import UnprovisionFabricDescription from ._models import UpdateClusterUpgradeDescription + from ._models import UpdatePartitionLoadResult from ._models import UpgradeDomainDeltaNodesCheckHealthEvaluation from ._models import UpgradeDomainInfo from ._models import UpgradeDomainNodesHealthEvaluation @@ -1141,6 +1155,7 @@ 'ApplicationHealthPolicies', 'ApplicationHealthPolicy', 'ApplicationHealthPolicyMapItem', + 'ApplicationHealthPolicyMapObject', 'ApplicationHealthReportExpiredEvent', 'ApplicationHealthState', 'ApplicationHealthStateChunk', @@ -1296,6 +1311,7 @@ 'DisableBackupDescription', 'DiskInfo', 'DoublePropertyValue', + 'DsmsAzureBlobBackupStorageDescription', 'EnableBackupDescription', 'EndpointProperties', 'EndpointRef', @@ -1361,6 +1377,7 @@ 'LocalNetworkResourceProperties', 'ManagedApplicationIdentity', 'ManagedApplicationIdentityDescription', + 'MetricLoadDescription', 'MonitoringPolicyDescription', 'NameDescription', 'NamedPartitionInformation', @@ -1426,6 +1443,7 @@ 'PagedServiceReplicaDescriptionList', 'PagedServiceResourceDescriptionList', 'PagedSubNameInfoList', + 'PagedUpdatePartitionLoadResultList', 'PagedVolumeResourceDescriptionList', 'PartitionAnalysisEvent', 'PartitionBackupConfigurationInfo', @@ -1442,6 +1460,7 @@ 'PartitionInformation', 'PartitionInstanceCountScaleMechanism', 'PartitionLoadInformation', + 'PartitionMetricLoadDescription', 'PartitionNewHealthReportEvent', 'PartitionPrimaryMoveAnalysisEvent', 'PartitionQuorumLossProgress', @@ -1490,6 +1509,7 @@ 'ReplicaHealthStateChunkList', 'ReplicaHealthStateFilter', 'ReplicaInfo', + 'ReplicaMetricLoadDescription', 'ReplicasHealthEvaluation', 'ReplicaStatusBase', 'ReplicatorQueueStatus', @@ -1604,6 +1624,7 @@ 'UnprovisionApplicationTypeDescriptionInfo', 'UnprovisionFabricDescription', 'UpdateClusterUpgradeDescription', + 'UpdatePartitionLoadResult', 'UpgradeDomainDeltaNodesCheckHealthEvaluation', 'UpgradeDomainInfo', 'UpgradeDomainNodesHealthEvaluation', diff --git a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models.py b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models.py index 6e0869fad2b6..58d77b9b41ce 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models.py @@ -1115,6 +1115,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. @@ -3378,7 +3404,7 @@ class BackupStorageDescription(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: AzureBlobBackupStorageDescription, - FileShareBackupStorageDescription + FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription All required parameters must be populated in order to send to Azure. @@ -3398,7 +3424,7 @@ class BackupStorageDescription(Model): } _subtype_map = { - 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription'} + 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription'} } def __init__(self, **kwargs): @@ -5981,17 +6007,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 +6025,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): @@ -9307,6 +9326,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. @@ -11969,6 +12026,30 @@ def __init__(self, **kwargs): self.managed_identities = kwargs.get('managed_identities', None) +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. @@ -14516,6 +14597,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 @@ -15102,6 +15211,43 @@ def __init__(self, **kwargs): self.secondary_load_metric_reports = kwargs.get('secondary_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 located 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] + """ + + _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]'}, + } + + 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) + + class PartitionNewHealthReportEvent(PartitionEvent): """Partition Health Report Created event. @@ -16856,6 +17002,29 @@ def __init__(self, **kwargs): self.service_kind = 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. @@ -19766,6 +19935,8 @@ class ServiceUpdateDescription(Model): set. The value is 8192. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 32768. :type flags: str :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow @@ -20353,6 +20524,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 +20539,11 @@ 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 """ _validation = { @@ -20406,6 +20584,7 @@ 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'}, } def __init__(self, **kwargs): @@ -20418,6 +20597,7 @@ 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.service_kind = 'Stateful' @@ -20803,6 +20983,8 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): set. The value is 8192. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 32768. :type flags: str :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow @@ -20843,6 +21025,11 @@ 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 """ _validation = { @@ -20866,6 +21053,7 @@ 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'}, } def __init__(self, **kwargs): @@ -20876,6 +21064,7 @@ 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.service_kind = 'Stateful' @@ -21594,6 +21783,8 @@ class StatelessServiceUpdateDescription(ServiceUpdateDescription): set. The value is 8192. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 32768. :type flags: str :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow @@ -22153,6 +22344,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 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..9ab5e9fe4058 100644 --- a/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models_py3.py +++ b/sdk/servicefabric/azure-servicefabric/azure/servicefabric/models/_models_py3.py @@ -1115,6 +1115,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. @@ -3378,7 +3404,7 @@ class BackupStorageDescription(Model): You probably want to use the sub-classes and not this class directly. Known sub-classes are: AzureBlobBackupStorageDescription, - FileShareBackupStorageDescription + FileShareBackupStorageDescription, DsmsAzureBlobBackupStorageDescription All required parameters must be populated in order to send to Azure. @@ -3398,7 +3424,7 @@ class BackupStorageDescription(Model): } _subtype_map = { - 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription'} + 'storage_kind': {'AzureBlobStore': 'AzureBlobBackupStorageDescription', 'FileShare': 'FileShareBackupStorageDescription', 'DsmsAzureBlobStore': 'DsmsAzureBlobBackupStorageDescription'} } def __init__(self, *, friendly_name: str=None, **kwargs) -> None: @@ -5981,17 +6007,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 +6025,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: @@ -9307,6 +9326,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. @@ -11969,6 +12026,30 @@ def __init__(self, *, token_service_endpoint: str=None, managed_identities=None, self.managed_identities = managed_identities +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. @@ -14516,6 +14597,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 @@ -15102,6 +15211,43 @@ def __init__(self, *, partition_id: str=None, primary_load_metric_reports=None, self.secondary_load_metric_reports = secondary_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 located 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] + """ + + _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]'}, + } + + 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, **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 + + class PartitionNewHealthReportEvent(PartitionEvent): """Partition Health Report Created event. @@ -16856,6 +17002,29 @@ def __init__(self, *, replica_status=None, health_state=None, node_name: str=Non self.service_kind = 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, *, 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. @@ -19766,6 +19935,8 @@ class ServiceUpdateDescription(Model): set. The value is 8192. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 32768. :type flags: str :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow @@ -20353,6 +20524,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 +20539,11 @@ 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 """ _validation = { @@ -20406,9 +20584,10 @@ 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'}, } - 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: + 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, drop_source_replica_on_move: bool=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) self.target_replica_set_size = target_replica_set_size self.min_replica_set_size = min_replica_set_size @@ -20418,6 +20597,7 @@ 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.service_kind = 'Stateful' @@ -20803,6 +20983,8 @@ class StatefulServiceUpdateDescription(ServiceUpdateDescription): set. The value is 8192. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 32768. :type flags: str :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow @@ -20843,6 +21025,11 @@ 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 """ _validation = { @@ -20866,9 +21053,10 @@ 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'}, } - 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: + 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, drop_source_replica_on_move: bool=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) self.target_replica_set_size = target_replica_set_size self.min_replica_set_size = min_replica_set_size @@ -20876,6 +21064,7 @@ def __init__(self, *, flags: str=None, placement_constraints: str=None, correlat 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.service_kind = 'Stateful' @@ -21594,6 +21783,8 @@ class StatelessServiceUpdateDescription(ServiceUpdateDescription): set. The value is 8192. - InstanceCloseDelayDuration - Indicates the InstanceCloseDelayDuration property is set. The value is 16384. + - DropSourceReplicaOnMove - Indicates the DropSourceReplicaOnMove property + is set. The value is 32768. :type flags: str :param placement_constraints: The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow @@ -22153,6 +22344,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 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..8242aaf8c223 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 @@ -496,6 +496,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 +751,7 @@ 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. class BackupScheduleKind(str, Enum): 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..d94ced015347 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 @@ -4349,6 +4349,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 @@ -7648,6 +7655,93 @@ 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 create_repair_task( self, repair_task, custom_headers=None, raw=False, **operation_config): """Creates a new repair task.