Class: Aws::AutoScaling::Types::CreateLaunchConfigurationType

Inherits:
Struct
  • Object
show all
Includes:
Structure
Defined in:
lib/aws-sdk-autoscaling/types.rb

Overview

Note:

When making an API call, you may pass CreateLaunchConfigurationType data as a hash:

{
  launch_configuration_name: "XmlStringMaxLen255", # required
  image_id: "XmlStringMaxLen255",
  key_name: "XmlStringMaxLen255",
  security_groups: ["XmlString"],
  classic_link_vpc_id: "XmlStringMaxLen255",
  classic_link_vpc_security_groups: ["XmlStringMaxLen255"],
  user_data: "XmlStringUserData",
  instance_id: "XmlStringMaxLen19",
  instance_type: "XmlStringMaxLen255",
  kernel_id: "XmlStringMaxLen255",
  ramdisk_id: "XmlStringMaxLen255",
  block_device_mappings: [
    {
      virtual_name: "XmlStringMaxLen255",
      device_name: "XmlStringMaxLen255", # required
      ebs: {
        snapshot_id: "XmlStringMaxLen255",
        volume_size: 1,
        volume_type: "BlockDeviceEbsVolumeType",
        delete_on_termination: false,
        iops: 1,
        encrypted: false,
      },
      no_device: false,
    },
  ],
  instance_monitoring: {
    enabled: false,
  },
  spot_price: "SpotPrice",
  iam_instance_profile: "XmlStringMaxLen1600",
  ebs_optimized: false,
  associate_public_ip_address: false,
  placement_tenancy: "XmlStringMaxLen64",
}

Instance Attribute Summary collapse

Instance Attribute Details

#associate_public_ip_addressBoolean

Used for groups that launch instances into a virtual private cloud (VPC). Specifies whether to assign a public IP address to each instance. For more information, see [Launching Auto Scaling Instances in a VPC] in the *Amazon EC2 Auto Scaling User Guide*.

If you specify this parameter, be sure to specify at least one subnet when you create your group.

Default: If the instance is launched into a default subnet, the default is to assign a public IP address. If the instance is launched into a nondefault subnet, the default is not to assign a public IP address.

[1]: docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html

Returns:

  • (Boolean)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#block_device_mappingsArray<Types::BlockDeviceMapping>

One or more mappings that specify how block devices are exposed to the instance. For more information, see [Block Device Mapping] in the *Amazon Elastic Compute Cloud User Guide*.

[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html

Returns:



1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to. This parameter is supported only if you are launching EC2-Classic instances. For more information, see [ClassicLink] in the *Amazon Elastic Compute Cloud User Guide*.

[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html

Returns:

  • (String)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

The IDs of one or more security groups for the specified ClassicLink-enabled VPC. This parameter is required if you specify a ClassicLink-enabled VPC, and is not supported otherwise. For more information, see [ClassicLink] in the *Amazon Elastic Compute Cloud User Guide*.

[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html

Returns:

  • (Array<String>)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#ebs_optimizedBoolean

Indicates whether the instance is optimized for Amazon EBS I/O. By default, the instance is not optimized for EBS I/O. The optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal I/O performance. This optimization is not available with all instance types. Additional usage charges apply. For more information, see [Amazon EBS-Optimized Instances] in the *Amazon Elastic Compute Cloud User Guide*.

[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html

Returns:

  • (Boolean)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#iam_instance_profileString

The name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance.

EC2 instances launched with an IAM role automatically have AWS security credentials available. You can use IAM roles with Amazon EC2 Auto Scaling to automatically enable applications running on your EC2 instances to securely access other AWS resources. For more information, see [Launch Auto Scaling Instances with an IAM Role] in the *Amazon EC2 Auto Scaling User Guide*.

[1]: docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html

Returns:

  • (String)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#image_idString

The ID of the Amazon Machine Image (AMI) to use to launch your EC2 instances.

If you do not specify ‘InstanceId`, you must specify `ImageId`.

For more information, see [Finding an AMI] in the *Amazon Elastic Compute Cloud User Guide*.

[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html

Returns:

  • (String)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#instance_idString

The ID of the instance to use to create the launch configuration. The new launch configuration derives attributes from the instance, except for the block device mapping.

If you do not specify ‘InstanceId`, you must specify both `ImageId` and `InstanceType`.

To create a launch configuration with a block device mapping or override any other instance attributes, specify them as part of the same request.

For more information, see [Create a Launch Configuration Using an EC2 Instance] in the *Amazon EC2 Auto Scaling User Guide*.

[1]: docs.aws.amazon.com/autoscaling/ec2/userguide/create-lc-with-instanceID.html

Returns:

  • (String)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#instance_monitoringTypes::InstanceMonitoring

Enables detailed monitoring (‘true`) or basic monitoring (`false`) for the Auto Scaling instances. The default is `true`.



1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#instance_typeString

The instance type of the EC2 instance.

If you do not specify ‘InstanceId`, you must specify `InstanceType`.

For information about available instance types, see [Available Instance Types] in the *Amazon Elastic Compute Cloud User Guide.*

[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes

Returns:

  • (String)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#kernel_idString

The ID of the kernel associated with the AMI.

Returns:

  • (String)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#key_nameString

The name of the key pair. For more information, see [Amazon EC2 Key Pairs] in the *Amazon Elastic Compute Cloud User Guide*.

[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html

Returns:

  • (String)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#launch_configuration_nameString

The name of the launch configuration. This name must be unique within the scope of your AWS account.

Returns:

  • (String)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#placement_tenancyString

The tenancy of the instance. An instance with a tenancy of ‘dedicated` runs on single-tenant hardware and can only be launched into a VPC.

To launch Dedicated Instances into a shared tenancy VPC (a VPC with the instance placement tenancy attribute set to ‘default`), you must set the value of this parameter to `dedicated`.

If you specify this parameter, be sure to specify at least one subnet when you create your group.

For more information, see [Launching Auto Scaling Instances in a VPC] in the *Amazon EC2 Auto Scaling User Guide*.

Valid values: ‘default` | `dedicated`

[1]: docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html

Returns:

  • (String)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#ramdisk_idString

The ID of the RAM disk associated with the AMI.

Returns:

  • (String)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#security_groupsArray<String>

One or more security groups with which to associate the instances.

If your instances are launched in EC2-Classic, you can either specify security group names or the security group IDs. For more information, see [Amazon EC2 Security Groups] in the *Amazon Elastic Compute Cloud User Guide*.

If your instances are launched into a VPC, specify security group IDs. For more information, see [Security Groups for Your VPC] in the *Amazon Virtual Private Cloud User Guide*.

[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html [2]: docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html

Returns:

  • (Array<String>)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#spot_priceString

The maximum hourly price to be paid for any Spot Instance launched to fulfill the request. Spot Instances are launched when the price you specify exceeds the current Spot market price. For more information, see [Launching Spot Instances in Your Auto Scaling Group] in the *Amazon EC2 Auto Scaling User Guide*.

[1]: docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html

Returns:

  • (String)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end

#user_dataString

The user data to make available to the launched EC2 instances. For more information, see [Instance Metadata and User Data] in the *Amazon Elastic Compute Cloud User Guide*.

[1]: docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html

Returns:

  • (String)


1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
# File 'lib/aws-sdk-autoscaling/types.rb', line 1226

class CreateLaunchConfigurationType < Struct.new(
  :launch_configuration_name,
  :image_id,
  :key_name,
  :security_groups,
  :classic_link_vpc_id,
  :classic_link_vpc_security_groups,
  :user_data,
  :instance_id,
  :instance_type,
  :kernel_id,
  :ramdisk_id,
  :block_device_mappings,
  :instance_monitoring,
  :spot_price,
  :iam_instance_profile,
  :ebs_optimized,
  :associate_public_ip_address,
  :placement_tenancy)
  include Aws::Structure
end