Get-ServiceFabricServiceGroupDescription
Gets a Service Fabric service group description.
Syntax
Get-ServiceFabricServiceGroupDescription
[-ServiceName] <Uri>
[-TimeoutSec <Int32>]
[<CommonParameters>]
Description
The Get-ServiceFabricServiceGroupDescription cmdlet gets the Service Fabric service group description of a service that is running. A service group is a group defined by the user. Services that are part of a group would be placed on the same node.
To create a new group use New-ServiceFabricServiceGroup cmdlet. To update a service group use Update-ServiceFabricServiceGroup cmdlet. To remove a service group use Remove-ServiceFabricServiceGroup cmdlet.
Before you perform any operation on a Service Fabric cluster, establish a connection to the cluster by using the Connect-ServiceFabricCluster cmdlet.
Examples
Example 1: Get a service group description
PS C:\> Get-ServiceFabricServiceGroupDescription -ServiceName fabric:/CalcApp/CalcService
This command gets the Service Fabric service group description for the service named fabric:/CalcApp/CalcService.
Example 2: Create, Update and Remove service fabric service groups.
PS C:\> New-ServiceFabricServiceGroup -ApplicationName fabric:/myapp/calculator -ServiceName fabric:/myapp/calculator/svc1 -ServiceTypeName StatelessCalculatorService -Stateless -PartitionSchemeSingleton -InstanceCount 3 -ServiceGroupMemberDescription @(@{"ServiceName"="fabric:/myapp/calculator/svc1#a";"ServiceTypeName"="StatelessCalculatorService1"},@{"ServiceName"="fabric:/myapp/calculator/svc1#b";"ServiceTypeName"="StatelessCalculatorService2"})
PS C:\> New-ServiceFabricServiceGroup -ApplicationName fabric:/myapp/calculator -ServiceName fabric:/myapp/calculator/svc1 -ServiceTypeName StatefulCalculatorService -Stateful -TargetReplicaSetSize 5 -MinReplicaSetSize 3 -ReplicaRestartWaitDuration 10 -PlacementConstraint TestPlacementConstraints -ServiceGroupMemberDescription @(@{"ServiceName"="fabric:/myapp/calculator/svc1#a";"ServiceTypeName"="StatelessCalculatorService"})
PS C:\> Get-ServiceFabricServiceGroupDescription -ServiceName fabric:/CalcApp/CalcService
PS C:\> Update-ServiceFabricServiceGroup -ServiceName fabric:/myapp/calculator/svc1 -Stateless -PartitionSchemeSingleton -InstanceCount 3 -ServiceGroupMemberDescription @("fabric:/myapp/calculator/svc1#a,StatelessCalculatorService,")
PS C:\> Remove-ServiceFabricServiceGroup -ServiceName fabric:/myapp/calculator/svc1
Parameters
-ServiceName
Specifies the Uniform Resource Identifier (URI) of a Service Fabric service group.
Type: | Uri |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
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
System.Uri
Outputs
System.Object