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.

AttachVolumeInput

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

type AttachVolumeInput struct { Device *string `type:"string" required:"true"` DryRun *bool `locationName:"dryRun" type:"boolean"` InstanceId *string `type:"string" required:"true"` VolumeId *string `type:"string" required:"true"` }

Contains the parameters for AttachVolume.

Device

Type: *string

The device name (for example, /dev/sdh or xvdh).

Device is a required field

DryRun

Type: *bool

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

InstanceId

Type: *string

The ID of the instance.

InstanceId is a required field

VolumeId

Type: *string

The ID of the EBS volume. The volume and instance must be within the same Availability Zone.

VolumeId is a required field

Method

GoString

func (s AttachVolumeInput) GoString() string

GoString returns the string representation

SetDevice

func (s *AttachVolumeInput) SetDevice(v string) *AttachVolumeInput

SetDevice sets the Device field's value.

SetDryRun

func (s *AttachVolumeInput) SetDryRun(v bool) *AttachVolumeInput

SetDryRun sets the DryRun field's value.

SetInstanceId

func (s *AttachVolumeInput) SetInstanceId(v string) *AttachVolumeInput

SetInstanceId sets the InstanceId field's value.

SetVolumeId

func (s *AttachVolumeInput) SetVolumeId(v string) *AttachVolumeInput

SetVolumeId sets the VolumeId field's value.

String

func (s AttachVolumeInput) String() string

String returns the string representation

Validate

func (s *AttachVolumeInput) Validate() error

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

On this page: