Set-AzServiceFabricManagedClusterService
從叢集更新受控服務。 僅支援 ARM 部署的服務。
語法
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
此 Cmdlet 會更新受控服務,形成叢集。
範例
範例 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
此範例會更新受控服務 「testService1」。。
範例 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
此範例會移除受控服務 testService1”
範例 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
此範例會移除具有指定 ARM 資源識別碼的受控服務詳細數據。
參數
-ApplicationName
指定受控應用程式的名稱。
類型: | String |
Position: | 2 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-AsJob
在背景執行 Cmdlet,並傳回作業以追蹤進度。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ClusterName
指定叢集的名稱。
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Correlation
將受控服務的位置條件約束指定為字串。
類型: | PSServiceCorrelation[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultMoveCost
指定行動的預設成本。 較高的成本使得叢集資源管理員在嘗試平衡叢集時移動復本的可能性較低
類型: | MoveCostEnum |
接受的值: | Zero, Low, Medium, High |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 Azure 通訊的認證、帳戶、租用戶和訂用帳戶。
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Force
在沒有提示的情況下繼續
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-HasPersistedState
指定受控服務的目標副本集大小
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-InputObject
受控服務資源。
類型: | PSManagedService |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-InstanceCount
指定受控服務的實例計數
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Metric
將受控服務的位置條件約束指定為字串。
類型: | PSServiceMetric[] |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-MinInstanceCount
指定受控服務的最小實例計數
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-MinInstancePercentage
指定受控服務的最小實例百分比
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-MinReplicaSetSize
指定受控服務的最小副本集大小
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Name
指定受控服務的名稱。
類型: | String |
別名: | ServiceName |
Position: | 3 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-PlacementConstraint
將受控服務的位置條件約束指定為字串。
類型: | String |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-QuorumLossWaitDuration
指定受控服務的仲裁遺失等候持續時間。 以 ISO 8601 格式 'hh:mm:ss' 表示的持續時間
類型: | TimeSpan |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ReplicaRestartWaitDuration
指定受控服務的複本重新啟動等候持續時間。 以 ISO 8601 格式 'hh:mm:ss' 表示的持續時間
類型: | TimeSpan |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
指定資源群組的名稱。
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ResourceId
受控服務的 Arm ResourceId。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-ServicePackageActivationMode
指定行動的預設成本。 較高的成本使得叢集資源管理員在嘗試平衡叢集時移動復本的可能性較低
類型: | ServicePackageActivationModeEnum |
接受的值: | SharedProcess, ExclusiveProcess |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-ServicePlacementTimeLimit
指定受控服務的服務放置時間限制。 以 ISO 8601 格式 'hh:mm:ss' 表示的持續時間
類型: | TimeSpan |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-StandByReplicaKeepDuration
指定受控服務的待用複本持續時間。 以 ISO 8601 格式 'hh:mm:ss' 表示的持續時間
類型: | TimeSpan |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Stateful
用於具狀態服務
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Stateless
用於無狀態服務
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-Tag
將標記指定為索引鍵/值組。
類型: | Hashtable |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-TargetReplicaSetSize
指定受控服務的目標副本集大小
類型: | Int32 |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |