Bearbeiten

Freigeben über


New-AzServiceFabricService

Create new service fabric service under the specified application and cluster.

Syntax

New-AzServiceFabricService
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-ApplicationName] <String>
   [-Name] <String>
   -Type <String>
   [-Stateless]
   -InstanceCount <Int32>
   [-DefaultMoveCost <MoveCostEnum>]
   [-PartitionSchemeSingleton]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzServiceFabricService
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-ApplicationName] <String>
   [-Name] <String>
   -Type <String>
   [-Stateless]
   -InstanceCount <Int32>
   [-DefaultMoveCost <MoveCostEnum>]
   [-PartitionSchemeUniformInt64]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzServiceFabricService
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-ApplicationName] <String>
   [-Name] <String>
   -Type <String>
   [-Stateless]
   -InstanceCount <Int32>
   [-DefaultMoveCost <MoveCostEnum>]
   [-PartitionSchemeNamed]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzServiceFabricService
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-ApplicationName] <String>
   [-Name] <String>
   -Type <String>
   [-Stateful]
   -TargetReplicaSetSize <Int32>
   -MinReplicaSetSize <Int32>
   [-ReplicaRestartWaitDuration <TimeSpan>]
   [-QuorumLossWaitDuration <TimeSpan>]
   [-StandByReplicaKeepDuration <TimeSpan>]
   [-DefaultMoveCost <MoveCostEnum>]
   [-PartitionSchemeSingleton]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzServiceFabricService
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-ApplicationName] <String>
   [-Name] <String>
   -Type <String>
   [-Stateful]
   -TargetReplicaSetSize <Int32>
   -MinReplicaSetSize <Int32>
   [-ReplicaRestartWaitDuration <TimeSpan>]
   [-QuorumLossWaitDuration <TimeSpan>]
   [-StandByReplicaKeepDuration <TimeSpan>]
   [-DefaultMoveCost <MoveCostEnum>]
   [-PartitionSchemeUniformInt64]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
New-AzServiceFabricService
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-ApplicationName] <String>
   [-Name] <String>
   -Type <String>
   [-Stateful]
   -TargetReplicaSetSize <Int32>
   -MinReplicaSetSize <Int32>
   [-ReplicaRestartWaitDuration <TimeSpan>]
   [-QuorumLossWaitDuration <TimeSpan>]
   [-StandByReplicaKeepDuration <TimeSpan>]
   [-DefaultMoveCost <MoveCostEnum>]
   [-PartitionSchemeNamed]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

This cmdlet allows to creating stateless or stateful services under the specified application. The service should exit in the application manifest and the type should be the same as the one in the manifest. The application name should be a prefix of the service name.

Examples

Example 1

$resourceGroupName = "testRG"
$clusterName = "testCluster"
$appName = "testApp"
$serviceName = "testApp~testService1"
$serviceTypeName = "testStateless"
New-AzServiceFabricService -ResourceGroupName $resourceGroupName -ClusterName $clusterName -ApplicationName $appName -Name $serviceName -Type $serviceTypeName -Stateless -InstanceCount -1 -PartitionSchemeSingleton -Verbose

This example will create a new stateless service "testApp~testService1" with instance count -1 (on all the nodes).

Example 2

$resourceGroupName = "testRG"
$clusterName = "testCluster"
$appName = "testApp"
$serviceName = "testApp~testService2"
$serviceTypeName = "testStatefulType"
New-AzServiceFabricService -ResourceGroupName $resourceGroupName -ClusterName $clusterName -ApplicationName $appName -Name $serviceName -Type $serviceTypeName -Stateful -TargetReplicaSetSize 3 -MinReplicaSetSize 5

This example will create a new stateful service "testApp~testService2" with a target of 5 nodes.

Parameters

-ApplicationName

Specify the name of the application.

Type:String
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ClusterName

Specify the name of the cluster.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultMoveCost

Specify 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

Type:MoveCostEnum
Accepted values:Zero, Low, Medium, High
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InstanceCount

Specify the instance count for the service

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-MinReplicaSetSize

Specify the min replica set size for the service

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specify the name of the service.

Type:String
Aliases:ServiceName
Position:3
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:Named
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:Named
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:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-QuorumLossWaitDuration

Specify the quorum loss wait duration for the service

Type:TimeSpan
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ReplicaRestartWaitDuration

Specify the replica restart wait duration for the service

Type:TimeSpan
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Specify the name of the resource group.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-StandByReplicaKeepDuration

Specify the stand by replica duration for the service

Type:TimeSpan
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Stateful

Use for stateful service

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Stateless

Use for stateless service

Type:SwitchParameter
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-TargetReplicaSetSize

Specify the target replica set size for the service

Type:Int32
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-Type

Specify the service type name of the application, should exist in the application manifest.

Type:String
Aliases:ServiceType
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

PSService