使用 Application Auto Scaling 的分步扩展策略删除 Amazon CLI - Application Auto Scaling
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

使用 Application Auto Scaling 的分步扩展策略删除 Amazon CLI

当您不再需要某个步进扩展策略时,可将其删除。要删除扩展策略和关联 CloudWatch 警报,请完成以下任务。

删除您的扩展策略

使用 delete-scaling-policy 命令。

Linux、macOS 或 Unix

aws application-autoscaling delete-scaling-policy --service-namespace ecs \ --scalable-dimension ecs:service:DesiredCount \ --resource-id service/my-cluster/my-service \ --policy-name my-step-scaling-policy

Windows

aws application-autoscaling delete-scaling-policy --service-namespace ecs ^ --scalable-dimension ecs:service:DesiredCount ^ --resource-id service/my-cluster/my-service ^ --policy-name my-step-scaling-policy
删除 CloudWatch 警报

使用 delete-alarms 命令。您可以一次删除一个或多个警报。例如,使用以下命令可删除 Step-Scaling-AlarmHigh-ECS:service/my-cluster/my-serviceStep-Scaling-AlarmLow-ECS:service/my-cluster/my-service 警报:

aws cloudwatch delete-alarms --alarm-name Step-Scaling-AlarmHigh-ECS:service/my-cluster/my-service Step-Scaling-AlarmLow-ECS:service/my-cluster/my-service