launch_instances
¶
launch_instances(
*,
config_overrides: Optional[AutoScalingClientConfig] = None,
auto_scaling_group_name: Optional[XmlStringMaxLen255] = None,
requested_capacity: Optional[RequestedCapacity] = None,
client_token: Optional[ClientToken] = None,
availability_zones: Optional[AvailabilityZonesLimit1] = None,
availability_zone_ids: Optional[AvailabilityZoneIdsLimit1] = None,
subnet_ids: Optional[SubnetIdsLimit1] = None,
retry_strategy: Optional[RetryStrategy] = None,
) -> LaunchInstancesResult
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.
Parameters:
-
auto_scaling_group_name(Optional[XmlStringMaxLen255], default:None) –The name of the Auto Scaling group to launch instances into.
-
requested_capacity(Optional[RequestedCapacity], default:None) –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.
-
client_token(Optional[ClientToken], default:None) –A unique, case-sensitive identifier to ensure idempotency of the request.
-
availability_zones(Optional[AvailabilityZonesLimit1], default:None) –The 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. -
availability_zone_ids(Optional[AvailabilityZoneIdsLimit1], default:None) –A 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.
-
subnet_ids(Optional[SubnetIdsLimit1], default:None) –The subnet IDs for the instance launch. Either
AvailabilityZonesorSubnetIdsmust be specified. If both are specified, the subnets must reside in the specified Availability Zones. -
retry_strategy(Optional[RetryStrategy], default:None) –Specifies 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).
Raises:
-
IdempotentCallInProgressFault–The service is currently processing another request with the same client token. Retry the request with the same client token—the in-flight operation will complete and return its result.
-
IdempotentParameterMismatchError–Indicates that the parameters in the current request do not match the parameters from a previous request with the same client token within the idempotency window.
-
ResourceContentionFault–You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_auto_scaling/_services/auto_scaling.py
4137 4138 4139 4140 4141 4142 4143 4144 4145 4146 4147 4148 4149 4150 4151 4152 4153 4154 4155 4156 4157 4158 4159 4160 4161 4162 4163 4164 4165 4166 4167 4168 4169 4170 4171 4172 4173 4174 4175 4176 4177 4178 4179 4180 4181 4182 4183 4184 4185 4186 4187 4188 4189 4190 4191 4192 4193 4194 4195 4196 4197 4198 4199 4200 4201 4202 4203 4204 4205 4206 4207 4208 4209 4210 4211 4212 4213 4214 4215 4216 4217 4218 4219 4220 4221 | |