編集

次の方法で共有


Set-AzServiceFabricManagedClusterService

Update a managed service from the cluster. Only supports ARM deployed services.

Syntax

Set-AzServiceFabricManagedClusterService
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-ApplicationName] <String>
   [-Name] <String>
   [-Stateless]
   [-InstanceCount <Int32>]
   [-MinInstanceCount <Int32>]
   [-MinInstancePercentage <Int32>]
   [-DefaultMoveCost <MoveCostEnum>]
   [-PlacementConstraint <String>]
   [-Metric <PSServiceMetric[]>]
   [-Correlation <PSServiceCorrelation[]>]
   [-ServicePackageActivationMode <ServicePackageActivationModeEnum>]
   [-Tag <Hashtable>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzServiceFabricManagedClusterService
   [-ResourceGroupName] <String>
   [-ClusterName] <String>
   [-ApplicationName] <String>
   [-Name] <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]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzServiceFabricManagedClusterService
   -ResourceId <String>
   [-Stateless]
   [-InstanceCount <Int32>]
   [-MinInstanceCount <Int32>]
   [-MinInstancePercentage <Int32>]
   [-DefaultMoveCost <MoveCostEnum>]
   [-PlacementConstraint <String>]
   [-Metric <PSServiceMetric[]>]
   [-Correlation <PSServiceCorrelation[]>]
   [-ServicePackageActivationMode <ServicePackageActivationModeEnum>]
   [-Tag <Hashtable>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzServiceFabricManagedClusterService
   -ResourceId <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]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzServiceFabricManagedClusterService
   -InputObject <PSManagedService>
   [-Stateless]
   [-InstanceCount <Int32>]
   [-MinInstanceCount <Int32>]
   [-MinInstancePercentage <Int32>]
   [-DefaultMoveCost <MoveCostEnum>]
   [-PlacementConstraint <String>]
   [-Metric <PSServiceMetric[]>]
   [-Correlation <PSServiceCorrelation[]>]
   [-ServicePackageActivationMode <ServicePackageActivationModeEnum>]
   [-Tag <Hashtable>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzServiceFabricManagedClusterService
   -InputObject <PSManagedService>
   [-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]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

This cmdlet updates a managed service form the cluster.

Examples

Example 1

$resourceGroupName = "testRG"
$clusterName = "testCluster"
$appName = "testApp"
$serviceName = "testService1"
Set-AzServiceFabricManagedClusterService -ResourceGroupName $resourceGroupName -ClusterName $clusterName -ApplicationName $appName -Name $serviceName -Stateful -TargetReplicaSetSize 3 -MinReplicaSetSize 5 -Verbose

This example will update the managed service "testService1".

Example 2

$resourceGroupName = "testRG"
$clusterName = "testCluster"
$appName = "testApp"
$serviceName = "testService1"
$minInstancePercentage = 20
$minInstanceCount = 2
$statelessServiceMetric = New-Object -TypeName "Microsoft.Azure.Commands.ServiceFabric.Models.PSServiceMetric" -ArgumentList @("metric1", "Low", 4)
$service = Get-AzServiceFabricManagedClusterService -ResourceGroupName $resourceGroupName -ClusterName $clusterName -ApplicationName $appName
$service | Set-AzServiceFabricManagedClusterService -Stateless -Metric @($statelessServiceMetric) -MinInstanceCount $minInstanceCount -MinInstancePercentage $minInstancePercentage -Verbose

This example will remove the managed service testService1".

Example 3

$standByReplicaKeepDuration = "00:11:00"
$servicePlacementTimeLimit = "00:11:00"
$resourceId = "/subscriptions/13ad2c84-84fa-4798-ad71-e70c07af873f/resourcegroups/testRG/providers/Microsoft.ServiceFabric/managedClusters/testCluster/applications/testApp/services/testService"
Set-AzServiceFabricManagedClusterService -ResourceId $resourceId -StandByReplicaKeepDuration $standByReplicaKeepDuration -ServicePlacementTimeLimit $servicePlacementTimeLimit -Verbose

This example will remove the managed service details with the ARM Resource ID specified.

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

-InputObject

The managed service resource.

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

-InstanceCount

Specify the instance count for the managed service

Type:Int32
Position:Named
Default value:None
Required:False
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:False
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

-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

-ResourceId

Arm ResourceId of the managed service.

Type:String
Position:Named
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:False
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

PSManagedService

Hashtable

Outputs

PSManagedService