Deleting a scaling policy - Amazon ElastiCache for Redis
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Deleting a scaling policy

You can delete a scaling policy using the Amazon Web Services Management Console, the Amazon CLI or the Application Auto Scaling API

Deleting a scaling policy using the Amazon Web Services Management Console

You can only edit policies with type Predefined metrics by using the Amazon Web Services Management Console

  1. Sign in to the Amazon Web Services Management Console and open the Amazon ElastiCache console at https://console.amazonaws.cn/elasticache/.

  2. In the navigation pane, choose Redis

  3. Choose the cluster whose auto scaling policy you want to delete.

  4. Choose the Auto Scaling policies tab.

  5. Under Scaling policies, choose the auto scaling policy, and then choose Delete.

Deleting a scaling policy using the Amazon CLI or the Application Auto Scaling API

You can use the Amazon CLI or the Application Auto Scaling API to delete a scaling policy from an ElastiCache cluster.

CLI

To delete a scaling policy from your ElastiCache for Redis cluster, use the delete-scaling-policy command with the following parameters:

  • --policy-name – The name of the scaling policy.

  • --resource-id – The resource identifier for the ElastiCache for Redis cluster. For this parameter, the resource type is ReplicationGroup and the unique identifier is the name of the ElastiCache cluster, for example replication-group/myscalablecluster.

  • --service-namespace – Set this value to elasticache.

  • --scalable-dimension – Set this value to elasticache:replication-group:Replicas.

In the following example, you delete a target-tracking scaling policy named myscalablepolicy from an ELC; cluster named myscalablecluster.

For Linux, OS X, or Unix:

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

For Windows:

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

API

To delete a scaling policy from your ElastiCache for Redis cluster, use the DeleteScalingPolicy Application Auto Scaling API operation with the following parameters:

  • PolicyName – The name of the scaling policy.

  • ResourceID – The resource identifier for the ElastiCache for Redis cluster. For this parameter, the resource type is ReplicationGroup and the unique identifier is the name of the ElastiCache cluster, for example replication-group/myscalablecluster.

  • ServiceNamespace – Set this value to elasticache.

  • ScalableDimension – Set this value to elasticache:replication-group:Replicas.

In the following example, you delete a target-tracking scaling policy named myscalablepolicy from an ElastiCache for Redis cluster named myscalablecluster with the Application Auto Scaling API.

POST / HTTP/1.1 >>>>>>> mainline 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:Replicas" }