Launches a specified number of instances in an Auto Scaling group¶
Description¶
Launches a specified number of instances in an Auto Scaling group. Returns instance IDs and other details if launch is successful or error details if launch is unsuccessful.
Usage¶
autoscaling_launch_instances(AutoScalingGroupName, RequestedCapacity,
ClientToken, AvailabilityZones, AvailabilityZoneIds, SubnetIds,
RetryStrategy)
Arguments¶
-
AutoScalingGroupName[required] The name of the Auto Scaling group to launch instances into.
-
RequestedCapacity[required] The number of instances to launch. Although this value can exceed 100 for instance weights, the actual instance count is limited to 100 instances per launch.
-
ClientToken[required] A unique, case-sensitive identifier to ensure idempotency of the request.
-
AvailabilityZonesThe Availability Zones for the instance launch. Must match or be included in the Auto Scaling group's Availability Zone configuration. Either
AvailabilityZonesorSubnetIdsmust be specified for groups with multiple Availability Zone configurations. -
AvailabilityZoneIdsA list of Availability Zone IDs where instances should be launched. Must match or be included in the group's AZ configuration. You cannot specify both AvailabilityZones and AvailabilityZoneIds. Required for multi-AZ groups, optional for single-AZ groups.
-
SubnetIdsThe subnet IDs for the instance launch. Either
AvailabilityZonesorSubnetIdsmust be specified. If both are specified, the subnets must reside in the specified Availability Zones. -
RetryStrategySpecifies whether to retry asynchronously if the synchronous launch fails. Valid values are NONE (default, no async retry) and RETRY_WITH_GROUP_CONFIGURATION (increase desired capacity and retry with group configuration).
Value¶
A list with the following syntax:
list(
AutoScalingGroupName = "string",
ClientToken = "string",
Instances = list(
list(
InstanceType = "string",
MarketType = "string",
SubnetId = "string",
AvailabilityZone = "string",
AvailabilityZoneId = "string",
InstanceIds = list(
"string"
)
)
),
Errors = list(
list(
InstanceType = "string",
MarketType = "string",
SubnetId = "string",
AvailabilityZone = "string",
AvailabilityZoneId = "string",
ErrorCode = "string",
ErrorMessage = "string"
)
)
)