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.

AllocateHostsInput

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

type AllocateHostsInput struct { AutoPlacement *string `locationName:"autoPlacement" type:"string" enum:"AutoPlacement"` AvailabilityZone *string `locationName:"availabilityZone" type:"string" required:"true"` ClientToken *string `locationName:"clientToken" type:"string"` InstanceType *string `locationName:"instanceType" type:"string" required:"true"` Quantity *int64 `locationName:"quantity" type:"integer" required:"true"` TagSpecifications []*TagSpecification `locationName:"TagSpecification" locationNameList:"item" type:"list"` }

AutoPlacement

Type: *string

This is enabled by default. This property allows instances to be automatically placed onto available Dedicated Hosts, when you are launching instances without specifying a host ID.

Default: Enabled

AvailabilityZone

Type: *string

The Availability Zone for the Dedicated Hosts.

AvailabilityZone is a required field

ClientToken

Type: *string

Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. For more information, see How to Ensure Idempotency (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Run_Instance_Idempotency.html) in the Amazon Elastic Compute Cloud User Guide.

InstanceType

Type: *string

Specify the instance type for which to configure your Dedicated Hosts. When you specify the instance type, that is the only instance type that you can launch onto that host.

InstanceType is a required field

Quantity

Type: *int64

The number of Dedicated Hosts to allocate to your account with these parameters.

Quantity is a required field

TagSpecifications

The tags to apply to a resource when the resource is being created.

Method

GoString

func (s AllocateHostsInput) GoString() string

GoString returns the string representation

SetAutoPlacement

func (s *AllocateHostsInput) SetAutoPlacement(v string) *AllocateHostsInput

SetAutoPlacement sets the AutoPlacement field's value.

SetAvailabilityZone

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

SetAvailabilityZone sets the AvailabilityZone field's value.

SetClientToken

func (s *AllocateHostsInput) SetClientToken(v string) *AllocateHostsInput

SetClientToken sets the ClientToken field's value.

SetInstanceType

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

SetInstanceType sets the InstanceType field's value.

SetQuantity

func (s *AllocateHostsInput) SetQuantity(v int64) *AllocateHostsInput

SetQuantity sets the Quantity field's value.

SetTagSpecifications

func (s *AllocateHostsInput) SetTagSpecifications(v []*TagSpecification) *AllocateHostsInput

SetTagSpecifications sets the TagSpecifications field's value.

String

func (s AllocateHostsInput) String() string

String returns the string representation

Validate

func (s *AllocateHostsInput) Validate() error

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

On this page: