New-ServiceFabricServiceGroupFromTemplate
Creates a Service Fabric service group from a service template.
Syntax
New-ServiceFabricServiceGroupFromTemplate
[-ApplicationName] <Uri>
[-ServiceName] <Uri>
[-ServiceTypeName] <String>
[-Force]
[-ServicePackageActivationMode <ServicePackageActivationMode>]
[-TimeoutSec <Int32>]
[<CommonParameters>]
Description
The New-ServiceFabricServiceGroupFromTemplate cmdlet creates a Service Fabric service group from the service template defined in the application manifest.
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: Create a service group from a service group template
PS C:\> New-ServiceFabricServiceGroupFromTemplate -ApplicationName fabric:/myapp/persistenttodolist -ServiceName fabric:/myapp/persistenttodolist/svc4 -ServiceTypeName "PersistentToDoListServiceGroupType"
This command creates a Service Fabric service group that uses the service template for service type PersistentToDoListServiceType. The type is defined in the application manifest for the fabric:/myapp/persistenttodolist Service Fabric application.
Parameters
-ApplicationName
Specifies the Uniform Resource Identifier (URI) of a Service Fabric application. The cmdlet creates a service group based on the application that has the URI that you specify.
Type: | Uri |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServiceName
Specifies the URI of a Service Fabric service group.
Type: | Uri |
Position: | 1 |
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 |
-ServiceTypeName
Specifies the name of a Service Fabric service group type.
Type: | String |
Position: | 2 |
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