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
3996 3997 3998 3999 4000 4001 4002 4003 4004 4005 4006 4007 4008 4009 4010 4011 4012 4013 4014 4015 4016 4017 4018 4019 4020 4021 4022 4023 4024 4025 4026 4027 4028 4029 4030 4031 4032 4033 4034 4035 4036 4037 4038 4039 4040 4041 4042 4043 4044 4045 4046 4047 4048 4049 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 | |