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

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

删除扩展策略

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

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

删除适用于 Red OSS is 的集群的 Auto S ElastiCache caling 策略
  1. 登录 Amazon Web Services Management Console 并打开 Amazon ElastiCache 控制台,网址为https://console.aws.amazon.com/elasticache/

  2. 在导航窗格中,选择 ValkeyRedis OSS

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

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

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

使用删除扩展策略 Amazon CLI

要删除 Valkey 和 Redis OSS 集群的扩展策略,请使用带有以下参数的delete-scaling-policy Amazon CLI 命令: ElastiCache

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

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

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

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

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

对于 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删除扩展策略

要删除 Valkey 和 Redis OSS 集群的扩展策略,请使用带有以下参数的DeleteScalingPolicy Amazon CLI 命令: ElastiCache

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

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

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

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

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

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" }