New-ServiceFabricService
Creates a Service Fabric service.
Syntax
New-ServiceFabricService
[-Stateless]
[-PartitionSchemeSingleton]
[-ApplicationName] <Uri>
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
-InstanceCount <Int32>
[-MinInstanceCount <Int32>]
[-MinInstancePercentage <Int32>]
[-InstanceLifecycleDescription <InstanceLifecycleDescription>]
[-PlacementConstraint <String>]
[-Metric <String[]>]
[-Correlation <String[]>]
[-PlacementPolicy <String[]>]
[-DefaultMoveCost <String>]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-ServiceDnsName <String>]
[-ScalingPolicies <System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription]>]
[-TagsRequiredToPlace <System.Collections.Generic.List`1[System.String]>]
[-TagsRequiredToRun <System.Collections.Generic.List`1[System.String]>]
[-InstanceCloseDelayDuration <TimeSpan>]
[-InstanceRestartWaitDuration <TimeSpan>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
New-ServiceFabricService
[-Stateful]
[-PartitionSchemeSingleton]
[-ApplicationName] <Uri>
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
[-HasPersistedState]
-TargetReplicaSetSize <Int32>
-MinReplicaSetSize <Int32>
[-ReplicaRestartWaitDuration <TimeSpan>]
[-QuorumLossWaitDuration <TimeSpan>]
[-StandByReplicaKeepDuration <TimeSpan>]
[-ServicePlacementTimeLimit <TimeSpan>]
[-DropSourceReplicaOnMove <Boolean>]
[-ReplicaLifecycleDescription <ReplicaLifecycleDescription>]
[-PlacementConstraint <String>]
[-Metric <String[]>]
[-Correlation <String[]>]
[-PlacementPolicy <String[]>]
[-DefaultMoveCost <String>]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-ServiceDnsName <String>]
[-ScalingPolicies <System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription]>]
[-TagsRequiredToPlace <System.Collections.Generic.List`1[System.String]>]
[-TagsRequiredToRun <System.Collections.Generic.List`1[System.String]>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
New-ServiceFabricService
[-Stateful]
[-PartitionSchemeUniformInt64]
[-ApplicationName] <Uri>
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
-PartitionCount <Int32>
-LowKey <Int64>
-HighKey <Int64>
[-HasPersistedState]
-TargetReplicaSetSize <Int32>
-MinReplicaSetSize <Int32>
[-ReplicaRestartWaitDuration <TimeSpan>]
[-QuorumLossWaitDuration <TimeSpan>]
[-StandByReplicaKeepDuration <TimeSpan>]
[-ServicePlacementTimeLimit <TimeSpan>]
[-DropSourceReplicaOnMove <Boolean>]
[-ReplicaLifecycleDescription <ReplicaLifecycleDescription>]
[-PlacementConstraint <String>]
[-Metric <String[]>]
[-Correlation <String[]>]
[-PlacementPolicy <String[]>]
[-DefaultMoveCost <String>]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-ServiceDnsName <String>]
[-ScalingPolicies <System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription]>]
[-TagsRequiredToPlace <System.Collections.Generic.List`1[System.String]>]
[-TagsRequiredToRun <System.Collections.Generic.List`1[System.String]>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
New-ServiceFabricService
[-Stateful]
[-PartitionSchemeNamed]
[-ApplicationName] <Uri>
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
-PartitionNames <String[]>
[-HasPersistedState]
-TargetReplicaSetSize <Int32>
-MinReplicaSetSize <Int32>
[-ReplicaRestartWaitDuration <TimeSpan>]
[-QuorumLossWaitDuration <TimeSpan>]
[-StandByReplicaKeepDuration <TimeSpan>]
[-ServicePlacementTimeLimit <TimeSpan>]
[-DropSourceReplicaOnMove <Boolean>]
[-ReplicaLifecycleDescription <ReplicaLifecycleDescription>]
[-PlacementConstraint <String>]
[-Metric <String[]>]
[-Correlation <String[]>]
[-PlacementPolicy <String[]>]
[-DefaultMoveCost <String>]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-ServiceDnsName <String>]
[-ScalingPolicies <System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription]>]
[-TagsRequiredToPlace <System.Collections.Generic.List`1[System.String]>]
[-TagsRequiredToRun <System.Collections.Generic.List`1[System.String]>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
New-ServiceFabricService
[-Stateful]
[-PartitionSchemeSingleton]
[-Adhoc]
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
[-HasPersistedState]
-TargetReplicaSetSize <Int32>
-MinReplicaSetSize <Int32>
[-ReplicaRestartWaitDuration <TimeSpan>]
[-QuorumLossWaitDuration <TimeSpan>]
[-StandByReplicaKeepDuration <TimeSpan>]
[-ServicePlacementTimeLimit <TimeSpan>]
[-DropSourceReplicaOnMove <Boolean>]
[-ReplicaLifecycleDescription <ReplicaLifecycleDescription>]
[-PlacementConstraint <String>]
[-Metric <String[]>]
[-Correlation <String[]>]
[-PlacementPolicy <String[]>]
[-DefaultMoveCost <String>]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-ServiceDnsName <String>]
[-ScalingPolicies <System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription]>]
[-TagsRequiredToPlace <System.Collections.Generic.List`1[System.String]>]
[-TagsRequiredToRun <System.Collections.Generic.List`1[System.String]>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
New-ServiceFabricService
[-Stateful]
[-PartitionSchemeUniformInt64]
[-Adhoc]
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
-PartitionCount <Int32>
-LowKey <Int64>
-HighKey <Int64>
[-HasPersistedState]
-TargetReplicaSetSize <Int32>
-MinReplicaSetSize <Int32>
[-ReplicaRestartWaitDuration <TimeSpan>]
[-QuorumLossWaitDuration <TimeSpan>]
[-StandByReplicaKeepDuration <TimeSpan>]
[-ServicePlacementTimeLimit <TimeSpan>]
[-DropSourceReplicaOnMove <Boolean>]
[-ReplicaLifecycleDescription <ReplicaLifecycleDescription>]
[-PlacementConstraint <String>]
[-Metric <String[]>]
[-Correlation <String[]>]
[-PlacementPolicy <String[]>]
[-DefaultMoveCost <String>]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-ServiceDnsName <String>]
[-ScalingPolicies <System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription]>]
[-TagsRequiredToPlace <System.Collections.Generic.List`1[System.String]>]
[-TagsRequiredToRun <System.Collections.Generic.List`1[System.String]>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
New-ServiceFabricService
[-Stateful]
[-PartitionSchemeNamed]
[-Adhoc]
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
-PartitionNames <String[]>
[-HasPersistedState]
-TargetReplicaSetSize <Int32>
-MinReplicaSetSize <Int32>
[-ReplicaRestartWaitDuration <TimeSpan>]
[-QuorumLossWaitDuration <TimeSpan>]
[-StandByReplicaKeepDuration <TimeSpan>]
[-ServicePlacementTimeLimit <TimeSpan>]
[-DropSourceReplicaOnMove <Boolean>]
[-ReplicaLifecycleDescription <ReplicaLifecycleDescription>]
[-PlacementConstraint <String>]
[-Metric <String[]>]
[-Correlation <String[]>]
[-PlacementPolicy <String[]>]
[-DefaultMoveCost <String>]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-ServiceDnsName <String>]
[-ScalingPolicies <System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription]>]
[-TagsRequiredToPlace <System.Collections.Generic.List`1[System.String]>]
[-TagsRequiredToRun <System.Collections.Generic.List`1[System.String]>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
New-ServiceFabricService
[-Stateless]
[-PartitionSchemeUniformInt64]
[-ApplicationName] <Uri>
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
-PartitionCount <Int32>
-LowKey <Int64>
-HighKey <Int64>
-InstanceCount <Int32>
[-MinInstanceCount <Int32>]
[-MinInstancePercentage <Int32>]
[-InstanceLifecycleDescription <InstanceLifecycleDescription>]
[-PlacementConstraint <String>]
[-Metric <String[]>]
[-Correlation <String[]>]
[-PlacementPolicy <String[]>]
[-DefaultMoveCost <String>]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-ServiceDnsName <String>]
[-ScalingPolicies <System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription]>]
[-TagsRequiredToPlace <System.Collections.Generic.List`1[System.String]>]
[-TagsRequiredToRun <System.Collections.Generic.List`1[System.String]>]
[-InstanceCloseDelayDuration <TimeSpan>]
[-InstanceRestartWaitDuration <TimeSpan>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
New-ServiceFabricService
[-Stateless]
[-PartitionSchemeNamed]
[-ApplicationName] <Uri>
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
-PartitionNames <String[]>
-InstanceCount <Int32>
[-MinInstanceCount <Int32>]
[-MinInstancePercentage <Int32>]
[-InstanceLifecycleDescription <InstanceLifecycleDescription>]
[-PlacementConstraint <String>]
[-Metric <String[]>]
[-Correlation <String[]>]
[-PlacementPolicy <String[]>]
[-DefaultMoveCost <String>]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-ServiceDnsName <String>]
[-ScalingPolicies <System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription]>]
[-TagsRequiredToPlace <System.Collections.Generic.List`1[System.String]>]
[-TagsRequiredToRun <System.Collections.Generic.List`1[System.String]>]
[-InstanceCloseDelayDuration <TimeSpan>]
[-InstanceRestartWaitDuration <TimeSpan>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
New-ServiceFabricService
[-Stateless]
[-PartitionSchemeSingleton]
[-Adhoc]
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
-InstanceCount <Int32>
[-MinInstanceCount <Int32>]
[-MinInstancePercentage <Int32>]
[-InstanceLifecycleDescription <InstanceLifecycleDescription>]
[-PlacementConstraint <String>]
[-Metric <String[]>]
[-Correlation <String[]>]
[-PlacementPolicy <String[]>]
[-DefaultMoveCost <String>]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-ServiceDnsName <String>]
[-ScalingPolicies <System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription]>]
[-TagsRequiredToPlace <System.Collections.Generic.List`1[System.String]>]
[-TagsRequiredToRun <System.Collections.Generic.List`1[System.String]>]
[-InstanceCloseDelayDuration <TimeSpan>]
[-InstanceRestartWaitDuration <TimeSpan>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
New-ServiceFabricService
[-Stateless]
[-PartitionSchemeUniformInt64]
[-Adhoc]
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
-PartitionCount <Int32>
-LowKey <Int64>
-HighKey <Int64>
-InstanceCount <Int32>
[-MinInstanceCount <Int32>]
[-MinInstancePercentage <Int32>]
[-InstanceLifecycleDescription <InstanceLifecycleDescription>]
[-PlacementConstraint <String>]
[-Metric <String[]>]
[-Correlation <String[]>]
[-PlacementPolicy <String[]>]
[-DefaultMoveCost <String>]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-ServiceDnsName <String>]
[-ScalingPolicies <System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription]>]
[-TagsRequiredToPlace <System.Collections.Generic.List`1[System.String]>]
[-TagsRequiredToRun <System.Collections.Generic.List`1[System.String]>]
[-InstanceCloseDelayDuration <TimeSpan>]
[-InstanceRestartWaitDuration <TimeSpan>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
New-ServiceFabricService
[-Stateless]
[-PartitionSchemeNamed]
[-Adhoc]
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
-PartitionNames <String[]>
-InstanceCount <Int32>
[-MinInstanceCount <Int32>]
[-MinInstancePercentage <Int32>]
[-InstanceLifecycleDescription <InstanceLifecycleDescription>]
[-PlacementConstraint <String>]
[-Metric <String[]>]
[-Correlation <String[]>]
[-PlacementPolicy <String[]>]
[-DefaultMoveCost <String>]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-ServiceDnsName <String>]
[-ScalingPolicies <System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription]>]
[-TagsRequiredToPlace <System.Collections.Generic.List`1[System.String]>]
[-TagsRequiredToRun <System.Collections.Generic.List`1[System.String]>]
[-InstanceCloseDelayDuration <TimeSpan>]
[-InstanceRestartWaitDuration <TimeSpan>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
Description
The New-ServiceFabricService cmdlet creates a Service Fabric service.
Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.
Before performing this operation, please upload application package, register application type, and create application instance first. For more information, see Deploy and remove applications using PowerShell.
To get the services created under an application, use Get-ServiceFabricService.
Examples
Example 1: Create a stateless service by using a singleton partitioning scheme.
PS C:\> New-ServiceFabricService -ApplicationName fabric:/HelloWorld -ServiceName fabric:/HelloWorld/svc1 -ServiceTypeName HelloWorldStateless -Stateless -PartitionSchemeSingleton -InstanceCount -1
This command creates a Service Fabric stateless service from the specified application instance by using a singleton partitioning scheme.
Example 2: Create a stateful service by using a singleton partitioning scheme.
PS C:\> New-ServiceFabricService -ApplicationName fabric:/HelloWorld -ServiceName fabric:/HelloWorld/svc1 -ServiceTypeName HelloWorldStateful -Stateful -PartitionSchemeSingleton -TargetReplicaSetSize 5 -MinReplicaSetSize 3
This command creates a Service Fabric stateful service from the specified application instance by using a singleton partitioning scheme.
Example 3: Create a stateless service by using ranged partitioning scheme.
New-ServiceFabricService -ApplicationName fabric:/HelloWorld -ServiceName fabric:/HelloWorld/svc1 -ServiceTypeName HelloWorldStateless -Stateless -PartitionSchemeUniformInt64 -PartitionCount 26 -LowKey 0 -HighKey 51 -InstanceCount -1
This command creates a Service Fabric stateless service from the specified application instance with ranged partitioning scheme.
Example 4: Create a stateless service by using named partitioning scheme
New-ServiceFabricService -ApplicationName fabric:/HelloWorld -ServiceName fabric:/HelloWorld/svc1 -ServiceTypeName HelloWorldStateless -Stateless -PartitionSchemeNamed -PartitionNames @("Seattle","Vancouver") -InstanceCount -1
This command creates a Service Fabric stateless service from the specified application instance with named partitioning scheme.
Example 5: Create a stateful service by using ranged partitioning scheme.
New-ServiceFabricService -ApplicationName fabric:/HelloWorld -ServiceName fabric:/HelloWorld/svc1 -ServiceTypeName HelloWorldStateful -Stateful -PartitionSchemeUniformInt64 -PartitionCount 26 -LowKey 0 -HighKey 51 -MinReplicaSetSize 3 -TargetReplicaSetSize 5
This command creates a Service Fabric stateful service from the specified application instance with ranged partitioning shceme.
Example 6: Create a stateful service by using named partitioning scheme.
New-ServiceFabricService -ApplicationName fabric:/HelloWorld -ServiceName fabric:/HelloWorld/svc1 -ServiceTypeName HelloWorldStateful -Stateful -PartitionSchemeNamed -PartitionNames @("Seattle","Vancouver") -MinReplicaSetSize 3 -TargetReplicaSetSize 5
This command creates a Service Fabric stateful service from the specified application instance with named partitioning scheme.
Parameters
-Adhoc
Indicates that the service runs in ad hoc mode. In ad hoc mode, the service host is manually activated. Note: This is only for legacy support.
Type: | SwitchParameter |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ApplicationName
Specifies the Uniform Resource Identifier (URI) of a Service Fabric application. This is the unique name of an application and is used to group services together for management. The scheme must be "fabric:/" and the service name must start with the application name. The cmdlet creates a service based on this application.
Type: | Uri |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Correlation
Correlation is a control that is provided mainly to help ease the transition of larger monolithic applications into the cloud and microservices world. For more information, see Managing resource consumption and load in Service Fabric with metrics.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultMoveCost
The default cost for a move. Higher costs make it less likely that the Cluster Resource Manager will move the replica when trying to balance the cluster. Valid values are:
- Zero
- Low
- Medium
- High
For more information, see Managing resource consumption and load in Service Fabric with metrics.
Type: | String |
Accepted values: | Zero, Low, Medium, High, VeryHigh |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DropSourceReplicaOnMove
Enables source Secondary replicas to be dropped before new Secondary replicas finish the build.
Type: | Boolean |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HasPersistedState
Indicates that the stateful service has persistent state. When a FabricReplicator at a secondary replica receives an operation for a persistent service, it must wait for the service to acknowledge that the data has been persisted before it can send that acknowledgment back to the primary. For non-persistent services, the operation can be acknowledged immediately upon receipt.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HighKey
Specifies the high key range of the partition set.
Type: | Int64 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InstanceCloseDelayDuration
Specifies the duration, as a TimeSpan object, for which the graceful close of a stateless instance is delayed. This would be effective when the instance is closing during the application/cluster upgrade and disabling node. The endpoint exposed on this instance is removed prior to starting the delay, which prevents new connections to this instance. In addition, clients that have subscribed to service endpoint change events can do the following upon receiving the endpoint removal notification:
- Stop sending new requests to this instance.
- Close existing connections after in-flight requests have completed.
- Connect to a different instance of the service partition for future requests.
Note, the default value is TimeSpan.Zero, which indicates that there won't be any delay or removal of the endpoint prior to closing the instance.
To obtain a TimeSpan object, use the New-TimeSpan cmdlet.
Type: | TimeSpan |
Position: | Named |
Default value: | TimeSpan.Zero |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InstanceCount
Specifies the number of instances that the system creates and maintains for each partition of this Service Fabric stateless service. Setting InstanceCount to -1 implies deploying instances to all the nodes within the cluster.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InstanceLifecycleDescription
Lifecycle description of instances belonging to this service. If some configuration in this section is not specified, the default value is taken from the cluster parameter of the same name (if existing).
Type: | InstanceLifecycleDescription |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InstanceRestartWaitDuration
Gets or sets the duration Service Fabric will wait for stateless instance to come up. If instance does not come up within this duration, Service Fabric will create a new replacement instance.
Type: | TimeSpan |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LowKey
Specifies the low key range of the partition set.
Type: | Int64 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Metric
Metrics are the set of resources that a given named service instance needs. A service's metric configuration includes how much of that resource each stateful replica or stateless instance of that service consumes by default. Metrics also include a weight that indicates how important balancing that metric is to that service, in case tradeoffs are necessary.
For more information, see Managing resource consumption and load in Service Fabric with metrics.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MinInstanceCount
Specifies the minimum number of instances of a stateless service partition that must be up to meet the EnsureAvailability safety check during operations like application upgrade or cluster upgrade or disable node. The actual number used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). If InstanceCount is set to -1, during MinInstanceCount computation -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.
Type: | Int32 |
Position: | Named |
Default value: | 1 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MinInstancePercentage
Specifies the the minimum percentage of InstanceCount of a stateless service partition that must be up to meet the EnsureAvailability safety check during operations like application upgrade or cluster upgrade or disable node. The actual number used is max( MinInstanceCount, ceil( MinInstancePercentage/100.0 * InstanceCount) ). If InstanceCount is set to -1, during MinInstancePercentage computation, -1 is first converted into the number of nodes on which the instances are allowed to be placed according to the placement constraints on the service.
Type: | Int32 |
Position: | Named |
Default value: | 0 |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MinReplicaSetSize
Specifies the minimum replica set size that Service Fabric will keep in its view of the Replica Set for a given partition.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PartitionCount
Specifies the number of partitions for the Service Fabric service.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PartitionNames
Specifies an array of names of partitions.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PartitionSchemeNamed
Indicates that the service uses the named partition scheme. Services using this model usually have data that can be bucketed, within a bounded set. Some common examples of data fields used as named partition keys would be regions, postal codes, customer groups, or other business boundaries.
Type: | SwitchParameter |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PartitionSchemeSingleton
Indicates that the service uses the singleton partition scheme. Singleton partitions are typically used when the service does not require any additional routing.
Type: | SwitchParameter |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PartitionSchemeUniformInt64
Indicates that the service uses the UniformInt64 partition scheme. This means that each partition owns a range of int64 keys.
Type: | SwitchParameter |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PlacementConstraint
Placement Constraints are Boolean statements which allow services to select for particular node properties (and the values of those properties) in order to control where it is legal to place them. For more information, see Placement constraints and node properties.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PlacementPolicy
Placement Policies are used to for a given service to always run or never run in certain regions, similarly to try to place the Primary in a certain region to minimize end-user latency. For more information, see Placement policies for service fabric services.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-QuorumLossWaitDuration
Specifies the duration, as a TimeSpan object, that Service Fabric waits before it declares data loss for the service partition.
To obtain a TimeSpan object, use the New-TimeSpan cmdlet.
For more information, type Get-Help New-TimeSpan
.
Type: | TimeSpan |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReplicaLifecycleDescription
Lifecycle description of replicas belonging to this service. If some configuration in this section is not specified, the default value is taken from the cluster parameter of the same name (if existing).
Type: | ReplicaLifecycleDescription |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ReplicaRestartWaitDuration
Specifies the interval, as a TimeSpan object, that Service Fabric waits for a replica to restart before it starts building a replacement replica. To obtain a TimeSpan object, use the New-TimeSpan cmdlet.
Type: | TimeSpan |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ScalingPolicies
Sets the list of ScalingPolicyDescription for this service.
Type: | System.Collections.Generic.List`1[System.Fabric.Description.ScalingPolicyDescription] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServiceDnsName
Sets DNS name for the service.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServiceName
Specifies the URI of a Service Fabric service.
Type: | Uri |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServicePackageActivationMode
Controls the [hosting model][1] to be used for the service. Valid values are SharedProcess and ExclusiveProcess. The default is SharedProcess.
With SharedProcess activation mode, replicas (or instances) of different services of a given ServiceType will share same ServiceHost. With ExclusiveProcess activation mode, each replica or instance of a service will have its own dedicated ServiceHost. For more details, please see [Service Fabric Hosting Model][1].
Type: | ServicePackageActivationMode |
Accepted values: | SharedProcess, ExclusiveProcess |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServicePlacementTimeLimit
Sets the service placement time limit.
Type: | TimeSpan |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServiceTypeName
Specifies the name of a Service Fabric service type.
Type: | String |
Position: | 4 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StandByReplicaKeepDuration
Specifies the duration, as a TimeSpan object, that a replica with persistent state remains in the replica set even if it has already been replaced, that is, when the target replica set size is already satisfied. To obtain a TimeSpan object, use the New-TimeSpan cmdlet.
Type: | TimeSpan |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Stateful
Indicates that the service is a Service Fabric stateful service.
Type: | SwitchParameter |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Stateless
Indicates that the service is a Service Fabric stateless service.
Type: | SwitchParameter |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TagsRequiredToPlace
Declares tags required for placement of a service. Useful for dynamically influencing service placement. For more, see Service Fabric Dynamic Node Tags.
Type: | System.Collections.Generic.List`1[System.String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TagsRequiredToRun
Declares tags required for placement and running of a service. Useful for dynamically influencing service placement and running. For more information, see Service Fabric Dynamic Node Tags.
Type: | System.Collections.Generic.List`1[System.String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TargetReplicaSetSize
Specifies the number of replicas that the system creates and maintains for each partition of this Service Fabric stateful service.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-TimeoutSec
Specifies the time-out period, in seconds, for the operation.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
None
Outputs
System.Object