Share via


Get-ServiceFabricServiceGroupDescription

Gets a Service Fabric service group description.

Syntax

Default (Default)

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.

Parameter properties

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

Parameter sets

(All)
Position:0
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.Uri

Outputs

System.Object