New-AzServiceFabricManagedClusterService
Create new service fabric managed service under the specified application and cluster.
Syntax
New-AzServiceFabricManagedClusterService
[-ResourceGroupName] <String>
[-ClusterName] <String>
[-ApplicationName] <String>
[-Name] <String>
-Type <String>
[-Stateless]
-InstanceCount <Int32>
[-MinInstanceCount <Int32>]
[-MinInstancePercentage <Int32>]
[-DefaultMoveCost <MoveCostEnum>]
[-PlacementConstraint <String>]
[-Metric <PSServiceMetric[]>]
[-Correlation <PSServiceCorrelation[]>]
[-ServicePackageActivationMode <ServicePackageActivationModeEnum>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-PartitionSchemeSingleton]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzServiceFabricManagedClusterService
[-ResourceGroupName] <String>
[-ClusterName] <String>
[-ApplicationName] <String>
[-Name] <String>
-Type <String>
[-Stateless]
-InstanceCount <Int32>
[-MinInstanceCount <Int32>]
[-MinInstancePercentage <Int32>]
[-DefaultMoveCost <MoveCostEnum>]
[-PlacementConstraint <String>]
[-Metric <PSServiceMetric[]>]
[-Correlation <PSServiceCorrelation[]>]
[-ServicePackageActivationMode <ServicePackageActivationModeEnum>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-PartitionSchemeUniformInt64]
-PartitionCount <Int32>
-LowKey <Int64>
-HighKey <Int64>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzServiceFabricManagedClusterService
[-ResourceGroupName] <String>
[-ClusterName] <String>
[-ApplicationName] <String>
[-Name] <String>
-Type <String>
[-Stateless]
-InstanceCount <Int32>
[-MinInstanceCount <Int32>]
[-MinInstancePercentage <Int32>]
[-DefaultMoveCost <MoveCostEnum>]
[-PlacementConstraint <String>]
[-Metric <PSServiceMetric[]>]
[-Correlation <PSServiceCorrelation[]>]
[-ServicePackageActivationMode <ServicePackageActivationModeEnum>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-PartitionSchemeNamed]
-PartitionName <String[]>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzServiceFabricManagedClusterService
[-ResourceGroupName] <String>
[-ClusterName] <String>
[-ApplicationName] <String>
[-Name] <String>
-Type <String>
[-Stateful]
-TargetReplicaSetSize <Int32>
-MinReplicaSetSize <Int32>
[-HasPersistedState]
[-ReplicaRestartWaitDuration <TimeSpan>]
[-QuorumLossWaitDuration <TimeSpan>]
[-StandByReplicaKeepDuration <TimeSpan>]
[-ServicePlacementTimeLimit <TimeSpan>]
[-DefaultMoveCost <MoveCostEnum>]
[-PlacementConstraint <String>]
[-Metric <PSServiceMetric[]>]
[-Correlation <PSServiceCorrelation[]>]
[-ServicePackageActivationMode <ServicePackageActivationModeEnum>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-PartitionSchemeSingleton]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzServiceFabricManagedClusterService
[-ResourceGroupName] <String>
[-ClusterName] <String>
[-ApplicationName] <String>
[-Name] <String>
-Type <String>
[-Stateful]
-TargetReplicaSetSize <Int32>
-MinReplicaSetSize <Int32>
[-HasPersistedState]
[-ReplicaRestartWaitDuration <TimeSpan>]
[-QuorumLossWaitDuration <TimeSpan>]
[-StandByReplicaKeepDuration <TimeSpan>]
[-ServicePlacementTimeLimit <TimeSpan>]
[-DefaultMoveCost <MoveCostEnum>]
[-PlacementConstraint <String>]
[-Metric <PSServiceMetric[]>]
[-Correlation <PSServiceCorrelation[]>]
[-ServicePackageActivationMode <ServicePackageActivationModeEnum>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-PartitionSchemeUniformInt64]
-PartitionCount <Int32>
-LowKey <Int64>
-HighKey <Int64>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
New-AzServiceFabricManagedClusterService
[-ResourceGroupName] <String>
[-ClusterName] <String>
[-ApplicationName] <String>
[-Name] <String>
-Type <String>
[-Stateful]
-TargetReplicaSetSize <Int32>
-MinReplicaSetSize <Int32>
[-HasPersistedState]
[-ReplicaRestartWaitDuration <TimeSpan>]
[-QuorumLossWaitDuration <TimeSpan>]
[-StandByReplicaKeepDuration <TimeSpan>]
[-ServicePlacementTimeLimit <TimeSpan>]
[-DefaultMoveCost <MoveCostEnum>]
[-PlacementConstraint <String>]
[-Metric <PSServiceMetric[]>]
[-Correlation <PSServiceCorrelation[]>]
[-ServicePackageActivationMode <ServicePackageActivationModeEnum>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-PartitionSchemeNamed]
-PartitionName <String[]>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
This cmdlet allows to creating stateless or stateful managed 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 = "testService1"
$serviceTypeName = "testStateless"
$statelessServiceMetric = New-Object -TypeName "Microsoft.Azure.Commands.ServiceFabric.Models.PSServiceMetric" -ArgumentList @("metric1", "Low", 4)
New-AzServiceFabricManagedClusterService -ResourceGroupName $resourceGroupName -ClusterName $clusterName -ApplicationName $appName -Name $serviceName -Type $serviceTypeName -Stateless -InstanceCount -1 -PartitionSchemeSingleton -Metric @($statelessServiceMetric) -Verbose
This example will create a new stateless managed service "testService1" with instance count -1 (on all the nodes).
Example 2
$resourceGroupName = "testRG"
$clusterName = "testCluster"
$appName = "testApp"
$serviceName = "testService2"
$serviceTypeName = "testStatefulType"
$partitionCount = 5
$partitionLowKey = 0
$partitionHighKey = 25
$statefulServiceMetric = New-Object -TypeName "Microsoft.Azure.Commands.ServiceFabric.Models.PSServiceMetric" -ArgumentList @("metric2", "Medium", 4, 2)
New-AzServiceFabricManagedClusterService -ResourceGroupName $resourceGroupName -ClusterName $clusterName -ApplicationName $appName -Name $serviceName -Type $serviceTypeName -Stateful -TargetReplicaSetSize 5 -MinReplicaSetSize 3 -Metric @($statefulServiceMetric) -PartitionSchemeUniformInt64 -PartitionCount $partitionCount -LowKey $partitionLowKey -HighKey $partitionHighKey -Verbose
This example will create a new stateful managed service "testService2" with a target of 5 nodes.
Example 3
$resourceGroupName = "testRG"
$clusterName = "testCluster"
$appName = "testApp"
$serviceName = "testService3"
$serviceName2 = "testService2"
$serviceTypeName = "testStateless"
$statefulService = Get-AzServiceFabricManagedClusterService -ResourceGroupName $resourceGroupName -ClusterName $clusterName -ApplicationName $appName -Name $serviceName2
$statefulServiceCorrelation = New-Object -TypeName "Microsoft.Azure.Commands.ServiceFabric.Models.PSServiceCorrelation" -ArgumentList @("AlignedAffinity", $statefulService.Id)
New-AzServiceFabricManagedClusterService -ResourceGroupName $resourceGroupName -ClusterName $clusterName -ApplicationName $appName -Name $serviceName -Type $serviceTypeName -Stateless -InstanceCount 3 -PartitionSchemeSingleton -Correlation @($statefulServiceCorrelation) -Verbose
This example will create a new stateless managed service "testService3".
Parameters
-ApplicationName
Specify the name of the managed application.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-AsJob
Run cmdlet in the background and return a Job to track progress.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
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 |
-Correlation
Specify the placement constraints of the managed service, as a string.
Type: | PSServiceCorrelation[] |
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 |
-Force
Continue without prompts
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HasPersistedState
Specify the target replica set size for the managed service
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HighKey
Specify the upper bound of the partition key range.
Type: | Int64 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InstanceCount
Specify the instance count for the managed service
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LowKey
Specify the lower bound of the partition key range.
Type: | Int64 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Metric
Specify the placement constraints of the managed service, as a string.
Type: | PSServiceMetric[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MinInstanceCount
Specify the minimum instance count for the managed service
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MinInstancePercentage
Specify the minimum instance percentage for the managed service
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-MinReplicaSetSize
Specify the min replica set size for the managed service
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specify the name of the managed service.
Type: | String |
Aliases: | ServiceName |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PartitionCount
Specify the number of partitions.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-PartitionName
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: | 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: | 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 |
-PlacementConstraint
Specify the placement constraints of the managed service, as a string.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-QuorumLossWaitDuration
Specify the quorum loss wait duration for the managed service. Duration represented in ISO 8601 format 'hh:mm:ss'
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 managed service. Duration represented in ISO 8601 format 'hh:mm:ss'
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 |
-ServicePackageActivationMode
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: | ServicePackageActivationModeEnum |
Accepted values: | SharedProcess, ExclusiveProcess |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ServicePlacementTimeLimit
Specify the service placement time limit for the managed service. Duration represented in ISO 8601 format 'hh:mm:ss'
Type: | TimeSpan |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-StandByReplicaKeepDuration
Specify the stand by replica duration for the managed service. Duration represented in ISO 8601 format 'hh:mm:ss'
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 |
-Tag
Specify the tags as key/value pairs.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-TargetReplicaSetSize
Specify the target replica set size for the managed 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 managed 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
Outputs
Azure PowerShell