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
4050 4051 4052 4053 4054 4055 4056 4057 4058 4059 4060 4061 4062 4063 4064 4065 4066 4067 4068 4069 4070 4071 4072 4073 4074 4075 4076 4077 4078 4079 4080 4081 4082 4083 4084 4085 4086 4087 4088 4089 4090 4091 4092 4093 4094 4095 4096 4097 4098 4099 4100 4101 4102 4103 4104 4105 4106 4107 4108 4109 4110 4111 4112 4113 4114 4115 4116 4117 4118 4119 4120 4121 4122 4123 4124 4125 4126 4127 4128 4129 4130 4131 4132 4133 4134 4135 | |