Class Snapshot
- java.lang.Object
-
- software.amazon.awssdk.services.redshift.model.Snapshot
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Snapshot.Builder,Snapshot>
@Generated("software.amazon.awssdk:codegen") public final class Snapshot extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Snapshot.Builder,Snapshot>
Describes a snapshot.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceSnapshot.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<AccountWithRestoreAccess>accountsWithRestoreAccess()A list of the Amazon Web Services accounts authorized to restore the snapshot.DoubleactualIncrementalBackupSizeInMegaBytes()The size of the incremental backup.StringavailabilityZone()The Availability Zone in which the cluster was created.DoublebackupProgressInMegaBytes()The number of megabytes that have been transferred to the snapshot backup.static Snapshot.Builderbuilder()InstantclusterCreateTime()The time (UTC) when the cluster was originally created.StringclusterIdentifier()The identifier of the cluster for which the snapshot was taken.StringclusterVersion()The version ID of the Amazon Redshift engine that is running on the cluster.DoublecurrentBackupRateInMegaBytesPerSecond()The number of megabytes per second being transferred to the snapshot backup.StringdbName()The name of the database that was created when the cluster was created.LongelapsedTimeInSeconds()The amount of time an in-progress snapshot backup has been running, or the amount of time it took a completed backup to finish.Booleanencrypted()Iftrue, the data in the snapshot is encrypted at rest.BooleanencryptedWithHSM()A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster.StringengineFullVersion()The cluster version of the cluster used to create the snapshot.BooleanenhancedVpcRouting()An option that specifies whether to create the cluster with enhanced VPC routing enabled.booleanequals(Object obj)booleanequalsBySdkFields(Object obj)LongestimatedSecondsToCompletion()The estimate of the time remaining before the snapshot backup will complete.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasAccountsWithRestoreAccess()For responses, this returns true if the service returned a value for the AccountsWithRestoreAccess property.inthashCode()booleanhasRestorableNodeTypes()For responses, this returns true if the service returned a value for the RestorableNodeTypes property.booleanhasTags()For responses, this returns true if the service returned a value for the Tags property.StringkmsKeyId()The Key Management Service (KMS) key ID of the encryption key that was used to encrypt data in the cluster from which the snapshot was taken.StringmaintenanceTrackName()The name of the maintenance track for the snapshot.IntegermanualSnapshotRemainingDays()The number of days until a manual snapshot will pass its retention period.IntegermanualSnapshotRetentionPeriod()The number of days that a manual snapshot is retained.StringmasterPasswordSecretArn()The Amazon Resource Name (ARN) for the cluster's admin user credentials secret.StringmasterPasswordSecretKmsKeyId()The ID of the Key Management Service (KMS) key used to encrypt and store the cluster's admin credentials secret.StringmasterUsername()The admin user name for the cluster.StringnodeType()The node type of the nodes in the cluster.IntegernumberOfNodes()The number of nodes in the cluster.StringownerAccount()For manual snapshots, the Amazon Web Services account used to create or copy the snapshot.Integerport()The port that the cluster is listening on.List<String>restorableNodeTypes()The list of node types that this cluster snapshot is able to restore into.List<SdkField<?>>sdkFields()static Class<? extends Snapshot.Builder>serializableBuilderClass()StringsnapshotArn()The Amazon Resource Name (ARN) of the snapshot.InstantsnapshotCreateTime()The time (in UTC format) when Amazon Redshift began the snapshot.StringsnapshotIdentifier()The snapshot identifier that is provided in the request.InstantsnapshotRetentionStartTime()A timestamp representing the start of the retention period for the snapshot.StringsnapshotType()The snapshot type.StringsourceRegion()The source region from which the snapshot was copied.Stringstatus()The snapshot status.List<Tag>tags()The list of tags for the cluster snapshot.Snapshot.BuildertoBuilder()StringtoString()Returns a string representation of this object.DoubletotalBackupSizeInMegaBytes()The size of the complete set of backup data that would be used to restore the cluster.StringvpcId()The VPC identifier of the cluster if the snapshot is from a cluster in a VPC.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
snapshotIdentifier
public final String snapshotIdentifier()
The snapshot identifier that is provided in the request.
- Returns:
- The snapshot identifier that is provided in the request.
-
clusterIdentifier
public final String clusterIdentifier()
The identifier of the cluster for which the snapshot was taken.
- Returns:
- The identifier of the cluster for which the snapshot was taken.
-
snapshotCreateTime
public final Instant snapshotCreateTime()
The time (in UTC format) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time.
- Returns:
- The time (in UTC format) when Amazon Redshift began the snapshot. A snapshot contains a copy of the cluster data as of this exact time.
-
status
public final String status()
The snapshot status. The value of the status depends on the API operation used:
-
CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating".
-
DescribeClusterSnapshots returns status as "creating", "available", "final snapshot", or "failed".
-
DeleteClusterSnapshot returns status as "deleted".
- Returns:
- The snapshot status. The value of the status depends on the API operation used:
-
CreateClusterSnapshot and CopyClusterSnapshot returns status as "creating".
-
DescribeClusterSnapshots returns status as "creating", "available", "final snapshot", or "failed".
-
DeleteClusterSnapshot returns status as "deleted".
-
-
-
port
public final Integer port()
The port that the cluster is listening on.
- Returns:
- The port that the cluster is listening on.
-
availabilityZone
public final String availabilityZone()
The Availability Zone in which the cluster was created.
- Returns:
- The Availability Zone in which the cluster was created.
-
clusterCreateTime
public final Instant clusterCreateTime()
The time (UTC) when the cluster was originally created.
- Returns:
- The time (UTC) when the cluster was originally created.
-
masterUsername
public final String masterUsername()
The admin user name for the cluster.
- Returns:
- The admin user name for the cluster.
-
clusterVersion
public final String clusterVersion()
The version ID of the Amazon Redshift engine that is running on the cluster.
- Returns:
- The version ID of the Amazon Redshift engine that is running on the cluster.
-
engineFullVersion
public final String engineFullVersion()
The cluster version of the cluster used to create the snapshot. For example, 1.0.15503.
- Returns:
- The cluster version of the cluster used to create the snapshot. For example, 1.0.15503.
-
snapshotType
public final String snapshotType()
The snapshot type. Snapshots created using CreateClusterSnapshot and CopyClusterSnapshot are of type "manual".
- Returns:
- The snapshot type. Snapshots created using CreateClusterSnapshot and CopyClusterSnapshot are of type "manual".
-
nodeType
public final String nodeType()
The node type of the nodes in the cluster.
- Returns:
- The node type of the nodes in the cluster.
-
numberOfNodes
public final Integer numberOfNodes()
The number of nodes in the cluster.
- Returns:
- The number of nodes in the cluster.
-
dbName
public final String dbName()
The name of the database that was created when the cluster was created.
- Returns:
- The name of the database that was created when the cluster was created.
-
vpcId
public final String vpcId()
The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output.
- Returns:
- The VPC identifier of the cluster if the snapshot is from a cluster in a VPC. Otherwise, this field is not in the output.
-
encrypted
public final Boolean encrypted()
If
true, the data in the snapshot is encrypted at rest.- Returns:
- If
true, the data in the snapshot is encrypted at rest.
-
kmsKeyId
public final String kmsKeyId()
The Key Management Service (KMS) key ID of the encryption key that was used to encrypt data in the cluster from which the snapshot was taken.
- Returns:
- The Key Management Service (KMS) key ID of the encryption key that was used to encrypt data in the cluster from which the snapshot was taken.
-
encryptedWithHSM
public final Boolean encryptedWithHSM()
A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster.
trueindicates that the data is encrypted using HSM keys.- Returns:
- A boolean that indicates whether the snapshot data is encrypted using the HSM keys of the source cluster.
trueindicates that the data is encrypted using HSM keys.
-
hasAccountsWithRestoreAccess
public final boolean hasAccountsWithRestoreAccess()
For responses, this returns true if the service returned a value for the AccountsWithRestoreAccess 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.
-
accountsWithRestoreAccess
public final List<AccountWithRestoreAccess> accountsWithRestoreAccess()
A list of the Amazon Web Services accounts authorized to restore the snapshot. Returns
nullif no accounts are authorized. Visible only to the snapshot owner.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
hasAccountsWithRestoreAccess()method.- Returns:
- A list of the Amazon Web Services accounts authorized to restore the snapshot. Returns
nullif no accounts are authorized. Visible only to the snapshot owner.
-
ownerAccount
public final String ownerAccount()
For manual snapshots, the Amazon Web Services account used to create or copy the snapshot. For automatic snapshots, the owner of the cluster. The owner can perform all snapshot actions, such as sharing a manual snapshot.
- Returns:
- For manual snapshots, the Amazon Web Services account used to create or copy the snapshot. For automatic snapshots, the owner of the cluster. The owner can perform all snapshot actions, such as sharing a manual snapshot.
-
totalBackupSizeInMegaBytes
public final Double totalBackupSizeInMegaBytes()
The size of the complete set of backup data that would be used to restore the cluster.
- Returns:
- The size of the complete set of backup data that would be used to restore the cluster.
-
actualIncrementalBackupSizeInMegaBytes
public final Double actualIncrementalBackupSizeInMegaBytes()
The size of the incremental backup.
- Returns:
- The size of the incremental backup.
-
backupProgressInMegaBytes
public final Double backupProgressInMegaBytes()
The number of megabytes that have been transferred to the snapshot backup.
- Returns:
- The number of megabytes that have been transferred to the snapshot backup.
-
currentBackupRateInMegaBytesPerSecond
public final Double currentBackupRateInMegaBytesPerSecond()
The number of megabytes per second being transferred to the snapshot backup. Returns
0for a completed backup.- Returns:
- The number of megabytes per second being transferred to the snapshot backup. Returns
0for a completed backup.
-
estimatedSecondsToCompletion
public final Long estimatedSecondsToCompletion()
The estimate of the time remaining before the snapshot backup will complete. Returns
0for a completed backup.- Returns:
- The estimate of the time remaining before the snapshot backup will complete. Returns
0for a completed backup.
-
elapsedTimeInSeconds
public final Long elapsedTimeInSeconds()
The amount of time an in-progress snapshot backup has been running, or the amount of time it took a completed backup to finish.
- Returns:
- The amount of time an in-progress snapshot backup has been running, or the amount of time it took a completed backup to finish.
-
sourceRegion
public final String sourceRegion()
The source region from which the snapshot was copied.
- Returns:
- The source region from which the snapshot was copied.
-
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
public final List<Tag> tags()
The list of tags for the cluster 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:
- The list of tags for the cluster snapshot.
-
hasRestorableNodeTypes
public final boolean hasRestorableNodeTypes()
For responses, this returns true if the service returned a value for the RestorableNodeTypes 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.
-
restorableNodeTypes
public final List<String> restorableNodeTypes()
The list of node types that this cluster snapshot is able to restore into.
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
hasRestorableNodeTypes()method.- Returns:
- The list of node types that this cluster snapshot is able to restore into.
-
enhancedVpcRouting
public final Boolean enhancedVpcRouting()
An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC Routing in the Amazon Redshift Cluster Management Guide.
If this option is
true, enhanced VPC routing is enabled.Default: false
- Returns:
- An option that specifies whether to create the cluster with enhanced VPC routing enabled. To create a
cluster that uses enhanced VPC routing, the cluster must be in a VPC. For more information, see Enhanced VPC
Routing in the Amazon Redshift Cluster Management Guide.
If this option is
true, enhanced VPC routing is enabled.Default: false
-
maintenanceTrackName
public final String maintenanceTrackName()
The name of the maintenance track for the snapshot.
- Returns:
- The name of the maintenance track for the snapshot.
-
manualSnapshotRetentionPeriod
public final Integer manualSnapshotRetentionPeriod()
The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is retained indefinitely.
The value must be either -1 or an integer between 1 and 3,653.
- Returns:
- The number of days that a manual snapshot is retained. If the value is -1, the manual snapshot is
retained indefinitely.
The value must be either -1 or an integer between 1 and 3,653.
-
manualSnapshotRemainingDays
public final Integer manualSnapshotRemainingDays()
The number of days until a manual snapshot will pass its retention period.
- Returns:
- The number of days until a manual snapshot will pass its retention period.
-
snapshotRetentionStartTime
public final Instant snapshotRetentionStartTime()
A timestamp representing the start of the retention period for the snapshot.
- Returns:
- A timestamp representing the start of the retention period for the snapshot.
-
masterPasswordSecretArn
public final String masterPasswordSecretArn()
The Amazon Resource Name (ARN) for the cluster's admin user credentials secret.
- Returns:
- The Amazon Resource Name (ARN) for the cluster's admin user credentials secret.
-
masterPasswordSecretKmsKeyId
public final String masterPasswordSecretKmsKeyId()
The ID of the Key Management Service (KMS) key used to encrypt and store the cluster's admin credentials secret.
- Returns:
- The ID of the Key Management Service (KMS) key used to encrypt and store the cluster's admin credentials secret.
-
snapshotArn
public final String snapshotArn()
The Amazon Resource Name (ARN) of the snapshot.
- Returns:
- The Amazon Resource Name (ARN) of the snapshot.
-
toBuilder
public Snapshot.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Snapshot.Builder,Snapshot>
-
builder
public static Snapshot.Builder builder()
-
serializableBuilderClass
public static Class<? extends Snapshot.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
-