Application Auto Scaling
API Reference
API Version 2016-02-06
Application Auto Scaling: API Reference
Copyright © Amazon Web Services, Inc. and/or its affiliates. All rights reserved.
Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.
Table of Contents
Welcome ... 1
Actions ... 3
DeleteScalingPolicy ... 4
Request Syntax ... 4
Request Parameters ... 4
Response Elements ... 6
Errors ... 7
Examples ... 7
See Also ... 8
DeleteScheduledAction ... 9
Request Syntax ... 9
Request Parameters ... 9
Response Elements ... 11
Errors ... 11
See Also ... 12
DeregisterScalableTarget ... 13
Request Syntax ... 13
Request Parameters ... 13
Response Elements ... 15
Errors ... 15
Examples ... 16
See Also ... 16
DescribeScalableTargets ... 18
Request Syntax ... 18
Request Parameters ... 18
Response Syntax ... 21
Response Elements ... 21
Errors ... 21
Examples ... 22
See Also ... 23
DescribeScalingActivities ... 24
Request Syntax ... 24
Request Parameters ... 24
Response Syntax ... 27
Response Elements ... 27
Errors ... 27
Examples ... 28
See Also ... 30
DescribeScalingPolicies ... 32
Request Syntax ... 32
Request Parameters ... 32
Response Syntax ... 35
Response Elements ... 36
Errors ... 36
Examples ... 37
See Also ... 38
DescribeScheduledActions ... 40
Request Syntax ... 40
Request Parameters ... 40
Response Syntax ... 43
Response Elements ... 43
Errors ... 44
See Also ... 44
PutScalingPolicy ... 45
Request Syntax ... 45
Request Parameters ... 46
Response Syntax ... 49
Response Elements ... 49
Errors ... 50
Examples ... 50
See Also ... 53
PutScheduledAction ... 54
Request Syntax ... 54
Request Parameters ... 54
Response Elements ... 58
Errors ... 58
See Also ... 59
RegisterScalableTarget ... 60
Request Syntax ... 60
Request Parameters ... 60
Response Elements ... 64
Errors ... 64
Examples ... 64
See Also ... 65
Data Types ... 66
Alarm ... 67
Contents ... 67
See Also ... 67
CustomizedMetricSpecification ... 68
Contents ... 68
See Also ... 69
MetricDimension ... 70
Contents ... 70
See Also ... 70
PredefinedMetricSpecification ... 71
Contents ... 71
See Also ... 72
ScalableTarget ... 73
Contents ... 73
See Also ... 76
ScalableTargetAction ... 77
Contents ... 77
See Also ... 77
ScalingActivity ... 78
Contents ... 78
See Also ... 81
ScalingPolicy ... 82
Contents ... 82
See Also ... 85
ScheduledAction ... 86
Contents ... 86
See Also ... 89
StepAdjustment ... 91
Contents ... 91
See Also ... 92
StepScalingPolicyConfiguration ... 93
Contents ... 93
See Also ... 94
SuspendedState ... 95
Contents ... 95
See Also ... 95
TargetTrackingScalingPolicyConfiguration ... 96
Contents ... 96
See Also ... 98
Common Parameters ... 99
Common Errors ... 101
Logging API Calls with CloudTrail ... 103
Application Auto Scaling Information in CloudTrail ... 103
Understanding Application Auto Scaling Log File Entries ... 104
... 104
Welcome
This is the Application Auto Scaling API Reference. With Application Auto Scaling, you can configure automatic scaling for the following resources:
• Amazon AppStream 2.0 fleets
• Amazon Aurora Replicas
• Amazon Comprehend document classification and entity recognizer endpoints
• Amazon DynamoDB tables and global secondary indexes throughput capacity
• Amazon ECS services
• Amazon ElastiCache for Redis clusters (replication groups)
• Amazon EMR clusters
• Amazon Keyspaces (for Apache Cassandra) tables
• AWS Lambda function provisioned concurrency
• Amazon Managed Streaming for Apache Kafka broker storage
• Amazon Neptune clusters
• Amazon SageMaker endpoint variants
• Spot Fleets (Amazon EC2)
• Custom resources provided by your own applications or services
API Summary
The Application Auto Scaling service API includes three key sets of actions:
• Register and manage scalable targets - Register AWS or custom resources as scalable targets (a resource that Application Auto Scaling can scale), set minimum and maximum capacity limits, and retrieve information on existing scalable targets.
• Configure and manage automatic scaling - Define scaling policies to dynamically scale your resources in response to CloudWatch alarms, schedule one-time or recurring scaling actions, and retrieve your recent scaling activity history.
• Suspend and resume scaling - Temporarily suspend and later resume automatic scaling by calling the RegisterScalableTarget API action for any Application Auto Scaling scalable target. You can suspend and resume (individually or in combination) scale-out activities that are triggered by a scaling policy, scale-in activities that are triggered by a scaling policy, and scheduled scaling.
The documentation for each action shows the Query API request syntax, the request parameters, and the response elements and provides links to language-specific SDK reference topics. For more information, see AWS SDKs.
To learn more about Application Auto Scaling, including information about granting IAM users required permissions for Application Auto Scaling actions, see the Application Auto Scaling User Guide.
API request rate
Application Auto Scaling uses the token bucket algorithm to implement API throttling. With this algorithm, your account has a bucket that holds a specific number of tokens. The number of tokens in the bucket represents your throttling limit at any given second. Application Auto Scaling throttles API requests based on a shared API bucket. For example, calls to the DescribeScalableTargets (p. 18) and DescribeScheduledActions (p. 40) API operations use tokens from the same bucket. Throttling
means that Application Auto Scaling rejects a request because the request exceeds the service's limit for the number of requests per second. When a request is throttled, Application Auto Scaling returns a RateExceeded error. For more information, see My Auto Scaling API calls are getting throttled. What can I do to avoid this? in the AWS Knowledge Center.
This document was last published on March 6, 2022.
Actions
The following actions are supported:
• DeleteScalingPolicy (p. 4)
• DeleteScheduledAction (p. 9)
• DeregisterScalableTarget (p. 13)
• DescribeScalableTargets (p. 18)
• DescribeScalingActivities (p. 24)
• DescribeScalingPolicies (p. 32)
• DescribeScheduledActions (p. 40)
• PutScalingPolicy (p. 45)
• PutScheduledAction (p. 54)
• RegisterScalableTarget (p. 60)
DeleteScalingPolicy
DeleteScalingPolicy
Deletes the specified scaling policy for an Application Auto Scaling scalable target.
Deleting a step scaling policy deletes the underlying alarm action, but does not delete the CloudWatch alarm associated with the scaling policy, even if it no longer has an associated action.
For more information, see Delete a step scaling policy and Delete a target tracking scaling policy in the Application Auto Scaling User Guide.
Request Syntax
{ "PolicyName": "string", "ResourceId": "string", "ScalableDimension": "string", "ServiceNamespace": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters (p. 99).
The request accepts the following data in JSON format.
PolicyName (p. 4)
The name of the scaling policy.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1600.
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
Required: Yes ResourceId (p. 4)
The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier.
• ECS service - The resource type is service and the unique identifier is the cluster name and service name. Example: service/default/sample-webapp.
• Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce- aa30-494c-8788-1cee4EXAMPLE.
• EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
• AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name.
Example: fleet/sample-fleet.
• DynamoDB table - The resource type is table and the unique identifier is the table name.
Example: table/my-table.
• DynamoDB global secondary index - The resource type is index and the unique identifier is the index name. Example: table/my-table/index/my-table-index.
Request Parameters
• Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name.
Example: cluster:my-db-cluster.
• SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
• Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.
• Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us- west-2:123456789012:document-classifier-endpoint/EXAMPLE.
• Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us- west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.
• Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST. Example:
function:my-function:prod or function:my-function:1.
• Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.
Example: keyspace/mykeyspace/table/mytable.
• Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN. Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo- cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.
• Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.
• Neptune cluster - The resource type is cluster and the unique identifier is the cluster name.
Example: cluster:mycluster.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1600.
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
Required: Yes ScalableDimension (p. 4)
The scalable dimension. This string consists of the service namespace, resource type, and scaling property.
• ecs:service:DesiredCount - The desired task count of an ECS service.
• elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.
• ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.
• appstream:fleet:DesiredCapacity - The desired capacity of an AppStream 2.0 fleet.
• dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.
• dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.
• dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.
• dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.
• rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster.
Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.
• sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.
Response Elements
• custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.
• comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.
• comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.
• lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.
• cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.
• cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.
• kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.
• elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.
• elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.
• neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.
Type: String
Valid Values: ecs:service:DesiredCount | ec2:spot-fleet-
request:TargetCapacity | elasticmapreduce:instancegroup:InstanceCount
| appstream:fleet:DesiredCapacity | dynamodb:table:ReadCapacityUnits
| dynamodb:table:WriteCapacityUnits | dynamodb:index:ReadCapacityUnits
| dynamodb:index:WriteCapacityUnits | rds:cluster:ReadReplicaCount
| sagemaker:variant:DesiredInstanceCount | custom-
resource:ResourceType:Property | comprehend:document-classifier- endpoint:DesiredInferenceUnits | comprehend:entity-recognizer-
endpoint:DesiredInferenceUnits | lambda:function:ProvisionedConcurrency | cassandra:table:ReadCapacityUnits | cassandra:table:WriteCapacityUnits | kafka:broker-storage:VolumeSize | elasticache:replication-group:NodeGroups | elasticache:replication-group:Replicas | neptune:cluster:ReadReplicaCount Required: Yes
ServiceNamespace (p. 4)
The namespace of the AWS service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
Type: String
Valid Values: ecs | elasticmapreduce | ec2 | appstream | dynamodb | rds | sagemaker | custom-resource | comprehend | lambda | cassandra | kafka | elasticache | neptune
Required: Yes
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
Errors
For information about the errors that are common to all actions, see Common Errors (p. 101).
ConcurrentUpdateException
Concurrent updates caused an exception, for example, if you request an update to an Application Auto Scaling resource that already has a pending update.
HTTP Status Code: 400 InternalServiceException
The service encountered an internal error.
HTTP Status Code: 400 ObjectNotFoundException
The specified object could not be found. For any operation that depends on the existence of a scalable target, this exception is thrown if the scalable target with the specified service namespace, resource ID, and scalable dimension does not exist. For any operation that deletes or deregisters a resource, this exception is thrown if the resource cannot be found.
HTTP Status Code: 400 ValidationException
An exception was thrown for a validation issue. Review the available parameters for the API request.
HTTP Status Code: 400
Examples
If you plan to create requests manually, you must replace the Authorization header contents in the examples (AUTHPARAMS) with a signature. For more information, see Signature Version 4 Signing Process in the Amazon Web Services General Reference. If you plan to use the AWS CLI or one of the AWS SDKs, these tools sign the requests for you.
Example
The following example deletes a scaling policy for the Amazon ECS service web-app running in the default cluster.
Sample Request
POST / HTTP/1.1
Host: autoscaling.us-west-2.amazonaws.com Accept-Encoding: identity
Content-Length: 152
X-Amz-Target: AnyScaleFrontendService.DeleteScalingPolicy X-Amz-Date: 20190506T205712Z
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": "my-scale-out-policy", "ServiceNamespace": "ecs",
"ScalableDimension": "ecs:service:DesiredCount",
See Also
"ResourceId": "service/default/web-app"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DeleteScheduledAction
DeleteScheduledAction
Deletes the specified scheduled action for an Application Auto Scaling scalable target.
For more information, see Delete a scheduled action in the Application Auto Scaling User Guide.
Request Syntax
{ "ResourceId": "string", "ScalableDimension": "string", "ScheduledActionName": "string", "ServiceNamespace": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters (p. 99).
The request accepts the following data in JSON format.
ResourceId (p. 9)
The identifier of the resource associated with the scheduled action. This string consists of the resource type and unique identifier.
• ECS service - The resource type is service and the unique identifier is the cluster name and service name. Example: service/default/sample-webapp.
• Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce- aa30-494c-8788-1cee4EXAMPLE.
• EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
• AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name.
Example: fleet/sample-fleet.
• DynamoDB table - The resource type is table and the unique identifier is the table name.
Example: table/my-table.
• DynamoDB global secondary index - The resource type is index and the unique identifier is the index name. Example: table/my-table/index/my-table-index.
• Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name.
Example: cluster:my-db-cluster.
• SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
• Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.
• Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us- west-2:123456789012:document-classifier-endpoint/EXAMPLE.
• Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us- west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.
Request Parameters
• Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST. Example:
function:my-function:prod or function:my-function:1.
• Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.
Example: keyspace/mykeyspace/table/mytable.
• Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN. Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo- cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.
• Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.
• Neptune cluster - The resource type is cluster and the unique identifier is the cluster name.
Example: cluster:mycluster.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1600.
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
Required: Yes ScalableDimension (p. 9)
The scalable dimension. This string consists of the service namespace, resource type, and scaling property.
• ecs:service:DesiredCount - The desired task count of an ECS service.
• elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.
• ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.
• appstream:fleet:DesiredCapacity - The desired capacity of an AppStream 2.0 fleet.
• dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.
• dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.
• dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.
• dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.
• rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster.
Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.
• sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.
• custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.
• comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.
• comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.
• lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.
• cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.
• cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.
Response Elements
• kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.
• elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.
• elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.
• neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.
Type: String
Valid Values: ecs:service:DesiredCount | ec2:spot-fleet-
request:TargetCapacity | elasticmapreduce:instancegroup:InstanceCount
| appstream:fleet:DesiredCapacity | dynamodb:table:ReadCapacityUnits
| dynamodb:table:WriteCapacityUnits | dynamodb:index:ReadCapacityUnits
| dynamodb:index:WriteCapacityUnits | rds:cluster:ReadReplicaCount
| sagemaker:variant:DesiredInstanceCount | custom-
resource:ResourceType:Property | comprehend:document-classifier- endpoint:DesiredInferenceUnits | comprehend:entity-recognizer-
endpoint:DesiredInferenceUnits | lambda:function:ProvisionedConcurrency | cassandra:table:ReadCapacityUnits | cassandra:table:WriteCapacityUnits | kafka:broker-storage:VolumeSize | elasticache:replication-group:NodeGroups | elasticache:replication-group:Replicas | neptune:cluster:ReadReplicaCount Required: Yes
ScheduledActionName (p. 9)
The name of the scheduled action.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1600.
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
Required: Yes ServiceNamespace (p. 9)
The namespace of the AWS service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
Type: String
Valid Values: ecs | elasticmapreduce | ec2 | appstream | dynamodb | rds | sagemaker | custom-resource | comprehend | lambda | cassandra | kafka | elasticache | neptune
Required: Yes
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 101).
See Also
ConcurrentUpdateException
Concurrent updates caused an exception, for example, if you request an update to an Application Auto Scaling resource that already has a pending update.
HTTP Status Code: 400 InternalServiceException
The service encountered an internal error.
HTTP Status Code: 400 ObjectNotFoundException
The specified object could not be found. For any operation that depends on the existence of a scalable target, this exception is thrown if the scalable target with the specified service namespace, resource ID, and scalable dimension does not exist. For any operation that deletes or deregisters a resource, this exception is thrown if the resource cannot be found.
HTTP Status Code: 400 ValidationException
An exception was thrown for a validation issue. Review the available parameters for the API request.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DeregisterScalableTarget
DeregisterScalableTarget
Deregisters an Application Auto Scaling scalable target when you have finished using it. To see which resources have been registered, use DescribeScalableTargets.
Note
Deregistering a scalable target deletes the scaling policies and the scheduled actions that are associated with it.
Request Syntax
{
"ResourceId": "string", "ScalableDimension": "string", "ServiceNamespace": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters (p. 99).
The request accepts the following data in JSON format.
ResourceId (p. 13)
The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier.
• ECS service - The resource type is service and the unique identifier is the cluster name and service name. Example: service/default/sample-webapp.
• Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce- aa30-494c-8788-1cee4EXAMPLE.
• EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
• AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name.
Example: fleet/sample-fleet.
• DynamoDB table - The resource type is table and the unique identifier is the table name.
Example: table/my-table.
• DynamoDB global secondary index - The resource type is index and the unique identifier is the index name. Example: table/my-table/index/my-table-index.
• Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name.
Example: cluster:my-db-cluster.
• SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
• Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.
• Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us- west-2:123456789012:document-classifier-endpoint/EXAMPLE.
Request Parameters
• Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us- west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.
• Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST. Example:
function:my-function:prod or function:my-function:1.
• Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.
Example: keyspace/mykeyspace/table/mytable.
• Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN. Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo- cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.
• Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.
• Neptune cluster - The resource type is cluster and the unique identifier is the cluster name.
Example: cluster:mycluster.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1600.
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
Required: Yes
ScalableDimension (p. 13)
The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property.
• ecs:service:DesiredCount - The desired task count of an ECS service.
• elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.
• ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.
• appstream:fleet:DesiredCapacity - The desired capacity of an AppStream 2.0 fleet.
• dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.
• dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.
• dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.
• dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.
• rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster.
Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.
• sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.
• custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.
• comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.
• comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.
• lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.
Response Elements
• cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.
• cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.
• kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.
• elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.
• elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.
• neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.
Type: String
Valid Values: ecs:service:DesiredCount | ec2:spot-fleet-
request:TargetCapacity | elasticmapreduce:instancegroup:InstanceCount
| appstream:fleet:DesiredCapacity | dynamodb:table:ReadCapacityUnits
| dynamodb:table:WriteCapacityUnits | dynamodb:index:ReadCapacityUnits
| dynamodb:index:WriteCapacityUnits | rds:cluster:ReadReplicaCount
| sagemaker:variant:DesiredInstanceCount | custom-
resource:ResourceType:Property | comprehend:document-classifier- endpoint:DesiredInferenceUnits | comprehend:entity-recognizer-
endpoint:DesiredInferenceUnits | lambda:function:ProvisionedConcurrency | cassandra:table:ReadCapacityUnits | cassandra:table:WriteCapacityUnits | kafka:broker-storage:VolumeSize | elasticache:replication-group:NodeGroups | elasticache:replication-group:Replicas | neptune:cluster:ReadReplicaCount Required: Yes
ServiceNamespace (p. 13)
The namespace of the AWS service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
Type: String
Valid Values: ecs | elasticmapreduce | ec2 | appstream | dynamodb | rds | sagemaker | custom-resource | comprehend | lambda | cassandra | kafka | elasticache | neptune
Required: Yes
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Errors (p. 101).
ConcurrentUpdateException
Concurrent updates caused an exception, for example, if you request an update to an Application Auto Scaling resource that already has a pending update.
HTTP Status Code: 400
Examples
InternalServiceException
The service encountered an internal error.
HTTP Status Code: 400 ObjectNotFoundException
The specified object could not be found. For any operation that depends on the existence of a scalable target, this exception is thrown if the scalable target with the specified service namespace, resource ID, and scalable dimension does not exist. For any operation that deletes or deregisters a resource, this exception is thrown if the resource cannot be found.
HTTP Status Code: 400 ValidationException
An exception was thrown for a validation issue. Review the available parameters for the API request.
HTTP Status Code: 400
Examples
If you plan to create requests manually, you must replace the Authorization header contents in the examples (AUTHPARAMS) with a signature. For more information, see Signature Version 4 Signing Process in the Amazon Web Services General Reference. If you plan to use the AWS CLI or one of the AWS SDKs, these tools sign the requests for you.
Example
The following example deregisters a scalable target for an Amazon ECS service called web-app that is running in the default cluster.
Sample Request
POST / HTTP/1.1
Host: autoscaling.us-west-2.amazonaws.com Accept-Encoding: identity
Content-Length: 117
X-Amz-Target: AnyScaleFrontendService.DeregisterScalableTarget X-Amz-Date: 20190506T210150Z
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 {
"ResourceId": "service/default/web-app", "ServiceNamespace": "ecs",
"ScalableDimension": "ecs:service:DesiredCount"
}
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
See Also
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DescribeScalableTargets
DescribeScalableTargets
Gets information about the scalable targets in the specified namespace.
You can filter the results using ResourceIds and ScalableDimension.
Request Syntax
{
"MaxResults": number, "NextToken": "string", "ResourceIds": [ "string" ], "ScalableDimension": "string", "ServiceNamespace": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters (p. 99).
The request accepts the following data in JSON format.
MaxResults (p. 18)
The maximum number of scalable targets. This value can be between 1 and 50. The default value is 50.
If this parameter is used, the operation returns up to MaxResults results at a time, along with a NextToken value. To get the next set of results, include the NextToken value in a subsequent call. If this parameter is not used, the operation returns up to 50 results and a NextToken value, if applicable.
Type: Integer Required: No NextToken (p. 18)
The token for the next set of results.
Type: String
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
Required: No ResourceIds (p. 18)
The identifier of the resource associated with the scalable target. This string consists of the resource type and unique identifier.
• ECS service - The resource type is service and the unique identifier is the cluster name and service name. Example: service/default/sample-webapp.
• Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce- aa30-494c-8788-1cee4EXAMPLE.
• EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
Request Parameters
• AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name.
Example: fleet/sample-fleet.
• DynamoDB table - The resource type is table and the unique identifier is the table name.
Example: table/my-table.
• DynamoDB global secondary index - The resource type is index and the unique identifier is the index name. Example: table/my-table/index/my-table-index.
• Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name.
Example: cluster:my-db-cluster.
• SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
• Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.
• Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us- west-2:123456789012:document-classifier-endpoint/EXAMPLE.
• Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us- west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.
• Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST. Example:
function:my-function:prod or function:my-function:1.
• Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.
Example: keyspace/mykeyspace/table/mytable.
• Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN. Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo- cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.
• Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.
• Neptune cluster - The resource type is cluster and the unique identifier is the cluster name.
Example: cluster:mycluster.
Type: Array of strings
Array Members: Maximum number of 50 items.
Length Constraints: Minimum length of 1. Maximum length of 1600.
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
Required: No
ScalableDimension (p. 18)
The scalable dimension associated with the scalable target. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID.
• ecs:service:DesiredCount - The desired task count of an ECS service.
• elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.
• ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.
• appstream:fleet:DesiredCapacity - The desired capacity of an AppStream 2.0 fleet.
• dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.
• dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.
Request Parameters
• dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.
• dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.
• rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster.
Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.
• sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.
• custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.
• comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.
• comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.
• lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.
• cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.
• cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.
• kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.
• elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.
• elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.
• neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.
Type: String
Valid Values: ecs:service:DesiredCount | ec2:spot-fleet-
request:TargetCapacity | elasticmapreduce:instancegroup:InstanceCount
| appstream:fleet:DesiredCapacity | dynamodb:table:ReadCapacityUnits
| dynamodb:table:WriteCapacityUnits | dynamodb:index:ReadCapacityUnits
| dynamodb:index:WriteCapacityUnits | rds:cluster:ReadReplicaCount
| sagemaker:variant:DesiredInstanceCount | custom-
resource:ResourceType:Property | comprehend:document-classifier- endpoint:DesiredInferenceUnits | comprehend:entity-recognizer-
endpoint:DesiredInferenceUnits | lambda:function:ProvisionedConcurrency | cassandra:table:ReadCapacityUnits | cassandra:table:WriteCapacityUnits | kafka:broker-storage:VolumeSize | elasticache:replication-group:NodeGroups | elasticache:replication-group:Replicas | neptune:cluster:ReadReplicaCount Required: No
ServiceNamespace (p. 18)
The namespace of the AWS service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
Type: String
Valid Values: ecs | elasticmapreduce | ec2 | appstream | dynamodb | rds | sagemaker | custom-resource | comprehend | lambda | cassandra | kafka | elasticache | neptune
Response Syntax
Required: Yes
Response Syntax
{ "NextToken": "string", "ScalableTargets": [ {
"CreationTime": number, "MaxCapacity": number, "MinCapacity": number, "ResourceId": "string", "RoleARN": "string",
"ScalableDimension": "string", "ServiceNamespace": "string", "SuspendedState": {
"DynamicScalingInSuspended": boolean, "DynamicScalingOutSuspended": boolean, "ScheduledScalingSuspended": boolean }
} ]}
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
NextToken (p. 21)
The token required to get the next set of results. This value is null if there are no more results to return.
Type: String
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
ScalableTargets (p. 21)
The scalable targets that match the request parameters.
Type: Array of ScalableTarget (p. 73) objects
Errors
For information about the errors that are common to all actions, see Common Errors (p. 101).
ConcurrentUpdateException
Concurrent updates caused an exception, for example, if you request an update to an Application Auto Scaling resource that already has a pending update.
HTTP Status Code: 400 InternalServiceException
The service encountered an internal error.
Examples
HTTP Status Code: 400 InvalidNextTokenException
The next token supplied was invalid.
HTTP Status Code: 400 ValidationException
An exception was thrown for a validation issue. Review the available parameters for the API request.
HTTP Status Code: 400
Examples
If you plan to create requests manually, you must replace the Authorization header contents in the examples (AUTHPARAMS) with a signature. For more information, see Signature Version 4 Signing Process in the Amazon Web Services General Reference. If you plan to use the AWS CLI or one of the AWS SDKs, these tools sign the requests for you.
Example
The following example describes the scalable targets for the ecs service namespace.
Sample Request
POST / HTTP/1.1
Host: autoscaling.us-west-2.amazonaws.com Accept-Encoding: identity
Content-Length: 27
X-Amz-Target: AnyScaleFrontendService.DescribeScalableTargets X-Amz-Date: 20190506T184921Z
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 {
"ServiceNamespace": "ecs"
}
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: 3f10dab0-13bb-11e6-a873-676fff004c09 Content-Type: application/x-amz-json-1.1
Content-Length: 272
Date: Fri, 06 May 2019 18:49:21 GMT {
"ScalableTargets": [ {
"CreationTime": 1462558906.199, "MaxCapacity": 10,
"MinCapacity": 1,
"ResourceId": "service/default/web-app",
"RoleARN": "arn:aws:iam::012345678910:role/aws-service-role/ecs.application- autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService",
"ScalableDimension": "ecs:service:DesiredCount", "ServiceNamespace": "ecs",
See Also
"SuspendedState": {
"DynamicScalingInSuspended": false, "DynamicScalingOutSuspended": false, "ScheduledScalingSuspended": false }
} ] }
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DescribeScalingActivities
DescribeScalingActivities
Provides descriptive information about the scaling activities in the specified namespace from the previous six weeks.
You can filter the results using ResourceId and ScalableDimension.
Request Syntax
{ "MaxResults": number, "NextToken": "string", "ResourceId": "string", "ScalableDimension": "string", "ServiceNamespace": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters (p. 99).
The request accepts the following data in JSON format.
MaxResults (p. 24)
The maximum number of scalable targets. This value can be between 1 and 50. The default value is 50.
If this parameter is used, the operation returns up to MaxResults results at a time, along with a NextToken value. To get the next set of results, include the NextToken value in a subsequent call. If this parameter is not used, the operation returns up to 50 results and a NextToken value, if applicable.
Type: Integer Required: No NextToken (p. 24)
The token for the next set of results.
Type: String
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
Required: No ResourceId (p. 24)
The identifier of the resource associated with the scaling activity. This string consists of the resource type and unique identifier.
• ECS service - The resource type is service and the unique identifier is the cluster name and service name. Example: service/default/sample-webapp.
• Spot Fleet - The resource type is spot-fleet-request and the unique identifier is the Spot Fleet request ID. Example: spot-fleet-request/sfr-73fbd2ce- aa30-494c-8788-1cee4EXAMPLE.
Request Parameters
• EMR cluster - The resource type is instancegroup and the unique identifier is the cluster ID and instance group ID. Example: instancegroup/j-2EEZNYKUA1NTV/ig-1791Y4E1L8YI0.
• AppStream 2.0 fleet - The resource type is fleet and the unique identifier is the fleet name.
Example: fleet/sample-fleet.
• DynamoDB table - The resource type is table and the unique identifier is the table name.
Example: table/my-table.
• DynamoDB global secondary index - The resource type is index and the unique identifier is the index name. Example: table/my-table/index/my-table-index.
• Aurora DB cluster - The resource type is cluster and the unique identifier is the cluster name.
Example: cluster:my-db-cluster.
• SageMaker endpoint variant - The resource type is variant and the unique identifier is the resource ID. Example: endpoint/my-end-point/variant/KMeansClustering.
• Custom resources are not supported with a resource type. This parameter must specify the OutputValue from the CloudFormation template stack used to access the resources. The unique identifier is defined by the service provider. More information is available in our GitHub repository.
• Amazon Comprehend document classification endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us- west-2:123456789012:document-classifier-endpoint/EXAMPLE.
• Amazon Comprehend entity recognizer endpoint - The resource type and unique identifier are specified using the endpoint ARN. Example: arn:aws:comprehend:us- west-2:123456789012:entity-recognizer-endpoint/EXAMPLE.
• Lambda provisioned concurrency - The resource type is function and the unique identifier is the function name with a function version or alias name suffix that is not $LATEST. Example:
function:my-function:prod or function:my-function:1.
• Amazon Keyspaces table - The resource type is table and the unique identifier is the table name.
Example: keyspace/mykeyspace/table/mytable.
• Amazon MSK cluster - The resource type and unique identifier are specified using the cluster ARN. Example: arn:aws:kafka:us-east-1:123456789012:cluster/demo- cluster-1/6357e0b2-0e6a-4b86-a0b4-70df934c2e31-5.
• Amazon ElastiCache replication group - The resource type is replication-group and the unique identifier is the replication group name. Example: replication-group/mycluster.
• Neptune cluster - The resource type is cluster and the unique identifier is the cluster name.
Example: cluster:mycluster.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 1600.
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
Required: No
ScalableDimension (p. 24)
The scalable dimension. This string consists of the service namespace, resource type, and scaling property. If you specify a scalable dimension, you must also specify a resource ID.
• ecs:service:DesiredCount - The desired task count of an ECS service.
• elasticmapreduce:instancegroup:InstanceCount - The instance count of an EMR Instance Group.
• ec2:spot-fleet-request:TargetCapacity - The target capacity of a Spot Fleet.
• appstream:fleet:DesiredCapacity - The desired capacity of an AppStream 2.0 fleet.
• dynamodb:table:ReadCapacityUnits - The provisioned read capacity for a DynamoDB table.
• dynamodb:table:WriteCapacityUnits - The provisioned write capacity for a DynamoDB table.
Request Parameters
• dynamodb:index:ReadCapacityUnits - The provisioned read capacity for a DynamoDB global secondary index.
• dynamodb:index:WriteCapacityUnits - The provisioned write capacity for a DynamoDB global secondary index.
• rds:cluster:ReadReplicaCount - The count of Aurora Replicas in an Aurora DB cluster.
Available for Aurora MySQL-compatible edition and Aurora PostgreSQL-compatible edition.
• sagemaker:variant:DesiredInstanceCount - The number of EC2 instances for a SageMaker model endpoint variant.
• custom-resource:ResourceType:Property - The scalable dimension for a custom resource provided by your own application or service.
• comprehend:document-classifier-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend document classification endpoint.
• comprehend:entity-recognizer-endpoint:DesiredInferenceUnits - The number of inference units for an Amazon Comprehend entity recognizer endpoint.
• lambda:function:ProvisionedConcurrency - The provisioned concurrency for a Lambda function.
• cassandra:table:ReadCapacityUnits - The provisioned read capacity for an Amazon Keyspaces table.
• cassandra:table:WriteCapacityUnits - The provisioned write capacity for an Amazon Keyspaces table.
• kafka:broker-storage:VolumeSize - The provisioned volume size (in GiB) for brokers in an Amazon MSK cluster.
• elasticache:replication-group:NodeGroups - The number of node groups for an Amazon ElastiCache replication group.
• elasticache:replication-group:Replicas - The number of replicas per node group for an Amazon ElastiCache replication group.
• neptune:cluster:ReadReplicaCount - The count of read replicas in an Amazon Neptune DB cluster.
Type: String
Valid Values: ecs:service:DesiredCount | ec2:spot-fleet-
request:TargetCapacity | elasticmapreduce:instancegroup:InstanceCount
| appstream:fleet:DesiredCapacity | dynamodb:table:ReadCapacityUnits
| dynamodb:table:WriteCapacityUnits | dynamodb:index:ReadCapacityUnits
| dynamodb:index:WriteCapacityUnits | rds:cluster:ReadReplicaCount
| sagemaker:variant:DesiredInstanceCount | custom-
resource:ResourceType:Property | comprehend:document-classifier- endpoint:DesiredInferenceUnits | comprehend:entity-recognizer-
endpoint:DesiredInferenceUnits | lambda:function:ProvisionedConcurrency | cassandra:table:ReadCapacityUnits | cassandra:table:WriteCapacityUnits | kafka:broker-storage:VolumeSize | elasticache:replication-group:NodeGroups | elasticache:replication-group:Replicas | neptune:cluster:ReadReplicaCount Required: No
ServiceNamespace (p. 24)
The namespace of the AWS service that provides the resource. For a resource provided by your own application or service, use custom-resource instead.
Type: String
Valid Values: ecs | elasticmapreduce | ec2 | appstream | dynamodb | rds | sagemaker | custom-resource | comprehend | lambda | cassandra | kafka | elasticache | neptune
Response Syntax
Required: Yes
Response Syntax
{ "NextToken": "string", "ScalingActivities": [ {
"ActivityId": "string", "Cause": "string", "Description": "string", "Details": "string", "EndTime": number, "ResourceId": "string", "ScalableDimension": "string", "ServiceNamespace": "string", "StartTime": number,
"StatusCode": "string", "StatusMessage": "string"
} ] }
Response Elements
If the action is successful, the service sends back an HTTP 200 response.
The following data is returned in JSON format by the service.
NextToken (p. 27)
The token required to get the next set of results. This value is null if there are no more results to return.
Type: String
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
ScalingActivities (p. 27)
A list of scaling activity objects.
Type: Array of ScalingActivity (p. 78) objects
Errors
For information about the errors that are common to all actions, see Common Errors (p. 101).
ConcurrentUpdateException
Concurrent updates caused an exception, for example, if you request an update to an Application Auto Scaling resource that already has a pending update.
HTTP Status Code: 400 InternalServiceException
The service encountered an internal error.
Examples
HTTP Status Code: 400 InvalidNextTokenException
The next token supplied was invalid.
HTTP Status Code: 400 ValidationException
An exception was thrown for a validation issue. Review the available parameters for the API request.
HTTP Status Code: 400
Examples
If you plan to create requests manually, you must replace the Authorization header contents in the examples (AUTHPARAMS) with a signature. For more information, see Signature Version 4 Signing Process in the Amazon Web Services General Reference. If you plan to use the AWS CLI or one of the AWS SDKs, these tools sign the requests for you.
Example of scaling activities for a scaling policy
The following example describes the scaling activities for an Amazon ECS service named web-app that is running in the default cluster. It shows the scaling activities for the scaling policy named cpu75-target-tracking-scaling-policy, which was triggered by the CloudWatch alarm named TargetTracking-service/default/web-app-AlarmHigh-d4f0770c-b46e-434a- a60f-3b36d653feca.
Sample Request
POST / HTTP/1.1
Host: autoscaling.us-west-2.amazonaws.com Accept-Encoding: identity
Content-Length: 117
X-Amz-Target: AnyScaleFrontendService.DescribeScalingActivities X-Amz-Date: 20190506T224112Z
User-Agent: aws-cli/1.10.26 Python/2.7.11 Darwin/15.4.0 botocore/1.4.8 Content-Type: application/x-amz-json-1.1
Authorization: AUTHPARAMS {
"ResourceId": "service/default/web-app", "ServiceNamespace": "ecs",
"ScalableDimension": "ecs:service:DesiredCount"
}
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: a2704130-13db-11e6-9fca-039a3edb2541 Content-Type: application/x-amz-json-1.1
Content-Length: 1784
Date: Fri, 06 May 2019 22:41:12 GMT { "ScalingActivities": [
{
"ScalableDimension": "ecs:service:DesiredCount", "Description": "Setting desired count to 3.",
Examples
"ResourceId": "service/default/web-app",
"ActivityId": "4d759079-a31f-4d0c-8468-504c56e2eecf", "StartTime": 1462574194.658,
"ServiceNamespace": "ecs", "EndTime": 1462574276.686,
"Cause": "monitor alarm TargetTracking-service/default/web-app-AlarmHigh-d4f0770c- b46e-434a-a60f-3b36d653feca in state ALARM triggered policy cpu75-target-tracking-scaling- policy",
"StatusMessage": "Successfully set desired count to 3. Change successfully fulfilled by ecs.",
"StatusCode": "Successful"
}, {
"ScalableDimension": "ecs:service:DesiredCount", "Description": "Setting desired count to 2.", "ResourceId": "service/default/web-app",
"ActivityId": "90aff0eb-dd6a-443c-889b-b809e78061c1", "StartTime": 1462574254.223,
"ServiceNamespace": "ecs", "EndTime": 1462574333.492,
"Cause": "monitor alarm TargetTracking-service/default/web-app-AlarmHigh-d4f0770c- b46e-434a-a60f-3b36d653feca in state ALARM triggered policy cpu75-target-tracking-scaling- policy",
"StatusMessage": "Successfully set desired count to 2. Change successfully fulfilled by ecs.",
"StatusCode": "Successful"
} ]}
Example of scaling activities for scheduled actions
The following example describes the scaling activities for a DynamoDB table named my-table. It shows the scaling activities for scheduled actions named my-first-scheduled-action and my-second- scheduled-action.
Sample Request
POST / HTTP/1.1
Host: autoscaling.us-west-2.amazonaws.com Accept-Encoding: identity
Content-Length: 117
X-Amz-Target: AnyScaleFrontendService.DescribeScalingActivities X-Amz-Date: 20190526T110828Z
User-Agent: aws-cli/1.10.26 Python/2.7.11 Darwin/15.4.0 botocore/1.4.8 Content-Type: application/x-amz-json-1.1
Authorization: AUTHPARAMS {
"ResourceId": "table/my-table", "ServiceNamespace": "dynamodb",
"ScalableDimension": "dynamodb:table:WriteCapacityUnits"
}
Sample Response
HTTP/1.1 200 OK
x-amzn-RequestId: a2704130-13db-11e6-9fca-039a3edb2541 Content-Type: application/x-amz-json-1.1
Content-Length: 1784
Date: Fri, 26 May 2019 11:08:28 GMT
See Also
{ "ScalingActivities": [ {
"ScalableDimension": "dynamodb:table:WriteCapacityUnits", "Description": "Setting write capacity units to 10.", "ResourceId": "table/my-table",
"ActivityId": "4d1308c0-bbcf-4514-a673-b0220ae38547", "StartTime": 1561574415.086,
"ServiceNamespace": "dynamodb",
"Cause": "maximum capacity was set to 10",
"StatusMessage": "Successfully set write capacity units to 10. Waiting for change to be fulfilled by dynamodb.",
"StatusCode": "InProgress"
}, {
"ScalableDimension": "dynamodb:table:WriteCapacityUnits",
"Description": "Setting min capacity to 5 and max capacity to 10", "ResourceId": "table/my-table",
"ActivityId": "f2b7847b-721d-4e01-8ef0-0c8d3bacc1c7", "StartTime": 1561574414.644,
"ServiceNamespace": "dynamodb",
"Cause": "scheduled action name my-second-scheduled-action was triggered", "StatusMessage": "Successfully set min capacity to 5 and max capacity to 10", "StatusCode": "Successful"
}, {
"ScalableDimension": "dynamodb:table:WriteCapacityUnits", "Description": "Setting write capacity units to 15.", "ResourceId": "table/my-table",
"ActivityId": "d8ea4de6-9eaa-499f-b466-2cc5e681ba8b", "StartTime": 1561574108.904,
"ServiceNamespace": "dynamodb", "EndTime": 1561574140.255,
"Cause": "minimum capacity was set to 15",
"StatusMessage": "Successfully set write capacity units to 15. Change successfully fulfilled by dynamodb.",
"StatusCode": "Successful"
}, {
"ScalableDimension": "dynamodb:table:WriteCapacityUnits",
"Description": "Setting min capacity to 15 and max capacity to 20", "ResourceId": "table/my-table",
"ActivityId": "3250fd06-6940-4e8e-bb1f-d494db7554d2", "StartTime": 1561574108.512,
"ServiceNamespace": "dynamodb",
"Cause": "scheduled action name my-first-scheduled-action was triggered", "StatusMessage": "Successfully set min capacity to 15 and max capacity to 20", "StatusCode": "Successful"
} ] }
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
See Also
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DescribeScalingPolicies
DescribeScalingPolicies
Describes the Application Auto Scaling scaling policies for the specified service namespace.
You can filter the results using ResourceId, ScalableDimension, and PolicyNames.
For more information, see Target tracking scaling policies and Step scaling policies in the Application Auto Scaling User Guide.
Request Syntax
{
"MaxResults": number, "NextToken": "string", "PolicyNames": [ "string" ], "ResourceId": "string", "ScalableDimension": "string", "ServiceNamespace": "string"
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters (p. 99).
The request accepts the following data in JSON format.
MaxResults (p. 32)
The maximum number of scalable targets. This value can be between 1 and 10. The default value is 10.
If this parameter is used, the operation returns up to MaxResults results at a time, along with a NextToken value. To get the next set of results, include the NextToken value in a subsequent call. If this parameter is not used, the operation returns up to 10 results and a NextToken value, if applicable.
Type: Integer Required: No NextToken (p. 32)
The token for the next set of results.
Type: String
Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
Required: No PolicyNames (p. 32)
The names of the scaling policies to describe.
Type: Array of strings
Array Members: Maximum number of 50 items.