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.

CreateInstancesFromSnapshotInput

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

type CreateInstancesFromSnapshotInput struct { AttachedDiskMapping map[string][]*DiskMap `locationName:"attachedDiskMapping" type:"map"` AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` BundleId *string `locationName:"bundleId" type:"string" required:"true"` InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` InstanceSnapshotName *string `locationName:"instanceSnapshotName" type:"string" required:"true"` KeyPairName *string `locationName:"keyPairName" type:"string"` Tags []*Tag `locationName:"tags" type:"list"` UserData *string `locationName:"userData" type:"string"` }

AttachedDiskMapping

Type: map[string][]*DiskMap

An object containing information about one or more disk mappings.

AvailabilityZone

Type: *string

The Availability Zone where you want to create your instances. Use the following formatting: us-east-2a (case sensitive). You can get a list of Availability Zones by using the get regions (https://docs.aws.amazon.com/lightsail/2016-11-28/api-reference/API_GetRegions.html) operation. Be sure to add the include Availability Zones parameter to your request.

AvailabilityZone is a required field

BundleId

Type: *string

The bundle of specification information for your virtual private server (or instance), including the pricing plan (e.g., micro_1_0).

BundleId is a required field

InstanceNames

Type: []*string

The names for your new instances.

InstanceNames is a required field

InstanceSnapshotName

Type: *string

The name of the instance snapshot on which you are basing your new instances. Use the get instance snapshots operation to return information about your existing snapshots.

InstanceSnapshotName is a required field

KeyPairName

Type: *string

The name for your key pair.

Tags

Describes a tag key and optional value assigned to an Amazon Lightsail resource.

For more information about tags in Lightsail, see the Lightsail Dev Guide (https://lightsail.aws.amazon.com/ls/docs/en/articles/amazon-lightsail-tags).

UserData

Type: *string

You can create a launch script that configures a server with additional user data. For example, 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. For a complete list, see the Dev Guide (https://lightsail.aws.amazon.com/ls/docs/getting-started/article/compare-options-choose-lightsail-instance-image).

Method

GoString

func (s CreateInstancesFromSnapshotInput) GoString() string

GoString returns the string representation

SetAttachedDiskMapping

func (s *CreateInstancesFromSnapshotInput) SetAttachedDiskMapping(v map[string][]*DiskMap) *CreateInstancesFromSnapshotInput

SetAttachedDiskMapping sets the AttachedDiskMapping field's value.

SetAvailabilityZone

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

SetAvailabilityZone sets the AvailabilityZone field's value.

SetBundleId

func (s *CreateInstancesFromSnapshotInput) SetBundleId(v string) *CreateInstancesFromSnapshotInput

SetBundleId sets the BundleId field's value.

SetInstanceNames

func (s *CreateInstancesFromSnapshotInput) SetInstanceNames(v []*string) *CreateInstancesFromSnapshotInput

SetInstanceNames sets the InstanceNames field's value.

SetInstanceSnapshotName

func (s *CreateInstancesFromSnapshotInput) SetInstanceSnapshotName(v string) *CreateInstancesFromSnapshotInput

SetInstanceSnapshotName sets the InstanceSnapshotName field's value.

SetKeyPairName

func (s *CreateInstancesFromSnapshotInput) SetKeyPairName(v string) *CreateInstancesFromSnapshotInput

SetKeyPairName sets the KeyPairName field's value.

SetTags

func (s *CreateInstancesFromSnapshotInput) SetTags(v []*Tag) *CreateInstancesFromSnapshotInput

SetTags sets the Tags field's value.

SetUserData

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

SetUserData sets the UserData field's value.

String

func (s CreateInstancesFromSnapshotInput) String() string

String returns the string representation

Validate

func (s *CreateInstancesFromSnapshotInput) Validate() error

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

On this page: