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.

CreateInstancesInput

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

type CreateInstancesInput struct { AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` BlueprintId *string `locationName:"blueprintId" type:"string" required:"true"` BundleId *string `locationName:"bundleId" type:"string" required:"true"` CustomImageName *string `locationName:"customImageName" deprecated:"true" type:"string"` InstanceNames []*string `locationName:"instanceNames" type:"list" required:"true"` KeyPairName *string `locationName:"keyPairName" type:"string"` Tags []*Tag `locationName:"tags" type:"list"` UserData *string `locationName:"userData" type:"string"` }

AvailabilityZone

Type: *string

The Availability Zone in which to create your instance. Use the following format: 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

BlueprintId

Type: *string

The ID for a virtual private server image (e.g., app_wordpress_4_4 or app_lamp_7_0). Use the get blueprints operation to return a list of available images (or blueprints).

BlueprintId 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

CustomImageName

Type: *string

(Deprecated) The name for your custom image.

In releases prior to June 12, 2017, this parameter was ignored by the API. It is now deprecated.

Deprecated: CustomImageName has been deprecated

InstanceNames

Type: []*string

The names to use for your new Lightsail instances. Separate multiple values using quotation marks and commas, for example: ["MyFirstInstance","MySecondInstance"]

InstanceNames is a required field

KeyPairName

Type: *string

The name of 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

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. 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 CreateInstancesInput) GoString() string

GoString returns the string representation

SetAvailabilityZone

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

SetAvailabilityZone sets the AvailabilityZone field's value.

SetBlueprintId

func (s *CreateInstancesInput) SetBlueprintId(v string) *CreateInstancesInput

SetBlueprintId sets the BlueprintId field's value.

SetBundleId

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

SetBundleId sets the BundleId field's value.

SetCustomImageName

func (s *CreateInstancesInput) SetCustomImageName(v string) *CreateInstancesInput

SetCustomImageName sets the CustomImageName field's value.

SetInstanceNames

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

SetInstanceNames sets the InstanceNames field's value.

SetKeyPairName

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

SetKeyPairName sets the KeyPairName field's value.

SetTags

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

SetTags sets the Tags field's value.

SetUserData

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

SetUserData sets the UserData field's value.

String

func (s CreateInstancesInput) String() string

String returns the string representation

Validate

func (s *CreateInstancesInput) Validate() error

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

On this page: