Table of Contents
ApplicationAutoScaling.Client¶A low-level client representing Application Auto Scaling:
client = session.create_client('application-autoscaling')
These are the available methods:
can_paginate()delete_scaling_policy()deregister_scalable_target()describe_scalable_targets()describe_scaling_activities()describe_scaling_policies()generate_presigned_url()get_paginator()get_waiter()put_scaling_policy()register_scalable_target()can_paginate(operation_name)¶Check if an operation can be paginated.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Returns: | True if the operation can be paginated,
False otherwise. |
delete_scaling_policy(**kwargs)¶Deletes the specified Application Auto Scaling scaling policy.
Deleting a 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.
To create a scaling policy or update an existing one, see PutScalingPolicy .
See also: AWS API Documentation
Request Syntax
response = client.delete_scaling_policy(
PolicyName='string',
ServiceNamespace='ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
ResourceId='string',
ScalableDimension='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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
Examples
This example deletes a scaling policy for the Amazon ECS service called web-app, which is running in the default cluster.
response = client.delete_scaling_policy(
PolicyName='web-app-cpu-lt-25',
ResourceId='service/default/web-app',
ScalableDimension='ecs:service:DesiredCount',
ServiceNamespace='ecs',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}
deregister_scalable_target(**kwargs)¶Deregisters a scalable target.
Deregistering a scalable target deletes the scaling policies that are associated with it.
To create a scalable target or update an existing one, see RegisterScalableTarget .
See also: AWS API Documentation
Request Syntax
response = client.deregister_scalable_target(
ServiceNamespace='ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
ResourceId='string',
ScalableDimension='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'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
Examples
This example deregisters a scalable target for an Amazon ECS service called web-app that is running in the default cluster.
response = client.deregister_scalable_target(
ResourceId='service/default/web-app',
ScalableDimension='ecs:service:DesiredCount',
ServiceNamespace='ecs',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}
describe_scalable_targets(**kwargs)¶Provides descriptive information about the scalable targets in the specified namespace.
You can filter the results using the ResourceIds and ScalableDimension parameters.
To create a scalable target or update an existing one, see RegisterScalableTarget . If you are no longer using a scalable target, you can deregister it using DeregisterScalableTarget .
See also: AWS API Documentation
Request Syntax
response = client.describe_scalable_targets(
ServiceNamespace='ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
ResourceIds=[
'string',
],
ScalableDimension='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',
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ScalableTargets': [
{
'ServiceNamespace': 'ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
'ResourceId': 'string',
'ScalableDimension': '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',
'MinCapacity': 123,
'MaxCapacity': 123,
'RoleARN': 'string',
'CreationTime': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
|
Examples
This example describes the scalable targets for the ecs service namespace.
response = client.describe_scalable_targets(
ServiceNamespace='ecs',
)
print(response)
Expected Output:
{
'ScalableTargets': [
{
'CreationTime': datetime(2016, 5, 6, 11, 21, 46, 4, 127, 0),
'MaxCapacity': 10,
'MinCapacity': 1,
'ResourceId': 'service/default/web-app',
'RoleARN': 'arn:aws:iam::012345678910:role/ApplicationAutoscalingECSRole',
'ScalableDimension': 'ecs:service:DesiredCount',
'ServiceNamespace': 'ecs',
},
],
'ResponseMetadata': {
'...': '...',
},
}
describe_scaling_activities(**kwargs)¶Provides descriptive information about the scaling activities in the specified namespace from the previous six weeks.
You can filter the results using the ResourceId and ScalableDimension parameters.
Scaling activities are triggered by CloudWatch alarms that are associated with scaling policies. To view the scaling policies for a service namespace, see DescribeScalingPolicies . To create a scaling policy or update an existing one, see PutScalingPolicy .
See also: AWS API Documentation
Request Syntax
response = client.describe_scaling_activities(
ServiceNamespace='ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
ResourceId='string',
ScalableDimension='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',
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ScalingActivities': [
{
'ActivityId': 'string',
'ServiceNamespace': 'ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
'ResourceId': 'string',
'ScalableDimension': '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',
'Description': 'string',
'Cause': 'string',
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'StatusCode': 'Pending'|'InProgress'|'Successful'|'Overridden'|'Unfulfilled'|'Failed',
'StatusMessage': 'string',
'Details': 'string'
},
],
'NextToken': 'string'
}
Response Structure
|
Examples
This example describes the scaling activities for an Amazon ECS service called web-app that is running in the default cluster.
response = client.describe_scaling_activities(
ResourceId='service/default/web-app',
ScalableDimension='ecs:service:DesiredCount',
ServiceNamespace='ecs',
)
print(response)
Expected Output:
{
'ScalingActivities': [
{
'ActivityId': 'e6c5f7d1-dbbb-4a3f-89b2-51f33e766399',
'Cause': 'monitor alarm web-app-cpu-lt-25 in state ALARM triggered policy web-app-cpu-lt-25',
'Description': 'Setting desired count to 1.',
'EndTime': datetime(2016, 5, 6, 16, 4, 32, 4, 127, 0),
'ResourceId': 'service/default/web-app',
'ScalableDimension': 'ecs:service:DesiredCount',
'ServiceNamespace': 'ecs',
'StartTime': datetime(2016, 5, 6, 16, 3, 58, 4, 127, 0),
'StatusCode': 'Successful',
'StatusMessage': 'Successfully set desired count to 1. Change successfully fulfilled by ecs.',
},
],
'ResponseMetadata': {
'...': '...',
},
}
describe_scaling_policies(**kwargs)¶Provides descriptive information about the scaling policies in the specified namespace.
You can filter the results using the ResourceId , ScalableDimension , and PolicyNames parameters.
To create a scaling policy or update an existing one, see PutScalingPolicy . If you are no longer using a scaling policy, you can delete it using DeleteScalingPolicy .
See also: AWS API Documentation
Request Syntax
response = client.describe_scaling_policies(
PolicyNames=[
'string',
],
ServiceNamespace='ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
ResourceId='string',
ScalableDimension='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',
MaxResults=123,
NextToken='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ScalingPolicies': [
{
'PolicyARN': 'string',
'PolicyName': 'string',
'ServiceNamespace': 'ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
'ResourceId': 'string',
'ScalableDimension': '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',
'PolicyType': 'StepScaling'|'TargetTrackingScaling',
'StepScalingPolicyConfiguration': {
'AdjustmentType': 'ChangeInCapacity'|'PercentChangeInCapacity'|'ExactCapacity',
'StepAdjustments': [
{
'MetricIntervalLowerBound': 123.0,
'MetricIntervalUpperBound': 123.0,
'ScalingAdjustment': 123
},
],
'MinAdjustmentMagnitude': 123,
'Cooldown': 123,
'MetricAggregationType': 'Average'|'Minimum'|'Maximum'
},
'TargetTrackingScalingPolicyConfiguration': {
'TargetValue': 123.0,
'PredefinedMetricSpecification': {
'PredefinedMetricType': 'DynamoDBReadCapacityUtilization'|'DynamoDBWriteCapacityUtilization',
'ResourceLabel': 'string'
},
'CustomizedMetricSpecification': {
'MetricName': 'string',
'Namespace': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'Statistic': 'Average'|'Minimum'|'Maximum'|'SampleCount'|'Sum',
'Unit': 'string'
},
'ScaleOutCooldown': 123,
'ScaleInCooldown': 123
},
'Alarms': [
{
'AlarmName': 'string',
'AlarmARN': 'string'
},
],
'CreationTime': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
|
Examples
This example describes the scaling policies for the ecs service namespace.
response = client.describe_scaling_policies(
ServiceNamespace='ecs',
)
print(response)
Expected Output:
{
'NextToken': '',
'ScalingPolicies': [
{
'Alarms': [
{
'AlarmARN': 'arn:aws:cloudwatch:us-west-2:012345678910:alarm:web-app-cpu-gt-75',
'AlarmName': 'web-app-cpu-gt-75',
},
],
'CreationTime': datetime(2016, 5, 6, 12, 11, 39, 4, 127, 0),
'PolicyARN': 'arn:aws:autoscaling:us-west-2:012345678910:scalingPolicy:6d8972f3-efc8-437c-92d1-6270f29a66e7:resource/ecs/service/default/web-app:policyName/web-app-cpu-gt-75',
'PolicyName': 'web-app-cpu-gt-75',
'PolicyType': 'StepScaling',
'ResourceId': 'service/default/web-app',
'ScalableDimension': 'ecs:service:DesiredCount',
'ServiceNamespace': 'ecs',
'StepScalingPolicyConfiguration': {
'AdjustmentType': 'PercentChangeInCapacity',
'Cooldown': 60,
'StepAdjustments': [
{
'MetricIntervalLowerBound': 0,
'ScalingAdjustment': 200,
},
],
},
},
],
'ResponseMetadata': {
'...': '...',
},
}
generate_presigned_url(ClientMethod, Params=None, ExpiresIn=3600, HttpMethod=None)¶Generate a presigned url given a client, its method, and arguments
| Parameters: |
|
|---|---|
| Returns: | The presigned url |
get_paginator(operation_name)¶Create a paginator for an operation.
| Parameters: | operation_name (string) – The operation name. This is the same name
as the method name on the client. For example, if the
method name is create_foo, and you’d normally invoke the
operation as client.create_foo(**kwargs), if the
create_foo operation can be paginated, you can use the
call client.get_paginator("create_foo"). |
|---|---|
| Raises: | OperationNotPageableError – Raised if the operation is not
pageable. You can use the client.can_paginate method to
check if an operation is pageable. |
| Return type: | L{botocore.paginate.Paginator} |
| Returns: | A paginator object. |
get_waiter(waiter_name)¶put_scaling_policy(**kwargs)¶Creates or updates a policy for an Application Auto Scaling scalable target.
Each scalable target is identified by a service namespace, resource ID, and scalable dimension. A scaling policy applies to the scalable target identified by those three attributes. You cannot create a scaling policy without first registering a scalable target using RegisterScalableTarget .
To update a policy, specify its policy name and the parameters that you want to change. Any parameters that you don’t specify are not changed by this update request.
You can view the scaling policies for a service namespace using DescribeScalingPolicies . If you are no longer using a scaling policy, you can delete it using DeleteScalingPolicy .
See also: AWS API Documentation
Request Syntax
response = client.put_scaling_policy(
PolicyName='string',
ServiceNamespace='ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
ResourceId='string',
ScalableDimension='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',
PolicyType='StepScaling'|'TargetTrackingScaling',
StepScalingPolicyConfiguration={
'AdjustmentType': 'ChangeInCapacity'|'PercentChangeInCapacity'|'ExactCapacity',
'StepAdjustments': [
{
'MetricIntervalLowerBound': 123.0,
'MetricIntervalUpperBound': 123.0,
'ScalingAdjustment': 123
},
],
'MinAdjustmentMagnitude': 123,
'Cooldown': 123,
'MetricAggregationType': 'Average'|'Minimum'|'Maximum'
},
TargetTrackingScalingPolicyConfiguration={
'TargetValue': 123.0,
'PredefinedMetricSpecification': {
'PredefinedMetricType': 'DynamoDBReadCapacityUtilization'|'DynamoDBWriteCapacityUtilization',
'ResourceLabel': 'string'
},
'CustomizedMetricSpecification': {
'MetricName': 'string',
'Namespace': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'Statistic': 'Average'|'Minimum'|'Maximum'|'SampleCount'|'Sum',
'Unit': 'string'
},
'ScaleOutCooldown': 123,
'ScaleInCooldown': 123
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'PolicyARN': 'string',
'Alarms': [
{
'AlarmName': 'string',
'AlarmARN': 'string'
},
]
}
Response Structure
|
Examples
This example applies a scaling policy to an Amazon ECS service called web-app in the default cluster. The policy increases the desired count of the service by 200%, with a cool down period of 60 seconds.
response = client.put_scaling_policy(
PolicyName='web-app-cpu-gt-75',
PolicyType='StepScaling',
ResourceId='service/default/web-app',
ScalableDimension='ecs:service:DesiredCount',
ServiceNamespace='ecs',
StepScalingPolicyConfiguration={
'AdjustmentType': 'PercentChangeInCapacity',
'Cooldown': 60,
'StepAdjustments': [
{
'MetricIntervalLowerBound': 0,
'ScalingAdjustment': 200,
},
],
},
)
print(response)
Expected Output:
{
'PolicyARN': 'arn:aws:autoscaling:us-west-2:012345678910:scalingPolicy:6d8972f3-efc8-437c-92d1-6270f29a66e7:resource/ecs/service/default/web-app:policyName/web-app-cpu-gt-75',
'ResponseMetadata': {
'...': '...',
},
}
This example applies a scaling policy to an Amazon EC2 Spot fleet. The policy increases the target capacity of the spot fleet by 200%, with a cool down period of 180 seconds.”,
response = client.put_scaling_policy(
PolicyName='fleet-cpu-gt-75',
PolicyType='StepScaling',
ResourceId='spot-fleet-request/sfr-45e69d8a-be48-4539-bbf3-3464e99c50c3',
ScalableDimension='ec2:spot-fleet-request:TargetCapacity',
ServiceNamespace='ec2',
StepScalingPolicyConfiguration={
'AdjustmentType': 'PercentChangeInCapacity',
'Cooldown': 180,
'StepAdjustments': [
{
'MetricIntervalLowerBound': 0,
'ScalingAdjustment': 200,
},
],
},
)
print(response)
Expected Output:
{
'PolicyARN': 'arn:aws:autoscaling:us-east-1:012345678910:scalingPolicy:89406401-0cb7-4130-b770-d97cca0e446b:resource/ec2/spot-fleet-request/sfr-45e69d8a-be48-4539-bbf3-3464e99c50c3:policyName/fleet-cpu-gt-75',
'ResponseMetadata': {
'...': '...',
},
}
register_scalable_target(**kwargs)¶Registers or updates a scalable target. A scalable target is a resource that Application Auto Scaling can scale out or scale in. After you have registered a scalable target, you can use this operation to update the minimum and maximum values for your scalable dimension.
After you register a scalable target, you can create and apply scaling policies using PutScalingPolicy . You can view the scaling policies for a service namespace using DescribeScalableTargets . If you are no longer using a scalable target, you can deregister it using DeregisterScalableTarget .
See also: AWS API Documentation
Request Syntax
response = client.register_scalable_target(
ServiceNamespace='ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
ResourceId='string',
ScalableDimension='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',
MinCapacity=123,
MaxCapacity=123,
RoleARN='string'
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {}
Response Structure
|
Examples
This example registers a scalable target from an Amazon ECS service called web-app that is running on the default cluster, with a minimum desired count of 1 task and a maximum desired count of 10 tasks.
response = client.register_scalable_target(
MaxCapacity=10,
MinCapacity=1,
ResourceId='service/default/web-app',
RoleARN='arn:aws:iam::012345678910:role/ApplicationAutoscalingECSRole',
ScalableDimension='ecs:service:DesiredCount',
ServiceNamespace='ecs',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}
This example registers a scalable target from an Amazon EC2 Spot fleet with a minimum target capacity of 1 and a maximum of 10.
response = client.register_scalable_target(
MaxCapacity=10,
MinCapacity=1,
ResourceId='spot-fleet-request/sfr-45e69d8a-be48-4539-bbf3-3464e99c50c3',
RoleARN='arn:aws:iam::012345678910:role/ApplicationAutoscalingSpotRole',
ScalableDimension='ec2:spot-fleet-request:TargetCapacity',
ServiceNamespace='ec2',
)
print(response)
Expected Output:
{
'ResponseMetadata': {
'...': '...',
},
}
The available paginators are:
ApplicationAutoScaling.Paginator.DescribeScalableTargetsApplicationAutoScaling.Paginator.DescribeScalingActivitiesApplicationAutoScaling.Paginator.DescribeScalingPoliciesApplicationAutoScaling.Paginator.DescribeScalableTargets¶paginator = client.get_paginator('describe_scalable_targets')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from ApplicationAutoScaling.Client.describe_scalable_targets().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
ServiceNamespace='ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
ResourceIds=[
'string',
],
ScalableDimension='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',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ScalableTargets': [
{
'ServiceNamespace': 'ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
'ResourceId': 'string',
'ScalableDimension': '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',
'MinCapacity': 123,
'MaxCapacity': 123,
'RoleARN': 'string',
'CreationTime': datetime(2015, 1, 1)
},
],
}
Response Structure
|
ApplicationAutoScaling.Paginator.DescribeScalingActivities¶paginator = client.get_paginator('describe_scaling_activities')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from ApplicationAutoScaling.Client.describe_scaling_activities().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
ServiceNamespace='ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
ResourceId='string',
ScalableDimension='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',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ScalingActivities': [
{
'ActivityId': 'string',
'ServiceNamespace': 'ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
'ResourceId': 'string',
'ScalableDimension': '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',
'Description': 'string',
'Cause': 'string',
'StartTime': datetime(2015, 1, 1),
'EndTime': datetime(2015, 1, 1),
'StatusCode': 'Pending'|'InProgress'|'Successful'|'Overridden'|'Unfulfilled'|'Failed',
'StatusMessage': 'string',
'Details': 'string'
},
],
}
Response Structure
|
ApplicationAutoScaling.Paginator.DescribeScalingPolicies¶paginator = client.get_paginator('describe_scaling_policies')
paginate(**kwargs)¶Creates an iterator that will paginate through responses from ApplicationAutoScaling.Client.describe_scaling_policies().
See also: AWS API Documentation
Request Syntax
response_iterator = paginator.paginate(
PolicyNames=[
'string',
],
ServiceNamespace='ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
ResourceId='string',
ScalableDimension='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',
PaginationConfig={
'MaxItems': 123,
'PageSize': 123,
'StartingToken': 'string'
}
)
| Parameters: |
|
|---|---|
| Return type: | dict |
| Returns: | Response Syntax {
'ScalingPolicies': [
{
'PolicyARN': 'string',
'PolicyName': 'string',
'ServiceNamespace': 'ecs'|'elasticmapreduce'|'ec2'|'appstream'|'dynamodb',
'ResourceId': 'string',
'ScalableDimension': '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',
'PolicyType': 'StepScaling'|'TargetTrackingScaling',
'StepScalingPolicyConfiguration': {
'AdjustmentType': 'ChangeInCapacity'|'PercentChangeInCapacity'|'ExactCapacity',
'StepAdjustments': [
{
'MetricIntervalLowerBound': 123.0,
'MetricIntervalUpperBound': 123.0,
'ScalingAdjustment': 123
},
],
'MinAdjustmentMagnitude': 123,
'Cooldown': 123,
'MetricAggregationType': 'Average'|'Minimum'|'Maximum'
},
'TargetTrackingScalingPolicyConfiguration': {
'TargetValue': 123.0,
'PredefinedMetricSpecification': {
'PredefinedMetricType': 'DynamoDBReadCapacityUtilization'|'DynamoDBWriteCapacityUtilization',
'ResourceLabel': 'string'
},
'CustomizedMetricSpecification': {
'MetricName': 'string',
'Namespace': 'string',
'Dimensions': [
{
'Name': 'string',
'Value': 'string'
},
],
'Statistic': 'Average'|'Minimum'|'Maximum'|'SampleCount'|'Sum',
'Unit': 'string'
},
'ScaleOutCooldown': 123,
'ScaleInCooldown': 123
},
'Alarms': [
{
'AlarmName': 'string',
'AlarmARN': 'string'
},
],
'CreationTime': datetime(2015, 1, 1)
},
],
}
Response Structure
|