Class CreateSnapshotResponse
- All Implemented Interfaces:
SdkPojo
,ToCopyableBuilder<CreateSnapshotResponse.Builder,
CreateSnapshotResponse>
Describes a snapshot.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal String
The Availability Zone or Local Zone of the snapshot.builder()
final Integer
final Instant
The time stamp when the snapshot was completed.final String
The data encryption key identifier for the snapshot.final String
The description for the snapshot.final Boolean
Indicates whether the snapshot is encrypted.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final Long
The full size of the snapshot, in bytes.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) Used to retrieve the value of a field from any class that extendsSdkResponse
.final int
hashCode()
final boolean
hasTags()
For responses, this returns true if the service returned a value for the Tags property.final String
kmsKeyId()
The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.final String
The ARN of the Outpost on which the snapshot is stored.final String
The Amazon Web Services owner alias, from an Amazon-maintained list (amazon
).final String
ownerId()
The ID of the Amazon Web Services account that owns the EBS snapshot.final String
progress()
The progress of the snapshot, as a percentage.final Instant
Only for archived snapshots that are temporarily restored.static Class
<? extends CreateSnapshotResponse.Builder> final String
The ID of the snapshot.final SSEType
sseType()
Reserved for future use.final String
Reserved for future use.final Instant
The time stamp when the snapshot was initiated.final SnapshotState
state()
The snapshot state.final String
The snapshot state.final String
Encrypted Amazon EBS snapshots are copied asynchronously.final StorageTier
The storage tier in which the snapshot is stored.final String
The storage tier in which the snapshot is stored.tags()
Any tags assigned to the snapshot.Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.final TransferType
final String
final String
volumeId()
The ID of the volume that was used to create the snapshot.final Integer
The size of the volume, in GiB.Methods inherited from class software.amazon.awssdk.services.ec2.model.Ec2Response
responseMetadata
Methods inherited from class software.amazon.awssdk.core.SdkResponse
sdkHttpResponse
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
ownerAlias
The Amazon Web Services owner alias, from an Amazon-maintained list (
amazon
). This is not the user-configured Amazon Web Services account alias set using the IAM console.- Returns:
- The Amazon Web Services owner alias, from an Amazon-maintained list (
amazon
). This is not the user-configured Amazon Web Services account alias set using the IAM console.
-
outpostArn
The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon EBS User Guide.
- Returns:
- The ARN of the Outpost on which the snapshot is stored. For more information, see Amazon EBS local snapshots on Outposts in the Amazon EBS User Guide.
-
hasTags
public final boolean hasTags()For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()
method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
tags
Any tags assigned to the snapshot.
Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasTags()
method.- Returns:
- Any tags assigned to the snapshot.
-
storageTier
The storage tier in which the snapshot is stored.
standard
indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use.archive
indicates that the snapshot is currently archived and that it must be restored before it can be used.If the service returns an enum value that is not available in the current SDK version,
storageTier
will returnStorageTier.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstorageTierAsString()
.- Returns:
- The storage tier in which the snapshot is stored.
standard
indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use.archive
indicates that the snapshot is currently archived and that it must be restored before it can be used. - See Also:
-
storageTierAsString
The storage tier in which the snapshot is stored.
standard
indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use.archive
indicates that the snapshot is currently archived and that it must be restored before it can be used.If the service returns an enum value that is not available in the current SDK version,
storageTier
will returnStorageTier.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstorageTierAsString()
.- Returns:
- The storage tier in which the snapshot is stored.
standard
indicates that the snapshot is stored in the standard snapshot storage tier and that it is ready for use.archive
indicates that the snapshot is currently archived and that it must be restored before it can be used. - See Also:
-
restoreExpiryTime
Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.
- Returns:
- Only for archived snapshots that are temporarily restored. Indicates the date and time when a temporarily restored snapshot will be automatically re-archived.
-
sseType
Reserved for future use.
If the service returns an enum value that is not available in the current SDK version,
sseType
will returnSSEType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromsseTypeAsString()
.- Returns:
- Reserved for future use.
- See Also:
-
sseTypeAsString
Reserved for future use.
If the service returns an enum value that is not available in the current SDK version,
sseType
will returnSSEType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromsseTypeAsString()
.- Returns:
- Reserved for future use.
- See Also:
-
availabilityZone
The Availability Zone or Local Zone of the snapshot. For example,
us-west-1a
(Availability Zone) orus-west-2-lax-1a
(Local Zone).- Returns:
- The Availability Zone or Local Zone of the snapshot. For example,
us-west-1a
(Availability Zone) orus-west-2-lax-1a
(Local Zone).
-
transferType
Only for snapshot copies.
Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.
-
standard
- The snapshot copy was created with a standard snapshot copy operation. -
time-based
- The snapshot copy was created with a time-based snapshot copy operation.
If the service returns an enum value that is not available in the current SDK version,
transferType
will returnTransferType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtransferTypeAsString()
.- Returns:
Only for snapshot copies.
Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.
-
standard
- The snapshot copy was created with a standard snapshot copy operation. -
time-based
- The snapshot copy was created with a time-based snapshot copy operation.
-
- See Also:
-
-
transferTypeAsString
Only for snapshot copies.
Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.
-
standard
- The snapshot copy was created with a standard snapshot copy operation. -
time-based
- The snapshot copy was created with a time-based snapshot copy operation.
If the service returns an enum value that is not available in the current SDK version,
transferType
will returnTransferType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtransferTypeAsString()
.- Returns:
Only for snapshot copies.
Indicates whether the snapshot copy was created with a standard or time-based snapshot copy operation. Time-based snapshot copy operations complete within the completion duration specified in the request. Standard snapshot copy operations are completed on a best-effort basis.
-
standard
- The snapshot copy was created with a standard snapshot copy operation. -
time-based
- The snapshot copy was created with a time-based snapshot copy operation.
-
- See Also:
-
-
completionDurationMinutes
Only for snapshot copies created with time-based snapshot copy operations.
The completion duration requested for the time-based snapshot copy operation.
- Returns:
Only for snapshot copies created with time-based snapshot copy operations.
The completion duration requested for the time-based snapshot copy operation.
-
completionTime
The time stamp when the snapshot was completed.
- Returns:
- The time stamp when the snapshot was completed.
-
fullSnapshotSizeInBytes
The full size of the snapshot, in bytes.
This is not the incremental size of the snapshot. This is the full snapshot size and represents the size of all the blocks that were written to the source volume at the time the snapshot was created.
- Returns:
- The full size of the snapshot, in bytes.
This is not the incremental size of the snapshot. This is the full snapshot size and represents the size of all the blocks that were written to the source volume at the time the snapshot was created.
-
snapshotId
The ID of the snapshot. Each snapshot receives a unique identifier when it is created.
- Returns:
- The ID of the snapshot. Each snapshot receives a unique identifier when it is created.
-
volumeId
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.
- Returns:
- 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.
-
state
The snapshot state.
If the service returns an enum value that is not available in the current SDK version,
state
will returnSnapshotState.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstateAsString()
.- Returns:
- The snapshot state.
- See Also:
-
stateAsString
The snapshot state.
If the service returns an enum value that is not available in the current SDK version,
state
will returnSnapshotState.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromstateAsString()
.- Returns:
- The snapshot state.
- See Also:
-
stateMessage
Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper 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 DescribeSnapshots.
- Returns:
- Encrypted Amazon EBS snapshots are copied asynchronously. If a snapshot copy operation fails (for example, if the proper 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 DescribeSnapshots.
-
startTime
The time stamp when the snapshot was initiated.
- Returns:
- The time stamp when the snapshot was initiated.
-
progress
The progress of the snapshot, as a percentage.
- Returns:
- The progress of the snapshot, as a percentage.
-
ownerId
The ID of the Amazon Web Services account that owns the EBS snapshot.
- Returns:
- The ID of the Amazon Web Services account that owns the EBS snapshot.
-
description
The description for the snapshot.
- Returns:
- The description for the snapshot.
-
volumeSize
The size of the volume, in GiB.
- Returns:
- The size of the volume, in GiB.
-
encrypted
Indicates whether the snapshot is encrypted.
- Returns:
- Indicates whether the snapshot is encrypted.
-
kmsKeyId
The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.
- Returns:
- The Amazon Resource Name (ARN) of the KMS key that was used to protect the volume encryption key for the parent volume.
-
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 DescribeSnapshots.
- Returns:
- 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 DescribeSnapshots.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<CreateSnapshotResponse.Builder,
CreateSnapshotResponse> - Specified by:
toBuilder
in classAwsResponse
- Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode()- Overrides:
hashCode
in classAwsResponse
-
equals
- Overrides:
equals
in classAwsResponse
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
Description copied from class:SdkResponse
Used to retrieve the value of a field from any class that extendsSdkResponse
. The field name specified should match the member name from the corresponding service-2.json model specified in the codegen-resources folder for a given service. The class specifies what class to cast the returned value to. If the returned value is also a modeled class, theSdkResponse.getValueForField(String, Class)
method will again be available.- Overrides:
getValueForField
in classSdkResponse
- Parameters:
fieldName
- The name of the member to be retrieved.clazz
- The class to cast the returned object to.- Returns:
- Optional containing the casted return value
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
- Returns:
- The mapping between the field name and its corresponding field.
-