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.

RequestLaunchTemplateData

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

type RequestLaunchTemplateData struct { BlockDeviceMappings []*LaunchTemplateBlockDeviceMappingRequest `locationName:"BlockDeviceMapping" locationNameList:"BlockDeviceMapping" type:"list"` CapacityReservationSpecification *LaunchTemplateCapacityReservationSpecificationRequest `type:"structure"` CpuOptions *LaunchTemplateCpuOptionsRequest `type:"structure"` CreditSpecification *CreditSpecificationRequest `type:"structure"` DisableApiTermination *bool `type:"boolean"` EbsOptimized *bool `type:"boolean"` ElasticGpuSpecifications []*ElasticGpuSpecification `locationName:"ElasticGpuSpecification" locationNameList:"ElasticGpuSpecification" type:"list"` ElasticInferenceAccelerators []*LaunchTemplateElasticInferenceAccelerator `locationName:"ElasticInferenceAccelerator" locationNameList:"item" type:"list"` HibernationOptions *LaunchTemplateHibernationOptionsRequest `type:"structure"` IamInstanceProfile *LaunchTemplateIamInstanceProfileSpecificationRequest `type:"structure"` ImageId *string `type:"string"` InstanceInitiatedShutdownBehavior *string `type:"string" enum:"ShutdownBehavior"` InstanceMarketOptions *LaunchTemplateInstanceMarketOptionsRequest `type:"structure"` InstanceType *string `type:"string" enum:"InstanceType"` KernelId *string `type:"string"` KeyName *string `type:"string"` LicenseSpecifications []*LaunchTemplateLicenseConfigurationRequest `locationName:"LicenseSpecification" locationNameList:"item" type:"list"` Monitoring *LaunchTemplatesMonitoringRequest `type:"structure"` NetworkInterfaces []*LaunchTemplateInstanceNetworkInterfaceSpecificationRequest `locationName:"NetworkInterface" locationNameList:"InstanceNetworkInterfaceSpecification" type:"list"` Placement *LaunchTemplatePlacementRequest `type:"structure"` RamDiskId *string `type:"string"` SecurityGroupIds []*string `locationName:"SecurityGroupId" locationNameList:"SecurityGroupId" type:"list"` SecurityGroups []*string `locationName:"SecurityGroup" locationNameList:"SecurityGroup" type:"list"` TagSpecifications []*LaunchTemplateTagSpecificationRequest `locationName:"TagSpecification" locationNameList:"LaunchTemplateTagSpecificationRequest" type:"list"` UserData *string `type:"string"` }

The information to include in the launch template.

BlockDeviceMappings

Describes a block device mapping.

CapacityReservationSpecification

Describes an instance's Capacity Reservation targeting option. You can specify only one option at a time. Use the CapacityReservationPreference parameter to configure the instance to run in On-Demand capacity or to run in any open Capacity Reservation that has matching attributes (instance type, platform, Availability Zone). Use the CapacityReservationTarget parameter to explicitly target a specific Capacity Reservation.

CpuOptions

The CPU options for the instance. Both the core count and threads per core must be specified in the request.

CreditSpecification

The credit option for CPU usage of a T2 or T3 instance.

DisableApiTermination

Type: *bool

If set to true, you can't terminate the instance using the Amazon EC2 console, CLI, or API. To change this attribute to false after launch, use ModifyInstanceAttribute.

EbsOptimized

Type: *bool

Indicates whether the instance is optimized for Amazon EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal Amazon EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS-optimized instance.

ElasticGpuSpecifications

A specification for an Elastic Graphics accelerator.

ElasticInferenceAccelerators

Describes an elastic inference accelerator.

HibernationOptions

Indicates whether the instance is configured for hibernation. This parameter is valid only if the instance meets the hibernation prerequisites (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Hibernate.html#hibernating-prerequisites). Hibernation is currently supported only for Amazon Linux.

IamInstanceProfile

An IAM instance profile.

ImageId

Type: *string

The ID of the AMI, which you can get by using DescribeImages.

InstanceInitiatedShutdownBehavior

Type: *string

Indicates whether an instance stops or terminates when you initiate shutdown from the instance (using the operating system command for system shutdown).

Default: stop

InstanceMarketOptions

The market (purchasing) option for the instances.

InstanceType

Type: *string

The instance type. For more information, see Instance Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) in the Amazon Elastic Compute Cloud User Guide.

KernelId

Type: *string

The ID of the kernel.

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) in the Amazon Elastic Compute Cloud User Guide.

KeyName

Type: *string

The name of the key pair. You can create a key pair using CreateKeyPair or ImportKeyPair.

If you do not specify a key pair, you can't connect to the instance unless you choose an AMI that is configured to allow users another way to log in.

LicenseSpecifications

Describes a license configuration.

Monitoring

Describes the monitoring for the instance.

NetworkInterfaces

The parameters for a network interface.

Placement

Describes the placement of an instance.

RamDiskId

Type: *string

The ID of the RAM disk.

We recommend that you use PV-GRUB instead of kernels and RAM disks. For more information, see User Provided Kernels (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html) in the Amazon Elastic Compute Cloud User Guide.

SecurityGroupIds

Type: []*string

One or more security group IDs. You can create a security group using CreateSecurityGroup. You cannot specify both a security group ID and security name in the same request.

SecurityGroups

Type: []*string

[EC2-Classic, default VPC] One or more security group names. For a nondefault VPC, you must use security group IDs instead. You cannot specify both a security group ID and security name in the same request.

TagSpecifications

The tags specification for the launch template.

UserData

Type: *string

The Base64-encoded user data to make available to the instance. For more information, see Running Commands on Your Linux Instance at Launch (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html) (Linux) and Adding User Data (https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ec2-instance-metadata.html#instancedata-add-user-data) (Windows).

Method

GoString

func (s RequestLaunchTemplateData) GoString() string

GoString returns the string representation

SetBlockDeviceMappings

func (s *RequestLaunchTemplateData) SetBlockDeviceMappings(v []*LaunchTemplateBlockDeviceMappingRequest) *RequestLaunchTemplateData

SetBlockDeviceMappings sets the BlockDeviceMappings field's value.

SetCapacityReservationSpecification

func (s *RequestLaunchTemplateData) SetCapacityReservationSpecification(v *LaunchTemplateCapacityReservationSpecificationRequest) *RequestLaunchTemplateData

SetCapacityReservationSpecification sets the CapacityReservationSpecification field's value.

SetCpuOptions

func (s *RequestLaunchTemplateData) SetCpuOptions(v *LaunchTemplateCpuOptionsRequest) *RequestLaunchTemplateData

SetCpuOptions sets the CpuOptions field's value.

SetCreditSpecification

func (s *RequestLaunchTemplateData) SetCreditSpecification(v *CreditSpecificationRequest) *RequestLaunchTemplateData

SetCreditSpecification sets the CreditSpecification field's value.

SetDisableApiTermination

func (s *RequestLaunchTemplateData) SetDisableApiTermination(v bool) *RequestLaunchTemplateData

SetDisableApiTermination sets the DisableApiTermination field's value.

SetEbsOptimized

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

SetEbsOptimized sets the EbsOptimized field's value.

SetElasticGpuSpecifications

func (s *RequestLaunchTemplateData) SetElasticGpuSpecifications(v []*ElasticGpuSpecification) *RequestLaunchTemplateData

SetElasticGpuSpecifications sets the ElasticGpuSpecifications field's value.

SetElasticInferenceAccelerators

func (s *RequestLaunchTemplateData) SetElasticInferenceAccelerators(v []*LaunchTemplateElasticInferenceAccelerator) *RequestLaunchTemplateData

SetElasticInferenceAccelerators sets the ElasticInferenceAccelerators field's value.

SetHibernationOptions

func (s *RequestLaunchTemplateData) SetHibernationOptions(v *LaunchTemplateHibernationOptionsRequest) *RequestLaunchTemplateData

SetHibernationOptions sets the HibernationOptions field's value.

SetIamInstanceProfile

func (s *RequestLaunchTemplateData) SetIamInstanceProfile(v *LaunchTemplateIamInstanceProfileSpecificationRequest) *RequestLaunchTemplateData

SetIamInstanceProfile sets the IamInstanceProfile field's value.

SetImageId

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

SetImageId sets the ImageId field's value.

SetInstanceInitiatedShutdownBehavior

func (s *RequestLaunchTemplateData) SetInstanceInitiatedShutdownBehavior(v string) *RequestLaunchTemplateData

SetInstanceInitiatedShutdownBehavior sets the InstanceInitiatedShutdownBehavior field's value.

SetInstanceMarketOptions

func (s *RequestLaunchTemplateData) SetInstanceMarketOptions(v *LaunchTemplateInstanceMarketOptionsRequest) *RequestLaunchTemplateData

SetInstanceMarketOptions sets the InstanceMarketOptions field's value.

SetInstanceType

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

SetInstanceType sets the InstanceType field's value.

SetKernelId

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

SetKernelId sets the KernelId field's value.

SetKeyName

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

SetKeyName sets the KeyName field's value.

SetLicenseSpecifications

func (s *RequestLaunchTemplateData) SetLicenseSpecifications(v []*LaunchTemplateLicenseConfigurationRequest) *RequestLaunchTemplateData

SetLicenseSpecifications sets the LicenseSpecifications field's value.

SetMonitoring

func (s *RequestLaunchTemplateData) SetMonitoring(v *LaunchTemplatesMonitoringRequest) *RequestLaunchTemplateData

SetMonitoring sets the Monitoring field's value.

SetNetworkInterfaces

func (s *RequestLaunchTemplateData) SetNetworkInterfaces(v []*LaunchTemplateInstanceNetworkInterfaceSpecificationRequest) *RequestLaunchTemplateData

SetNetworkInterfaces sets the NetworkInterfaces field's value.

SetPlacement

func (s *RequestLaunchTemplateData) SetPlacement(v *LaunchTemplatePlacementRequest) *RequestLaunchTemplateData

SetPlacement sets the Placement field's value.

SetRamDiskId

func (s *RequestLaunchTemplateData) SetRamDiskId(v string) *RequestLaunchTemplateData

SetRamDiskId sets the RamDiskId field's value.

SetSecurityGroupIds

func (s *RequestLaunchTemplateData) SetSecurityGroupIds(v []*string) *RequestLaunchTemplateData

SetSecurityGroupIds sets the SecurityGroupIds field's value.

SetSecurityGroups

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

SetSecurityGroups sets the SecurityGroups field's value.

SetTagSpecifications

func (s *RequestLaunchTemplateData) SetTagSpecifications(v []*LaunchTemplateTagSpecificationRequest) *RequestLaunchTemplateData

SetTagSpecifications sets the TagSpecifications field's value.

SetUserData

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

SetUserData sets the UserData field's value.

String

func (s RequestLaunchTemplateData) String() string

String returns the string representation

Validate

func (s *RequestLaunchTemplateData) Validate() error

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

On this page: