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.

Snapshot

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

type Snapshot struct { DataEncryptionKeyId *string `locationName:"dataEncryptionKeyId" type:"string"` Description *string `locationName:"description" type:"string"` Encrypted *bool `locationName:"encrypted" type:"boolean"` KmsKeyId *string `locationName:"kmsKeyId" type:"string"` OwnerAlias *string `locationName:"ownerAlias" type:"string"` OwnerId *string `locationName:"ownerId" type:"string"` Progress *string `locationName:"progress" type:"string"` SnapshotId *string `locationName:"snapshotId" type:"string"` StartTime *time.Time `locationName:"startTime" type:"timestamp"` State *string `locationName:"status" type:"string" enum:"SnapshotState"` StateMessage *string `locationName:"statusMessage" type:"string"` Tags []*Tag `locationName:"tagSet" locationNameList:"item" type:"list"` VolumeId *string `locationName:"volumeId" type:"string"` VolumeSize *int64 `locationName:"volumeSize" type:"integer"` }

Describes a snapshot.

DataEncryptionKeyId

Type: *string

The data encryption key identifier for the snapshot. This value is a unique identifier that corresponds to the data encryption key that was used to encrypt the original volume or snapshot copy. Because data encryption keys are inherited by volumes created from snapshots, and vice versa, if snapshots share the same data encryption key identifier, then they belong to the same volume/snapshot lineage. This parameter is only returned by the DescribeSnapshots API operation.

Description

Type: *string

The description for the snapshot.

Encrypted

Type: *bool

Indicates whether the snapshot is encrypted.

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 parent volume.

OwnerAlias

Type: *string

Value from an Amazon-maintained list (amazon | aws-marketplace | microsoft) of snapshot owners. Not to be confused with the user-configured AWS account alias, which is set from the IAM console.

OwnerId

Type: *string

The AWS account ID of the EBS snapshot owner.

Progress

Type: *string

The progress of the snapshot, as a percentage.

SnapshotId

Type: *string

The ID of the snapshot. Each snapshot receives a unique identifier when it is created.

StartTime

Type: *time.Time

The time stamp when the snapshot was initiated.

State

Type: *string

The snapshot state.

StateMessage

Type: *string

Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper AWS Key Management Service (AWS KMS) permissions are not obtained) this field displays error state details to help you diagnose why the error occurred. This parameter is only returned by the DescribeSnapshots API operation.

Tags

Describes a tag.

VolumeId

Type: *string

The ID of the volume that was used to create the snapshot. Snapshots created by the CopySnapshot action have an arbitrary volume ID that should not be used for any purpose.

VolumeSize

Type: *int64

The size of the volume, in GiB.

Method

GoString

func (s Snapshot) GoString() string

GoString returns the string representation

SetDataEncryptionKeyId

func (s *Snapshot) SetDataEncryptionKeyId(v string) *Snapshot

SetDataEncryptionKeyId sets the DataEncryptionKeyId field's value.

SetDescription

func (s *Snapshot) SetDescription(v string) *Snapshot

SetDescription sets the Description field's value.

SetEncrypted

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

SetEncrypted sets the Encrypted field's value.

SetKmsKeyId

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

SetKmsKeyId sets the KmsKeyId field's value.

SetOwnerAlias

func (s *Snapshot) SetOwnerAlias(v string) *Snapshot

SetOwnerAlias sets the OwnerAlias field's value.

SetOwnerId

func (s *Snapshot) SetOwnerId(v string) *Snapshot

SetOwnerId sets the OwnerId field's value.

SetProgress

func (s *Snapshot) SetProgress(v string) *Snapshot

SetProgress sets the Progress field's value.

SetSnapshotId

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

SetSnapshotId sets the SnapshotId field's value.

SetStartTime

func (s *Snapshot) SetStartTime(v time.Time) *Snapshot

SetStartTime sets the StartTime field's value.

SetState

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

SetState sets the State field's value.

SetStateMessage

func (s *Snapshot) SetStateMessage(v string) *Snapshot

SetStateMessage sets the StateMessage field's value.

SetTags

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

SetTags sets the Tags field's value.

SetVolumeId

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

SetVolumeId sets the VolumeId field's value.

SetVolumeSize

func (s *Snapshot) SetVolumeSize(v int64) *Snapshot

SetVolumeSize sets the VolumeSize field's value.

String

func (s Snapshot) String() string

String returns the string representation

On this page: