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.

InstanceEntry

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

type InstanceEntry struct { AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` InstanceType *string `locationName:"instanceType" type:"string" required:"true"` PortInfoSource *string `locationName:"portInfoSource" type:"string" required:"true" enum:"PortInfoSourceType"` SourceName *string `locationName:"sourceName" type:"string" required:"true"` UserData *string `locationName:"userData" type:"string"` }

Describes the Amazon Elastic Compute Cloud instance and related resources to be created using the create cloud formation stack operation.

AvailabilityZone

Type: *string

The Availability Zone for the new Amazon EC2 instance.

AvailabilityZone is a required field

InstanceType

Type: *string

The instance type (e.g., t2.micro) to use for the new Amazon EC2 instance.

InstanceType is a required field

PortInfoSource

Type: *string

The port configuration to use for the new Amazon EC2 instance.

The following configuration options are available:

  • DEFAULT — Use the default firewall settings from the image.

  • INSTANCE — Use the firewall settings from the source Lightsail instance.

  • NONE — Default to Amazon EC2.

  • CLOSED — All ports closed.

PortInfoSource is a required field

SourceName

Type: *string

The name of the export snapshot record, which contains the exported Lightsail instance snapshot that will be used as the source of the new Amazon EC2 instance.

Use the get export snapshot records operation to get a list of export snapshot records that you can use to create a CloudFormation stack.

SourceName is a required field

UserData

Type: *string

A launch script you can create that configures a server with additional user data. For example, you might want to run apt-get -y update.

Depending on the machine image you choose, the command to get software on your instance varies. Amazon Linux and CentOS use yum, Debian and Ubuntu use apt-get, and FreeBSD uses pkg.

Method

GoString

func (s InstanceEntry) GoString() string

GoString returns the string representation

SetAvailabilityZone

func (s *InstanceEntry) SetAvailabilityZone(v string) *InstanceEntry

SetAvailabilityZone sets the AvailabilityZone field's value.

SetInstanceType

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

SetInstanceType sets the InstanceType field's value.

SetPortInfoSource

func (s *InstanceEntry) SetPortInfoSource(v string) *InstanceEntry

SetPortInfoSource sets the PortInfoSource field's value.

SetSourceName

func (s *InstanceEntry) SetSourceName(v string) *InstanceEntry

SetSourceName sets the SourceName field's value.

SetUserData

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

SetUserData sets the UserData field's value.

String

func (s InstanceEntry) String() string

String returns the string representation

Validate

func (s *InstanceEntry) Validate() error

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

On this page: