launch_instances
async
¶
launch_instances(
*,
config_overrides: Optional[AsyncAutoScalingClientConfig] = 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/async_auto_scaling.py
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 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 4232 4233 4234 4235 4236 4237 4238 4239 4240 4241 4242 4243 4244 4245 4246 4247 4248 4249 4250 4251 4252 4253 4254 4255 4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 4273 4274 4275 4276 4277 | |