StatefulServiceDescription Class

Describes a stateful service.

All required parameters must be populated in order to send to Azure.

Inheritance
azure.servicefabric.models._models_py3.ServiceDescription
StatefulServiceDescription

Constructor

StatefulServiceDescription(*, 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: Optional[str] = None, initialization_data=None, placement_constraints: Optional[str] = None, correlation_scheme=None, service_load_metrics=None, service_placement_policies=None, default_move_cost=None, is_default_move_cost_specified: Optional[bool] = None, service_package_activation_mode=None, service_dns_name: Optional[str] = None, scaling_policies=None, tags_required_to_place=None, tags_required_to_run=None, flags: Optional[int] = None, replica_restart_wait_duration_seconds: Optional[int] = None, quorum_loss_wait_duration_seconds: Optional[int] = None, stand_by_replica_keep_duration_seconds: Optional[int] = None, service_placement_time_limit_seconds: Optional[int] = None, drop_source_replica_on_move: Optional[bool] = None, replica_lifecycle_description=None, auxiliary_replica_count: Optional[int] = None, **kwargs)

Parameters

application_name
str
Required

The name of the application, including the 'fabric:' URI scheme.

service_name
str
Required

Required. The full name of the service with 'fabric:' URI scheme.

service_type_name
str
Required

Required. Name of the service type as specified in the service manifest.

initialization_data
list[int]
Required

The initialization data as an array of bytes. Initialization data is passed to service instances or replicas when they are created.

partition_description
PartitionSchemeDescription
Required

Required. The partition description as an object.

placement_constraints
str
Required

The placement constraints as a string. Placement constraints are boolean expressions on node properties and allow for restricting a service to particular nodes based on the service requirements. For example, to place a service on nodes where NodeType is blue specify the following: "NodeColor == blue)".

correlation_scheme
list[ServiceCorrelationDescription]
Required

The correlation scheme.

service_load_metrics
list[ServiceLoadMetricDescription]
Required

The service load metrics.

service_placement_policies
list[ServicePlacementPolicyDescription]
Required

The service placement policies.

default_move_cost
str or MoveCost
Required

The move cost for the service. Possible values include: 'Zero', 'Low', 'Medium', 'High', 'VeryHigh'

is_default_move_cost_specified
bool
Required

Indicates if the DefaultMoveCost property is specified.

service_package_activation_mode
str or ServicePackageActivationMode
Required

The activation mode of service package to be used for a service. Possible values include: 'SharedProcess', 'ExclusiveProcess'

service_dns_name
str
Required

The DNS name of the service. It requires the DNS system service to be enabled in Service Fabric cluster.

scaling_policies
list[ScalingPolicyDescription]
Required

Scaling policies for this service.

tags_required_to_place
NodeTagsDescription
Required

Tags for placement of this service.

tags_required_to_run
NodeTagsDescription
Required

Tags for running of this service.

service_kind
str
Required

Required. Constant filled by server.

target_replica_set_size
int
Required

Required. The target replica set size as a number.

min_replica_set_size
int
Required

Required. The minimum replica set size as a number.

has_persisted_state
bool
Required

Required. A flag indicating whether this is a persistent service which stores states on the local disk. If it is then the value of this property is true, if not it is false.

flags
int
Required

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. This property can be a combination of those flags obtained using bitwise 'OR' operator. For example, if the provided value is 6 then the flags for QuorumLossWaitDuration (2) and StandByReplicaKeepDuration(4) are set.

  • None - Does not indicate any other properties are set. The value is zero.
  • ReplicaRestartWaitDuration - Indicates the ReplicaRestartWaitDuration property is set. The value is 1.
  • QuorumLossWaitDuration - Indicates the QuorumLossWaitDuration property is set. The value is 2.
  • StandByReplicaKeepDuration - Indicates the StandByReplicaKeepDuration 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.
replica_restart_wait_duration_seconds
<xref:long>
Required

The duration, in seconds, between when a replica goes down and when a new replica is created.

quorum_loss_wait_duration_seconds
<xref:long>
Required

The maximum duration, in seconds, for which a partition is allowed to be in a state of quorum loss.

stand_by_replica_keep_duration_seconds
<xref:long>
Required

The definition on how long StandBy replicas should be maintained before being removed.

service_placement_time_limit_seconds
<xref:long>
Required

The duration for which replicas can stay InBuild before reporting that build is stuck.

drop_source_replica_on_move
bool
Required

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.

replica_lifecycle_description
ReplicaLifecycleDescription
Required

Defines how replicas of this service will behave during their lifecycle.

auxiliary_replica_count
int
Required

The auxiliary replica count as a number. To use Auxiliary replicas, the following must be true: AuxiliaryReplicaCount < (TargetReplicaSetSize+1)/2 and TargetReplicaSetSize >=3.