如何设置参数aws ecs update-service -DeploymentConfiguration_MinimumHealthyPercent XX?

how to set the parameter aws ecs update-service -DeploymentConfiguration_MinimumHealthyPercent XX?

有 2 个文档

1 https://docs.aws.amazon.com/powershell/latest/reference/items/Update-ECSService.html

2 https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/update-service.html

在第一个文档中我明白了如何指定参数“-DeploymentConfiguration_MinimumHealthyPercent 50 “

第二个文档没有告诉我怎么做

这个例子有效:

Update-ECSService -Cluster $Cluster -Service $Service -ForceNewDeployment 1 -HealthCheckGracePeriodSecond 1200 -DeploymentConfiguration_MinimumHealthyPercent 50 

如何通过 AWS CLI 执行同样的操作?

aws ecs update-service --cluster $cluster --service $service --force-new-deployment --health-check-grace-period-seconds 1200 ( -DeploymentConfiguration_MinimumHealthyPercent 50 ???)

你能告诉我如何设置参数吗?

aws ecs 更新服务 -DeploymentConfiguration_MinimumHealthyPercent XX

您可以将 minimumHealthyPercent 值设置为 --deployment-configuration 参数的一部分:

aws ecs update-service --cluster $cluster \
--service $service \
--force-new-deployment \
--health-check-grace-period-seconds 1200 \
--deployment-configuration "maximumPercent=100,minimumHealthyPercent=50,deploymentCircuitBreaker={enable=boolean,rollback=boolean}"