Skip to content

Launch Instances

autoscaling_launch_instances R Documentation

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.

AvailabilityZones

The Availability Zones for the instance launch. Must match or be included in the Auto Scaling group's Availability Zone configuration. Either AvailabilityZones or SubnetIds must be specified for groups with multiple Availability Zone configurations.

AvailabilityZoneIds

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.

SubnetIds

The subnet IDs for the instance launch. Either AvailabilityZones or SubnetIds must be specified. If both are specified, the subnets must reside in the specified Availability Zones.

RetryStrategy

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).

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"
    )
  )
)

Request syntax

svc$launch_instances(
  AutoScalingGroupName = "string",
  RequestedCapacity = 123,
  ClientToken = "string",
  AvailabilityZones = list(
    "string"
  ),
  AvailabilityZoneIds = list(
    "string"
  ),
  SubnetIds = list(
    "string"
  ),
  RetryStrategy = "retry-with-group-configuration"|"none"
)