Share via


Move-ServiceFabricInstance

Moves the instance of a partition of a stateless service.

Syntax

PartitionId

Move-ServiceFabricInstance
    -PartitionId <Guid>
    -ServiceName <Uri>
    [-CurrentInstanceNodeName <String>]
    [-NewInstanceNodeName <String>]
    [-IgnoreConstraints <Boolean>]
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

ServiceNameRandomPartition

Move-ServiceFabricInstance
    -ServiceName <Uri>
    [-CurrentInstanceNodeName <String>]
    [-NewInstanceNodeName <String>]
    [-IgnoreConstraints <Boolean>]
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

ServiceNamePartitionSingleton

Move-ServiceFabricInstance
    -ServiceName <Uri>
    [-CurrentInstanceNodeName <String>]
    [-NewInstanceNodeName <String>]
    [-IgnoreConstraints <Boolean>]
    [-PartitionKindSingleton]
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

ServiceNamePartitionNamed

Move-ServiceFabricInstance
    -ServiceName <Uri>
    -PartitionKey <String>
    [-CurrentInstanceNodeName <String>]
    [-NewInstanceNodeName <String>]
    [-IgnoreConstraints <Boolean>]
    [-PartitionKindNamed]
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

ServiceNamePartitionUniformedInt

Move-ServiceFabricInstance
    -ServiceName <Uri>
    -PartitionKey <String>
    [-CurrentInstanceNodeName <String>]
    [-NewInstanceNodeName <String>]
    [-IgnoreConstraints <Boolean>]
    [-PartitionKindUniformInt64]
    [-TimeoutSec <Int32>]
    [<CommonParameters>]

Description

This command moves the instance of a partition of a stateless service, respecting all constraints. PartitionId and ServiceName must be specified to be able to move the instance. CurrentInstanceNodeName when specified identifies the instance that is moved. If not specified, random instance will be moved, New node name can be omitted, and the 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.

Examples

Example 1

Move-ServiceFabricInstance -PartitionId 93838f53-f1d9-4b99-8492-b802ee807d03 -ServiceName fabric:/SampleApp/SampleService

Parameters

-CurrentInstanceNodeName

The name of the source node for instance move. If not specified, instance is moved from a random node.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-IgnoreConstraints

Ignore constraints when moving a replica or instance. If this parameter is not specified, all constraints are honored.

Parameter properties

Type:Boolean
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-NewInstanceNodeName

The name of the target node for secondary replica or instance move. If not specified, replica or instance is moved to a random node.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PartitionId

Specifies the partition ID.

Parameter properties

Type:Guid
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

PartitionId
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-PartitionKey

Specifies the partition key.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ServiceNamePartitionNamed
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False
ServiceNamePartitionUniformedInt
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-PartitionKindNamed

Indicates that this cmdlet moves a named partition.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ServiceNamePartitionNamed
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PartitionKindSingleton

Indicates that this cmdlet moves a singleton partition.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ServiceNamePartitionSingleton
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PartitionKindUniformInt64

Indicates that this cmdlet moves a UniformInt64 partition.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

ServiceNamePartitionUniformedInt
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ServiceName

Name of the service.

Parameter properties

Type:Uri
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-TimeoutSec

Specifies the time-out period, in seconds, for the operation.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

System.Boolean

System.Guid

System.Uri

System.String

Outputs

System.Object