public class Snapshot
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable
Describes a snapshot.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
dataEncryptionKeyId
The data encryption key identifier for the snapshot.
|
private java.lang.String |
description
The description for the snapshot.
|
private java.lang.Boolean |
encrypted
Indicates whether the snapshot is encrypted.
|
private 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.
|
private java.lang.String |
ownerAlias
The AWS account alias (for example,
amazon ,
self ) or AWS account ID that owns the snapshot. |
private java.lang.String |
ownerId
The AWS account ID of the EBS snapshot owner.
|
private java.lang.String |
progress
The progress of the snapshot, as a percentage.
|
private java.lang.String |
snapshotId
The ID of the snapshot.
|
private java.util.Date |
startTime
The time stamp when the snapshot was initiated.
|
private java.lang.String |
state
The snapshot state.
|
private java.lang.String |
stateMessage
Encrypted Amazon EBS snapshots are copied asynchronously.
|
private SdkInternalList<Tag> |
tags
Any tags assigned to the snapshot.
|
private java.lang.String |
volumeId
The ID of the volume that was used to create the snapshot.
|
private java.lang.Integer |
volumeSize
The size of the volume, in GiB.
|
Constructor and Description |
---|
Snapshot() |
Modifier and Type | Method and Description |
---|---|
Snapshot |
clone() |
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.
|
private java.lang.String snapshotId
The ID of the snapshot. Each snapshot receives a unique identifier when it is created.
private java.lang.String volumeId
The ID of the volume that was used to create the snapshot.
private java.lang.String state
The snapshot state.
private java.lang.String 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.
private java.util.Date startTime
The time stamp when the snapshot was initiated.
private java.lang.String progress
The progress of the snapshot, as a percentage.
private java.lang.String ownerId
The AWS account ID of the EBS snapshot owner.
private java.lang.String description
The description for the snapshot.
private java.lang.Integer volumeSize
The size of the volume, in GiB.
private java.lang.String ownerAlias
The AWS account alias (for example, amazon
,
self
) or AWS account ID that owns the snapshot.
private SdkInternalList<Tag> tags
Any tags assigned to the snapshot.
private java.lang.Boolean encrypted
Indicates whether the snapshot is encrypted.
private 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.
private java.lang.String 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 void setSnapshotId(java.lang.String snapshotId)
The ID of the snapshot. Each snapshot receives a unique identifier when it is created.
snapshotId
- The ID of the snapshot. Each snapshot receives a unique identifier
when it is created.public java.lang.String getSnapshotId()
The ID of the snapshot. Each snapshot receives a unique identifier when it is created.
public Snapshot withSnapshotId(java.lang.String snapshotId)
The ID of the snapshot. Each snapshot receives a unique identifier when it is created.
snapshotId
- The ID of the snapshot. Each snapshot receives a unique identifier
when it is created.public void setVolumeId(java.lang.String volumeId)
The ID of the volume that was used to create the snapshot.
volumeId
- The ID of the volume that was used to create the snapshot.public java.lang.String getVolumeId()
The ID of the volume that was used to create the snapshot.
public Snapshot withVolumeId(java.lang.String volumeId)
The ID of the volume that was used to create the snapshot.
volumeId
- The ID of the volume that was used to create the snapshot.public void setState(java.lang.String state)
The snapshot state.
state
- The snapshot state.SnapshotState
public java.lang.String getState()
The snapshot state.
SnapshotState
public Snapshot withState(java.lang.String state)
The snapshot state.
state
- The snapshot state.SnapshotState
public void setState(SnapshotState state)
The snapshot state.
state
- The snapshot state.SnapshotState
public Snapshot withState(SnapshotState state)
The snapshot state.
state
- The snapshot state.SnapshotState
public void setStateMessage(java.lang.String 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.
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.lang.String getStateMessage()
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)
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.
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 void setStartTime(java.util.Date startTime)
The time stamp when the snapshot was initiated.
startTime
- The time stamp when the snapshot was initiated.public java.util.Date getStartTime()
The time stamp when the snapshot was initiated.
public Snapshot withStartTime(java.util.Date startTime)
The time stamp when the snapshot was initiated.
startTime
- The time stamp when the snapshot was initiated.public void setProgress(java.lang.String progress)
The progress of the snapshot, as a percentage.
progress
- The progress of the snapshot, as a percentage.public java.lang.String getProgress()
The progress of the snapshot, as a percentage.
public Snapshot withProgress(java.lang.String progress)
The progress of the snapshot, as a percentage.
progress
- The progress of the snapshot, as a percentage.public void setOwnerId(java.lang.String ownerId)
The AWS account ID of the EBS snapshot owner.
ownerId
- The AWS account ID of the EBS snapshot owner.public java.lang.String getOwnerId()
The AWS account ID of the EBS snapshot owner.
public Snapshot withOwnerId(java.lang.String ownerId)
The AWS account ID of the EBS snapshot owner.
ownerId
- The AWS account ID of the EBS snapshot owner.public void setDescription(java.lang.String description)
The description for the snapshot.
description
- The description for the snapshot.public java.lang.String getDescription()
The description for the snapshot.
public Snapshot withDescription(java.lang.String description)
The description for the snapshot.
description
- The description for the snapshot.public void setVolumeSize(java.lang.Integer volumeSize)
The size of the volume, in GiB.
volumeSize
- The size of the volume, in GiB.public java.lang.Integer getVolumeSize()
The size of the volume, in GiB.
public Snapshot withVolumeSize(java.lang.Integer volumeSize)
The size of the volume, in GiB.
volumeSize
- The size of the volume, in GiB.public void setOwnerAlias(java.lang.String ownerAlias)
The AWS account alias (for example, 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 java.lang.String getOwnerAlias()
The AWS account alias (for example, amazon
,
self
) or AWS account ID that owns the snapshot.
amazon
,
self
) or AWS account ID that owns the snapshot.public Snapshot withOwnerAlias(java.lang.String ownerAlias)
The AWS account alias (for example, 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 java.util.List<Tag> getTags()
Any tags assigned to the snapshot.
public void setTags(java.util.Collection<Tag> tags)
Any tags assigned to the snapshot.
tags
- Any tags assigned to the snapshot.public Snapshot withTags(Tag... tags)
Any tags assigned to the snapshot.
NOTE: This method appends the values to the existing list (if
any). Use setTags(java.util.Collection)
or
withTags(java.util.Collection)
if you want to override the
existing values.
tags
- Any tags assigned to the snapshot.public Snapshot withTags(java.util.Collection<Tag> tags)
Any tags assigned to the snapshot.
tags
- Any tags assigned to the snapshot.public void setEncrypted(java.lang.Boolean encrypted)
Indicates whether the snapshot is encrypted.
encrypted
- Indicates whether the snapshot is encrypted.public java.lang.Boolean getEncrypted()
Indicates whether the snapshot is encrypted.
public Snapshot withEncrypted(java.lang.Boolean encrypted)
Indicates whether the snapshot is encrypted.
encrypted
- Indicates whether the snapshot is encrypted.public java.lang.Boolean isEncrypted()
Indicates whether the snapshot is encrypted.
public 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.
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 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.
public 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.
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 void setDataEncryptionKeyId(java.lang.String 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.
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 getDataEncryptionKeyId()
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)
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.
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 boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Snapshot clone()
clone
in class java.lang.Object