AWS SDK for Go (PILOT)
API Reference

PREVIEW DOCUMENTATION - This is a preview of a new format for the AWS SDK for Go API Reference documentation. For the current AWS SDK for Go API Reference, see https://docs.aws.amazon.com/sdk-for-go/api/.

We welcome your feedback on this new version of the documentation. Send your comments to aws-sdkdocs-feedback@amazon.com.

CreateLaunchConfigurationInput

import "github.com/aws/aws-sdk-go/service/autoscaling"

type CreateLaunchConfigurationInput struct { AssociatePublicIpAddress *bool `type:"boolean"` BlockDeviceMappings []*BlockDeviceMapping `type:"list"` ClassicLinkVPCId *string `min:"1" type:"string"` ClassicLinkVPCSecurityGroups []*string `type:"list"` EbsOptimized *bool `type:"boolean"` IamInstanceProfile *string `min:"1" type:"string"` ImageId *string `min:"1" type:"string"` InstanceId *string `min:"1" type:"string"` InstanceMonitoring *InstanceMonitoring `type:"structure"` InstanceType *string `min:"1" type:"string"` KernelId *string `min:"1" type:"string"` KeyName *string `min:"1" type:"string"` LaunchConfigurationName *string `min:"1" type:"string" required:"true"` PlacementTenancy *string `min:"1" type:"string"` RamdiskId *string `min:"1" type:"string"` SecurityGroups []*string `type:"list"` SpotPrice *string `min:"1" type:"string"` UserData *string `type:"string"` }

AssociatePublicIpAddress

Type: *bool

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 (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) 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.

BlockDeviceMappings

Describes a block device mapping.

ClassicLinkVPCId

Type: *string

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 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) in the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic Instances to a VPC (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink) in the Amazon EC2 Auto Scaling User Guide.

ClassicLinkVPCSecurityGroups

Type: []*string

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 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/vpc-classiclink.html) in the Amazon EC2 User Guide for Linux Instances and Linking EC2-Classic Instances to a VPC (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html#as-ClassicLink) in the Amazon EC2 Auto Scaling User Guide.

EbsOptimized

Type: *bool

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 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSOptimized.html) in the Amazon EC2 User Guide for Linux Instances.

IamInstanceProfile

Type: *string

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 Use an IAM Role for Applications That Run on Amazon EC2 Instances (https://docs.aws.amazon.com/autoscaling/ec2/userguide/us-iam-role.html) in the Amazon EC2 Auto Scaling User Guide.

ImageId

Type: *string

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 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html) in the Amazon EC2 User Guide for Linux Instances.

InstanceId

Type: *string

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 (https://docs.aws.amazon.com/autoscaling/ec2/userguide/create-lc-with-instanceID.html) in the Amazon EC2 Auto Scaling User Guide.

InstanceMonitoring

Describes whether detailed monitoring is enabled for the Auto Scaling instances.

InstanceType

Type: *string

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 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#AvailableInstanceTypes) in the Amazon EC2 User Guide for Linux Instances.

KernelId

Type: *string

The ID of the kernel associated with the AMI.

KeyName

Type: *string

The name of the key pair. For more information, see Amazon EC2 Key Pairs (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) in the Amazon EC2 User Guide for Linux Instances.

LaunchConfigurationName

Type: *string

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

LaunchConfigurationName is a required field

PlacementTenancy

Type: *string

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 (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-in-vpc.html) in the Amazon EC2 Auto Scaling User Guide.

Valid values: default | dedicated

RamdiskId

Type: *string

The ID of the RAM disk associated with the AMI.

SecurityGroups

Type: []*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 (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html) in the Amazon EC2 User Guide for Linux Instances.

If your instances are launched into a VPC, specify security group IDs. For more information, see Security Groups for Your VPC (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html) in the Amazon Virtual Private Cloud User Guide.

SpotPrice

Type: *string

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 (https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-launch-spot-instances.html) in the Amazon EC2 Auto Scaling User Guide.

UserData

Type: *string

The user data to make available to the launched EC2 instances. For more information, see Instance Metadata and User Data (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) in the Amazon EC2 User Guide for Linux Instances.

Method

GoString

func (s CreateLaunchConfigurationInput) GoString() string

GoString returns the string representation

SetAssociatePublicIpAddress

func (s *CreateLaunchConfigurationInput) SetAssociatePublicIpAddress(v bool) *CreateLaunchConfigurationInput

SetAssociatePublicIpAddress sets the AssociatePublicIpAddress field's value.

SetBlockDeviceMappings

func (s *CreateLaunchConfigurationInput) SetBlockDeviceMappings(v []*BlockDeviceMapping) *CreateLaunchConfigurationInput

SetBlockDeviceMappings sets the BlockDeviceMappings field's value.

SetClassicLinkVPCId

func (s *CreateLaunchConfigurationInput) SetClassicLinkVPCId(v string) *CreateLaunchConfigurationInput

SetClassicLinkVPCId sets the ClassicLinkVPCId field's value.

SetClassicLinkVPCSecurityGroups

func (s *CreateLaunchConfigurationInput) SetClassicLinkVPCSecurityGroups(v []*string) *CreateLaunchConfigurationInput

SetClassicLinkVPCSecurityGroups sets the ClassicLinkVPCSecurityGroups field's value.

SetEbsOptimized

func (s *CreateLaunchConfigurationInput) SetEbsOptimized(v bool) *CreateLaunchConfigurationInput

SetEbsOptimized sets the EbsOptimized field's value.

SetIamInstanceProfile

func (s *CreateLaunchConfigurationInput) SetIamInstanceProfile(v string) *CreateLaunchConfigurationInput

SetIamInstanceProfile sets the IamInstanceProfile field's value.

SetImageId

func (s *CreateLaunchConfigurationInput) SetImageId(v string) *CreateLaunchConfigurationInput

SetImageId sets the ImageId field's value.

SetInstanceId

func (s *CreateLaunchConfigurationInput) SetInstanceId(v string) *CreateLaunchConfigurationInput

SetInstanceId sets the InstanceId field's value.

SetInstanceMonitoring

func (s *CreateLaunchConfigurationInput) SetInstanceMonitoring(v *InstanceMonitoring) *CreateLaunchConfigurationInput

SetInstanceMonitoring sets the InstanceMonitoring field's value.

SetInstanceType

func (s *CreateLaunchConfigurationInput) SetInstanceType(v string) *CreateLaunchConfigurationInput

SetInstanceType sets the InstanceType field's value.

SetKernelId

func (s *CreateLaunchConfigurationInput) SetKernelId(v string) *CreateLaunchConfigurationInput

SetKernelId sets the KernelId field's value.

SetKeyName

func (s *CreateLaunchConfigurationInput) SetKeyName(v string) *CreateLaunchConfigurationInput

SetKeyName sets the KeyName field's value.

SetLaunchConfigurationName

func (s *CreateLaunchConfigurationInput) SetLaunchConfigurationName(v string) *CreateLaunchConfigurationInput

SetLaunchConfigurationName sets the LaunchConfigurationName field's value.

SetPlacementTenancy

func (s *CreateLaunchConfigurationInput) SetPlacementTenancy(v string) *CreateLaunchConfigurationInput

SetPlacementTenancy sets the PlacementTenancy field's value.

SetRamdiskId

func (s *CreateLaunchConfigurationInput) SetRamdiskId(v string) *CreateLaunchConfigurationInput

SetRamdiskId sets the RamdiskId field's value.

SetSecurityGroups

func (s *CreateLaunchConfigurationInput) SetSecurityGroups(v []*string) *CreateLaunchConfigurationInput

SetSecurityGroups sets the SecurityGroups field's value.

SetSpotPrice

func (s *CreateLaunchConfigurationInput) SetSpotPrice(v string) *CreateLaunchConfigurationInput

SetSpotPrice sets the SpotPrice field's value.

SetUserData

func (s *CreateLaunchConfigurationInput) SetUserData(v string) *CreateLaunchConfigurationInput

SetUserData sets the UserData field's value.

String

func (s CreateLaunchConfigurationInput) String() string

String returns the string representation

Validate

func (s *CreateLaunchConfigurationInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

On this page: