0% found this document useful (0 votes)
101 views

As Api

Uploaded by

dangerman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
101 views

As Api

Uploaded by

dangerman
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 224

Amazon EC2 Auto Scaling

API Reference
API Version 2011-01-01
Amazon EC2 Auto Scaling API Reference

Amazon EC2 Auto Scaling: API Reference


Copyright © 2019 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.

The AWS Documentation website is getting a new look!

Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.
Amazon EC2 Auto Scaling API Reference

Table of Contents
Welcome ........................................................................................................................................... 1
List of Actions by Function .................................................................................................................. 2
Actions ............................................................................................................................................. 4
AttachInstances .......................................................................................................................... 6
Request Parameters ............................................................................................................ 6
Errors ............................................................................................................................... 6
Example ............................................................................................................................ 7
See Also ............................................................................................................................ 7
AttachLoadBalancers .................................................................................................................. 8
Request Parameters ............................................................................................................ 8
Errors ............................................................................................................................... 8
Example ............................................................................................................................ 9
See Also ............................................................................................................................ 9
AttachLoadBalancerTargetGroups ............................................................................................... 10
Request Parameters .......................................................................................................... 10
Errors .............................................................................................................................. 10
See Also .......................................................................................................................... 11
BatchDeleteScheduledAction ...................................................................................................... 12
Request Parameters .......................................................................................................... 12
Response Elements ........................................................................................................... 12
Errors .............................................................................................................................. 12
See Also .......................................................................................................................... 12
BatchPutScheduledUpdateGroupAction ....................................................................................... 14
Request Parameters .......................................................................................................... 14
Response Elements ........................................................................................................... 14
Errors .............................................................................................................................. 14
See Also .......................................................................................................................... 15
CompleteLifecycleAction ........................................................................................................... 16
Request Parameters .......................................................................................................... 16
Errors .............................................................................................................................. 17
Example .......................................................................................................................... 17
See Also .......................................................................................................................... 17
CreateAutoScalingGroup ............................................................................................................ 19
Request Parameters .......................................................................................................... 19
Errors .............................................................................................................................. 23
Example .......................................................................................................................... 24
See Also .......................................................................................................................... 24
CreateLaunchConfiguration ........................................................................................................ 25
Request Parameters .......................................................................................................... 25
Errors .............................................................................................................................. 29
Example .......................................................................................................................... 30
See Also .......................................................................................................................... 30
CreateOrUpdateTags ................................................................................................................. 31
Request Parameters .......................................................................................................... 31
Errors .............................................................................................................................. 31
Example .......................................................................................................................... 31
See Also .......................................................................................................................... 32
DeleteAutoScalingGroup ............................................................................................................ 33
Request Parameters .......................................................................................................... 33
Errors .............................................................................................................................. 33
Example .......................................................................................................................... 34
See Also .......................................................................................................................... 34
DeleteLaunchConfiguration ........................................................................................................ 35
Request Parameters .......................................................................................................... 35

API Version 2011-01-01


iii
Amazon EC2 Auto Scaling API Reference

Errors .............................................................................................................................. 35
Example .......................................................................................................................... 35
See Also .......................................................................................................................... 35
DeleteLifecycleHook ................................................................................................................. 37
Request Parameters .......................................................................................................... 37
Errors .............................................................................................................................. 37
Example .......................................................................................................................... 37
See Also .......................................................................................................................... 38
DeleteNotificationConfiguration ................................................................................................. 39
Request Parameters .......................................................................................................... 39
Errors .............................................................................................................................. 39
Example .......................................................................................................................... 39
See Also .......................................................................................................................... 40
DeletePolicy ............................................................................................................................. 41
Request Parameters .......................................................................................................... 41
Errors .............................................................................................................................. 41
Example .......................................................................................................................... 42
See Also .......................................................................................................................... 42
DeleteScheduledAction ............................................................................................................. 43
Request Parameters .......................................................................................................... 43
Errors .............................................................................................................................. 43
Example .......................................................................................................................... 43
See Also .......................................................................................................................... 44
DeleteTags ............................................................................................................................... 45
Request Parameters .......................................................................................................... 45
Errors .............................................................................................................................. 45
Example .......................................................................................................................... 45
See Also .......................................................................................................................... 45
DescribeAccountLimits .............................................................................................................. 47
Response Elements ........................................................................................................... 47
Errors .............................................................................................................................. 47
Example .......................................................................................................................... 47
See Also .......................................................................................................................... 48
DescribeAdjustmentTypes .......................................................................................................... 49
Response Elements ........................................................................................................... 49
Errors .............................................................................................................................. 49
Example .......................................................................................................................... 49
See Also .......................................................................................................................... 50
DescribeAutoScalingGroups ....................................................................................................... 51
Request Parameters .......................................................................................................... 51
Response Elements ........................................................................................................... 51
Errors .............................................................................................................................. 52
Example .......................................................................................................................... 52
See Also .......................................................................................................................... 53
DescribeAutoScalingInstances .................................................................................................... 54
Request Parameters .......................................................................................................... 54
Response Elements ........................................................................................................... 54
Errors .............................................................................................................................. 55
Example .......................................................................................................................... 55
See Also .......................................................................................................................... 55
DescribeAutoScalingNotificationTypes ......................................................................................... 57
Response Elements ........................................................................................................... 57
Errors .............................................................................................................................. 57
Example .......................................................................................................................... 57
See Also .......................................................................................................................... 58
DescribeLaunchConfigurations .................................................................................................... 59
Request Parameters .......................................................................................................... 59

API Version 2011-01-01


iv
Amazon EC2 Auto Scaling API Reference

Response Elements ........................................................................................................... 59


Errors .............................................................................................................................. 60
Example .......................................................................................................................... 60
See Also .......................................................................................................................... 61
DescribeLifecycleHooks ............................................................................................................. 62
Request Parameters .......................................................................................................... 62
Response Elements ........................................................................................................... 62
Errors .............................................................................................................................. 62
Example .......................................................................................................................... 63
See Also .......................................................................................................................... 63
DescribeLifecycleHookTypes ....................................................................................................... 64
Response Elements ........................................................................................................... 64
Errors .............................................................................................................................. 64
Example .......................................................................................................................... 64
See Also .......................................................................................................................... 65
DescribeLoadBalancers .............................................................................................................. 66
Request Parameters .......................................................................................................... 66
Response Elements ........................................................................................................... 66
Errors .............................................................................................................................. 67
Example .......................................................................................................................... 67
See Also .......................................................................................................................... 67
DescribeLoadBalancerTargetGroups ............................................................................................. 69
Request Parameters .......................................................................................................... 69
Response Elements ........................................................................................................... 69
Errors .............................................................................................................................. 70
See Also .......................................................................................................................... 70
DescribeMetricCollectionTypes ................................................................................................... 71
Response Elements ........................................................................................................... 71
Errors .............................................................................................................................. 71
Example .......................................................................................................................... 71
See Also .......................................................................................................................... 72
DescribeNotificationConfigurations ............................................................................................. 73
Request Parameters .......................................................................................................... 73
Response Elements ........................................................................................................... 73
Errors .............................................................................................................................. 74
Example .......................................................................................................................... 74
See Also .......................................................................................................................... 74
DescribePolicies ........................................................................................................................ 76
Request Parameters .......................................................................................................... 76
Response Elements ........................................................................................................... 77
Errors .............................................................................................................................. 77
Example .......................................................................................................................... 77
See Also .......................................................................................................................... 78
DescribeScalingActivities ........................................................................................................... 80
Request Parameters .......................................................................................................... 80
Response Elements ........................................................................................................... 80
Errors .............................................................................................................................. 81
Example .......................................................................................................................... 81
See Also .......................................................................................................................... 82
DescribeScalingProcessTypes ...................................................................................................... 83
Response Elements ........................................................................................................... 83
Errors .............................................................................................................................. 83
Example .......................................................................................................................... 83
See Also .......................................................................................................................... 84
DescribeScheduledActions ......................................................................................................... 85
Request Parameters .......................................................................................................... 85
Response Elements ........................................................................................................... 86

API Version 2011-01-01


v
Amazon EC2 Auto Scaling API Reference

Errors .............................................................................................................................. 86
See Also .......................................................................................................................... 86
DescribeTags ............................................................................................................................ 88
Request Parameters .......................................................................................................... 88
Response Elements ........................................................................................................... 88
Errors .............................................................................................................................. 89
Example .......................................................................................................................... 89
See Also .......................................................................................................................... 89
DescribeTerminationPolicyTypes ................................................................................................. 91
Response Elements ........................................................................................................... 91
Errors .............................................................................................................................. 91
Example .......................................................................................................................... 91
See Also .......................................................................................................................... 92
DetachInstances ....................................................................................................................... 93
Request Parameters .......................................................................................................... 93
Response Elements ........................................................................................................... 93
Errors .............................................................................................................................. 94
Example .......................................................................................................................... 94
See Also .......................................................................................................................... 94
DetachLoadBalancers ................................................................................................................ 96
Request Parameters .......................................................................................................... 96
Errors .............................................................................................................................. 96
Example .......................................................................................................................... 96
See Also .......................................................................................................................... 97
DetachLoadBalancerTargetGroups ............................................................................................... 98
Request Parameters .......................................................................................................... 98
Errors .............................................................................................................................. 98
See Also .......................................................................................................................... 98
DisableMetricsCollection .......................................................................................................... 100
Request Parameters ........................................................................................................ 100
Errors ............................................................................................................................ 100
Example ........................................................................................................................ 101
See Also ........................................................................................................................ 101
EnableMetricsCollection ........................................................................................................... 102
Request Parameters ........................................................................................................ 102
Errors ............................................................................................................................ 102
Example ........................................................................................................................ 103
See Also ........................................................................................................................ 103
EnterStandby ......................................................................................................................... 104
Request Parameters ........................................................................................................ 104
Response Elements ......................................................................................................... 104
Errors ............................................................................................................................ 105
Example ........................................................................................................................ 105
See Also ........................................................................................................................ 105
ExecutePolicy ......................................................................................................................... 107
Request Parameters ........................................................................................................ 107
Errors ............................................................................................................................ 108
See Also ........................................................................................................................ 108
ExitStandby ........................................................................................................................... 109
Request Parameters ........................................................................................................ 109
Response Elements ......................................................................................................... 109
Errors ............................................................................................................................ 109
Example ........................................................................................................................ 110
See Also ........................................................................................................................ 110
PutLifecycleHook .................................................................................................................... 111
Request Parameters ........................................................................................................ 111
Errors ............................................................................................................................ 113

API Version 2011-01-01


vi
Amazon EC2 Auto Scaling API Reference

Example ........................................................................................................................ 113


See Also ........................................................................................................................ 114
PutNotificationConfiguration .................................................................................................... 115
Request Parameters ........................................................................................................ 115
Errors ............................................................................................................................ 115
Example ........................................................................................................................ 116
See Also ........................................................................................................................ 116
PutScalingPolicy ..................................................................................................................... 117
Request Parameters ........................................................................................................ 117
Response Elements ......................................................................................................... 119
Errors ............................................................................................................................ 120
Example ........................................................................................................................ 120
See Also ........................................................................................................................ 120
PutScheduledUpdateGroupAction ............................................................................................. 122
Request Parameters ........................................................................................................ 122
Errors ............................................................................................................................ 123
Examples ....................................................................................................................... 124
See Also ........................................................................................................................ 124
RecordLifecycleActionHeartbeat ................................................................................................ 125
Request Parameters ........................................................................................................ 125
Errors ............................................................................................................................ 126
See Also ........................................................................................................................ 126
ResumeProcesses .................................................................................................................... 127
Request Parameters ........................................................................................................ 127
Errors ............................................................................................................................ 127
Example ........................................................................................................................ 128
See Also ........................................................................................................................ 128
SetDesiredCapacity ................................................................................................................. 129
Request Parameters ........................................................................................................ 129
Errors ............................................................................................................................ 129
Example ........................................................................................................................ 130
See Also ........................................................................................................................ 130
SetInstanceHealth ................................................................................................................... 131
Request Parameters ........................................................................................................ 131
Errors ............................................................................................................................ 131
Example ........................................................................................................................ 132
See Also ........................................................................................................................ 132
SetInstanceProtection ............................................................................................................. 133
Request Parameters ........................................................................................................ 133
Errors ............................................................................................................................ 133
Example ........................................................................................................................ 134
See Also ........................................................................................................................ 134
SuspendProcesses ................................................................................................................... 135
Request Parameters ........................................................................................................ 135
Errors ............................................................................................................................ 135
Example ........................................................................................................................ 136
See Also ........................................................................................................................ 136
TerminateInstanceInAutoScalingGroup ....................................................................................... 137
Request Parameters ........................................................................................................ 137
Response Elements ......................................................................................................... 137
Errors ............................................................................................................................ 137
Example ........................................................................................................................ 138
See Also ........................................................................................................................ 138
UpdateAutoScalingGroup ......................................................................................................... 139
Request Parameters ........................................................................................................ 139
Errors ............................................................................................................................ 142
Examples ....................................................................................................................... 143

API Version 2011-01-01


vii
Amazon EC2 Auto Scaling API Reference

See Also ........................................................................................................................ 143


Data Types .................................................................................................................................... 144
Activity .................................................................................................................................. 146
Contents ........................................................................................................................ 146
See Also ........................................................................................................................ 147
AdjustmentType ..................................................................................................................... 148
Contents ........................................................................................................................ 148
See Also ........................................................................................................................ 148
Alarm .................................................................................................................................... 149
Contents ........................................................................................................................ 149
See Also ........................................................................................................................ 149
AutoScalingGroup ................................................................................................................... 150
Contents ........................................................................................................................ 150
See Also ........................................................................................................................ 153
AutoScalingInstanceDetails ...................................................................................................... 155
Contents ........................................................................................................................ 155
See Also ........................................................................................................................ 156
BlockDeviceMapping ............................................................................................................... 157
Contents ........................................................................................................................ 157
See Also ........................................................................................................................ 157
CustomizedMetricSpecification ................................................................................................. 159
Contents ........................................................................................................................ 159
See Also ........................................................................................................................ 160
Ebs ....................................................................................................................................... 161
Contents ........................................................................................................................ 161
See Also ........................................................................................................................ 162
EnabledMetric ........................................................................................................................ 163
Contents ........................................................................................................................ 163
See Also ........................................................................................................................ 163
FailedScheduledUpdateGroupActionRequest ............................................................................... 164
Contents ........................................................................................................................ 164
See Also ........................................................................................................................ 164
Filter ..................................................................................................................................... 165
Contents ........................................................................................................................ 165
See Also ........................................................................................................................ 165
Instance ................................................................................................................................. 166
Contents ........................................................................................................................ 166
See Also ........................................................................................................................ 167
InstanceMonitoring ................................................................................................................. 168
Contents ........................................................................................................................ 168
See Also ........................................................................................................................ 168
InstancesDistribution ............................................................................................................... 169
Contents ........................................................................................................................ 169
See Also ........................................................................................................................ 170
LaunchConfiguration ............................................................................................................... 172
Contents ........................................................................................................................ 172
See Also ........................................................................................................................ 175
LaunchTemplate ..................................................................................................................... 177
Contents ........................................................................................................................ 177
See Also ........................................................................................................................ 177
LaunchTemplateOverrides ........................................................................................................ 178
Contents ........................................................................................................................ 178
See Also ........................................................................................................................ 178
LaunchTemplateSpecification ................................................................................................... 179
Contents ........................................................................................................................ 179
See Also ........................................................................................................................ 179
LifecycleHook ......................................................................................................................... 181

API Version 2011-01-01


viii
Amazon EC2 Auto Scaling API Reference

Contents ........................................................................................................................ 181


See Also ........................................................................................................................ 182
LifecycleHookSpecification ....................................................................................................... 183
Contents ........................................................................................................................ 183
See Also ........................................................................................................................ 184
LoadBalancerState .................................................................................................................. 186
Contents ........................................................................................................................ 186
See Also ........................................................................................................................ 186
LoadBalancerTargetGroupState ................................................................................................. 187
Contents ........................................................................................................................ 187
See Also ........................................................................................................................ 187
MetricCollectionType ............................................................................................................... 188
Contents ........................................................................................................................ 188
See Also ........................................................................................................................ 188
MetricDimension ..................................................................................................................... 189
Contents ........................................................................................................................ 189
See Also ........................................................................................................................ 189
MetricGranularityType ............................................................................................................. 190
Contents ........................................................................................................................ 190
See Also ........................................................................................................................ 190
MixedInstancesPolicy ............................................................................................................... 191
Contents ........................................................................................................................ 191
See Also ........................................................................................................................ 191
NotificationConfiguration ......................................................................................................... 192
Contents ........................................................................................................................ 192
See Also ........................................................................................................................ 192
PredefinedMetricSpecification .................................................................................................. 193
Contents ........................................................................................................................ 193
See Also ........................................................................................................................ 193
ProcessType ........................................................................................................................... 194
Contents ........................................................................................................................ 194
See Also ........................................................................................................................ 194
ScalingPolicy .......................................................................................................................... 195
Contents ........................................................................................................................ 195
See Also ........................................................................................................................ 197
ScheduledUpdateGroupAction .................................................................................................. 198
Contents ........................................................................................................................ 198
See Also ........................................................................................................................ 199
ScheduledUpdateGroupActionRequest ....................................................................................... 200
Contents ........................................................................................................................ 200
See Also ........................................................................................................................ 201
StepAdjustment ...................................................................................................................... 202
Contents ........................................................................................................................ 202
See Also ........................................................................................................................ 203
SuspendedProcess .................................................................................................................. 204
Contents ........................................................................................................................ 204
See Also ........................................................................................................................ 204
Tag ....................................................................................................................................... 205
Contents ........................................................................................................................ 205
See Also ........................................................................................................................ 205
TagDescription ....................................................................................................................... 207
Contents ........................................................................................................................ 207
See Also ........................................................................................................................ 207
TargetTrackingConfiguration .................................................................................................... 209
Contents ........................................................................................................................ 209
See Also ........................................................................................................................ 209
Common Parameters ...................................................................................................................... 210

API Version 2011-01-01


ix
Amazon EC2 Auto Scaling API Reference

Common Errors .............................................................................................................................. 212


SOAP API ...................................................................................................................................... 214

API Version 2011-01-01


x
Amazon EC2 Auto Scaling API Reference

Welcome
Amazon EC2 Auto Scaling is designed to automatically launch or terminate EC2 instances based on user-
defined scaling policies, scheduled actions, and health checks. Use this service with AWS Auto Scaling,
Amazon CloudWatch, and Elastic Load Balancing.

For more information, including information about granting IAM users required permissions for Amazon
EC2 Auto Scaling actions, see the Amazon EC2 Auto Scaling User Guide.

This document was last published on October 26, 2019.

API Version 2011-01-01


1
Amazon EC2 Auto Scaling API Reference

List of Actions by Function


Account Limits

• DescribeAccountLimits (p. 47)

Auto Scaling Groups

• AttachLoadBalancers (p. 8)
• AttachLoadBalancerTargetGroups (p. 10)
• CreateAutoScalingGroup (p. 19)
• DeleteAutoScalingGroup (p. 33)
• DescribeAutoScalingGroups (p. 51)
• DescribeLoadBalancers (p. 66)
• DescribeLoadBalancerTargetGroups (p. 69)
• DetachLoadBalancerTargetGroups (p. 98)
• DetachLoadBalancers (p. 96)
• UpdateAutoScalingGroup (p. 139)

Auto Scaling Instances

• AttachInstances (p. 6)
• DescribeAutoScalingInstances (p. 54)
• DetachInstances (p. 93)
• SetInstanceHealth (p. 131)
• SetInstanceProtection (p. 133)
• TerminateInstanceInAutoScalingGroup (p. 137)

Launch Configurations

• CreateLaunchConfiguration (p. 25)


• DeleteLaunchConfiguration (p. 35)
• DescribeLaunchConfigurations (p. 59)

Lifecycle Hooks

• CompleteLifecycleAction (p. 16)


• DeleteLifecycleHook (p. 37)
• DescribeLifecycleHooks (p. 62)
• DescribeLifecycleHookTypes (p. 64)
• PutLifecycleHook (p. 111)
• RecordLifecycleActionHeartbeat (p. 125)

Monitoring

• DeleteNotificationConfiguration (p. 39)

API Version 2011-01-01


2
Amazon EC2 Auto Scaling API Reference

• DescribeAutoScalingNotificationTypes (p. 57)


• DescribeMetricCollectionTypes (p. 71)
• DescribeNotificationConfigurations (p. 73)
• DisableMetricsCollection (p. 100)
• EnableMetricsCollection (p. 102)
• PutNotificationConfiguration (p. 115)

Scaling

• DeletePolicy (p. 41)


• DescribeAdjustmentTypes (p. 49)
• DescribePolicies (p. 76)
• DescribeScalingActivities (p. 80)
• DescribeScalingProcessTypes (p. 83)
• DescribeTerminationPolicyTypes (p. 91)
• ExecutePolicy (p. 107)
• PutScalingPolicy (p. 117)
• ResumeProcesses (p. 127)
• SetDesiredCapacity (p. 129)
• SuspendProcesses (p. 135)

Scheduled Scaling

• BatchDeleteScheduledAction (p. 12)


• BatchPutScheduledUpdateGroupAction (p. 14)
• DeleteScheduledAction (p. 43)
• DescribeScheduledActions (p. 85)
• PutScheduledUpdateGroupAction (p. 122)

Standby State

• EnterStandby (p. 104)


• ExitStandby (p. 109)

Tags

• CreateOrUpdateTags (p. 31)


• DeleteTags (p. 45)
• DescribeTags (p. 88)

API Version 2011-01-01


3
Amazon EC2 Auto Scaling API Reference

Actions
The following actions are supported:

• AttachInstances (p. 6)
• AttachLoadBalancers (p. 8)
• AttachLoadBalancerTargetGroups (p. 10)
• BatchDeleteScheduledAction (p. 12)
• BatchPutScheduledUpdateGroupAction (p. 14)
• CompleteLifecycleAction (p. 16)
• CreateAutoScalingGroup (p. 19)
• CreateLaunchConfiguration (p. 25)
• CreateOrUpdateTags (p. 31)
• DeleteAutoScalingGroup (p. 33)
• DeleteLaunchConfiguration (p. 35)
• DeleteLifecycleHook (p. 37)
• DeleteNotificationConfiguration (p. 39)
• DeletePolicy (p. 41)
• DeleteScheduledAction (p. 43)
• DeleteTags (p. 45)
• DescribeAccountLimits (p. 47)
• DescribeAdjustmentTypes (p. 49)
• DescribeAutoScalingGroups (p. 51)
• DescribeAutoScalingInstances (p. 54)
• DescribeAutoScalingNotificationTypes (p. 57)
• DescribeLaunchConfigurations (p. 59)
• DescribeLifecycleHooks (p. 62)
• DescribeLifecycleHookTypes (p. 64)
• DescribeLoadBalancers (p. 66)
• DescribeLoadBalancerTargetGroups (p. 69)
• DescribeMetricCollectionTypes (p. 71)
• DescribeNotificationConfigurations (p. 73)
• DescribePolicies (p. 76)
• DescribeScalingActivities (p. 80)
• DescribeScalingProcessTypes (p. 83)
• DescribeScheduledActions (p. 85)
• DescribeTags (p. 88)
• DescribeTerminationPolicyTypes (p. 91)
• DetachInstances (p. 93)
• DetachLoadBalancers (p. 96)
• DetachLoadBalancerTargetGroups (p. 98)
• DisableMetricsCollection (p. 100)
• EnableMetricsCollection (p. 102)
• EnterStandby (p. 104)

API Version 2011-01-01


4
Amazon EC2 Auto Scaling API Reference

• ExecutePolicy (p. 107)


• ExitStandby (p. 109)
• PutLifecycleHook (p. 111)
• PutNotificationConfiguration (p. 115)
• PutScalingPolicy (p. 117)
• PutScheduledUpdateGroupAction (p. 122)
• RecordLifecycleActionHeartbeat (p. 125)
• ResumeProcesses (p. 127)
• SetDesiredCapacity (p. 129)
• SetInstanceHealth (p. 131)
• SetInstanceProtection (p. 133)
• SuspendProcesses (p. 135)
• TerminateInstanceInAutoScalingGroup (p. 137)
• UpdateAutoScalingGroup (p. 139)

API Version 2011-01-01


5
Amazon EC2 Auto Scaling API Reference
AttachInstances

AttachInstances
Attaches one or more EC2 instances to the specified Auto Scaling group.

When you attach instances, Amazon EC2 Auto Scaling increases the desired capacity of the group by the
number of instances being attached. If the number of instances being attached plus the desired capacity
of the group exceeds the maximum size of the group, the operation fails.

If there is a Classic Load Balancer attached to your Auto Scaling group, the instances are also registered
with the load balancer. If there are target groups attached to your Auto Scaling group, the instances are
also registered with the target groups.

For more information, see Attach EC2 Instances to Your Auto Scaling Group in the Amazon EC2 Auto
Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
InstanceIds.member.N

The IDs of the instances. You can specify up to 20 instances.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ServiceLinkedRoleFailure

The service-linked role is not yet ready for use.

API Version 2011-01-01


6
Amazon EC2 Auto Scaling API Reference
Example

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=AttachInstances
&AutoScalingGroupName=my-asg
&InstanceIds.member.1=i-12345678
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


7
Amazon EC2 Auto Scaling API Reference
AttachLoadBalancers

AttachLoadBalancers
Attaches one or more Classic Load Balancers to the specified Auto Scaling group.

To attach an Application Load Balancer or a Network Load Balancer instead, see


AttachLoadBalancerTargetGroups (p. 10).

To describe the load balancers for an Auto Scaling group, use DescribeLoadBalancers (p. 66). To
detach the load balancer from the Auto Scaling group, use DetachLoadBalancers (p. 96).

For more information, see Attaching a Load Balancer to Your Auto Scaling Group in the Amazon EC2 Auto
Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
LoadBalancerNames.member.N

The names of the load balancers. You can specify up to 10 load balancers.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ServiceLinkedRoleFailure

The service-linked role is not yet ready for use.

HTTP Status Code: 500

API Version 2011-01-01


8
Amazon EC2 Auto Scaling API Reference
Example

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=AttachLoadBalancers
&AutoScalingGroupName=my-asg
&LoadBalancerNames.member.1=my-lb
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


9
Amazon EC2 Auto Scaling API Reference
AttachLoadBalancerTargetGroups

AttachLoadBalancerTargetGroups
Attaches one or more target groups to the specified Auto Scaling group.

To describe the target groups for an Auto Scaling group, use


DescribeLoadBalancerTargetGroups (p. 69). To detach the target group from the Auto Scaling group,
use DetachLoadBalancerTargetGroups (p. 98).

With Application Load Balancers and Network Load Balancers, instances are registered as targets with
a target group. With Classic Load Balancers, instances are registered with the load balancer. For more
information, see Attaching a Load Balancer to Your Auto Scaling Group in the Amazon EC2 Auto Scaling
User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
TargetGroupARNs.member.N

The Amazon Resource Names (ARN) of the target groups. You can specify up to 10 target groups.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 511.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ServiceLinkedRoleFailure

The service-linked role is not yet ready for use.

HTTP Status Code: 500

API Version 2011-01-01


10
Amazon EC2 Auto Scaling API Reference
See Also

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


11
Amazon EC2 Auto Scaling API Reference
BatchDeleteScheduledAction

BatchDeleteScheduledAction
Deletes one or more scheduled actions for the specified Auto Scaling group.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
ScheduledActionNames.member.N

The names of the scheduled actions to delete. The maximum number allowed is 50.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

Response Elements
The following element is returned by the service.

FailedScheduledActions.member.N

The names of the scheduled actions that could not be deleted, including an error message.

Type: Array of FailedScheduledUpdateGroupActionRequest (p. 164) objects

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

API Version 2011-01-01


12
Amazon EC2 Auto Scaling API Reference
See Also

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


13
Amazon EC2 Auto Scaling API Reference
BatchPutScheduledUpdateGroupAction

BatchPutScheduledUpdateGroupAction
Creates or updates one or more scheduled scaling actions for an Auto Scaling group. If you leave a
parameter unspecified when updating a scheduled scaling action, the corresponding value remains
unchanged.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
ScheduledUpdateGroupActions.member.N

One or more scheduled actions. The maximum number allowed is 50.

Type: Array of ScheduledUpdateGroupActionRequest (p. 200) objects

Required: Yes

Response Elements
The following element is returned by the service.

FailedScheduledUpdateGroupActions.member.N

The names of the scheduled actions that could not be created or updated, including an error
message.

Type: Array of FailedScheduledUpdateGroupActionRequest (p. 164) objects

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

AlreadyExists

You already have an Auto Scaling group or launch configuration with this name.

HTTP Status Code: 400


LimitExceeded

You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example,
Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see
DescribeAccountLimits (p. 47).

API Version 2011-01-01


14
Amazon EC2 Auto Scaling API Reference
See Also

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


15
Amazon EC2 Auto Scaling API Reference
CompleteLifecycleAction

CompleteLifecycleAction
Completes the lifecycle action for the specified token or instance with the specified result.

This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:

1. (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda
function when Amazon EC2 Auto Scaling launches or terminates instances.
2. (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue
or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to
the target.
3. Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.
4. If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state.
5. If you finish before the timeout period ends, complete the lifecycle action.

For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks in the Amazon EC2 Auto Scaling
User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
InstanceId

The ID of the instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
LifecycleActionResult

The action for the group to take. This parameter can be either CONTINUE or ABANDON.

Type: String

Required: Yes
LifecycleActionToken

A universally unique identifier (UUID) that identifies a specific lifecycle action associated with an
instance. Amazon EC2 Auto Scaling sends this token to the notification target you specified when
you created the lifecycle hook.

API Version 2011-01-01


16
Amazon EC2 Auto Scaling API Reference
Errors

Type: String

Length Constraints: Fixed length of 36.

Required: No
LifecycleHookName

The name of the lifecycle hook.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [A-Za-z0-9\-_\/]+

Required: Yes

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=CompleteLifecycleAction
&AutoScalingGroupName=my-asg
&LifecycleHookName=my-launch-hook
&LifecycleActionResult=CONTINUE
&LifecycleActionToken=bcd2f1b8-9a78-44d3-8a7a-4dd07EXAMPLE
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python

API Version 2011-01-01


17
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for Ruby V2

API Version 2011-01-01


18
Amazon EC2 Auto Scaling API Reference
CreateAutoScalingGroup

CreateAutoScalingGroup
Creates an Auto Scaling group with the specified name and attributes.

If you exceed your maximum limit of Auto Scaling groups, the call fails. For information about viewing
this limit, see DescribeAccountLimits (p. 47). For information about updating this limit, see Amazon
EC2 Auto Scaling Limits in the Amazon EC2 Auto Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group. This name must be unique per Region per account.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
AvailabilityZones.member.N

One or more Availability Zones for the group. This parameter is optional if you specify one or more
subnets for VPCZoneIdentifier.

Conditional: If your account supports EC2-Classic and VPC, this parameter is required to launch
instances into EC2-Classic.

Type: Array of strings

Array Members: Minimum number of 1 item.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
DefaultCooldown

The amount of time, in seconds, after a scaling activity completes before another scaling activity can
start. The default value is 300.

For more information, see Scaling Cooldowns in the Amazon EC2 Auto Scaling User Guide.

Type: Integer

Required: No
DesiredCapacity

The number of Amazon EC2 instances that the Auto Scaling group attempts to maintain. This
number must be greater than or equal to the minimum size of the group and less than or equal to
the maximum size of the group. If you do not specify a desired capacity, the default is the minimum
size of the group.

Type: Integer

API Version 2011-01-01


19
Amazon EC2 Auto Scaling API Reference
Request Parameters

Required: No
HealthCheckGracePeriod

The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health
status of an EC2 instance that has come into service. During this time, any health check failures for
the instance are ignored. The default value is 0.

For more information, see Health Check Grace Period in the Amazon EC2 Auto Scaling User Guide.

Conditional: This parameter is required if you are adding an ELB health check.

Type: Integer

Required: No
HealthCheckType

The service to use for the health checks. The valid values are EC2 and ELB. The default value is EC2.
If you configure an Auto Scaling group to use ELB health checks, it considers the instance unhealthy
if it fails either the EC2 status checks or the load balancer health checks.

For more information, see Health Checks for Auto Scaling Instances in the Amazon EC2 Auto Scaling
User Guide.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
InstanceId

The ID of the instance used to create a launch configuration for the group.

When you specify an ID of an instance, Amazon EC2 Auto Scaling creates a new launch configuration
and associates it with the group. This launch configuration derives its attributes from the specified
instance, except for the block device mapping.

For more information, see Create an Auto Scaling Group Using an EC2 Instance in the Amazon EC2
Auto Scaling User Guide.

You must specify one of the following parameters in your request: LaunchConfigurationName,
LaunchTemplate, InstanceId, or MixedInstancesPolicy.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
LaunchConfigurationName

The name of the launch configuration.

For more information, see Creating an Auto Scaling Group Using a Launch Configuration in the
Amazon EC2 Auto Scaling User Guide.

If you do not specify LaunchConfigurationName, you must specify one of the following
parameters: InstanceId, LaunchTemplate, or MixedInstancesPolicy.

API Version 2011-01-01


20
Amazon EC2 Auto Scaling API Reference
Request Parameters

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
LaunchTemplate

The launch template to use to launch instances.

For more information, see Creating an Auto Scaling Group Using a Launch Template in the Amazon
EC2 Auto Scaling User Guide.

If you do not specify LaunchTemplate, you must specify one of the following parameters:
InstanceId, LaunchConfigurationName, or MixedInstancesPolicy.

Type: LaunchTemplateSpecification (p. 179) object

Required: No
LifecycleHookSpecificationList.member.N

One or more lifecycle hooks.

Type: Array of LifecycleHookSpecification (p. 183) objects

Required: No
LoadBalancerNames.member.N

A list of Classic Load Balancers associated with this Auto Scaling group. For Application Load
Balancers and Network Load Balancers, specify a list of target groups using the TargetGroupARNs
property instead.

For more information, see Using a Load Balancer with an Auto Scaling Group in the Amazon EC2
Auto Scaling User Guide.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
MaxSize

The maximum size of the group.

Type: Integer

Required: Yes
MinSize

The minimum size of the group.

Type: Integer

Required: Yes
MixedInstancesPolicy

An embedded object that specifies a mixed instances policy. The required parameters must be
specified. If optional parameters are unspecified, their default values are used.

API Version 2011-01-01


21
Amazon EC2 Auto Scaling API Reference
Request Parameters

The policy includes parameters that not only define the distribution of On-Demand Instances and
Spot Instances, the maximum price to pay for Spot Instances, and how the Auto Scaling group
allocates instance types to fulfill On-Demand and Spot capacity, but also the parameters that
specify the instance configuration information—the launch template and instance types.

For more information, see Auto Scaling Groups with Multiple Instance Types and Purchase Options in
the Amazon EC2 Auto Scaling User Guide.

You must specify one of the following parameters in your request: LaunchConfigurationName,
LaunchTemplate, InstanceId, or MixedInstancesPolicy.

Type: MixedInstancesPolicy (p. 191) object

Required: No
NewInstancesProtectedFromScaleIn

Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto
Scaling when scaling in.

For more information about preventing instances from terminating on scale in, see Instance
Protection in the Amazon EC2 Auto Scaling User Guide.

Type: Boolean

Required: No
PlacementGroup

The name of the placement group into which to launch your instances, if any. A placement group
is a logical grouping of instances within a single Availability Zone. You cannot specify multiple
Availability Zones and a placement group. For more information, see Placement Groups in the
Amazon EC2 User Guide for Linux Instances.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ServiceLinkedRoleARN

The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call
other AWS services on your behalf. By default, Amazon EC2 Auto Scaling uses a service-linked role
named AWSServiceRoleForAutoScaling, which it creates if it does not exist. For more information,
see Service-Linked Roles in the Amazon EC2 Auto Scaling User Guide.

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
Tags.member.N

One or more tags.

For more information, see Tagging Auto Scaling Groups and Instances in the Amazon EC2 Auto
Scaling User Guide.

API Version 2011-01-01


22
Amazon EC2 Auto Scaling API Reference
Errors

Type: Array of Tag (p. 205) objects

Required: No
TargetGroupARNs.member.N

The Amazon Resource Names (ARN) of the target groups to associate with the Auto Scaling group.
Instances are registered as targets in a target group, and traffic is routed to the target group.

For more information, see Using a Load Balancer with an Auto Scaling Group in the Amazon EC2
Auto Scaling User Guide.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 511.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
TerminationPolicies.member.N

One or more termination policies used to select the instance to terminate. These policies are
executed in the order that they are listed.

For more information, see Controlling Which Instances Auto Scaling Terminates During Scale In in
the Amazon EC2 Auto Scaling User Guide.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
VPCZoneIdentifier

A comma-separated list of subnet IDs for your virtual private cloud (VPC).

If you specify VPCZoneIdentifier with AvailabilityZones, the subnets that you specify for
this parameter must reside in those Availability Zones.

Conditional: If your account supports EC2-Classic and VPC, this parameter is required to launch
instances into a VPC.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2047.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

AlreadyExists

You already have an Auto Scaling group or launch configuration with this name.

API Version 2011-01-01


23
Amazon EC2 Auto Scaling API Reference
Example

HTTP Status Code: 400


LimitExceeded

You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example,
Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see
DescribeAccountLimits (p. 47).

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ServiceLinkedRoleFailure

The service-linked role is not yet ready for use.

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=CreateAutoScalingGroup
&AutoScalingGroupName=my-asg
&AvailabilityZones.member.1=us-east-1a
&AvailabilityZones.member.2=us-east-1b
&MinSize=2
&MaxSize=10
&DesiredCapacity=2
&LoadBalancerNames.member.1=my-loadbalancer
&HealthCheckType=ELB
&HealthCheckGracePeriod=120
&LaunchConfigurationName=my-lc
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


24
Amazon EC2 Auto Scaling API Reference
CreateLaunchConfiguration

CreateLaunchConfiguration
Creates a launch configuration.

If you exceed your maximum limit of launch configurations, the call fails. For information about viewing
this limit, see DescribeAccountLimits (p. 47). For information about updating this limit, see Amazon
EC2 Auto Scaling Limits in the Amazon EC2 Auto Scaling User Guide.

For more information, see Launch Configurations in the Amazon EC2 Auto Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AssociatePublicIpAddress

For Auto Scaling groups that are running in a virtual private cloud (VPC), specifies whether to
assign a public IP address to the group's instances. If you specify true, each instance in the Auto
Scaling group receives a unique public IP address. For more information, see Launching Auto Scaling
Instances in a VPC in the Amazon EC2 Auto Scaling User Guide.

If you specify this parameter, you must specify at least one subnet for VPCZoneIdentifier when
you create your group.
Note
If the instance is launched into a default subnet, the default is to assign a public IP address,
unless you disabled the option to assign a public IP address on the subnet. If the instance
is launched into a nondefault subnet, the default is not to assign a public IP address, unless
you enabled the option to assign a public IP address on the subnet.

Type: Boolean

Required: No
BlockDeviceMappings.member.N

A block device mapping, which specifies the block devices for the instance. You can specify virtual
devices and EBS volumes. For more information, see Block Device Mapping in the Amazon EC2 User
Guide for Linux Instances.

Type: Array of BlockDeviceMapping (p. 157) objects

Required: No
ClassicLinkVPCId

The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. For more information, see
ClassicLink in the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic Instances to a
VPC in the Amazon EC2 Auto Scaling User Guide.

This parameter can only be used if you are launching EC2-Classic instances.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

API Version 2011-01-01


25
Amazon EC2 Auto Scaling API Reference
Request Parameters

ClassicLinkVPCSecurityGroups.member.N

The IDs of one or more security groups for the specified ClassicLink-enabled VPC. For more
information, see ClassicLink in the Amazon EC2 User Guide for Linux Instances and Linking EC2-
Classic Instances to a VPC in the Amazon EC2 Auto Scaling User Guide.

If you specify the ClassicLinkVPCId parameter, you must specify this parameter.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
EbsOptimized

Specifies whether the launch configuration is optimized for EBS I/O (true) or not (false). The
optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack
to provide optimal I/O performance. This optimization is not available with all instance types.
Additional fees are incurred when you enable EBS optimization for an instance type that is not EBS-
optimized by default. For more information, see Amazon EBS-Optimized Instances in the Amazon
EC2 User Guide for Linux Instances.

The default value is false.

Type: Boolean

Required: No
IamInstanceProfile

The name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role
for the instance. The instance profile contains the IAM role.

For more information, see IAM Role for Applications That Run on Amazon EC2 Instances in the
Amazon EC2 Auto Scaling User Guide.

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
ImageId

The ID of the Amazon Machine Image (AMI) that was assigned during registration. For more
information, see Finding an AMI in the Amazon EC2 User Guide for Linux Instances.

If you do not specify InstanceId, you must specify ImageId.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
InstanceId

The ID of the instance to use to create the launch configuration. The new launch configuration
derives attributes from the instance, except for the block device mapping.

API Version 2011-01-01


26
Amazon EC2 Auto Scaling API Reference
Request Parameters

To create a launch configuration with a block device mapping or override any other instance
attributes, specify them as part of the same request.

For more information, see Create a Launch Configuration Using an EC2 Instance in the Amazon EC2
Auto Scaling User Guide.

If you do not specify InstanceId, you must specify both ImageId and InstanceType.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
InstanceMonitoring

Controls whether instances in this group are launched with detailed (true) or basic (false)
monitoring.

The default value is true (enabled).


Important
When detailed monitoring is enabled, Amazon CloudWatch generates metrics every minute
and your account is charged a fee. When you disable detailed monitoring, CloudWatch
generates metrics every 5 minutes. For more information, see Configure Monitoring for
Auto Scaling Instances in the Amazon EC2 Auto Scaling User Guide.

Type: InstanceMonitoring (p. 168) object

Required: No
InstanceType

Specifies the instance type of the EC2 instance.

For information about available instance types, see Available Instance Types in the Amazon EC2 User
Guide for Linux Instances.

If you do not specify InstanceId, you must specify InstanceType.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
KernelId

The ID of the kernel associated with the AMI.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
KeyName

The name of the key pair. For more information, see Amazon EC2 Key Pairs in the Amazon EC2 User
Guide for Linux Instances.

API Version 2011-01-01


27
Amazon EC2 Auto Scaling API Reference
Request Parameters

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
LaunchConfigurationName

The name of the launch configuration. This name must be unique per Region per account.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
PlacementTenancy

The tenancy of the instance. An instance with dedicated tenancy runs on isolated, single-tenant
hardware and can only be launched into a VPC.

To launch dedicated instances into a shared tenancy VPC (a VPC with the instance placement
tenancy attribute set to default), you must set the value of this parameter to dedicated.

If you specify PlacementTenancy, you must specify at least one subnet for VPCZoneIdentifier
when you create your group.

For more information, see Instance Placement Tenancy in the Amazon EC2 Auto Scaling User Guide.

Valid values: default | dedicated

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
RamdiskId

The ID of the RAM disk to select.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
SecurityGroups.member.N

A list that contains the security groups to assign to the instances in the Auto Scaling group.

[EC2-VPC] Specify the security group IDs. For more information, see Security Groups for Your VPC in
the Amazon Virtual Private Cloud User Guide.

[EC2-Classic] Specify either the security group names or the security group IDs. For more
information, see Amazon EC2 Security Groups in the Amazon EC2 User Guide for Linux Instances.

API Version 2011-01-01


28
Amazon EC2 Auto Scaling API Reference
Errors

Type: Array of strings

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
SpotPrice

The maximum hourly price to be paid for any Spot Instance launched to fulfill the request. Spot
Instances are launched when the price you specify exceeds the current Spot price. For more
information, see Launching Spot Instances in Your Auto Scaling Group in the Amazon EC2 Auto
Scaling User Guide.
Note
When you change your maximum price by creating a new launch configuration, running
instances will continue to run as long as the maximum price for those running instances is
higher than the current Spot price.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: No
UserData

The Base64-encoded user data to make available to the launched EC2 instances. For more
information, see Instance Metadata and User Data in the Amazon EC2 User Guide for Linux Instances.

Type: String

Length Constraints: Maximum length of 21847.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

AlreadyExists

You already have an Auto Scaling group or launch configuration with this name.

HTTP Status Code: 400


LimitExceeded

You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example,
Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see
DescribeAccountLimits (p. 47).

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

API Version 2011-01-01


29
Amazon EC2 Auto Scaling API Reference
Example

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=CreateLaunchConfiguration
&LaunchConfigurationName=my-lc
&ImageId=ami-12345678
&InstanceType=t2.micro
&SecurityGroups.member.1=sg-12345678
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


30
Amazon EC2 Auto Scaling API Reference
CreateOrUpdateTags

CreateOrUpdateTags
Creates or updates tags for the specified Auto Scaling group.

When you specify a tag with a key that already exists, the operation overwrites the previous tag
definition, and you do not get an error message.

For more information, see Tagging Auto Scaling Groups and Instances in the Amazon EC2 Auto Scaling
User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

Tags.member.N

One or more tags.

Type: Array of Tag (p. 205) objects

Required: Yes

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

AlreadyExists

You already have an Auto Scaling group or launch configuration with this name.

HTTP Status Code: 400


LimitExceeded

You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example,
Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see
DescribeAccountLimits (p. 47).

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ResourceInUse

The operation can't be performed because the resource is in use.

HTTP Status Code: 400

Example
Sample Request
https://autoscaling.amazonaws.com/?Action=CreateOrUpdateTags

API Version 2011-01-01


31
Amazon EC2 Auto Scaling API Reference
See Also

&Tags.member.1.ResourceId=my-asg
&Tags.member.1.ResourceType=auto-scaling-group
&Tags.member.1.Key=environment
&Tags.member.1.Value=test
&Tags.member.1.PropagateAtLaunch=true
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


32
Amazon EC2 Auto Scaling API Reference
DeleteAutoScalingGroup

DeleteAutoScalingGroup
Deletes the specified Auto Scaling group.

If the group has instances or scaling activities in progress, you must specify the option to force the
deletion in order for it to succeed.

If the group has policies, deleting the group deletes the policies, the underlying alarm actions, and any
alarm that no longer has an associated action.

To remove instances from the Auto Scaling group before deleting it, call DetachInstances (p. 93) with
the list of instances and the option to decrement the desired capacity. This ensures that Amazon EC2
Auto Scaling does not launch replacement instances.

To terminate all instances before deleting the Auto Scaling group, call
UpdateAutoScalingGroup (p. 139) and set the minimum size and desired capacity of the Auto Scaling
group to zero.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
ForceDelete

Specifies that the group is to be deleted along with all instances associated with the group,
without waiting for all instances to be terminated. This parameter also deletes any lifecycle actions
associated with the group.

Type: Boolean

Required: No

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ResourceInUse

The operation can't be performed because the resource is in use.

API Version 2011-01-01


33
Amazon EC2 Auto Scaling API Reference
Example

HTTP Status Code: 400


ScalingActivityInProgress

The operation can't be performed because there are scaling activities in progress.

HTTP Status Code: 400

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DeleteAutoScalingGroup
&AutoScalingGroupName=my-asg
&ForceDelete=true
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


34
Amazon EC2 Auto Scaling API Reference
DeleteLaunchConfiguration

DeleteLaunchConfiguration
Deletes the specified launch configuration.

The launch configuration must not be attached to an Auto Scaling group. When this call completes, the
launch configuration is no longer available for use.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

LaunchConfigurationName

The name of the launch configuration.

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

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ResourceInUse

The operation can't be performed because the resource is in use.

HTTP Status Code: 400

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DeleteLaunchConfiguration
&LaunchConfigurationName=my-lc
&Version=2011-01-01
&AUTHPARAMS

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

API Version 2011-01-01


35
Amazon EC2 Auto Scaling API Reference
See Also

• AWS Command Line Interface


• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


36
Amazon EC2 Auto Scaling API Reference
DeleteLifecycleHook

DeleteLifecycleHook
Deletes the specified lifecycle hook.

If there are any outstanding lifecycle actions, they are completed first (ABANDON for launching instances,
CONTINUE for terminating instances).

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
LifecycleHookName

The name of the lifecycle hook.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [A-Za-z0-9\-_\/]+

Required: Yes

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DeleteLifecycleHook
&AutoScalingGroupName=my-asg
&LifecycleHookName=my-hook
&Version=2011-01-01

API Version 2011-01-01


37
Amazon EC2 Auto Scaling API Reference
See Also

&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


38
Amazon EC2 Auto Scaling API Reference
DeleteNotificationConfiguration

DeleteNotificationConfiguration
Deletes the specified notification.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
TopicARN

The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon SNS) topic.

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

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example

Sample Request

https://autoscaling.amazonaws.com/?Action=DeleteNotificationConfiguration
&AutoScalingGroupName=my-asg
&TopicARN=arn:aws:sns:us-east-1:123456789012:my-sns-topic
&Version=2011-01-01
&AUTHPARAMS

API Version 2011-01-01


39
Amazon EC2 Auto Scaling API Reference
See Also

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


40
Amazon EC2 Auto Scaling API Reference
DeletePolicy

DeletePolicy
Deletes the specified scaling policy.

Deleting either a step scaling policy or a simple scaling policy deletes the underlying alarm action, but
does not delete the alarm, even if it no longer has an associated action.

For more information, see Deleting a Scaling Policy in the Amazon EC2 Auto Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
PolicyName

The name or Amazon Resource Name (ARN) of the 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

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ServiceLinkedRoleFailure

The service-linked role is not yet ready for use.

HTTP Status Code: 500

API Version 2011-01-01


41
Amazon EC2 Auto Scaling API Reference
Example

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DeletePolicy
&AutoScalingGroupName=my-asg
&PolicyName=ScaleIn
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


42
Amazon EC2 Auto Scaling API Reference
DeleteScheduledAction

DeleteScheduledAction
Deletes the specified scheduled action.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
ScheduledActionName

The name of the action to delete.

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

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example

Sample Request

https://autoscaling.amazonaws.com/?Action=DeleteScheduledAction
&AutoScalingGroupName=my-asg
&ScheduledActionName=my-scheduled-action
&Version=2011-01-01
&AUTHPARAMS

API Version 2011-01-01


43
Amazon EC2 Auto Scaling API Reference
See Also

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


44
Amazon EC2 Auto Scaling API Reference
DeleteTags

DeleteTags
Deletes the specified tags.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

Tags.member.N

One or more tags.

Type: Array of Tag (p. 205) objects

Required: Yes

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ResourceInUse

The operation can't be performed because the resource is in use.

HTTP Status Code: 400

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DeleteTags
&Tags.member.1.ResourceId=my-asg
&Tags.member.1.ResourceType=auto-scaling-group
&Tags.member.1.Key=environment
&Version=2011-01-01
&AUTHPARAMS

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

API Version 2011-01-01


45
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for Java


• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


46
Amazon EC2 Auto Scaling API Reference
DescribeAccountLimits

DescribeAccountLimits
Describes the current Amazon EC2 Auto Scaling resource limits for your AWS account.

For information about requesting an increase in these limits, see Amazon EC2 Auto Scaling Limits in the
Amazon EC2 Auto Scaling User Guide.

Response Elements
The following elements are returned by the service.

MaxNumberOfAutoScalingGroups

The maximum number of groups allowed for your AWS account. The default limit is 200 per AWS
Region.

Type: Integer
MaxNumberOfLaunchConfigurations

The maximum number of launch configurations allowed for your AWS account. The default limit is
200 per AWS Region.

Type: Integer
NumberOfAutoScalingGroups

The current number of groups for your AWS account.

Type: Integer
NumberOfLaunchConfigurations

The current number of launch configurations for your AWS account.

Type: Integer

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeAccountLimits
&Version=2011-01-01
&AUTHPARAMS

API Version 2011-01-01


47
Amazon EC2 Auto Scaling API Reference
See Also

Sample Response

<DescribeAccountLimitsResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
<DescribeAccountLimitsResult>
<NumberOfLaunchConfigurations>5</NumberOfLaunchConfigurations>
<MaxNumberOfLaunchConfigurations>200</MaxNumberOfLaunchConfigurations>
<NumberOfAutoScalingGroups>10</NumberOfAutoScalingGroups>
<MaxNumberOfAutoScalingGroups>200</MaxNumberOfAutoScalingGroups>
</DescribeAccountLimitsResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeAccountLimitsResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


48
Amazon EC2 Auto Scaling API Reference
DescribeAdjustmentTypes

DescribeAdjustmentTypes
Describes the policy adjustment types for use with PutScalingPolicy (p. 117).

Response Elements
The following element is returned by the service.

AdjustmentTypes.member.N

The policy adjustment types.

Type: Array of AdjustmentType (p. 148) objects

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeAdjustmentTypes
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeAdjustmentTypesResponse xmlns="http://autoscaling.amazonaws.com/doc/201-01-01/">
<DescribeAdjustmentTypesResult>
<AdjustmentTypes>
<member>
<AdjustmentType>ChangeInCapacity</AdjustmentType>
</member>
<member>
<AdjustmentType>ExactCapacity</AdjustmentType>
</member>
<member>
<AdjustmentType>PercentChangeInCapacity</AdjustmentType>
</member>
</AdjustmentTypes>
</DescribeAdjustmentTypesResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeAdjustmentTypesResponse>

API Version 2011-01-01


49
Amazon EC2 Auto Scaling API Reference
See Also

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


50
Amazon EC2 Auto Scaling API Reference
DescribeAutoScalingGroups

DescribeAutoScalingGroups
Describes one or more Auto Scaling groups.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupNames.member.N

The names of the Auto Scaling groups. Each name can be a maximum of 1600 characters. By default,
you can only specify up to 50 names. You can optionally increase this limit using the MaxRecords
parameter.

If you omit this parameter, all Auto Scaling groups are described.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
MaxRecords

The maximum number of items to return with this call. The default value is 50 and the maximum
value is 100.

Type: Integer

Required: No
NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Response Elements
The following elements are returned by the service.

AutoScalingGroups.member.N

The groups.

Type: Array of AutoScalingGroup (p. 150) objects


NextToken

A string that indicates that the response contains more items than can be returned in a single
response. To receive additional items, specify this string for the NextToken value when requesting
the next set of items. This value is null when there are no more items to return.

API Version 2011-01-01


51
Amazon EC2 Auto Scaling API Reference
Errors

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidNextToken

The NextToken value is not valid.

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeAutoScalingGroups
&AutoScalingGroupNames.member.1=my-asg
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeAutoScalingGroupsResponse xmlns="http://autoscaling.amazonaws.com/
doc/2011-01-01/">
<DescribeAutoScalingGroupsResult>
<AutoScalingGroups>
<member>
<HealthCheckType>ELB</HealthCheckType>
<LoadBalancerNames>
<member>my-loadbalancer</member>
</LoadBalancerNames>
<Instances>
<member>
<LaunchConfigurationName>my-lc</LaunchConfigurationName>
<LifecycleState>InService</LifecycleState>
<InstanceId>i-12345678</InstanceId>
<ProtectedFromScaleIn>false</ProtectedFromScaleIn>
<AvailabilityZone>us-east-1c</AvailabilityZone>
</member>
</Instances>
<TerminationPolicies>
<member>Default</member>
</TerminationPolicies>
<DefaultCooldown>300</DefaultCooldown>
<AutoScalingGroupARN>arn:aws:autoscaling:us-
east-1:123456789012:autoScalingGroup:12345678-1234-1234-1234-123456789012:autoScalingGroupName/
my-asg</AutoScalingGroupARN>
<EnabledMetrics />

API Version 2011-01-01


52
Amazon EC2 Auto Scaling API Reference
See Also

<AvailabilityZones>
<member>us-east-1b</member>
<member>us-east-1a</member>
</AvailabilityZones>
<Tags>
<member>
<ResourceId>my-asg</ResourceId>
<PropagateAtLaunch>true</PropagateAtLaunch>
<Value>test</Value>
<Key>environment</Key>
<ResourceType>auto-scaling-group</ResourceType>
</member>
</Tags>
<LaunchConfigurationName>my-lc</LaunchConfigurationName>
<AutoScalingGroupName>my-asg</AutoScalingGroupName>
<HealthCheckGracePeriod>300</HealthCheckGracePeriod>
<NewInstancesProtectedFromScaleIn>false</NewInstancesProtectedFromScaleIn>
<SuspendedProcesses />
<CreatedTime>2015-05-06T17:47:15.107Z</CreatedTime>
<MinSize>2</MinSize>
<MaxSize>10</MaxSize>
<DesiredCapacity>2</DesiredCapacity>
<VPCZoneIdentifier>subnet-12345678,subnet-98765432</VPCZoneIdentifier>
</member>
</AutoScalingGroups>
</DescribeAutoScalingGroupsResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeAutoScalingGroupsResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


53
Amazon EC2 Auto Scaling API Reference
DescribeAutoScalingInstances

DescribeAutoScalingInstances
Describes one or more Auto Scaling instances.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

InstanceIds.member.N

The IDs of the instances. You can specify up to MaxRecords IDs. If you omit this parameter, all Auto
Scaling instances are described. If you specify an ID that does not exist, it is ignored with no error.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
MaxRecords

The maximum number of items to return with this call. The default value is 50 and the maximum
value is 50.

Type: Integer

Required: No
NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Response Elements
The following elements are returned by the service.

AutoScalingInstances.member.N

The instances.

Type: Array of AutoScalingInstanceDetails (p. 155) objects


NextToken

A string that indicates that the response contains more items than can be returned in a single
response. To receive additional items, specify this string for the NextToken value when requesting
the next set of items. This value is null when there are no more items to return.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

API Version 2011-01-01


54
Amazon EC2 Auto Scaling API Reference
Errors

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidNextToken

The NextToken value is not valid.

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeAutoScalingInstances
&InstanceIds.member.1=i-12345678
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeAutoScalingInstancesResponse xmlns="http://autoscaling.amazonaws.com/
doc/2011-01-01/">
<DescribeAutoScalingInstancesResult>
<AutoScalingInstances>
<member>
<LaunchConfigurationName>my-lc</LaunchConfigurationName>
<LifecycleState>InService</LifecycleState>
<AutoScalingGroupName>my-asg</AutoScalingGroupName>
<InstanceId>i-12345678</InstanceId>
<HealthStatus>HEALTHY</HealthStatus>
<ProtectedFromScaleIn>false</ProtectedFromScaleIn>
<AvailabilityZone>us-east-1b</AvailabilityZone>
</member>
</AutoScalingInstances>
</DescribeAutoScalingInstancesResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeAutoScalingInstancesResponse>

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++

API Version 2011-01-01


55
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for Go


• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


56
Amazon EC2 Auto Scaling API Reference
DescribeAutoScalingNotificationTypes

DescribeAutoScalingNotificationTypes
Describes the notification types that are supported by Amazon EC2 Auto Scaling.

Response Elements
The following element is returned by the service.

AutoScalingNotificationTypes.member.N

The notification types.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?
Version=2011-01-01&Action=DescribeAutoScalingNotificationTypes
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeAutoScalingNotificationTypesResponse xmlns="http://autoscaling.amazonaws.com/
doc/2011-01-01/">
<DescribeAutoScalingNotificationTypesResult>
<AutoScalingNotificationTypes>
<member>autoscaling:EC2_INSTANCE_LAUNCH</member>
<member>autoscaling:EC2_INSTANCE_LAUNCH_ERROR</member>
<member>autoscaling:EC2_INSTANCE_TERMINATE</member>
<member>autoscaling:EC2_INSTANCE_TERMINATE_ERROR</member>
<member>autoscaling:TEST_NOTIFICATION</member>
</AutoScalingNotificationTypes>
</DescribeAutoScalingNotificationTypesResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>

API Version 2011-01-01


57
Amazon EC2 Auto Scaling API Reference
See Also

</DescribeAutoScalingNotificationTypesResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


58
Amazon EC2 Auto Scaling API Reference
DescribeLaunchConfigurations

DescribeLaunchConfigurations
Describes one or more launch configurations.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

LaunchConfigurationNames.member.N

The launch configuration names. If you omit this parameter, all launch configurations are described.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
MaxRecords

The maximum number of items to return with this call. The default value is 50 and the maximum
value is 100.

Type: Integer

Required: No
NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Response Elements
The following elements are returned by the service.

LaunchConfigurations.member.N

The launch configurations.

Type: Array of LaunchConfiguration (p. 172) objects


NextToken

A string that indicates that the response contains more items than can be returned in a single
response. To receive additional items, specify this string for the NextToken value when requesting
the next set of items. This value is null when there are no more items to return.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

API Version 2011-01-01


59
Amazon EC2 Auto Scaling API Reference
Errors

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidNextToken

The NextToken value is not valid.

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeLaunchConfigurations
&LaunchConfigurationNames.member.1=my-lc
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeLaunchConfigurationsResponse xmlns="http://autoscaling.amazonaws.com/
doc/2011-01-01/">
<DescribeLaunchConfigurationsResult>
<LaunchConfigurations>
<member>
<KernelId />
<EbsOptimized>false</EbsOptimized>
<RamdiskId />
<UserData />
<ImageId>ami-12345678</ImageId>
<BlockDeviceMappings />
<ClassicLinkVPCSecurityGroups />
<InstanceType>t2.micro</InstanceType>
<KeyName />
<LaunchConfigurationARN>arn:aws:autoscaling:us-
east-1:123456789012:launchConfiguration:12345678-1234-1234-1234-123456789012:launchConfigurationName/
my-lc</LaunchConfigurationARN>
<LaunchConfigurationName>my-lc</LaunchConfigurationName>
<CreatedTime>2015-01-21T23:04:42.200Z</CreatedTime>
<SecurityGroups>
<member>sg-12345678</member>
</SecurityGroups>
<InstanceMonitoring>
<Enabled>true</Enabled>
</InstanceMonitoring>
</member>
</LaunchConfigurations>
</DescribeLaunchConfigurationsResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>

API Version 2011-01-01


60
Amazon EC2 Auto Scaling API Reference
See Also

</DescribeLaunchConfigurationsResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


61
Amazon EC2 Auto Scaling API Reference
DescribeLifecycleHooks

DescribeLifecycleHooks
Describes the lifecycle hooks for the specified Auto Scaling group.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
LifecycleHookNames.member.N

The names of one or more lifecycle hooks. If you omit this parameter, all lifecycle hooks are
described.

Type: Array of strings

Array Members: Maximum number of 50 items.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [A-Za-z0-9\-_\/]+

Required: No

Response Elements
The following element is returned by the service.

LifecycleHooks.member.N

The lifecycle hooks for the specified group.

Type: Array of LifecycleHook (p. 181) objects

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

API Version 2011-01-01


62
Amazon EC2 Auto Scaling API Reference
Example

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeLifecycleHooks
&AutoScalingGroupName=my-asg
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeLifecycleHooksResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
<DescribeLifecycleHooksResult>
<LifecycleHooks>
<member>
<AutoScalingGroupName>my-asg</AutoScalingGroupName>
<RoleARN>arn:aws:iam::1234567890:role/my-auto-scaling-role</RoleARN>
<LifecycleTransition>autoscaling:EC2_INSTANCE_LAUNCHING</LifecycleTransition>
<GlobalTimeout>172800</GlobalTimeout>
<LifecycleHookName>my-launch-hook</LifecycleHookName>
<HeartbeatTimeout>3600</HeartbeatTimeout>
<DefaultResult>ABANDON</DefaultResult>
<NotificationTargetARN>arn:aws:sqs:us-east-1:123456789012:my-queue</
NotificationTargetARN>
</member>
</LifecycleHooks>
</DescribeLifecycleHooksResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeLifecycleHooksResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


63
Amazon EC2 Auto Scaling API Reference
DescribeLifecycleHookTypes

DescribeLifecycleHookTypes
Describes the available types of lifecycle hooks.

The following hook types are supported:

• autoscaling:EC2_INSTANCE_LAUNCHING
• autoscaling:EC2_INSTANCE_TERMINATING

Response Elements
The following element is returned by the service.

LifecycleHookTypes.member.N

The lifecycle hook types.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeLifecycleHookTypes
&AutoScalingGroupName=my-asg
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeLifecycleHookTypesResponse xmlns="http://autoscaling.amazonaws.com/
doc/2011-01-01/">
<DescribeLifecycleHookTypesResult>
<LifecycleHookTypes>
<member>autoscaling:EC2_INSTANCE_LAUNCHING</member>
<member>autoscaling:EC2_INSTANCE_TERMINATING</member>
</LifecycleHookTypes>

API Version 2011-01-01


64
Amazon EC2 Auto Scaling API Reference
See Also

</DescribeLifecycleHookTypesResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeLifecycleHookTypesResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


65
Amazon EC2 Auto Scaling API Reference
DescribeLoadBalancers

DescribeLoadBalancers
Describes the load balancers for the specified Auto Scaling group.

This operation describes only Classic Load Balancers. If you have Application Load Balancers or Network
Load Balancers, use DescribeLoadBalancerTargetGroups (p. 69) instead.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
MaxRecords

The maximum number of items to return with this call. The default value is 100 and the maximum
value is 100.

Type: Integer

Required: No
NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Response Elements
The following elements are returned by the service.

LoadBalancers.member.N

The load balancers.

Type: Array of LoadBalancerState (p. 186) objects


NextToken

A string that indicates that the response contains more items than can be returned in a single
response. To receive additional items, specify this string for the NextToken value when requesting
the next set of items. This value is null when there are no more items to return.

Type: String

API Version 2011-01-01


66
Amazon EC2 Auto Scaling API Reference
Errors

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeLoadBalancers
&AutoScalingGroupName=my-asg
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeLoadBalancersResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
<DescribeLoadBalancersResult>
<LoadBalancers>
<member>
<LoadBalancerName>my-loadbalancer</LoadBalancerName>
<State>Added</State>
</member>
</LoadBalancers>
</DescribeLoadBalancersResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeLoadBalancersResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


67
Amazon EC2 Auto Scaling API Reference
See Also

API Version 2011-01-01


68
Amazon EC2 Auto Scaling API Reference
DescribeLoadBalancerTargetGroups

DescribeLoadBalancerTargetGroups
Describes the target groups for the specified Auto Scaling group.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
MaxRecords

The maximum number of items to return with this call. The default value is 100 and the maximum
value is 100.

Type: Integer

Required: No
NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Response Elements
The following elements are returned by the service.

LoadBalancerTargetGroups.member.N

Information about the target groups.

Type: Array of LoadBalancerTargetGroupState (p. 187) objects


NextToken

A string that indicates that the response contains more items than can be returned in a single
response. To receive additional items, specify this string for the NextToken value when requesting
the next set of items. This value is null when there are no more items to return.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

API Version 2011-01-01


69
Amazon EC2 Auto Scaling API Reference
Errors

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


70
Amazon EC2 Auto Scaling API Reference
DescribeMetricCollectionTypes

DescribeMetricCollectionTypes
Describes the available CloudWatch metrics for Amazon EC2 Auto Scaling.

The GroupStandbyInstances metric is not returned by default. You must explicitly request this metric
when calling EnableMetricsCollection (p. 102).

Response Elements
The following elements are returned by the service.

Granularities.member.N

The granularities for the metrics.

Type: Array of MetricGranularityType (p. 190) objects


Metrics.member.N

One or more metrics.

Type: Array of MetricCollectionType (p. 188) objects

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Version=2011-01-01&Action=DescribeMetricCollectionTypes
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeMetricCollectionTypesResponse xmlns="http://autoscaling.amazonaws.com/
doc/2011-01-01/">
<DescribeMetricCollectionTypesResult>
<Granularities>
<member>
<Granularity>1Minute</Granularity>
</member>
</Granularities>
<Metrics>
<member>

API Version 2011-01-01


71
Amazon EC2 Auto Scaling API Reference
See Also

<Metric>GroupMinSize</Metric>
</member>
<member>
<Metric>GroupMaxSize</Metric>
</member>
<member>
<Metric>GroupDesiredCapacity</Metric>
</member>
<member>
<Metric>GroupInServiceInstances</Metric>
</member>
<member>
<Metric>GroupPendingInstances</Metric>
</member>
<member>
<Metric>GroupTerminatingInstances</Metric>
</member>
<member>
<Metric>GroupStandbyInstances</Metric>
</member>
<member>
<Metric>GroupTotalInstances</Metric>
</member>
</Metrics>
</DescribeMetricCollectionTypesResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeMetricCollectionTypesResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


72
Amazon EC2 Auto Scaling API Reference
DescribeNotificationConfigurations

DescribeNotificationConfigurations
Describes the notification actions associated with the specified Auto Scaling group.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupNames.member.N

The name of the Auto Scaling group.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
MaxRecords

The maximum number of items to return with this call. The default value is 50 and the maximum
value is 100.

Type: Integer

Required: No
NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Response Elements
The following elements are returned by the service.

NextToken

A string that indicates that the response contains more items than can be returned in a single
response. To receive additional items, specify this string for the NextToken value when requesting
the next set of items. This value is null when there are no more items to return.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
NotificationConfigurations.member.N

The notification configurations.

Type: Array of NotificationConfiguration (p. 192) objects

API Version 2011-01-01


73
Amazon EC2 Auto Scaling API Reference
Errors

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidNextToken

The NextToken value is not valid.

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?
Version=2011-01-01&Action=DescribeNotificationConfigurations
&AutoScalingGroupNames.member.1=my-asg
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeNotificationConfigurationsResponse xmlns="http://autoscaling.amazonaws.com/
doc/2011-01-01/">
<DescribeNotificationConfigurationsResult>
<NotificationConfigurations>
<member>
<AutoScalingGroupName>my-asg</AutoScalingGroupName>
<NotificationType>autoscaling:EC2_INSTANCE_LAUNCH</NotificationType>
<TopicARN>arn:aws:sns:us-east-1:123456789012:my-sns-topic</TopicARN>
</member>
</NotificationConfigurations>
</DescribeNotificationConfigurationsResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeNotificationConfigurationsResponse>

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
• AWS SDK for JavaScript

API Version 2011-01-01


74
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for PHP V3


• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


75
Amazon EC2 Auto Scaling API Reference
DescribePolicies

DescribePolicies
Describes the policies for the specified Auto Scaling group.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
MaxRecords

The maximum number of items to be returned with each call. The default value is 50 and the
maximum value is 100.

Type: Integer

Required: No
NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
PolicyNames.member.N

The names of one or more policies. If you omit this parameter, all policies are described. If a group
name is provided, the results are limited to that group. This list is limited to 50 items. If you specify
an unknown policy name, it is ignored with no error.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
PolicyTypes.member.N

One or more policy types. The valid values are SimpleScaling, StepScaling, and
TargetTrackingScaling.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 64.

API Version 2011-01-01


76
Amazon EC2 Auto Scaling API Reference
Response Elements

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Response Elements
The following elements are returned by the service.

NextToken

A string that indicates that the response contains more items than can be returned in a single
response. To receive additional items, specify this string for the NextToken value when requesting
the next set of items. This value is null when there are no more items to return.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
ScalingPolicies.member.N

The scaling policies.

Type: Array of ScalingPolicy (p. 195) objects

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidNextToken

The NextToken value is not valid.

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ServiceLinkedRoleFailure

The service-linked role is not yet ready for use.

HTTP Status Code: 500

Example

Sample Request

https://autoscaling.amazonaws.com/?Action=DescribePolicies
&AutoScalingGroupName=my-asg
&Version=2011-01-01
&AUTHPARAMS

API Version 2011-01-01


77
Amazon EC2 Auto Scaling API Reference
See Also

Sample Response

<DescribePoliciesResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
<DescribePoliciesResult>
<ScalingPolicies>
<member>
<PolicyARN>arn:aws:autoscaling:us-
east-1:123456789012:scalingPolicy:c322761b-3172-4d56-9a21-0ed9dEXAMPLE:autoScalingGroupName/
my-asg:policyName/MyScaleInPolicy</PolicyARN>
<AdjustmentType>ChangeInCapacity</AdjustmentType>
<ScalingAdjustment>-1</ScalingAdjustment>
<PolicyName>MyScaleInPolicy</PolicyName>
<PolicyType>SimpleScaling</PolicyType>
<AutoScalingGroupName>my-asg</AutoScalingGroupName>
<Cooldown>60</Cooldown>
<Alarms>
<member>
<AlarmName>TestQueue</AlarmName>
<AlarmARN>arn:aws:cloudwatch:us-east-1:123456789012:alarm:TestQueue</AlarmARN>
</member>
</Alarms>
</member>
<member>
<PolicyARN>arn:aws:autoscaling:us-
east-1:123456789012:scalingPolicy:c55a5cdd-9be0-435b-b60b-
a8dd3EXAMPLE:autoScalingGroupName/my-asg:policyName/MyScaleOutPolicy</PolicyARN>
<AdjustmentType>ChangeInCapacity</AdjustmentType>
<ScalingAdjustment>1</ScalingAdjustment>
<PolicyName>MyScaleOutPolicy</PolicyName>
<PolicyType>SimpleScaling</PolicyType>
<AutoScalingGroupName>my-asg</AutoScalingGroupName>
<Cooldown>60</Cooldown>
<Alarms>
<member>
<AlarmName>TestQueue</AlarmName>
<AlarmARN>arn:aws:cloudwatch:us-east-1:123456789012:alarm:TestQueue</AlarmARN>
</member>
</Alarms>
</member>
</ScalingPolicies>
</DescribePoliciesResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribePoliciesResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


78
Amazon EC2 Auto Scaling API Reference
See Also

API Version 2011-01-01


79
Amazon EC2 Auto Scaling API Reference
DescribeScalingActivities

DescribeScalingActivities
Describes one or more scaling activities for the specified Auto Scaling group.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

ActivityIds.member.N

The activity IDs of the desired scaling activities. You can specify up to 50 IDs. If you omit this
parameter, all activities for the past six weeks are described. If unknown activities are requested,
they are ignored with no error. If you specify an Auto Scaling group, the results are limited to that
group.

Type: Array of strings

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
AutoScalingGroupName

The name of the Auto Scaling group.

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
MaxRecords

The maximum number of items to return with this call. The default value is 100 and the maximum
value is 100.

Type: Integer

Required: No
NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Response Elements
The following elements are returned by the service.

Activities.member.N

The scaling activities. Activities are sorted by start time. Activities still in progress are described first.

API Version 2011-01-01


80
Amazon EC2 Auto Scaling API Reference
Errors

Type: Array of Activity (p. 146) objects


NextToken

A string that indicates that the response contains more items than can be returned in a single
response. To receive additional items, specify this string for the NextToken value when requesting
the next set of items. This value is null when there are no more items to return.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidNextToken

The NextToken value is not valid.

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeScalingActivities
&AutoScalingGroupName=my-asg
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeScalingActivitiesResponse xmlns="http://ec2.amazonaws.com/doc/2011-01-01/">
<DescribeScalingActivitiesResult>
<Activities>
<member>
<StatusCode>Failed</StatusCode>
<Progress>0</Progress>
<ActivityId>12345678-1234-1234-1234-123456789012</ActivityId>
<StartTime>2019-04-12T17:32:07.882Z</StartTime>
<AutoScalingGroupName>my-asg</AutoScalingGroupName>
<Cause>At 2019-04-12T17:31:30Z a user request created an AutoScalingGroup changing
the desired capacity from 0 to 1. At 2019-04-12T17:32:07Z an instance was started in
response to a difference between desired and actual capacity, increasing the capacity from
0 to 1.</Cause>
<Details>{}</Details>
<Description>Launching a new EC2 instance. Status Reason: The image id
'ami-4edb0327' does not exist. Launching EC2 instance failed.</Description>
<EndTime>2019-04-12T17:32:08Z</EndTime>

API Version 2011-01-01


81
Amazon EC2 Auto Scaling API Reference
See Also

<StatusMessage>The image id 'ami-4edb0327' does not exist. Launching EC2 instance


failed.</StatusMessage>
</member>
</Activities>
</DescribeScalingActivitiesResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeScalingActivitiesResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


82
Amazon EC2 Auto Scaling API Reference
DescribeScalingProcessTypes

DescribeScalingProcessTypes
Describes the scaling process types for use with ResumeProcesses (p. 127) and
SuspendProcesses (p. 135).

Response Elements
The following element is returned by the service.

Processes.member.N

The names of the process types.

Type: Array of ProcessType (p. 194) objects

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeScalingProcessTypes
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeScalingProcessTypesResponse xmlns="http://autoscaling.amazonaws.com/
doc/2011-01-01/">
<DescribeScalingProcessTypesResult>
<Processes>
<member>
<ProcessName>AZRebalance</ProcessName>
</member>
<member>
<ProcessName>AddToLoadBalancer</ProcessName>
</member>
<member>
<ProcessName>AlarmNotification</ProcessName>
</member>
<member>
<ProcessName>HealthCheck</ProcessName>
</member>
<member>
<ProcessName>Launch</ProcessName>

API Version 2011-01-01


83
Amazon EC2 Auto Scaling API Reference
See Also

</member>
<member>
<ProcessName>ReplaceUnhealthy</ProcessName>
</member>
<member>
<ProcessName>ScheduledActions</ProcessName>
</member>
<member>
<ProcessName>Terminate</ProcessName>
</member>
</Processes>
</DescribeScalingProcessTypesResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeScalingProcessTypesResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


84
Amazon EC2 Auto Scaling API Reference
DescribeScheduledActions

DescribeScheduledActions
Describes the actions scheduled for your Auto Scaling group that haven't run or that have not reached
their end time. To describe the actions that have already run, use DescribeScalingActivities (p. 80).

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
EndTime

The latest scheduled start time to return. If scheduled action names are provided, this parameter is
ignored.

Type: Timestamp

Required: No
MaxRecords

The maximum number of items to return with this call. The default value is 50 and the maximum
value is 100.

Type: Integer

Required: No
NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ScheduledActionNames.member.N

The names of one or more scheduled actions. You can specify up to 50 actions. If you omit this
parameter, all scheduled actions are described. If you specify an unknown scheduled action, it is
ignored with no error.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

API Version 2011-01-01


85
Amazon EC2 Auto Scaling API Reference
Response Elements

StartTime

The earliest scheduled start time to return. If scheduled action names are provided, this parameter is
ignored.

Type: Timestamp

Required: No

Response Elements
The following elements are returned by the service.

NextToken

A string that indicates that the response contains more items than can be returned in a single
response. To receive additional items, specify this string for the NextToken value when requesting
the next set of items. This value is null when there are no more items to return.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*
ScheduledUpdateGroupActions.member.N

The scheduled actions.

Type: Array of ScheduledUpdateGroupAction (p. 198) objects

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidNextToken

The NextToken value is not valid.

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

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
• AWS SDK for JavaScript

API Version 2011-01-01


86
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for PHP V3


• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


87
Amazon EC2 Auto Scaling API Reference
DescribeTags

DescribeTags
Describes the specified tags.

You can use filters to limit the results. For example, you can query for the tags for a specific Auto Scaling
group. You can specify multiple values for a filter. A tag must match at least one of the specified values
for it to be included in the results.

You can also specify multiple filters. The result includes information for a particular tag only if it matches
all the filters. If there's no match, no special message is returned.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

Filters.member.N

One or more filters to scope the tags to return. The maximum number of filters per filter type (for
example, auto-scaling-group) is 1000.

Type: Array of Filter (p. 165) objects

Required: No
MaxRecords

The maximum number of items to return with this call. The default value is 50 and the maximum
value is 100.

Type: Integer

Required: No
NextToken

The token for the next set of items to return. (You received this token from a previous call.)

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Response Elements
The following elements are returned by the service.

NextToken

A string that indicates that the response contains more items than can be returned in a single
response. To receive additional items, specify this string for the NextToken value when requesting
the next set of items. This value is null when there are no more items to return.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

API Version 2011-01-01


88
Amazon EC2 Auto Scaling API Reference
Errors

Tags.member.N

One or more tags.

Type: Array of TagDescription (p. 207) objects

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

InvalidNextToken

The NextToken value is not valid.

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeTags
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeTagsResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
<DescribeTagsResult>
<Tags>
<member>
<ResourceId>my-asg</ResourceId>
<PropagateAtLaunch>true</PropagateAtLaunch>
<Value>test</Value>
<Key>environment</Key>
<ResourceType>auto-scaling-group</ResourceType>
</member>
</Tags>
</DescribeTagsResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeTagsResponse>

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

API Version 2011-01-01


89
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for .NET


• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


90
Amazon EC2 Auto Scaling API Reference
DescribeTerminationPolicyTypes

DescribeTerminationPolicyTypes
Describes the termination policies supported by Amazon EC2 Auto Scaling.

For more information, see Controlling Which Auto Scaling Instances Terminate During Scale In in the
Amazon EC2 Auto Scaling User Guide.

Response Elements
The following element is returned by the service.

TerminationPolicyTypes.member.N

The termination policies supported by Amazon EC2 Auto Scaling: OldestInstance,


OldestLaunchConfiguration, NewestInstance, ClosestToNextInstanceHour, Default,
OldestLaunchTemplate, and AllocationStrategy.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DescribeTerminationPolicyTypes
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DescribeTerminationPolicyTypesResponse xmlns="http://autoscaling.amazonaws.com/
doc/2011-01-01/">
<DescribeTerminationPolicyTypesResult>
<TerminationPolicyTypes>
<member>AllocationStrategy</member>
<member>ClosestToNextInstanceHour</member>
<member>Default</member>
<member>NewestInstance</member>
<member>OldestInstance</member>

API Version 2011-01-01


91
Amazon EC2 Auto Scaling API Reference
See Also

<member>OldestLaunchConfiguration</member>
<member>OldestLaunchTemplate</member>
</TerminationPolicyTypes>
</DescribeTerminationPolicyTypesResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DescribeTerminationPolicyTypesResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


92
Amazon EC2 Auto Scaling API Reference
DetachInstances

DetachInstances
Removes one or more instances from the specified Auto Scaling group.

After the instances are detached, you can manage them independent of the Auto Scaling group.

If you do not specify the option to decrement the desired capacity, Amazon EC2 Auto Scaling launches
instances to replace the ones that are detached.

If there is a Classic Load Balancer attached to the Auto Scaling group, the instances are deregistered
from the load balancer. If there are target groups attached to the Auto Scaling group, the instances are
deregistered from the target groups.

For more information, see Detach EC2 Instances from Your Auto Scaling Group in the Amazon EC2 Auto
Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
InstanceIds.member.N

The IDs of the instances. You can specify up to 20 instances.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ShouldDecrementDesiredCapacity

Indicates whether the Auto Scaling group decrements the desired capacity value by the number of
instances detached.

Type: Boolean

Required: Yes

Response Elements
The following element is returned by the service.

API Version 2011-01-01


93
Amazon EC2 Auto Scaling API Reference
Errors

Activities.member.N

The activities related to detaching the instances from the Auto Scaling group.

Type: Array of Activity (p. 146) objects

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DetachInstances
&AutoScalingGroupName=my-asg
&InstanceIds.member.1=i-12345678
&ShouldDecrementDesiredCapacity=true
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<DetachInstancesResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
<DetachInstancesResult>
<Activities>
<member>
<ActivityId>12345678-1234-1234-1234-123456789012</ActivityId>
<AutoScalingGroupName>my-asg</AutoScalingGroupName>
<Description>Detaching EC2 instance: i-12345678</Description>
<Cause>At 2015-06-14T00:07:30Z instance i-12345678 was detached in response to a
user request, shrinking the capacity from 4 to 3.</Cause>
<Progress>50</Progress>
<StartTime>2015-06-14T00:07:30.280Z</StartTime>
<Details>{"Availability Zone":"us-east-1a","SubnetID":"subnet-12345678"}</Details>
<StatusCode>InProgress</StatusCode>
</member>
</Activities>
</DetachInstancesResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</DetachInstancesResponse>

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS Command Line Interface

API Version 2011-01-01


94
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for .NET


• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


95
Amazon EC2 Auto Scaling API Reference
DetachLoadBalancers

DetachLoadBalancers
Detaches one or more Classic Load Balancers from the specified Auto Scaling group.

This operation detaches only Classic Load Balancers. If you have Application Load Balancers or Network
Load Balancers, use DetachLoadBalancerTargetGroups (p. 98) instead.

When you detach a load balancer, it enters the Removing state while deregistering the instances in the
group. When all instances are deregistered, then you can no longer describe the load balancer using
DescribeLoadBalancers (p. 66). The instances remain running.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
LoadBalancerNames.member.N

The names of the load balancers. You can specify up to 10 load balancers.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DetachLoadBalancers

API Version 2011-01-01


96
Amazon EC2 Auto Scaling API Reference
See Also

&AutoScalingGroupName=my-asg
&LoadBalancerNames.member.1=my-lb
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


97
Amazon EC2 Auto Scaling API Reference
DetachLoadBalancerTargetGroups

DetachLoadBalancerTargetGroups
Detaches one or more target groups from the specified Auto Scaling group.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
TargetGroupARNs.member.N

The Amazon Resource Names (ARN) of the target groups. You can specify up to 10 target groups.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 511.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3

API Version 2011-01-01


98
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for Python


• AWS SDK for Ruby V2

API Version 2011-01-01


99
Amazon EC2 Auto Scaling API Reference
DisableMetricsCollection

DisableMetricsCollection
Disables group metrics for the specified Auto Scaling group.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
Metrics.member.N

One or more of the following metrics. If you omit this parameter, all metrics are disabled.
• GroupMinSize
• GroupMaxSize
• GroupDesiredCapacity
• GroupInServiceInstances
• GroupPendingInstances
• GroupStandbyInstances
• GroupTerminatingInstances
• GroupTotalInstances

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

API Version 2011-01-01


100
Amazon EC2 Auto Scaling API Reference
Example

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=DisableMetricsCollection
&AutoScalingGroupName=my-asg
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


101
Amazon EC2 Auto Scaling API Reference
EnableMetricsCollection

EnableMetricsCollection
Enables group metrics for the specified Auto Scaling group. For more information, see Monitoring Your
Auto Scaling Groups and Instances in the Amazon EC2 Auto Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
Granularity

The granularity to associate with the metrics to collect. The only valid value is 1Minute.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
Metrics.member.N

One or more of the following metrics. If you omit this parameter, all metrics are enabled.
• GroupMinSize
• GroupMaxSize
• GroupDesiredCapacity
• GroupInServiceInstances
• GroupPendingInstances
• GroupStandbyInstances
• GroupTerminatingInstances
• GroupTotalInstances

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

API Version 2011-01-01


102
Amazon EC2 Auto Scaling API Reference
Example

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=EnableMetricsCollection
&AutoScalingGroupName=my-asg
&Granularity=1Minute
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


103
Amazon EC2 Auto Scaling API Reference
EnterStandby

EnterStandby
Moves the specified instances into the standby state.

If you choose to decrement the desired capacity of the Auto Scaling group, the instances can enter
standby as long as the desired capacity of the Auto Scaling group after the instances are placed into
standby is equal to or greater than the minimum capacity of the group.

If you choose not to decrement the desired capacity of the Auto Scaling group, the Auto Scaling group
launches new instances to replace the instances on standby.

For more information, see Temporarily Removing Instances from Your Auto Scaling Group in the Amazon
EC2 Auto Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
InstanceIds.member.N

The IDs of the instances. You can specify up to 20 instances.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ShouldDecrementDesiredCapacity

Indicates whether to decrement the desired capacity of the Auto Scaling group by the number of
instances moved to Standby mode.

Type: Boolean

Required: Yes

Response Elements
The following element is returned by the service.

Activities.member.N

The activities related to moving instances into Standby mode.

API Version 2011-01-01


104
Amazon EC2 Auto Scaling API Reference
Errors

Type: Array of Activity (p. 146) objects

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=EnterStandby
&AutoScalingGroupName=my-asg
&InstanceIds.member.1=i-12345678
&ShouldDecrementDesiredCapacity=true
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<EnterStandbyResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
<EnterStandbyResult>
<Activities>
<member>
<ActivityId>12345678-1234-1234-1234-123456789012</ActivityId>
<AutoScalingGroupName>my-asg</AutoScalingGroupName>
<Description>Moving EC2 instance to Standby: i-12345678</Description>
<Progress>50</Progress>
<Cause>At 2015-06-13T22:35:50Z instance i-5b73d709 was moved to standby in response
to a user request, shrinking the capacity from 4 to 3.</Cause>
<StartTime>2015-06-13T22:35:50.884Z</StartTime>
<Details>{"Availability Zone":"us-east-1a","SubnetID":"subnet-12345678"}</Details>
<StatusCode>InProgress</StatusCode>
</member>
</Activities>
</EnterStandbyResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</EnterStandbyResponse>

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++

API Version 2011-01-01


105
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for Go


• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


106
Amazon EC2 Auto Scaling API Reference
ExecutePolicy

ExecutePolicy
Executes the specified policy.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
BreachThreshold

The breach threshold for the alarm.

Conditional: This parameter is required if the policy type is StepScaling and not supported
otherwise.

Type: Double

Required: No
HonorCooldown

Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to complete before
executing the policy.

This parameter is not supported if the policy type is StepScaling or TargetTrackingScaling.

For more information, see Scaling Cooldowns in the Amazon EC2 Auto Scaling User Guide.

Type: Boolean

Required: No
MetricValue

The metric value to compare to BreachThreshold. This enables you to execute a policy of type
StepScaling and determine which step adjustment to use. For example, if the breach threshold is
50 and you want to use a step adjustment with a lower bound of 0 and an upper bound of 10, you
can set the metric value to 59.

If you specify a metric value that doesn't correspond to a step adjustment for the policy, the call
returns an error.

Conditional: This parameter is required if the policy type is StepScaling and not supported
otherwise.

Type: Double

Required: No

API Version 2011-01-01


107
Amazon EC2 Auto Scaling API Reference
Errors

PolicyName

The name or ARN of the 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

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ScalingActivityInProgress

The operation can't be performed because there are scaling activities in progress.

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


108
Amazon EC2 Auto Scaling API Reference
ExitStandby

ExitStandby
Moves the specified instances out of the standby state.

After you put the instances back in service, the desired capacity is incremented.

For more information, see Temporarily Removing Instances from Your Auto Scaling Group in the Amazon
EC2 Auto Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
InstanceIds.member.N

The IDs of the instances. You can specify up to 20 instances.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Response Elements
The following element is returned by the service.

Activities.member.N

The activities related to moving instances out of Standby mode.

Type: Array of Activity (p. 146) objects

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

API Version 2011-01-01


109
Amazon EC2 Auto Scaling API Reference
Example

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=ExitStandby
&AutoScalingGroupName=my-asg
&InstanceIds.member.1=i-5b73d709
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<ExitStandbyResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
<ExitStandbyResult>
<Activities>
<member>
<ActivityId>12345678-1234-1234-1234-123456789012</ActivityId>
<AutoScalingGroupName>my-asg</AutoScalingGroupName>
<Description>Moving EC2 instance out of Standby: i-12345678</Description>
<Progress>30</Progress>
<Cause>At 2015-06-13T22:43:53Z instance i-5b73d709 was moved out of standby in
response to a user request, increasing the capacity from 3 to 4.</Cause>
<StartTime>2015-06-13T22:43:53.523Z</StartTime>
<Details>{"Availability Zone":"us-east-1a","SubnetID":"subnet-12345678"}</Details>
<StatusCode>PreInService</StatusCode>
</member>
</Activities>
</ExitStandbyResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</ExitStandbyResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


110
Amazon EC2 Auto Scaling API Reference
PutLifecycleHook

PutLifecycleHook
Creates or updates a lifecycle hook for the specified Auto Scaling group.

A lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an instance when the instance
launches (before it is put into service) or as the instance terminates (before it is fully terminated).

This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:

1. (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda
function when Amazon EC2 Auto Scaling launches or terminates instances.
2. (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue
or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to
the target.
3. Create the lifecycle hook. Specify whether the hook is used when the instances launch or
terminate.
4. If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state
using RecordLifecycleActionHeartbeat (p. 125).
5. If you finish before the timeout period ends, complete the lifecycle action using
CompleteLifecycleAction (p. 16).

For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks in the Amazon EC2 Auto Scaling
User Guide.

If you exceed your maximum limit of lifecycle hooks, which by default is 50 per Auto Scaling group, the
call fails.

You can view the lifecycle hooks for an Auto Scaling group using DescribeLifecycleHooks (p. 62). If you
are no longer using a lifecycle hook, you can delete it using DeleteLifecycleHook (p. 37).

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
DefaultResult

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if
an unexpected failure occurs. This parameter can be either CONTINUE or ABANDON. The default value
is ABANDON.

Type: String

Required: No

API Version 2011-01-01


111
Amazon EC2 Auto Scaling API Reference
Request Parameters

HeartbeatTimeout

The maximum time, in seconds, that can elapse before the lifecycle hook times out. The range is
from 30 to 7200 seconds. The default value is 3600 seconds (1 hour).

If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the action that you specified
in the DefaultResult parameter. You can prevent the lifecycle hook from timing out by calling
RecordLifecycleActionHeartbeat (p. 125).

Type: Integer

Required: No
LifecycleHookName

The name of the lifecycle hook.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [A-Za-z0-9\-_\/]+

Required: Yes
LifecycleTransition

The instance state to which you want to attach the lifecycle hook. The valid values are:
• autoscaling:EC2_INSTANCE_LAUNCHING
• autoscaling:EC2_INSTANCE_TERMINATING

Conditional: This parameter is required for new lifecycle hooks, but optional when updating existing
hooks.

Type: String

Required: No
NotificationMetadata

Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message
to the notification target.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1023.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
NotificationTargetARN

The ARN of the notification target that Amazon EC2 Auto Scaling uses to notify you when an
instance is in the transition state for the lifecycle hook. This target can be either an SQS queue or an
SNS topic.

If you specify an empty string, this overrides the current ARN.

This operation uses the JSON format when sending notifications to an Amazon SQS queue, and an
email key-value pair format when sending notifications to an Amazon SNS topic.

API Version 2011-01-01


112
Amazon EC2 Auto Scaling API Reference
Errors

When you specify a notification target, Amazon EC2 Auto Scaling sends it a test
message. Test messages contain the following additional key-value pair: "Event":
"autoscaling:TEST_NOTIFICATION".

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
RoleARN

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification
target, for example, an Amazon SNS topic or an Amazon SQS queue.

Conditional: This parameter is required for new lifecycle hooks, but optional when updating existing
hooks.

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

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

LimitExceeded

You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example,
Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see
DescribeAccountLimits (p. 47).

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Example
Sample Request

http://autoscaling.amazonaws.com/?Action=PutLifecycleHook
&LifecycleHookName=my-launch-hook
&AutoScalingGroupName=my-asg
&LifecycleTransition=autoscaling:EC2_INSTANCE_LAUNCHING
&NotificationTargetARN=arn:aws:sqs:us-east-1:123456789012:my-queue
&RoleARN=arn:aws:iam::123456789012:role/my-auto-scaling-role
&Version=2011-01-01

API Version 2011-01-01


113
Amazon EC2 Auto Scaling API Reference
See Also

&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


114
Amazon EC2 Auto Scaling API Reference
PutNotificationConfiguration

PutNotificationConfiguration
Configures an Auto Scaling group to send notifications when specified events take place. Subscribers to
the specified topic can have messages delivered to an endpoint such as a web server or an email address.

This configuration overwrites any existing configuration.

For more information, see Getting Amazon SNS Notifications When Your Auto Scaling Group Scales in
the Amazon EC2 Auto Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
NotificationTypes.member.N

The type of event that causes the notification to be sent. For more information about notification
types supported by Amazon EC2 Auto Scaling, see DescribeAutoScalingNotificationTypes (p. 57).

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
TopicARN

The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon SNS) topic.

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

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

LimitExceeded

You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example,
Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see
DescribeAccountLimits (p. 47).

API Version 2011-01-01


115
Amazon EC2 Auto Scaling API Reference
Example

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ServiceLinkedRoleFailure

The service-linked role is not yet ready for use.

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=PutNotificationConfiguration
&AutoScalingGroupName=my-asg
&TopicARN=arn:aws:us-east-1:123456789012:my-sns-topic
&NotificationTypes.member.1=autoscaling:EC2_INSTANCE_LAUNCH
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


116
Amazon EC2 Auto Scaling API Reference
PutScalingPolicy

PutScalingPolicy
Creates or updates a scaling policy for an Auto Scaling group. To update an existing scaling policy, use
the existing policy name and set the parameters to change. Any existing parameter not changed in an
update to an existing policy is not changed in this update request.

For more information about using scaling policies to scale your Auto Scaling group automatically, see
Dynamic Scaling in the Amazon EC2 Auto Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AdjustmentType

Specifies whether the ScalingAdjustment parameter is an absolute number or a percentage


of the current capacity. The valid values are ChangeInCapacity, ExactCapacity, and
PercentChangeInCapacity.

Valid only if the policy type is StepScaling or SimpleScaling. For more information, see Scaling
Adjustment Types in the Amazon EC2 Auto Scaling User Guide.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
AutoScalingGroupName

The name of the Auto Scaling group.

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
Cooldown

The amount of time, in seconds, after a scaling activity completes before any further dynamic
scaling activities can start. If this parameter is not specified, the default cooldown period for the
group applies.

Valid only if the policy type is SimpleScaling. For more information, see Scaling Cooldowns in the
Amazon EC2 Auto Scaling User Guide.

Type: Integer

Required: No
EstimatedInstanceWarmup

The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch
metrics. The default is to use the value specified for the default cooldown period for the group.

Valid only if the policy type is StepScaling or TargetTrackingScaling.

API Version 2011-01-01


117
Amazon EC2 Auto Scaling API Reference
Request Parameters

Type: Integer

Required: No
MetricAggregationType

The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and
Average. If the aggregation type is null, the value is treated as Average.

Valid only if the policy type is StepScaling.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
MinAdjustmentMagnitude

The minimum number of instances to scale. If the value of AdjustmentType is


PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto
Scaling group by at least this many instances. Otherwise, the error is ValidationError.

This property replaces the MinAdjustmentStep property. For example, suppose that you
create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a
MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed,
25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon
EC2 Auto Scaling scales out the group by 2 instances.

Valid only if the policy type is SimpleScaling or StepScaling.

Type: Integer

Required: No
MinAdjustmentStep

This parameter has been deprecated.

Available for backward compatibility. Use MinAdjustmentMagnitude instead.

Type: Integer

Required: No
PolicyName

The name of the policy.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
PolicyType

The policy type. The valid values are SimpleScaling, StepScaling, and
TargetTrackingScaling. If the policy type is null, the value is treated as SimpleScaling.

Type: String

API Version 2011-01-01


118
Amazon EC2 Auto Scaling API Reference
Response Elements

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ScalingAdjustment

The amount by which a simple scaling policy scales the Auto Scaling group in response to an alarm
breach. The adjustment is based on the value that you specified in the AdjustmentType parameter
(either an absolute number or a percentage). A positive value adds to the current capacity and a
negative value subtracts from the current capacity. For exact capacity, you must specify a positive
value.

Conditional: If you specify SimpleScaling for the policy type, you must specify this parameter.
(Not used with any other policy type.)

Type: Integer

Required: No
StepAdjustments.member.N

A set of adjustments that enable you to scale based on the size of the alarm breach.

Conditional: If you specify StepScaling for the policy type, you must specify this parameter. (Not
used with any other policy type.)

Type: Array of StepAdjustment (p. 202) objects

Required: No
TargetTrackingConfiguration

A target tracking scaling policy. Includes support for predefined or customized metrics.

Conditional: If you specify TargetTrackingScaling for the policy type, you must specify this
parameter. (Not used with any other policy type.)

Type: TargetTrackingConfiguration (p. 209) object

Required: No

Response Elements
The following elements are returned by the service.

Alarms.member.N

The CloudWatch alarms created for the target tracking scaling policy.

Type: Array of Alarm (p. 149) objects


PolicyARN

The Amazon Resource Name (ARN) of the 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]*

API Version 2011-01-01


119
Amazon EC2 Auto Scaling API Reference
Errors

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

LimitExceeded

You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example,
Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see
DescribeAccountLimits (p. 47).

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ServiceLinkedRoleFailure

The service-linked role is not yet ready for use.

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=PutScalingPolicy
&AutoScalingGroupName=my-asg
&ScalingAdjustment=30
&AdjustmentType=PercentChangeInCapacity
&PolicyName=my-scaleout-policy
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<PutScalingPolicyResponse xmlns="http://autoscaling.amazonaws.com/doc/2011-01-01/">
<PutScalingPolicyResult>
<PolicyARN>arn:aws:autoscaling:us-
east-1:123456789012:scalingPolicy:b0dcf5e8-02e6-4e31-9719-0675dEXAMPLE:autoScalingGroupName/
my-asg:policyName/my-scaleout-policy</PolicyARN>
</PutScalingPolicyResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</PutScalingPolicyResponse>

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

API Version 2011-01-01


120
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


121
Amazon EC2 Auto Scaling API Reference
PutScheduledUpdateGroupAction

PutScheduledUpdateGroupAction
Creates or updates a scheduled scaling action for an Auto Scaling group. If you leave a parameter
unspecified when updating a scheduled scaling action, the corresponding value remains unchanged.

For more information, see Scheduled Scaling in the Amazon EC2 Auto Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
DesiredCapacity

The number of EC2 instances that should be running in the Auto Scaling group.

Type: Integer

Required: No
EndTime

The date and time for the recurring schedule to end. Amazon EC2 Auto Scaling does not perform the
action after this time.

Type: Timestamp

Required: No
MaxSize

The maximum number of instances in the Auto Scaling group.

Type: Integer

Required: No
MinSize

The minimum number of instances in the Auto Scaling group.

Type: Integer

Required: No
Recurrence

The recurring schedule for this action, in Unix cron syntax format. This format consists of five fields
separated by white spaces: [Minute] [Hour] [Day_of_Month] [Month_of_Year] [Day_of_Week]. The
value must be in quotes (for example, "30 0 1 1,6,12 *"). For more information about this
format, see Crontab.

API Version 2011-01-01


122
Amazon EC2 Auto Scaling API Reference
Errors

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when
the recurring action starts and stops.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ScheduledActionName

The name of this scaling action.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
StartTime

The date and time for this action to start, in YYYY-MM-DDThh:mm:ssZ format in UTC/GMT only and
in quotes (for example, "2019-06-01T00:00:00Z").

If you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs the action at this
time, and then performs the action based on the specified recurrence.

If you try to schedule your action in the past, Amazon EC2 Auto Scaling returns an error message.

Type: Timestamp

Required: No
Time

This parameter is no longer used.

Type: Timestamp

Required: No

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

AlreadyExists

You already have an Auto Scaling group or launch configuration with this name.

HTTP Status Code: 400


LimitExceeded

You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example,
Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see
DescribeAccountLimits (p. 47).

HTTP Status Code: 400

API Version 2011-01-01


123
Amazon EC2 Auto Scaling API Reference
Examples

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

Examples
Example 1: Schedule based on a specific date and time
Sample Request

https://autoscaling.amazonaws.com/?Action=PutScheduledUpdateGroupAction
&AutoScalingGroupName=my-asg
&ScheduledActionName=scaleout
&StartTime=2019-05-25T08:00:00Z
&DesiredCapacity=3
&Version=2011-01-01
&AUTHPARAMS

Example 2: Recurring Schedule


Sample Request

https://autoscaling.amazonaws.com/?Action="PutScheduledUpdateGroupAction
&AutoScalingGroupName=my-asg
&ScheduledActionName=scaleout-schedule-year
&Recurrence="30 0 1 1,6,12 *"
&DesiredCapacity=3
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


124
Amazon EC2 Auto Scaling API Reference
RecordLifecycleActionHeartbeat

RecordLifecycleActionHeartbeat
Records a heartbeat for the lifecycle action associated with the specified token or instance. This extends
the timeout by the length of time defined using PutLifecycleHook (p. 111).

This step is a part of the procedure for adding a lifecycle hook to an Auto Scaling group:

1. (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda
function when Amazon EC2 Auto Scaling launches or terminates instances.
2. (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue
or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to
the target.
3. Create the lifecycle hook. Specify whether the hook is used when the instances launch or terminate.
4. If you need more time, record the lifecycle action heartbeat to keep the instance in a pending
state.
5. If you finish before the timeout period ends, complete the lifecycle action.

For more information, see Auto Scaling Lifecycle in the Amazon EC2 Auto Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
InstanceId

The ID of the instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
LifecycleActionToken

A token that uniquely identifies a specific lifecycle action associated with an instance. Amazon EC2
Auto Scaling sends this token to the notification target that you specified when you created the
lifecycle hook.

Type: String

Length Constraints: Fixed length of 36.

Required: No

API Version 2011-01-01


125
Amazon EC2 Auto Scaling API Reference
Errors

LifecycleHookName

The name of the lifecycle hook.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [A-Za-z0-9\-_\/]+

Required: Yes

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


126
Amazon EC2 Auto Scaling API Reference
ResumeProcesses

ResumeProcesses
Resumes the specified suspended automatic scaling processes, or all suspended process, for the specified
Auto Scaling group.

For more information, see Suspending and Resuming Scaling Processes in the Amazon EC2 Auto Scaling
User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
ScalingProcesses.member.N

One or more of the following processes. If you omit this parameter, all processes are specified.
• Launch
• Terminate
• HealthCheck
• ReplaceUnhealthy
• AZRebalance
• AlarmNotification
• ScheduledActions
• AddToLoadBalancer

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500

API Version 2011-01-01


127
Amazon EC2 Auto Scaling API Reference
Example

ResourceInUse

The operation can't be performed because the resource is in use.

HTTP Status Code: 400

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=ResumeProcesses
&AutoScalingGroupName=my-asg
&ScalingProcesses.member.1=AlarmNotification
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


128
Amazon EC2 Auto Scaling API Reference
SetDesiredCapacity

SetDesiredCapacity
Sets the size of the specified Auto Scaling group.

For more information about desired capacity, see What Is Amazon EC2 Auto Scaling? in the Amazon EC2
Auto Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
DesiredCapacity

The number of EC2 instances that should be running in the Auto Scaling group.

Type: Integer

Required: Yes
HonorCooldown

Indicates whether Amazon EC2 Auto Scaling waits for the cooldown period to complete before
initiating a scaling activity to set your Auto Scaling group to its new capacity. By default, Amazon
EC2 Auto Scaling does not honor the cooldown period during manual scaling activities.

Type: Boolean

Required: No

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ScalingActivityInProgress

The operation can't be performed because there are scaling activities in progress.

HTTP Status Code: 400

API Version 2011-01-01


129
Amazon EC2 Auto Scaling API Reference
Example

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=SetDesiredCapacity
&AutoScalingGroupName=my-asg
&HonorCooldown=false
&DesiredCapacity=2
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


130
Amazon EC2 Auto Scaling API Reference
SetInstanceHealth

SetInstanceHealth
Sets the health status of the specified instance.

For more information, see Health Checks for Auto Scaling Instances in the Amazon EC2 Auto Scaling User
Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

HealthStatus

The health status of the instance. Set to Healthy to have the instance remain in service. Set to
Unhealthy to have the instance be out of service. Amazon EC2 Auto Scaling terminates and
replaces the unhealthy instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
InstanceId

The ID of the instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
ShouldRespectGracePeriod

If the Auto Scaling group of the specified instance has a HealthCheckGracePeriod specified
for the group, by default, this call respects the grace period. Set this to False, to have the call not
respect the grace period associated with the group.

For more information about the health check grace period, see CreateAutoScalingGroup (p. 19).

Type: Boolean

Required: No

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

API Version 2011-01-01


131
Amazon EC2 Auto Scaling API Reference
Example

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=SetInstanceHealth
&InstanceId=i-12345678
&HealthStatus=Unhealthy
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


132
Amazon EC2 Auto Scaling API Reference
SetInstanceProtection

SetInstanceProtection
Updates the instance protection settings of the specified instances.

For more information about preventing instances that are part of an Auto Scaling group from
terminating on scale in, see Instance Protection in the Amazon EC2 Auto Scaling User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
InstanceIds.member.N

One or more instance IDs.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
ProtectedFromScaleIn

Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when
scaling in.

Type: Boolean

Required: Yes

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

LimitExceeded

You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example,
Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see
DescribeAccountLimits (p. 47).

HTTP Status Code: 400


ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

API Version 2011-01-01


133
Amazon EC2 Auto Scaling API Reference
Example

HTTP Status Code: 500

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=SetInstanceProtection
&AutoScalingGroupName=my-asg
&InstanceIds.member.1=i-12345678
&ProtectedFromScaleIn=false
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


134
Amazon EC2 Auto Scaling API Reference
SuspendProcesses

SuspendProcesses
Suspends the specified automatic scaling processes, or all processes, for the specified Auto Scaling
group.

If you suspend either the Launch or Terminate process types, it can prevent other process types from
functioning properly.

To resume processes that have been suspended, use ResumeProcesses (p. 127).

For more information, see Suspending and Resuming Scaling Processes in the Amazon EC2 Auto Scaling
User Guide.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
ScalingProcesses.member.N

One or more of the following processes. If you omit this parameter, all processes are specified.
• Launch
• Terminate
• HealthCheck
• ReplaceUnhealthy
• AZRebalance
• AlarmNotification
• ScheduledActions
• AddToLoadBalancer

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

API Version 2011-01-01


135
Amazon EC2 Auto Scaling API Reference
Example

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ResourceInUse

The operation can't be performed because the resource is in use.

HTTP Status Code: 400

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=SuspendProcesses
&AutoScalingGroupName=my-asg
&ScalingProcesses.member.1=AlarmNotification
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


136
Amazon EC2 Auto Scaling API Reference
TerminateInstanceInAutoScalingGroup

TerminateInstanceInAutoScalingGroup
Terminates the specified instance and optionally adjusts the desired group size.

This call simply makes a termination request. The instance is not terminated immediately.

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

InstanceId

The ID of the instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
ShouldDecrementDesiredCapacity

Indicates whether terminating the instance also decrements the size of the Auto Scaling group.

Type: Boolean

Required: Yes

Response Elements
The following element is returned by the service.

Activity

A scaling activity.

Type: Activity (p. 146) object

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ScalingActivityInProgress

The operation can't be performed because there are scaling activities in progress.

HTTP Status Code: 400

API Version 2011-01-01


137
Amazon EC2 Auto Scaling API Reference
Example

Example
Sample Request

https://autoscaling.amazonaws.com/?Action=TerminateInstanceInAutoScalingGroup
&InstanceId=i-12345678
&ShouldDecrementDesiredCapacity=true
&Version=2011-01-01
&AUTHPARAMS

Sample Response

<TerminateInstanceInAutoScalingGroupResponse xmlns="http://autoscaling.amazonaws.com/
doc/2011-01-01/">
<TerminateInstanceInAutoScalingGroupResult>
<Activity>
<ActivityId>12345678-1234-1234-1234-123456789012</ActivityId>
<Description>Terminating EC2 instance: i-12345678</Description>
<Progress>0</Progress>
<Cause>At 2015-06-14T00:07:30Z instance i-12345678 was taken out of service in
response to a user request, shrinking the capacity from 4 to 3.</Cause>
<StartTime>2015-06-14T00:07:30.280Z</StartTime>
<Details>{"Availability Zone":"us-east-1a","SubnetID":"subnet-12345678"}</Details>
<StatusCode>InProgress</StatusCode>
</Activity>
</TerminateInstanceInAutoScalingGroupResult>
<ResponseMetadata>
<RequestId>7c6e177f-f082-11e1-ac58-3714bEXAMPLE</RequestId>
</ResponseMetadata>
</TerminateInstanceInAutoScalingGroupResponse>

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


138
Amazon EC2 Auto Scaling API Reference
UpdateAutoScalingGroup

UpdateAutoScalingGroup
Updates the configuration for the specified Auto Scaling group.

To update an Auto Scaling group, specify the name of the group and the parameter that you want to
change. Any parameters that you don't specify are not changed by this update request. The new settings
take effect on any scaling activities after this call returns.

If you associate a new launch configuration or template with an Auto Scaling group, all new instances
will get the updated configuration. Existing instances continue to run with the configuration that they
were originally launched with. When you update a group to specify a mixed instances policy instead of
a launch configuration or template, existing instances may be replaced to match the new purchasing
options that you specified in the policy. For example, if the group currently has 100% On-Demand
capacity and the policy specifies 50% Spot capacity, this means that half of your instances will be
gradually terminated and relaunched as Spot Instances. When replacing instances, Amazon EC2 Auto
Scaling launches new instances before terminating the old ones, so that updating your group does not
compromise the performance or availability of your application.

Note the following about changing DesiredCapacity, MaxSize, or MinSize:

• If a scale-in event occurs as a result of a new DesiredCapacity value that is lower than the current
size of the group, the Auto Scaling group uses its termination policy to determine which instances to
terminate.
• If you specify a new value for MinSize without specifying a value for DesiredCapacity, and the
new MinSize is larger than the current size of the group, this sets the group's DesiredCapacity to
the new MinSize value.
• If you specify a new value for MaxSize without specifying a value for DesiredCapacity, and the
new MaxSize is smaller than the current size of the group, this sets the group's DesiredCapacity to
the new MaxSize value.

To see which parameters have been set, use DescribeAutoScalingGroups (p. 51). You can also view the
scaling policies for an Auto Scaling group using DescribePolicies (p. 76). If the group has scaling policies,
you can update them using PutScalingPolicy (p. 117).

Request Parameters
For information about the parameters that are common to all actions, see Common
Parameters (p. 210).

AutoScalingGroupName

The name of the Auto Scaling group.

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
AvailabilityZones.member.N

One or more Availability Zones for the group.

Type: Array of strings

Array Members: Minimum number of 1 item.

API Version 2011-01-01


139
Amazon EC2 Auto Scaling API Reference
Request Parameters

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
DefaultCooldown

The amount of time, in seconds, after a scaling activity completes before another scaling activity can
start. The default value is 300. This cooldown period is not used when a scaling-specific cooldown is
specified.

Cooldown periods are not supported for target tracking scaling policies, step scaling policies, or
scheduled scaling. For more information, see Scaling Cooldowns in the Amazon EC2 Auto Scaling
User Guide.

Type: Integer

Required: No
DesiredCapacity

The number of EC2 instances that should be running in the Auto Scaling group. This number must
be greater than or equal to the minimum size of the group and less than or equal to the maximum
size of the group.

Type: Integer

Required: No
HealthCheckGracePeriod

The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health
status of an EC2 instance that has come into service. The default value is 0.

For more information, see Health Check Grace Period in the Amazon EC2 Auto Scaling User Guide.

Conditional: This parameter is required if you are adding an ELB health check.

Type: Integer

Required: No
HealthCheckType

The service to use for the health checks. The valid values are EC2 and ELB. If you configure an Auto
Scaling group to use ELB health checks, it considers the instance unhealthy if it fails either the EC2
status checks or the load balancer health checks.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
LaunchConfigurationName

The name of the launch configuration. If you specify LaunchConfigurationName in your update
request, you can't specify LaunchTemplate or MixedInstancesPolicy.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1600.

API Version 2011-01-01


140
Amazon EC2 Auto Scaling API Reference
Request Parameters

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
LaunchTemplate

The launch template and version to use to specify the updates. If you specify LaunchTemplate in
your update request, you can't specify LaunchConfigurationName or MixedInstancesPolicy.

Type: LaunchTemplateSpecification (p. 179) object

Required: No
MaxSize

The maximum size of the Auto Scaling group.

Type: Integer

Required: No
MinSize

The minimum size of the Auto Scaling group.

Type: Integer

Required: No
MixedInstancesPolicy

An embedded object that specifies a mixed instances policy.

In your call to UpdateAutoScalingGroup, you can make changes to the policy that is specified. All
optional parameters are left unchanged if not specified.

For more information, see Auto Scaling Groups with Multiple Instance Types and Purchase Options in
the Amazon EC2 Auto Scaling User Guide.

Type: MixedInstancesPolicy (p. 191) object

Required: No
NewInstancesProtectedFromScaleIn

Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto
Scaling when scaling in.

For more information about preventing instances from terminating on scale in, see Instance
Protection in the Amazon EC2 Auto Scaling User Guide.

Type: Boolean

Required: No
PlacementGroup

The name of the placement group into which to launch your instances, if any. A placement group
is a logical grouping of instances within a single Availability Zone. You cannot specify multiple
Availability Zones and a placement group. For more information, see Placement Groups in the
Amazon EC2 User Guide for Linux Instances.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

API Version 2011-01-01


141
Amazon EC2 Auto Scaling API Reference
Errors

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ServiceLinkedRoleARN

The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call
other AWS services on your behalf. For more information, see Service-Linked Roles in the Amazon
EC2 Auto Scaling User Guide.

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
TerminationPolicies.member.N

A standalone termination policy or a list of termination policies used to select the instance to
terminate. The policies are executed in the order that they are listed.

For more information, see Controlling Which Instances Auto Scaling Terminates During Scale In in
the Amazon EC2 Auto Scaling User Guide.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
VPCZoneIdentifier

A comma-separated list of subnet IDs for virtual private cloud (VPC).

If you specify VPCZoneIdentifier with AvailabilityZones, the subnets that you specify for
this parameter must reside in those Availability Zones.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2047.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

Errors
For information about the errors that are common to all actions, see Common Errors (p. 212).

ResourceContention

You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto
Scaling group, instance, or load balancer).

HTTP Status Code: 500


ScalingActivityInProgress

The operation can't be performed because there are scaling activities in progress.

API Version 2011-01-01


142
Amazon EC2 Auto Scaling API Reference
Examples

HTTP Status Code: 400


ServiceLinkedRoleFailure

The service-linked role is not yet ready for use.

HTTP Status Code: 500

Examples
Example 1: Update an existing Auto Scaling group with an
Elastic Load Balancing health check
Sample Request

https://autoscaling.amazonaws.com/?Action=UpdateAutoScalingGroup
&HealthCheckType=ELB
&HealthCheckGracePeriod=300
&AutoScalingGroupName=my-asg
&Version=2011-01-01
&AUTHPARAMS

Example 2: Update an existing Auto Scaling group with a new


Availability Zone
Sample Request

https://autoscaling.amazonaws.com/?Action=UpdateAutoScalingGroup
&AutoScalingGroupName=my-asg-lbs
&AvailabilityZones.member.1=us-east-1a
&AvailabilityZones.member.2=us-east-1b
&AvailabilityZones.member.3=us-east-1c
&MinSize=3
&Version=2011-01-01
&AUTHPARAMS

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
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V2

API Version 2011-01-01


143
Amazon EC2 Auto Scaling API Reference

Data Types
The Auto Scaling API contains several data types that various actions use. This section describes each
data type in detail.
Note
The order of each element in a data type structure is not guaranteed. Applications should not
assume a particular order.

The following data types are supported:

• Activity (p. 146)


• AdjustmentType (p. 148)
• Alarm (p. 149)
• AutoScalingGroup (p. 150)
• AutoScalingInstanceDetails (p. 155)
• BlockDeviceMapping (p. 157)
• CustomizedMetricSpecification (p. 159)
• Ebs (p. 161)
• EnabledMetric (p. 163)
• FailedScheduledUpdateGroupActionRequest (p. 164)
• Filter (p. 165)
• Instance (p. 166)
• InstanceMonitoring (p. 168)
• InstancesDistribution (p. 169)
• LaunchConfiguration (p. 172)
• LaunchTemplate (p. 177)
• LaunchTemplateOverrides (p. 178)
• LaunchTemplateSpecification (p. 179)
• LifecycleHook (p. 181)
• LifecycleHookSpecification (p. 183)
• LoadBalancerState (p. 186)
• LoadBalancerTargetGroupState (p. 187)
• MetricCollectionType (p. 188)
• MetricDimension (p. 189)
• MetricGranularityType (p. 190)
• MixedInstancesPolicy (p. 191)
• NotificationConfiguration (p. 192)
• PredefinedMetricSpecification (p. 193)
• ProcessType (p. 194)
• ScalingPolicy (p. 195)
• ScheduledUpdateGroupAction (p. 198)
• ScheduledUpdateGroupActionRequest (p. 200)
• StepAdjustment (p. 202)
• SuspendedProcess (p. 204)
• Tag (p. 205)

API Version 2011-01-01


144
Amazon EC2 Auto Scaling API Reference

• TagDescription (p. 207)


• TargetTrackingConfiguration (p. 209)

API Version 2011-01-01


145
Amazon EC2 Auto Scaling API Reference
Activity

Activity
Describes scaling activity, which is a long-running process that represents a change to your Auto Scaling
group, such as changing its size or replacing an instance.

Contents
ActivityId

The ID of the activity.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
AutoScalingGroupName

The name of the Auto Scaling group.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
Cause

The reason the activity began.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1023.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
Description

A friendly, more verbose description of the activity.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
Details

The details about the activity.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
EndTime

The end time of the activity.

API Version 2011-01-01


146
Amazon EC2 Auto Scaling API Reference
See Also

Type: Timestamp

Required: No
Progress

A value between 0 and 100 that indicates the progress of the activity.

Type: Integer

Required: No
StartTime

The start time of the activity.

Type: Timestamp

Required: Yes
StatusCode

The current status of the activity.

Type: String

Valid Values: PendingSpotBidPlacement | WaitingForSpotInstanceRequestId


| WaitingForSpotInstanceId | WaitingForInstanceId | PreInService |
InProgress | WaitingForELBConnectionDraining | MidLifecycleAction |
WaitingForInstanceWarmup | Successful | Failed | Cancelled

Required: Yes
StatusMessage

A friendly, more verbose description of the activity status.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


147
Amazon EC2 Auto Scaling API Reference
AdjustmentType

AdjustmentType
Describes a policy adjustment type.

Contents
AdjustmentType

The policy adjustment type. The valid values are ChangeInCapacity, ExactCapacity, and
PercentChangeInCapacity.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


148
Amazon EC2 Auto Scaling API Reference
Alarm

Alarm
Describes an alarm.

Contents
AlarmARN

The Amazon Resource Name (ARN) of the alarm.

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
AlarmName

The name of the alarm.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


149
Amazon EC2 Auto Scaling API Reference
AutoScalingGroup

AutoScalingGroup
Describes an Auto Scaling group.

Contents
AutoScalingGroupARN

The Amazon Resource Name (ARN) of the Auto Scaling group.

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
AutoScalingGroupName

The name of the Auto Scaling group.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
AvailabilityZones.member.N

One or more Availability Zones for the group.

Type: Array of strings

Array Members: Minimum number of 1 item.

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
CreatedTime

The date and time the group was created.

Type: Timestamp

Required: Yes
DefaultCooldown

The amount of time, in seconds, after a scaling activity completes before another scaling activity can
start.

Type: Integer

Required: Yes
DesiredCapacity

The desired size of the group.

API Version 2011-01-01


150
Amazon EC2 Auto Scaling API Reference
Contents

Type: Integer

Required: Yes
EnabledMetrics.member.N

The metrics enabled for the group.

Type: Array of EnabledMetric (p. 163) objects

Required: No
HealthCheckGracePeriod

The amount of time, in seconds, that Amazon EC2 Auto Scaling waits before checking the health
status of an EC2 instance that has come into service.

Type: Integer

Required: No
HealthCheckType

The service to use for the health checks. The valid values are EC2 and ELB. If you configure an Auto
Scaling group to use ELB health checks, it considers the instance unhealthy if it fails either the EC2
status checks or the load balancer health checks.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
Instances.member.N

The EC2 instances associated with the group.

Type: Array of Instance (p. 166) objects

Required: No
LaunchConfigurationName

The name of the associated launch configuration.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
LaunchTemplate

The launch template for the group.

Type: LaunchTemplateSpecification (p. 179) object

Required: No
LoadBalancerNames.member.N

One or more load balancers associated with the group.

Type: Array of strings

API Version 2011-01-01


151
Amazon EC2 Auto Scaling API Reference
Contents

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
MaxSize

The maximum size of the group.

Type: Integer

Required: Yes
MinSize

The minimum size of the group.

Type: Integer

Required: Yes
MixedInstancesPolicy

The mixed instances policy for the group.

Type: MixedInstancesPolicy (p. 191) object

Required: No
NewInstancesProtectedFromScaleIn

Indicates whether newly launched instances are protected from termination by Amazon EC2 Auto
Scaling when scaling in.

Type: Boolean

Required: No
PlacementGroup

The name of the placement group into which to launch your instances, if any.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ServiceLinkedRoleARN

The Amazon Resource Name (ARN) of the service-linked role that the Auto Scaling group uses to call
other AWS services on your behalf.

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
Status

The current state of the group when DeleteAutoScalingGroup (p. 33) is in progress.

API Version 2011-01-01


152
Amazon EC2 Auto Scaling API Reference
See Also

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
SuspendedProcesses.member.N

The suspended processes associated with the group.

Type: Array of SuspendedProcess (p. 204) objects

Required: No
Tags.member.N

The tags for the group.

Type: Array of TagDescription (p. 207) objects

Required: No
TargetGroupARNs.member.N

The Amazon Resource Names (ARN) of the target groups for your load balancer.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 511.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
TerminationPolicies.member.N

The termination policies for the group.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
VPCZoneIdentifier

One or more subnet IDs, if applicable, separated by commas.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2047.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

API Version 2011-01-01


153
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


154
Amazon EC2 Auto Scaling API Reference
AutoScalingInstanceDetails

AutoScalingInstanceDetails
Describes an EC2 instance associated with an Auto Scaling group.

Contents
AutoScalingGroupName

The name of the Auto Scaling group for the instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
AvailabilityZone

The Availability Zone for the instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
HealthStatus

The last reported health status of this instance. "Healthy" means that the instance is healthy and
should remain in service. "Unhealthy" means that the instance is unhealthy and Amazon EC2 Auto
Scaling should terminate and replace it.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
InstanceId

The ID of the instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
LaunchConfigurationName

The launch configuration used to launch the instance. This value is not available if you attached the
instance to the Auto Scaling group.

Type: String

API Version 2011-01-01


155
Amazon EC2 Auto Scaling API Reference
See Also

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
LaunchTemplate

The launch template for the instance.

Type: LaunchTemplateSpecification (p. 179) object

Required: No
LifecycleState

The lifecycle state for the instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
ProtectedFromScaleIn

Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when
scaling in.

Type: Boolean

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


156
Amazon EC2 Auto Scaling API Reference
BlockDeviceMapping

BlockDeviceMapping
Describes a block device mapping.

Contents
DeviceName

The device name exposed to the EC2 instance (for example, /dev/sdh or xvdh). For more
information, see Device Naming on Linux Instances in the Amazon EC2 User Guide for Linux Instances.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
Ebs

The information about the Amazon EBS volume.

Type: Ebs (p. 161) object

Required: No
NoDevice

Suppresses a device mapping.

If this parameter is true for the root device, the instance might fail the EC2 health check. In that
case, Amazon EC2 Auto Scaling launches a replacement instance.

Type: Boolean

Required: No
VirtualName

The name of the virtual device (for example, ephemeral0).

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


157
Amazon EC2 Auto Scaling API Reference
See Also

API Version 2011-01-01


158
Amazon EC2 Auto Scaling API Reference
CustomizedMetricSpecification

CustomizedMetricSpecification
Represents a CloudWatch metric of your choosing for a target tracking scaling policy to use with Amazon
EC2 Auto Scaling.

To create your customized metric specification:

• Add values for each required parameter from CloudWatch. You can use an existing metric, or a new
metric that you create. To use your own metric, you must first publish the metric to CloudWatch. For
more information, see Publish Custom Metrics in the Amazon CloudWatch User Guide.
• Choose a metric that changes proportionally with capacity. The value of the metric should increase or
decrease in inverse proportion to the number of capacity units. That is, the value of the metric should
decrease when capacity increases.

For more information about CloudWatch, see Amazon CloudWatch Concepts.

Contents
Dimensions.member.N

The dimensions of the metric.

Conditional: If you published your metric with dimensions, you must specify the same dimensions in
your scaling policy.

Type: Array of MetricDimension (p. 189) objects

Required: No
MetricName

The name of the metric.

Type: String

Required: Yes
Namespace

The namespace of the metric.

Type: String

Required: Yes
Statistic

The statistic of the metric.

Type: String

Valid Values: Average | Minimum | Maximum | SampleCount | Sum

Required: Yes
Unit

The unit of the metric.

Type: String

API Version 2011-01-01


159
Amazon EC2 Auto Scaling API Reference
See Also

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


160
Amazon EC2 Auto Scaling API Reference
Ebs

Ebs
Describes an Amazon EBS volume. Used in combination with BlockDeviceMapping (p. 157).

Contents
DeleteOnTermination

Indicates whether the volume is deleted on instance termination. For Amazon EC2 Auto Scaling, the
default value is true.

Type: Boolean

Required: No
Encrypted

Specifies whether the volume should be encrypted. Encrypted EBS volumes can only be attached
to instances that support Amazon EBS encryption. For more information, see Supported Instance
Types. If your AMI uses encrypted volumes, you can also only launch it on supported instance types.
Note
If you are creating a volume from a snapshot, you cannot specify an encryption value.
Volumes that are created from encrypted snapshots are automatically encrypted, and
volumes that are created from unencrypted snapshots are automatically unencrypted. By
default, encrypted snapshots use the AWS managed CMK that is used for EBS encryption,
but you can specify a custom CMK when you create the snapshot. The ability to encrypt
a snapshot during copying also allows you to apply a new CMK to an already-encrypted
snapshot. Volumes restored from the resulting copy are only accessible using the new CMK.
Enabling encryption by default results in all EBS volumes being encrypted with the AWS
managed CMK or a customer managed CMK, whether or not the snapshot was encrypted.

For more information, see Using Encryption with EBS-Backed AMIs in the Amazon EC2 User Guide
for Linux Instances and Required CMK Key Policy for Use with Encrypted Volumes in the Amazon EC2
Auto Scaling User Guide.

Type: Boolean

Required: No
Iops

The number of I/O operations per second (IOPS) to provision for the volume. The maximum ratio
of IOPS to volume size (in GiB) is 50:1. For more information, see Amazon EBS Volume Types in the
Amazon EC2 User Guide for Linux Instances.

Conditional: This parameter is required when the volume type is io1. (Not used with standard,
gp2, st1, or sc1 volumes.)

Type: Integer

Valid Range: Minimum value of 100. Maximum value of 20000.

Required: No
SnapshotId

The snapshot ID of the volume to use.

Conditional: This parameter is optional if you specify a volume size. If you specify both SnapshotId
and VolumeSize, VolumeSize must be equal or greater than the size of the snapshot.

API Version 2011-01-01


161
Amazon EC2 Auto Scaling API Reference
See Also

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
VolumeSize

The volume size, in Gibibytes (GiB).

This can be a number from 1-1,024 for standard, 4-16,384 for io1, 1-16,384 for gp2, and
500-16,384 for st1 and sc1. If you specify a snapshot, the volume size must be equal to or larger
than the snapshot size.

Default: If you create a volume from a snapshot and you don't specify a volume size, the default is
the snapshot size.
Note
At least one of VolumeSize or SnapshotId is required.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 16384.

Required: No
VolumeType

The volume type, which can be standard for Magnetic, io1 for Provisioned IOPS SSD, gp2
for General Purpose SSD, st1 for Throughput Optimized HDD, or sc1 for Cold HDD. For more
information, see Amazon EBS Volume Types in the Amazon EC2 User Guide for Linux Instances.

Valid values: standard | io1 | gp2 | st1 | sc1

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


162
Amazon EC2 Auto Scaling API Reference
EnabledMetric

EnabledMetric
Describes an enabled metric.

Contents
Granularity

The granularity of the metric. The only valid value is 1Minute.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
Metric

One of the following metrics:


• GroupMinSize
• GroupMaxSize
• GroupDesiredCapacity
• GroupInServiceInstances
• GroupPendingInstances
• GroupStandbyInstances
• GroupTerminatingInstances
• GroupTotalInstances

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


163
Amazon EC2 Auto Scaling API Reference
FailedScheduledUpdateGroupActionRequest

FailedScheduledUpdateGroupActionRequest
Describes a scheduled action that could not be created, updated, or deleted.

Contents
ErrorCode

The error code.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ErrorMessage

The error message accompanying the error code.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ScheduledActionName

The name of the scheduled action.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


164
Amazon EC2 Auto Scaling API Reference
Filter

Filter
Describes a filter.

Contents
Name

The name of the filter. The valid values are: "auto-scaling-group", "key", "value", and
"propagate-at-launch".

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
Values.member.N

The value of the filter.

Type: Array of strings

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


165
Amazon EC2 Auto Scaling API Reference
Instance

Instance
Describes an EC2 instance.

Contents
AvailabilityZone

The Availability Zone in which the instance is running.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
HealthStatus

The last reported health status of the instance. "Healthy" means that the instance is healthy and
should remain in service. "Unhealthy" means that the instance is unhealthy and that Amazon EC2
Auto Scaling should terminate and replace it.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
InstanceId

The ID of the instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 19.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
LaunchConfigurationName

The launch configuration associated with the instance.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
LaunchTemplate

The launch template for the instance.

Type: LaunchTemplateSpecification (p. 179) object

Required: No

API Version 2011-01-01


166
Amazon EC2 Auto Scaling API Reference
See Also

LifecycleState

A description of the current lifecycle state. The Quarantined state is not used.

Type: String

Valid Values: Pending | Pending:Wait | Pending:Proceed | Quarantined |


InService | Terminating | Terminating:Wait | Terminating:Proceed |
Terminated | Detaching | Detached | EnteringStandby | Standby

Required: Yes
ProtectedFromScaleIn

Indicates whether the instance is protected from termination by Amazon EC2 Auto Scaling when
scaling in.

Type: Boolean

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


167
Amazon EC2 Auto Scaling API Reference
InstanceMonitoring

InstanceMonitoring
Describes whether detailed monitoring is enabled for the Auto Scaling instances.

Contents
Enabled

If true, detailed monitoring is enabled. Otherwise, basic monitoring is enabled.

Type: Boolean

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


168
Amazon EC2 Auto Scaling API Reference
InstancesDistribution

InstancesDistribution
Describes an instances distribution for an Auto Scaling group with MixedInstancesPolicy (p. 191).

The instances distribution specifies the distribution of On-Demand Instances and Spot Instances, the
maximum price to pay for Spot Instances, and how the Auto Scaling group allocates instance types to
fulfill On-Demand and Spot capacity.

When you update SpotAllocationStrategy, SpotInstancePools, or SpotMaxPrice, this update


action does not deploy any changes across the running Amazon EC2 instances in the group. Your existing
Spot Instances continue to run as long as the maximum price for those instances is higher than the
current Spot price. When scale out occurs, Amazon EC2 Auto Scaling launches instances based on the
new settings. When scale in occurs, Amazon EC2 Auto Scaling terminates instances according to the
group's termination policies.

Contents
OnDemandAllocationStrategy

Indicates how to allocate instance types to fulfill On-Demand capacity.

The only valid value is prioritized, which is also the default value. This strategy uses the order
of instance type overrides for the LaunchTemplate (p. 177) to define the launch priority of each
instance type. The first instance type in the array is prioritized higher than the last. If all your On-
Demand capacity cannot be fulfilled using your highest priority instance, then the Auto Scaling
groups launches the remaining capacity using the second priority instance type, and so on.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
OnDemandBaseCapacity

The minimum amount of the Auto Scaling group's capacity that must be fulfilled by On-Demand
Instances. This base portion is provisioned first as your group scales.

The default value is 0. If you leave this parameter set to 0, On-Demand Instances
are launched as a percentage of the Auto Scaling group's desired capacity, per the
OnDemandPercentageAboveBaseCapacity setting.
Note
An update to this setting means a gradual replacement of instances to maintain the
specified number of On-Demand Instances for your base capacity. When replacing
instances, Amazon EC2 Auto Scaling launches new instances before terminating the old
ones.

Type: Integer

Required: No
OnDemandPercentageAboveBaseCapacity

Controls the percentages of On-Demand Instances and Spot Instances for your additional capacity
beyond OnDemandBaseCapacity. The range is 0–100.

The default value is 100. If you leave this parameter set to 100, the percentages are 100% for On-
Demand Instances and 0% for Spot Instances.

API Version 2011-01-01


169
Amazon EC2 Auto Scaling API Reference
See Also

Note
An update to this setting means a gradual replacement of instances to maintain the
percentage of On-Demand Instances for your additional capacity above the base capacity.
When replacing instances, Amazon EC2 Auto Scaling launches new instances before
terminating the old ones.

Type: Integer

Required: No
SpotAllocationStrategy

Indicates how to allocate instances across Spot Instance pools.

If the allocation strategy is lowest-price, the Auto Scaling group launches instances using the
Spot pools with the lowest price, and evenly allocates your instances across the number of Spot
pools that you specify. If the allocation strategy is capacity-optimized, the Auto Scaling group
launches instances using Spot pools that are optimally chosen based on the available Spot capacity.

The default Spot allocation strategy for calls that you make through the API, the AWS CLI, or
the AWS SDKs is lowest-price. The default Spot allocation strategy for the AWS Management
Console is capacity-optimized.

Valid values: lowest-price | capacity-optimized

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
SpotInstancePools

The number of Spot Instance pools across which to allocate your Spot Instances. The Spot pools are
determined from the different instance types in the Overrides array of LaunchTemplate (p. 177).
The range is 1–20. The default value is 2.

Valid only when the Spot allocation strategy is lowest-price.

Type: Integer

Required: No
SpotMaxPrice

The maximum price per unit hour that you are willing to pay for a Spot Instance. If you leave the
value of this parameter blank (which is the default), the maximum Spot price is set at the On-
Demand price.

To remove a value that you previously set, include the parameter but leave the value blank.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 255.

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++

API Version 2011-01-01


170
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for Go


• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


171
Amazon EC2 Auto Scaling API Reference
LaunchConfiguration

LaunchConfiguration
Describes a launch configuration.

Contents
AssociatePublicIpAddress

For Auto Scaling groups that are running in a VPC, specifies whether to assign a public IP address to
the group's instances.

For more information, see Launching Auto Scaling Instances in a VPC in the Amazon EC2 Auto
Scaling User Guide.

Type: Boolean

Required: No
BlockDeviceMappings.member.N

A block device mapping, which specifies the block devices for the instance.

For more information, see Block Device Mapping in the Amazon EC2 User Guide for Linux Instances.

Type: Array of BlockDeviceMapping (p. 157) objects

Required: No
ClassicLinkVPCId

The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.

For more information, see ClassicLink in the Amazon EC2 User Guide for Linux Instances and Linking
EC2-Classic Instances to a VPC in the Amazon EC2 Auto Scaling User Guide.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ClassicLinkVPCSecurityGroups.member.N

The IDs of one or more security groups for the VPC specified in ClassicLinkVPCId.

For more information, see ClassicLink in the Amazon EC2 User Guide for Linux Instances and Linking
EC2-Classic Instances to a VPC in the Amazon EC2 Auto Scaling User Guide.

Type: Array of strings

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
CreatedTime

The creation date and time for the launch configuration.

Type: Timestamp

API Version 2011-01-01


172
Amazon EC2 Auto Scaling API Reference
Contents

Required: Yes
EbsOptimized

Specifies whether the launch configuration is optimized for EBS I/O (true) or not (false).

For more information, see Amazon EBS-Optimized Instances in the Amazon EC2 User Guide for Linux
Instances.

Type: Boolean

Required: No
IamInstanceProfile

The name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role
for the instance. The instance profile contains the IAM role.

For more information, see IAM Role for Applications That Run on Amazon EC2 Instances in the
Amazon EC2 Auto Scaling User Guide.

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
ImageId

The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances.

For more information, see Finding an AMI in the Amazon EC2 User Guide for Linux Instances.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
InstanceMonitoring

Controls whether instances in this group are launched with detailed (true) or basic (false)
monitoring.

For more information, see Configure Monitoring for Auto Scaling Instances in the Amazon EC2 Auto
Scaling User Guide.

Type: InstanceMonitoring (p. 168) object

Required: No
InstanceType

The instance type for the instances.

For information about available instance types, see Available Instance Types in the Amazon EC2 User
Guide for Linux Instances.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

API Version 2011-01-01


173
Amazon EC2 Auto Scaling API Reference
Contents

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
KernelId

The ID of the kernel associated with the AMI.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
KeyName

The name of the key pair.

For more information, see Amazon EC2 Key Pairs in the Amazon EC2 User Guide for Linux Instances.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
LaunchConfigurationARN

The Amazon Resource Name (ARN) of the launch configuration.

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
LaunchConfigurationName

The name of the launch configuration.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
PlacementTenancy

The tenancy of the instance, either default or dedicated. An instance with dedicated tenancy
runs on isolated, single-tenant hardware and can only be launched into a VPC.

For more information, see Instance Placement Tenancy in the Amazon EC2 Auto Scaling User Guide.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

API Version 2011-01-01


174
Amazon EC2 Auto Scaling API Reference
See Also

Required: No
RamdiskId

The ID of the RAM disk associated with the AMI.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
SecurityGroups.member.N

A list that contains the security groups to assign to the instances in the Auto Scaling group.

For more information, see Security Groups for Your VPC in the Amazon Virtual Private Cloud User
Guide.

Type: Array of strings

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
SpotPrice

The maximum hourly price to be paid for any Spot Instance launched to fulfill the request. Spot
Instances are launched when the price you specify exceeds the current Spot price.

For more information, see Launching Spot Instances in Your Auto Scaling Group in the Amazon EC2
Auto Scaling User Guide.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Required: No
UserData

The Base64-encoded user data to make available to the launched EC2 instances.

For more information, see Instance Metadata and User Data in the Amazon EC2 User Guide for Linux
Instances.

Type: String

Length Constraints: Maximum length of 21847.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go

API Version 2011-01-01


175
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for Java


• AWS SDK for Ruby V2

API Version 2011-01-01


176
Amazon EC2 Auto Scaling API Reference
LaunchTemplate

LaunchTemplate
Describes a launch template and overrides.

The overrides are used to override the instance type specified by the launch template with multiple
instance types that can be used to launch On-Demand Instances and Spot Instances.

When you update the launch template or overrides, existing Amazon EC2 instances continue to run.
When scale out occurs, Amazon EC2 Auto Scaling launches instances to match the new settings. When
scale in occurs, Amazon EC2 Auto Scaling terminates instances according to the group's termination
policies.

Contents
LaunchTemplateSpecification

The launch template to use. You must specify either the launch template ID or launch template
name in the request.

Type: LaunchTemplateSpecification (p. 179) object

Required: No
Overrides.member.N

An optional setting. Any parameters that you specify override the same parameters in the launch
template. Currently, the only supported override is instance type. You can specify between 1 and 20
instance types.

Type: Array of LaunchTemplateOverrides (p. 178) objects

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


177
Amazon EC2 Auto Scaling API Reference
LaunchTemplateOverrides

LaunchTemplateOverrides
Describes an override for a launch template.

Contents
InstanceType

The instance type.

For information about available instance types, see Available Instance Types in the Amazon Elastic
Compute Cloud User Guide.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


178
Amazon EC2 Auto Scaling API Reference
LaunchTemplateSpecification

LaunchTemplateSpecification
Describes a launch template and the launch template version.

The launch template that is specified must be configured for use with an Auto Scaling group. For more
information, see Creating a Launch Template for an Auto Scaling Group in the Amazon EC2 Auto Scaling
User Guide.

Contents
LaunchTemplateId

The ID of the launch template. You must specify either a template ID or a template name.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
LaunchTemplateName

The name of the launch template. You must specify either a template name or a template ID.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 128.

Pattern: [a-zA-Z0-9\(\)\.\-/_]+

Required: No
Version

The version number, $Latest, or $Default. If the value is $Latest, Amazon EC2 Auto Scaling
selects the latest version of the launch template when launching instances. If the value is $Default,
Amazon EC2 Auto Scaling selects the default version of the launch template when launching
instances. The default value is $Default.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


179
Amazon EC2 Auto Scaling API Reference
See Also

API Version 2011-01-01


180
Amazon EC2 Auto Scaling API Reference
LifecycleHook

LifecycleHook
Describes a lifecycle hook, which tells Amazon EC2 Auto Scaling that you want to perform
an action whenever it launches instances or terminates instances. Used in response to
DescribeLifecycleHooks (p. 62).

Contents
AutoScalingGroupName

The name of the Auto Scaling group for the lifecycle hook.

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
DefaultResult

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or if
an unexpected failure occurs. The possible values are CONTINUE and ABANDON.

Type: String

Required: No
GlobalTimeout

The maximum time, in seconds, that an instance can remain in a Pending:Wait or


Terminating:Wait state. The maximum is 172800 seconds (48 hours) or 100 times
HeartbeatTimeout, whichever is smaller.

Type: Integer

Required: No
HeartbeatTimeout

The maximum time, in seconds, that can elapse before the lifecycle hook times out. If the
lifecycle hook times out, Amazon EC2 Auto Scaling performs the action that you specified in the
DefaultResult parameter.

Type: Integer

Required: No
LifecycleHookName

The name of the lifecycle hook.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [A-Za-z0-9\-_\/]+

Required: No

API Version 2011-01-01


181
Amazon EC2 Auto Scaling API Reference
See Also

LifecycleTransition

The state of the EC2 instance to which to attach the lifecycle hook. The following are possible
values:
• autoscaling:EC2_INSTANCE_LAUNCHING
• autoscaling:EC2_INSTANCE_TERMINATING

Type: String

Required: No
NotificationMetadata

Additional information that is included any time Amazon EC2 Auto Scaling sends a message to the
notification target.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1023.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
NotificationTargetARN

The ARN of the target that Amazon EC2 Auto Scaling sends notifications to when an instance is in
the transition state for the lifecycle hook. The notification target can be either an SQS queue or an
SNS topic.

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
RoleARN

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification
target.

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

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


182
Amazon EC2 Auto Scaling API Reference
LifecycleHookSpecification

LifecycleHookSpecification
Describes a lifecycle hook. Used in combination with CreateAutoScalingGroup (p. 19).

A lifecycle hook tells Amazon EC2 Auto Scaling to perform an action on an instance when the instance
launches (before it is put into service) or as the instance terminates (before it is fully terminated).

This step is a part of the procedure for creating a lifecycle hook for an Auto Scaling group:

1. (Optional) Create a Lambda function and a rule that allows CloudWatch Events to invoke your Lambda
function when Amazon EC2 Auto Scaling launches or terminates instances.
2. (Optional) Create a notification target and an IAM role. The target can be either an Amazon SQS queue
or an Amazon SNS topic. The role allows Amazon EC2 Auto Scaling to publish lifecycle notifications to
the target.
3. Create the lifecycle hook. Specify whether the hook is used when the instances launch or
terminate.
4. If you need more time, record the lifecycle action heartbeat to keep the instance in a pending state
using RecordLifecycleActionHeartbeat (p. 125).
5. If you finish before the timeout period ends, complete the lifecycle action using
CompleteLifecycleAction (p. 16).

For more information, see Amazon EC2 Auto Scaling Lifecycle Hooks in the Amazon EC2 Auto Scaling
User Guide.

You can view the lifecycle hooks for an Auto Scaling group using DescribeLifecycleHooks (p. 62). You can
modify an existing lifecycle hook or create new lifecycle hooks using PutLifecycleHook (p. 111). If you are
no longer using a lifecycle hook, you can delete it using DeleteLifecycleHook (p. 37).

Contents
DefaultResult

Defines the action the Auto Scaling group should take when the lifecycle hook timeout elapses or
if an unexpected failure occurs. The valid values are CONTINUE and ABANDON. The default value is
ABANDON.

Type: String

Required: No
HeartbeatTimeout

The maximum time, in seconds, that can elapse before the lifecycle hook times out.

If the lifecycle hook times out, Amazon EC2 Auto Scaling performs the action that you specified
in the DefaultResult parameter. You can prevent the lifecycle hook from timing out by calling
RecordLifecycleActionHeartbeat (p. 125).

Type: Integer

Required: No
LifecycleHookName

The name of the lifecycle hook.

Type: String

API Version 2011-01-01


183
Amazon EC2 Auto Scaling API Reference
See Also

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [A-Za-z0-9\-_\/]+

Required: Yes
LifecycleTransition

The state of the EC2 instance to which you want to attach the lifecycle hook. The valid values are:
• autoscaling:EC2_INSTANCE_LAUNCHING
• autoscaling:EC2_INSTANCE_TERMINATING

Type: String

Required: Yes
NotificationMetadata

Additional information that you want to include any time Amazon EC2 Auto Scaling sends a message
to the notification target.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1023.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
NotificationTargetARN

The ARN of the target that Amazon EC2 Auto Scaling sends notifications to when an instance is in
the transition state for the lifecycle hook. The notification target can be either an SQS queue or an
SNS topic.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 1600.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
RoleARN

The ARN of the IAM role that allows the Auto Scaling group to publish to the specified notification
target, for example, an Amazon SNS topic or an Amazon SQS queue.

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

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go

API Version 2011-01-01


184
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for Java


• AWS SDK for Ruby V2

API Version 2011-01-01


185
Amazon EC2 Auto Scaling API Reference
LoadBalancerState

LoadBalancerState
Describes the state of a Classic Load Balancer.

If you specify a load balancer when creating the Auto Scaling group, the state of the load balancer is
InService.

If you attach a load balancer to an existing Auto Scaling group, the initial state is Adding. The state
transitions to Added after all instances in the group are registered with the load balancer. If Elastic Load
Balancing health checks are enabled for the load balancer, the state transitions to InService after at
least one instance in the group passes the health check. If EC2 health checks are enabled instead, the
load balancer remains in the Added state.

Contents
LoadBalancerName

The name of the load balancer.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
State

One of the following load balancer states:


• Adding - The instances in the group are being registered with the load balancer.
• Added - All instances in the group are registered with the load balancer.
• InService - At least one instance in the group passed an ELB health check.
• Removing - The instances in the group are being deregistered from the load balancer. If
connection draining is enabled, Elastic Load Balancing waits for in-flight requests to complete
before deregistering the instances.
• Removed - All instances in the group are deregistered from the load balancer.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


186
Amazon EC2 Auto Scaling API Reference
LoadBalancerTargetGroupState

LoadBalancerTargetGroupState
Describes the state of a target group.

If you attach a target group to an existing Auto Scaling group, the initial state is Adding. The state
transitions to Added after all Auto Scaling instances are registered with the target group. If Elastic Load
Balancing health checks are enabled, the state transitions to InService after at least one Auto Scaling
instance passes the health check. If EC2 health checks are enabled instead, the target group remains in
the Added state.

Contents
LoadBalancerTargetGroupARN

The Amazon Resource Name (ARN) of the target group.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 511.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
State

The state of the target group.


• Adding - The Auto Scaling instances are being registered with the target group.
• Added - All Auto Scaling instances are registered with the target group.
• InService - At least one Auto Scaling instance passed an ELB health check.
• Removing - The Auto Scaling instances are being deregistered from the target group. If
connection draining is enabled, Elastic Load Balancing waits for in-flight requests to complete
before deregistering the instances.
• Removed - All Auto Scaling instances are deregistered from the target group.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


187
Amazon EC2 Auto Scaling API Reference
MetricCollectionType

MetricCollectionType
Describes a metric.

Contents
Metric

One of the following metrics:


• GroupMinSize
• GroupMaxSize
• GroupDesiredCapacity
• GroupInServiceInstances
• GroupPendingInstances
• GroupStandbyInstances
• GroupTerminatingInstances
• GroupTotalInstances

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


188
Amazon EC2 Auto Scaling API Reference
MetricDimension

MetricDimension
Describes the dimension of a metric.

Contents
Name

The name of the dimension.

Type: String

Required: Yes
Value

The value of the dimension.

Type: String

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


189
Amazon EC2 Auto Scaling API Reference
MetricGranularityType

MetricGranularityType
Describes a granularity of a metric.

Contents
Granularity

The granularity. The only valid value is 1Minute.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


190
Amazon EC2 Auto Scaling API Reference
MixedInstancesPolicy

MixedInstancesPolicy
Describes a mixed instances policy for an Auto Scaling group. With mixed instances, your Auto Scaling
group can provision a combination of On-Demand Instances and Spot Instances across multiple instance
types. For more information, see Auto Scaling Groups with Multiple Instance Types and Purchase Options
in the Amazon EC2 Auto Scaling User Guide.

You can create a mixed instances policy for a new Auto Scaling group, or you can create it for an existing
group by updating the group to specify MixedInstancesPolicy as the top-level parameter instead
of a launch configuration or template. For more information, see CreateAutoScalingGroup (p. 19) and
UpdateAutoScalingGroup (p. 139).

Contents
InstancesDistribution

The instances distribution to use.

If you leave this parameter unspecified, the value for each parameter in InstancesDistribution
uses a default value.

Type: InstancesDistribution (p. 169) object

Required: No
LaunchTemplate

The launch template and instance types (overrides).

This parameter must be specified when creating a mixed instances policy.

Type: LaunchTemplate (p. 177) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


191
Amazon EC2 Auto Scaling API Reference
NotificationConfiguration

NotificationConfiguration
Describes a notification.

Contents
AutoScalingGroupName

The name of the Auto Scaling group.

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
NotificationType

One of the following event notification types:


• autoscaling:EC2_INSTANCE_LAUNCH
• autoscaling:EC2_INSTANCE_LAUNCH_ERROR
• autoscaling:EC2_INSTANCE_TERMINATE
• autoscaling:EC2_INSTANCE_TERMINATE_ERROR
• autoscaling:TEST_NOTIFICATION

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
TopicARN

The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (Amazon SNS) topic.

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

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


192
Amazon EC2 Auto Scaling API Reference
PredefinedMetricSpecification

PredefinedMetricSpecification
Represents a predefined metric for a target tracking scaling policy to use with Amazon EC2 Auto Scaling.

Contents
PredefinedMetricType

The metric type. The following predefined metrics are available:


• ASGAverageCPUUtilization - Average CPU utilization of the Auto Scaling group.
• ASGAverageNetworkIn - Average number of bytes received on all network interfaces by the
Auto Scaling group.
• ASGAverageNetworkOut - Average number of bytes sent out on all network interfaces by the
Auto Scaling group.
• ALBRequestCountPerTarget - Number of requests completed per target in an Application Load
Balancer target group.

Type: String

Valid Values: ASGAverageCPUUtilization | ASGAverageNetworkIn |


ASGAverageNetworkOut | ALBRequestCountPerTarget

Required: Yes
ResourceLabel

Identifies the resource associated with the metric type. You can't specify a resource label unless
the metric type is ALBRequestCountPerTarget and there is a target group attached to the Auto
Scaling group.

The format is app/load-balancer-name/load-balancer-id/targetgroup/target-group-


name/target-group-id , where
• app/load-balancer-name/load-balancer-id is the final portion of the load balancer ARN,
and
• targetgroup/target-group-name/target-group-id is the final portion of the target
group ARN.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1023.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


193
Amazon EC2 Auto Scaling API Reference
ProcessType

ProcessType
Describes a process type.

For more information, see Scaling Processes in the Amazon EC2 Auto Scaling User Guide.

Contents
ProcessName

One of the following processes:


• Launch
• Terminate
• AddToLoadBalancer
• AlarmNotification
• AZRebalance
• HealthCheck
• ReplaceUnhealthy
• ScheduledActions

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


194
Amazon EC2 Auto Scaling API Reference
ScalingPolicy

ScalingPolicy
Describes a scaling policy.

Contents
AdjustmentType

The adjustment type, which specifies how ScalingAdjustment is interpreted. The valid values are
ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
Alarms.member.N

The CloudWatch alarms related to the policy.

Type: Array of Alarm (p. 149) objects

Required: No
AutoScalingGroupName

The name of the Auto Scaling group.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
Cooldown

The amount of time, in seconds, after a scaling activity completes before any further dynamic
scaling activities can start.

Type: Integer

Required: No
EstimatedInstanceWarmup

The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch
metrics.

Type: Integer

Required: No
MetricAggregationType

The aggregation type for the CloudWatch metrics. The valid values are Minimum, Maximum, and
Average.

Type: String

API Version 2011-01-01


195
Amazon EC2 Auto Scaling API Reference
Contents

Length Constraints: Minimum length of 1. Maximum length of 32.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
MinAdjustmentMagnitude

The minimum number of instances to scale. If the value of AdjustmentType is


PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto
Scaling group by at least this many instances. Otherwise, the error is ValidationError.

Type: Integer

Required: No
MinAdjustmentStep

This member has been deprecated.

Available for backward compatibility. Use MinAdjustmentMagnitude instead.

Type: Integer

Required: No
PolicyARN

The Amazon Resource Name (ARN) of the 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: No
PolicyName

The name of the scaling policy.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
PolicyType

The policy type. The valid values are SimpleScaling, StepScaling, and
TargetTrackingScaling.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ScalingAdjustment

The amount by which to scale, based on the specified adjustment type. A positive value adds to the
current capacity while a negative number removes from the current capacity.

API Version 2011-01-01


196
Amazon EC2 Auto Scaling API Reference
See Also

Type: Integer

Required: No
StepAdjustments.member.N

A set of adjustments that enable you to scale based on the size of the alarm breach.

Type: Array of StepAdjustment (p. 202) objects

Required: No
TargetTrackingConfiguration

A target tracking scaling policy.

Type: TargetTrackingConfiguration (p. 209) object

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


197
Amazon EC2 Auto Scaling API Reference
ScheduledUpdateGroupAction

ScheduledUpdateGroupAction
Describes a scheduled scaling action. Used in response to DescribeScheduledActions (p. 85).

Contents
AutoScalingGroupName

The name of the Auto Scaling group.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
DesiredCapacity

The number of instances you prefer to maintain in the group.

Type: Integer

Required: No
EndTime

The date and time in UTC for the recurring schedule to end. For example,
"2019-06-01T00:00:00Z".

Type: Timestamp

Required: No
MaxSize

The maximum number of instances in the Auto Scaling group.

Type: Integer

Required: No
MinSize

The minimum number of instances in the Auto Scaling group.

Type: Integer

Required: No
Recurrence

The recurring schedule for the action, in Unix cron syntax format.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when
the recurring action starts and stops.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

API Version 2011-01-01


198
Amazon EC2 Auto Scaling API Reference
See Also

Required: No
ScheduledActionARN

The Amazon Resource Name (ARN) 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: No
ScheduledActionName

The name of the scheduled action.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
StartTime

The date and time in UTC for this action to start. For example, "2019-06-01T00:00:00Z".

Type: Timestamp

Required: No
Time

This parameter is no longer used.

Type: Timestamp

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


199
Amazon EC2 Auto Scaling API Reference
ScheduledUpdateGroupActionRequest

ScheduledUpdateGroupActionRequest
Describes one or more scheduled scaling action updates for a specified Auto Scaling group. Used in
combination with BatchPutScheduledUpdateGroupAction (p. 14).

When updating a scheduled scaling action, all optional parameters are left unchanged if not specified.

Contents
DesiredCapacity

The number of EC2 instances that should be running in the group.

Type: Integer

Required: No
EndTime

The date and time for the recurring schedule to end. Amazon EC2 Auto Scaling does not perform the
action after this time.

Type: Timestamp

Required: No
MaxSize

The maximum number of instances in the Auto Scaling group.

Type: Integer

Required: No
MinSize

The minimum number of instances in the Auto Scaling group.

Type: Integer

Required: No
Recurrence

The recurring schedule for the action, in Unix cron syntax format. This format consists of five fields
separated by white spaces: [Minute] [Hour] [Day_of_Month] [Month_of_Year] [Day_of_Week]. The
value must be in quotes (for example, "30 0 1 1,6,12 *"). For more information about this
format, see Crontab.

When StartTime and EndTime are specified with Recurrence, they form the boundaries of when
the recurring action starts and stops.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ScheduledActionName

The name of the scaling action.

API Version 2011-01-01


200
Amazon EC2 Auto Scaling API Reference
See Also

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
StartTime

The date and time for the action to start, in YYYY-MM-DDThh:mm:ssZ format in UTC/GMT only and
in quotes (for example, "2019-06-01T00:00:00Z").

If you specify Recurrence and StartTime, Amazon EC2 Auto Scaling performs the action at this
time, and then performs the action based on the specified recurrence.

If you try to schedule the action in the past, Amazon EC2 Auto Scaling returns an error message.

Type: Timestamp

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


201
Amazon EC2 Auto Scaling API Reference
StepAdjustment

StepAdjustment
Describes an adjustment based on the difference between the value of the aggregated CloudWatch
metric and the breach threshold that you've defined for the alarm. Used in combination with
PutScalingPolicy (p. 117).

For the following examples, suppose that you have an alarm with a breach threshold of 50:

• To trigger the adjustment when the metric is greater than or equal to 50 and less than 60, specify a
lower bound of 0 and an upper bound of 10.
• To trigger the adjustment when the metric is greater than 40 and less than or equal to 50, specify a
lower bound of -10 and an upper bound of 0.

There are a few rules for the step adjustments for your step policy:

• The ranges of your step adjustments can't overlap or have a gap.


• At most, one step adjustment can have a null lower bound. If one step adjustment has a negative
lower bound, then there must be a step adjustment with a null lower bound.
• At most, one step adjustment can have a null upper bound. If one step adjustment has a positive upper
bound, then there must be a step adjustment with a null upper bound.
• The upper and lower bound can't be null in the same step adjustment.

Contents
MetricIntervalLowerBound

The lower bound for the difference between the alarm threshold and the CloudWatch metric. If the
metric value is above the breach threshold, the lower bound is inclusive (the metric must be greater
than or equal to the threshold plus the lower bound). Otherwise, it is exclusive (the metric must be
greater than the threshold plus the lower bound). A null value indicates negative infinity.

Type: Double

Required: No
MetricIntervalUpperBound

The upper bound for the difference between the alarm threshold and the CloudWatch metric. If the
metric value is above the breach threshold, the upper bound is exclusive (the metric must be less
than the threshold plus the upper bound). Otherwise, it is inclusive (the metric must be less than or
equal to the threshold plus the upper bound). A null value indicates positive infinity.

The upper bound must be greater than the lower bound.

Type: Double

Required: No
ScalingAdjustment

The amount by which to scale, based on the specified adjustment type. A positive value adds to the
current capacity while a negative number removes from the current capacity.

Type: Integer

Required: Yes

API Version 2011-01-01


202
Amazon EC2 Auto Scaling API Reference
See Also

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


203
Amazon EC2 Auto Scaling API Reference
SuspendedProcess

SuspendedProcess
Describes an automatic scaling process that has been suspended. For more information, see
ProcessType (p. 194).

Contents
ProcessName

The name of the suspended process.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
SuspensionReason

The reason that the process was suspended.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 255.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


204
Amazon EC2 Auto Scaling API Reference
Tag

Tag
Describes a tag for an Auto Scaling group.

Contents
Key

The tag key.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: Yes
PropagateAtLaunch

Determines whether the tag is added to new instances as they are launched in the group.

Type: Boolean

Required: No
ResourceId

The name of the group.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ResourceType

The type of resource. The only supported value is auto-scaling-group.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
Value

The tag value.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

API Version 2011-01-01


205
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


206
Amazon EC2 Auto Scaling API Reference
TagDescription

TagDescription
Describes a tag for an Auto Scaling group.

Contents
Key

The tag key.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
PropagateAtLaunch

Determines whether the tag is added to new instances as they are launched in the group.

Type: Boolean

Required: No
ResourceId

The name of the group.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
ResourceType

The type of resource. The only supported value is auto-scaling-group.

Type: String

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No
Value

The tag value.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: [\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*

Required: No

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

API Version 2011-01-01


207
Amazon EC2 Auto Scaling API Reference
See Also

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


208
Amazon EC2 Auto Scaling API Reference
TargetTrackingConfiguration

TargetTrackingConfiguration
Represents a target tracking scaling policy configuration to use with Amazon EC2 Auto Scaling.

Contents
CustomizedMetricSpecification

A customized metric. You must specify either a predefined metric or a customized metric.

Type: CustomizedMetricSpecification (p. 159) object

Required: No
DisableScaleIn

Indicates whether scaling in by the target tracking scaling policy is disabled. If scaling in is disabled,
the target tracking scaling policy doesn't remove instances from the Auto Scaling group. Otherwise,
the target tracking scaling policy can remove instances from the Auto Scaling group. The default is
false.

Type: Boolean

Required: No
PredefinedMetricSpecification

A predefined metric. You must specify either a predefined metric or a customized metric.

Type: PredefinedMetricSpecification (p. 193) object

Required: No
TargetValue

The target value for the metric.

Type: Double

Required: Yes

See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following:

• AWS SDK for C++


• AWS SDK for Go
• AWS SDK for Java
• AWS SDK for Ruby V2

API Version 2011-01-01


209
Amazon EC2 Auto Scaling API Reference

Common Parameters
The following list contains the parameters that all actions use for signing Signature Version 4 requests
with a query string. Any action-specific parameters are listed in the topic for that action. For more
information about Signature Version 4, see Signature Version 4 Signing Process in the Amazon Web
Services General Reference.

Action

The action to be performed.

Type: string

Required: Yes
Version

The API version that the request is written for, expressed in the format YYYY-MM-DD.

Type: string

Required: Yes
X-Amz-Algorithm

The hash algorithm that you used to create the request signature.

Condition: Specify this parameter when you include authentication information in a query string
instead of in the HTTP authorization header.

Type: string

Valid Values: AWS4-HMAC-SHA256

Required: Conditional
X-Amz-Credential

The credential scope value, which is a string that includes your access key, the date, the region you
are targeting, the service you are requesting, and a termination string ("aws4_request"). The value is
expressed in the following format: access_key/YYYYMMDD/region/service/aws4_request.

For more information, see Task 2: Create a String to Sign for Signature Version 4 in the Amazon Web
Services General Reference.

Condition: Specify this parameter when you include authentication information in a query string
instead of in the HTTP authorization header.

Type: string

Required: Conditional
X-Amz-Date

The date that is used to create the signature. The format must be ISO 8601 basic format
(YYYYMMDD'T'HHMMSS'Z'). For example, the following date time is a valid X-Amz-Date value:
20120325T120000Z.

Condition: X-Amz-Date is optional for all requests; it can be used to override the date used for
signing requests. If the Date header is specified in the ISO 8601 basic format, X-Amz-Date is

API Version 2011-01-01


210
Amazon EC2 Auto Scaling API Reference

not required. When X-Amz-Date is used, it always overrides the value of the Date header. For
more information, see Handling Dates in Signature Version 4 in the Amazon Web Services General
Reference.

Type: string

Required: Conditional
X-Amz-Security-Token

The temporary security token that was obtained through a call to AWS Security Token Service (AWS
STS). For a list of services that support temporary security credentials from AWS Security Token
Service, go to AWS Services That Work with IAM in the IAM User Guide.

Condition: If you're using temporary security credentials from the AWS Security Token Service, you
must include the security token.

Type: string

Required: Conditional
X-Amz-Signature

Specifies the hex-encoded signature that was calculated from the string to sign and the derived
signing key.

Condition: Specify this parameter when you include authentication information in a query string
instead of in the HTTP authorization header.

Type: string

Required: Conditional
X-Amz-SignedHeaders

Specifies all the HTTP headers that were included as part of the canonical request. For more
information about specifying signed headers, see Task 1: Create a Canonical Request For Signature
Version 4 in the Amazon Web Services General Reference.

Condition: Specify this parameter when you include authentication information in a query string
instead of in the HTTP authorization header.

Type: string

Required: Conditional

API Version 2011-01-01


211
Amazon EC2 Auto Scaling API Reference

Common Errors
This section lists the errors common to the API actions of all AWS services. For errors specific to an API
action for this service, see the topic for that API action.

AccessDeniedException

You do not have sufficient access to perform this action.

HTTP Status Code: 400


IncompleteSignature

The request signature does not conform to AWS standards.

HTTP Status Code: 400


InternalFailure

The request processing has failed because of an unknown error, exception or failure.

HTTP Status Code: 500


InvalidAction

The action or operation requested is invalid. Verify that the action is typed correctly.

HTTP Status Code: 400


InvalidClientTokenId

The X.509 certificate or AWS access key ID provided does not exist in our records.

HTTP Status Code: 403


InvalidParameterCombination

Parameters that must not be used together were used together.

HTTP Status Code: 400


InvalidParameterValue

An invalid or out-of-range value was supplied for the input parameter.

HTTP Status Code: 400


InvalidQueryParameter

The AWS query string is malformed or does not adhere to AWS standards.

HTTP Status Code: 400


MalformedQueryString

The query string contains a syntax error.

HTTP Status Code: 404


MissingAction

The request is missing an action or a required parameter.

HTTP Status Code: 400

API Version 2011-01-01


212
Amazon EC2 Auto Scaling API Reference

MissingAuthenticationToken

The request must contain either a valid (registered) AWS access key ID or X.509 certificate.

HTTP Status Code: 403


MissingParameter

A required parameter for the specified action is not supplied.

HTTP Status Code: 400


OptInRequired

The AWS access key ID needs a subscription for the service.

HTTP Status Code: 403


RequestExpired

The request reached the service more than 15 minutes after the date stamp on the request or more
than 15 minutes after the request expiration date (such as for pre-signed URLs), or the date stamp
on the request is more than 15 minutes in the future.

HTTP Status Code: 400


ServiceUnavailable

The request has failed due to a temporary failure of the server.

HTTP Status Code: 503


ThrottlingException

The request was denied due to request throttling.

HTTP Status Code: 400


ValidationError

The input fails to satisfy the constraints specified by an AWS service.

HTTP Status Code: 400

API Version 2011-01-01


213
Amazon EC2 Auto Scaling API Reference

Auto Scaling SOAP API


We have deprecated the SOAP API for Amazon EC2 Auto Scaling. As of December 4, 2017, if you make a
SOAP request, you will receive the following response:

Client.InvalidQueryParameter: SOAP is no longer supported

We recommend that you use the Query API for Amazon EC2 Auto Scaling, the AWS CLI, or one of the
AWS SDKs. For more information, see Accessing Amazon EC2 Auto Scaling in the Amazon EC2 Auto
Scaling User Guide.

API Version 2011-01-01


214

You might also like