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

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

删除扩展策略

您可以使用Amazon Web Services Management Console、Amazon CLI 或 Application Auto Scaling API 删除扩缩策略。

使用 Amazon Web Services Management Console删除扩展策略

删除 ElastiCache for Redis 集群的弹性伸缩策略
  1. 登录 Amazon Web Services Management Console 并打开 Amazon ElastiCache 控制台 (https://console.aws.amazon.com/elasticache/)。

  2. 在导航窗格中,选择 Redis

  3. 选择要编辑其 Auto Scaling 策略的集群(选择集群名称,而不是其左侧的按钮)。

  4. 选择 Auto Scaling policies(弹性伸缩策略)选项卡。

  5. Scaling policies(扩展策略)下,选择 Auto Scaling 策略,然后选择 Delete(删除)。

使用 Amazon CLI删除扩展策略

要删除 ElastiCache for Redis 集群的扩展策略,请使用包含下列参数的 delete-scaling-policy Amazon CLI 命令:

  • --policy-name – 扩展策略的名称。

  • --resource-id – ElastiCache for Redis 的资源标识符。对于此参数,资源类型为 ReplicationGroup,唯一标识符为 ElastiCache for Redis 集群的名称,例如 replication-group/myscalablecluster

  • --service-namespace – 将此值设置为 elasticache

  • --scalable-dimension – 将此值设置为 elasticache:replication-group:NodeGroups

在以下示例中,您从名为 myscalablecluster 的 ElastiCache for Redis 集群中删除名为 myscalablepolicy 的目标跟踪扩缩策略。

对于 Linux、macOS 或 Unix:

aws application-autoscaling delete-scaling-policy \ --policy-name myscalablepolicy \ --resource-id replication-group/myscalablecluster \ --service-namespace elasticache \ --scalable-dimension elasticache:replication-group:NodeGroups

对于 Windows:

aws application-autoscaling delete-scaling-policy ^ --policy-name myscalablepolicy ^ --resource-id replication-group/myscalablecluster ^ --service-namespace elasticache ^ --scalable-dimension elasticache:replication-group:NodeGroups

使用 API 删除扩展策略

要删除 ElastiCache for Redis 集群的扩展策略,请使用包含下列参数的 DeleteScalingPolicy Amazon CLI 命令:

  • --policy-name – 扩展策略的名称。

  • --resource-id – ElastiCache for Redis 的资源标识符。对于此参数,资源类型为 ReplicationGroup,唯一标识符为 ElastiCache for Redis 集群的名称,例如 replication-group/myscalablecluster

  • --service-namespace – 将此值设置为 elasticache

  • --scalable-dimension – 将此值设置为 elasticache:replication-group:NodeGroups

在以下示例中,您从名为 myscalablecluster 的 ElastiCache for Redis 集群中删除名为 myscalablepolicy 的目标跟踪扩缩策略。

POST / HTTP/1.1 Host: autoscaling.us-east-2.amazonaws.com Accept-Encoding: identity Content-Length: 219 X-Amz-Target: AnyScaleFrontendService.DeleteScalingPolicy X-Amz-Date: 20160506T182145Z User-Agent: aws-cli/1.10.23 Python/2.7.11 Darwin/15.4.0 botocore/1.4.8 Content-Type: application/x-amz-json-1.1 Authorization: AUTHPARAMS { "PolicyName": "myscalablepolicy", "ServiceNamespace": "elasticache", "ResourceId": "replication-group/myscalablecluster", "ScalableDimension": "elasticache:replication-group:NodeGroups" }