public class Snapshot
extends java.lang.Object
implements java.io.Serializable
Describes a snapshot.
Constructor and Description |
---|
Snapshot() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getDataEncryptionKeyId()
The data encryption key identifier for the snapshot.
|
java.lang.String |
getDescription()
The description for the snapshot.
|
java.lang.Boolean |
getEncrypted()
Indicates whether the snapshot is encrypted.
|
java.lang.String |
getKmsKeyId()
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.
|
java.lang.String |
getOwnerAlias()
The AWS account alias (for example,
amazon ,
self ) or AWS account ID that owns the snapshot. |
java.lang.String |
getOwnerId()
The AWS account ID of the EBS snapshot owner.
|
java.lang.String |
getProgress()
The progress of the snapshot, as a percentage.
|
java.lang.String |
getSnapshotId()
The ID of the snapshot.
|
java.util.Date |
getStartTime()
The time stamp when the snapshot was initiated.
|
java.lang.String |
getState()
The snapshot state.
|
java.lang.String |
getStateMessage()
Encrypted Amazon EBS snapshots are copied asynchronously.
|
java.util.List<Tag> |
getTags()
Any tags assigned to the snapshot.
|
java.lang.String |
getVolumeId()
The ID of the volume that was used to create the snapshot.
|
java.lang.Integer |
getVolumeSize()
The size of the volume, in GiB.
|
int |
hashCode() |
java.lang.Boolean |
isEncrypted()
Indicates whether the snapshot is encrypted.
|
void |
setDataEncryptionKeyId(java.lang.String dataEncryptionKeyId)
The data encryption key identifier for the snapshot.
|
void |
setDescription(java.lang.String description)
The description for the snapshot.
|
void |
setEncrypted(java.lang.Boolean encrypted)
Indicates whether the snapshot is encrypted.
|
void |
setKmsKeyId(java.lang.String kmsKeyId)
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.
|
void |
setOwnerAlias(java.lang.String ownerAlias)
The AWS account alias (for example,
amazon ,
self ) or AWS account ID that owns the snapshot. |
void |
setOwnerId(java.lang.String ownerId)
The AWS account ID of the EBS snapshot owner.
|
void |
setProgress(java.lang.String progress)
The progress of the snapshot, as a percentage.
|
void |
setSnapshotId(java.lang.String snapshotId)
The ID of the snapshot.
|
void |
setStartTime(java.util.Date startTime)
The time stamp when the snapshot was initiated.
|
void |
setState(SnapshotState state)
The snapshot state.
|
void |
setState(java.lang.String state)
The snapshot state.
|
void |
setStateMessage(java.lang.String stateMessage)
Encrypted Amazon EBS snapshots are copied asynchronously.
|
void |
setTags(java.util.Collection<Tag> tags)
Any tags assigned to the snapshot.
|
void |
setVolumeId(java.lang.String volumeId)
The ID of the volume that was used to create the snapshot.
|
void |
setVolumeSize(java.lang.Integer volumeSize)
The size of the volume, in GiB.
|
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
Snapshot |
withDataEncryptionKeyId(java.lang.String dataEncryptionKeyId)
The data encryption key identifier for the snapshot.
|
Snapshot |
withDescription(java.lang.String description)
The description for the snapshot.
|
Snapshot |
withEncrypted(java.lang.Boolean encrypted)
Indicates whether the snapshot is encrypted.
|
Snapshot |
withKmsKeyId(java.lang.String kmsKeyId)
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.
|
Snapshot |
withOwnerAlias(java.lang.String ownerAlias)
The AWS account alias (for example,
amazon ,
self ) or AWS account ID that owns the snapshot. |
Snapshot |
withOwnerId(java.lang.String ownerId)
The AWS account ID of the EBS snapshot owner.
|
Snapshot |
withProgress(java.lang.String progress)
The progress of the snapshot, as a percentage.
|
Snapshot |
withSnapshotId(java.lang.String snapshotId)
The ID of the snapshot.
|
Snapshot |
withStartTime(java.util.Date startTime)
The time stamp when the snapshot was initiated.
|
Snapshot |
withState(SnapshotState state)
The snapshot state.
|
Snapshot |
withState(java.lang.String state)
The snapshot state.
|
Snapshot |
withStateMessage(java.lang.String stateMessage)
Encrypted Amazon EBS snapshots are copied asynchronously.
|
Snapshot |
withTags(java.util.Collection<Tag> tags)
Any tags assigned to the snapshot.
|
Snapshot |
withTags(Tag... tags)
Any tags assigned to the snapshot.
|
Snapshot |
withVolumeId(java.lang.String volumeId)
The ID of the volume that was used to create the snapshot.
|
Snapshot |
withVolumeSize(java.lang.Integer volumeSize)
The size of the volume, in GiB.
|
public java.lang.String getSnapshotId()
public void setSnapshotId(java.lang.String snapshotId)
snapshotId
- The ID of the snapshot. Each snapshot receives a unique identifier
when it is created.public Snapshot withSnapshotId(java.lang.String snapshotId)
Returns a reference to this object so that method calls can be chained together.
snapshotId
- The ID of the snapshot. Each snapshot receives a unique identifier
when it is created.public java.lang.String getVolumeId()
public void setVolumeId(java.lang.String volumeId)
volumeId
- The ID of the volume that was used to create the snapshot.public Snapshot withVolumeId(java.lang.String volumeId)
Returns a reference to this object so that method calls can be chained together.
volumeId
- The ID of the volume that was used to create the snapshot.public java.lang.String getState()
Constraints:
Allowed Values: pending, completed, error
SnapshotState
public void setState(java.lang.String state)
Constraints:
Allowed Values: pending, completed, error
state
- The snapshot state.SnapshotState
public Snapshot withState(java.lang.String state)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: pending, completed, error
state
- The snapshot state.SnapshotState
public void setState(SnapshotState state)
Constraints:
Allowed Values: pending, completed, error
state
- The snapshot state.SnapshotState
public Snapshot withState(SnapshotState state)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: pending, completed, error
state
- The snapshot state.SnapshotState
public java.lang.String getStateMessage()
public void setStateMessage(java.lang.String stateMessage)
stateMessage
- 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.public Snapshot withStateMessage(java.lang.String stateMessage)
Returns a reference to this object so that method calls can be chained together.
stateMessage
- 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.public java.util.Date getStartTime()
public void setStartTime(java.util.Date startTime)
startTime
- The time stamp when the snapshot was initiated.public Snapshot withStartTime(java.util.Date startTime)
Returns a reference to this object so that method calls can be chained together.
startTime
- The time stamp when the snapshot was initiated.public java.lang.String getProgress()
public void setProgress(java.lang.String progress)
progress
- The progress of the snapshot, as a percentage.public Snapshot withProgress(java.lang.String progress)
Returns a reference to this object so that method calls can be chained together.
progress
- The progress of the snapshot, as a percentage.public java.lang.String getOwnerId()
public void setOwnerId(java.lang.String ownerId)
ownerId
- The AWS account ID of the EBS snapshot owner.public Snapshot withOwnerId(java.lang.String ownerId)
Returns a reference to this object so that method calls can be chained together.
ownerId
- The AWS account ID of the EBS snapshot owner.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- The description for the snapshot.public Snapshot withDescription(java.lang.String description)
Returns a reference to this object so that method calls can be chained together.
description
- The description for the snapshot.public java.lang.Integer getVolumeSize()
public void setVolumeSize(java.lang.Integer volumeSize)
volumeSize
- The size of the volume, in GiB.public Snapshot withVolumeSize(java.lang.Integer volumeSize)
Returns a reference to this object so that method calls can be chained together.
volumeSize
- The size of the volume, in GiB.public java.lang.String getOwnerAlias()
amazon
,
self
) or AWS account ID that owns the snapshot.amazon
,
self
) or AWS account ID that owns the snapshot.public void setOwnerAlias(java.lang.String ownerAlias)
amazon
,
self
) or AWS account ID that owns the snapshot.ownerAlias
- The AWS account alias (for example, amazon
,
self
) or AWS account ID that owns the snapshot.public Snapshot withOwnerAlias(java.lang.String ownerAlias)
amazon
,
self
) or AWS account ID that owns the snapshot.
Returns a reference to this object so that method calls can be chained together.
ownerAlias
- The AWS account alias (for example, amazon
,
self
) or AWS account ID that owns the snapshot.public java.util.List<Tag> getTags()
public void setTags(java.util.Collection<Tag> tags)
tags
- Any tags assigned to the snapshot.public Snapshot withTags(Tag... tags)
Returns a reference to this object so that method calls can be chained together.
tags
- Any tags assigned to the snapshot.public Snapshot withTags(java.util.Collection<Tag> tags)
Returns a reference to this object so that method calls can be chained together.
tags
- Any tags assigned to the snapshot.public java.lang.Boolean isEncrypted()
public void setEncrypted(java.lang.Boolean encrypted)
encrypted
- Indicates whether the snapshot is encrypted.public Snapshot withEncrypted(java.lang.Boolean encrypted)
Returns a reference to this object so that method calls can be chained together.
encrypted
- Indicates whether the snapshot is encrypted.public java.lang.Boolean getEncrypted()
public java.lang.String getKmsKeyId()
public void setKmsKeyId(java.lang.String kmsKeyId)
kmsKeyId
- 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.public Snapshot withKmsKeyId(java.lang.String kmsKeyId)
Returns a reference to this object so that method calls can be chained together.
kmsKeyId
- 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.public java.lang.String getDataEncryptionKeyId()
public void setDataEncryptionKeyId(java.lang.String dataEncryptionKeyId)
dataEncryptionKeyId
- 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.public Snapshot withDataEncryptionKeyId(java.lang.String dataEncryptionKeyId)
Returns a reference to this object so that method calls can be chained together.
dataEncryptionKeyId
- 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.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.