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.

Volume

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

type Volume struct { Attachments []*VolumeAttachment `locationName:"attachmentSet" locationNameList:"item" type:"list"` AvailabilityZone *string `locationName:"availabilityZone" type:"string"` CreateTime *time.Time `locationName:"createTime" type:"timestamp"` Encrypted *bool `locationName:"encrypted" type:"boolean"` Iops *int64 `locationName:"iops" type:"integer"` KmsKeyId *string `locationName:"kmsKeyId" type:"string"` Size *int64 `locationName:"size" type:"integer"` SnapshotId *string `locationName:"snapshotId" type:"string"` State *string `locationName:"status" type:"string" enum:"VolumeState"` Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` VolumeId *string `locationName:"volumeId" type:"string"` VolumeType *string `locationName:"volumeType" type:"string" enum:"VolumeType"` }

Describes a volume.

Attachments

Describes volume attachment details.

AvailabilityZone

Type: *string

The Availability Zone for the volume.

CreateTime

Type: *time.Time

The time stamp when volume creation was initiated.

Encrypted

Type: *bool

Indicates whether the volume will be encrypted.

Iops

Type: *int64

The number of I/O operations per second (IOPS) that the volume supports. For Provisioned IOPS SSD volumes, this represents the number of IOPS that are provisioned for the volume. For General Purpose SSD volumes, this represents the baseline performance of the volume and the rate at which the volume accumulates I/O credits for bursting. For more information, see Amazon EBS Volume Types (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html) in the Amazon Elastic Compute Cloud User Guide.

Constraints: Range is 100-16,000 IOPS for gp2 volumes and 100 to 64,000IOPS for io1 volumes, in most Regions. The maximum IOPS for io1 of 64,000 is guaranteed only on Nitro-based instances (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances). Other instance families guarantee performance up to 32,000 IOPS.

Condition: This parameter is required for requests to create io1 volumes; it is not used in requests to create gp2, st1, sc1, or standard volumes.

KmsKeyId

Type: *string

The full ARN of the AWS Key Management Service (AWS KMS) customer master key (CMK) that was used to protect the volume encryption key for the volume.

Size

Type: *int64

The size of the volume, in GiBs.

SnapshotId

Type: *string

The snapshot from which the volume was created, if applicable.

State

Type: *string

The volume state.

Tags

Describes a tag.

VolumeId

Type: *string

The ID of the volume.

VolumeType

Type: *string

The volume type. This can be gp2 for General Purpose SSD, io1 for Provisioned IOPS SSD, st1 for Throughput Optimized HDD, sc1 for Cold HDD, or standard for Magnetic volumes.

Method

GoString

func (s Volume) GoString() string

GoString returns the string representation

SetAttachments

func (s *Volume) SetAttachments(v []*VolumeAttachment) *Volume

SetAttachments sets the Attachments field's value.

SetAvailabilityZone

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

SetAvailabilityZone sets the AvailabilityZone field's value.

SetCreateTime

func (s *Volume) SetCreateTime(v time.Time) *Volume

SetCreateTime sets the CreateTime field's value.

SetEncrypted

func (s *Volume) SetEncrypted(v bool) *Volume

SetEncrypted sets the Encrypted field's value.

SetIops

func (s *Volume) SetIops(v int64) *Volume

SetIops sets the Iops field's value.

SetKmsKeyId

func (s *Volume) SetKmsKeyId(v string) *Volume

SetKmsKeyId sets the KmsKeyId field's value.

SetSize

func (s *Volume) SetSize(v int64) *Volume

SetSize sets the Size field's value.

SetSnapshotId

func (s *Volume) SetSnapshotId(v string) *Volume

SetSnapshotId sets the SnapshotId field's value.

SetState

func (s *Volume) SetState(v string) *Volume

SetState sets the State field's value.

SetTags

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

SetTags sets the Tags field's value.

SetVolumeId

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

SetVolumeId sets the VolumeId field's value.

SetVolumeType

func (s *Volume) SetVolumeType(v string) *Volume

SetVolumeType sets the VolumeType field's value.

String

func (s Volume) String() string

String returns the string representation

On this page: