Class TableDescription
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<TableDescription.Builder,
TableDescription>
Represents the properties of a table.
- See Also:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal ArchivalSummary
Contains information about the table archive.final List
<AttributeDefinition> An array ofAttributeDefinition
objects.final BillingModeSummary
Contains the details for the read/write capacity mode.static TableDescription.Builder
builder()
final Instant
The date and time when the table was created, in UNIX epoch time format.final Boolean
Indicates whether deletion protection is enabled (true) or disabled (false) on the table.final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) The global secondary indexes, if any, on the table.final String
Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.final boolean
For responses, this returns true if the service returned a value for the AttributeDefinitions property.final boolean
For responses, this returns true if the service returned a value for the GlobalSecondaryIndexes property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the KeySchema property.final boolean
For responses, this returns true if the service returned a value for the LocalSecondaryIndexes property.final boolean
For responses, this returns true if the service returned a value for the Replicas property.final Long
The number of items in the specified table.final List
<KeySchemaElement> The primary key structure for the table.final String
The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.final String
A timestamp, in ISO 8601 format, for this stream.Represents one or more local secondary indexes on the table.The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.final List
<ReplicaDescription> replicas()
Represents replicas of the table.final RestoreSummary
Contains details for the restore.static Class
<? extends TableDescription.Builder> final SSEDescription
The description of the server-side encryption status on the specified table.final StreamSpecification
The current DynamoDB Streams configuration for the table.final String
tableArn()
The Amazon Resource Name (ARN) that uniquely identifies the table.final TableClassSummary
Contains details of the table class.final String
tableId()
Unique identifier for the table for which the backup was created.final String
The name of the table.final Long
The total size of the specified table, in bytes.final TableStatus
The current state of the table:final String
The current state of the table: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.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
hasAttributeDefinitions
public final boolean hasAttributeDefinitions()For responses, this returns true if the service returned a value for the AttributeDefinitions 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. -
attributeDefinitions
An array of
AttributeDefinition
objects. Each of these objects describes one attribute in the table and index key schema.Each
AttributeDefinition
object in this array is composed of:-
AttributeName
- The name of the attribute. -
AttributeType
- The data type for the attribute.
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
hasAttributeDefinitions()
method.- Returns:
- An array of
AttributeDefinition
objects. Each of these objects describes one attribute in the table and index key schema.Each
AttributeDefinition
object in this array is composed of:-
AttributeName
- The name of the attribute. -
AttributeType
- The data type for the attribute.
-
-
-
tableName
The name of the table.
- Returns:
- The name of the table.
-
hasKeySchema
public final boolean hasKeySchema()For responses, this returns true if the service returned a value for the KeySchema 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. -
keySchema
The primary key structure for the table. Each
KeySchemaElement
consists of:-
AttributeName
- The name of the attribute. -
KeyType
- The role of the attribute:-
HASH
- partition key -
RANGE
- sort key
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
-
For more information about primary keys, see Primary Key in the Amazon DynamoDB Developer Guide.
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
hasKeySchema()
method.- Returns:
- The primary key structure for the table. Each
KeySchemaElement
consists of:-
AttributeName
- The name of the attribute. -
KeyType
- The role of the attribute:-
HASH
- partition key -
RANGE
- sort key
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB's usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
-
For more information about primary keys, see Primary Key in the Amazon DynamoDB Developer Guide.
-
-
-
tableStatus
The current state of the table:
-
CREATING
- The table is being created. -
UPDATING
- The table/index configuration is being updated. The table/index remains available for data operations whenUPDATING
. -
DELETING
- The table is being deleted. -
ACTIVE
- The table is ready for use. -
INACCESSIBLE_ENCRYPTION_CREDENTIALS
- The KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the KMS key. DynamoDB will initiate the table archival process when a table's KMS key remains inaccessible for more than seven days. -
ARCHIVING
- The table is being archived. Operations are not allowed until archival is complete. -
ARCHIVED
- The table has been archived. See the ArchivalReason for more information.
If the service returns an enum value that is not available in the current SDK version,
tableStatus
will returnTableStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtableStatusAsString()
.- Returns:
- The current state of the table:
-
CREATING
- The table is being created. -
UPDATING
- The table/index configuration is being updated. The table/index remains available for data operations whenUPDATING
. -
DELETING
- The table is being deleted. -
ACTIVE
- The table is ready for use. -
INACCESSIBLE_ENCRYPTION_CREDENTIALS
- The KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the KMS key. DynamoDB will initiate the table archival process when a table's KMS key remains inaccessible for more than seven days. -
ARCHIVING
- The table is being archived. Operations are not allowed until archival is complete. -
ARCHIVED
- The table has been archived. See the ArchivalReason for more information.
-
- See Also:
-
-
tableStatusAsString
The current state of the table:
-
CREATING
- The table is being created. -
UPDATING
- The table/index configuration is being updated. The table/index remains available for data operations whenUPDATING
. -
DELETING
- The table is being deleted. -
ACTIVE
- The table is ready for use. -
INACCESSIBLE_ENCRYPTION_CREDENTIALS
- The KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the KMS key. DynamoDB will initiate the table archival process when a table's KMS key remains inaccessible for more than seven days. -
ARCHIVING
- The table is being archived. Operations are not allowed until archival is complete. -
ARCHIVED
- The table has been archived. See the ArchivalReason for more information.
If the service returns an enum value that is not available in the current SDK version,
tableStatus
will returnTableStatus.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromtableStatusAsString()
.- Returns:
- The current state of the table:
-
CREATING
- The table is being created. -
UPDATING
- The table/index configuration is being updated. The table/index remains available for data operations whenUPDATING
. -
DELETING
- The table is being deleted. -
ACTIVE
- The table is ready for use. -
INACCESSIBLE_ENCRYPTION_CREDENTIALS
- The KMS key used to encrypt the table in inaccessible. Table operations may fail due to failure to use the KMS key. DynamoDB will initiate the table archival process when a table's KMS key remains inaccessible for more than seven days. -
ARCHIVING
- The table is being archived. Operations are not allowed until archival is complete. -
ARCHIVED
- The table has been archived. See the ArchivalReason for more information.
-
- See Also:
-
-
creationDateTime
The date and time when the table was created, in UNIX epoch time format.
- Returns:
- The date and time when the table was created, in UNIX epoch time format.
-
provisionedThroughput
The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.
- Returns:
- The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.
-
tableSizeBytes
The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
- Returns:
- The total size of the specified table, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
-
itemCount
The number of items in the specified table. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
- Returns:
- The number of items in the specified table. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
-
tableArn
The Amazon Resource Name (ARN) that uniquely identifies the table.
- Returns:
- The Amazon Resource Name (ARN) that uniquely identifies the table.
-
tableId
Unique identifier for the table for which the backup was created.
- Returns:
- Unique identifier for the table for which the backup was created.
-
billingModeSummary
Contains the details for the read/write capacity mode.
- Returns:
- Contains the details for the read/write capacity mode.
-
hasLocalSecondaryIndexes
public final boolean hasLocalSecondaryIndexes()For responses, this returns true if the service returned a value for the LocalSecondaryIndexes 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. -
localSecondaryIndexes
Represents one or more local secondary indexes on the table. Each index is scoped to a given partition key value. Tables with one or more local secondary indexes are subject to an item collection size limit, where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed of:
-
IndexName
- The name of the local secondary index. -
KeySchema
- Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. -
Projection
- Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:-
ProjectionType
- One of the following:-
KEYS_ONLY
- Only the index and primary keys are projected into the index. -
INCLUDE
- Only the specified table attributes are projected into the index. The list of projected attributes is inNonKeyAttributes
. -
ALL
- All of the table attributes are projected into the index.
-
-
NonKeyAttributes
- A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided inNonKeyAttributes
, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
-
-
IndexSizeBytes
- Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. -
ItemCount
- Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
If the table is in the
DELETING
state, no information about indexes will be returned.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
hasLocalSecondaryIndexes()
method.- Returns:
- Represents one or more local secondary indexes on the table. Each index is scoped to a given partition
key value. Tables with one or more local secondary indexes are subject to an item collection size limit,
where the amount of data within a given item collection cannot exceed 10 GB. Each element is composed
of:
-
IndexName
- The name of the local secondary index. -
KeySchema
- Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. -
Projection
- Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:-
ProjectionType
- One of the following:-
KEYS_ONLY
- Only the index and primary keys are projected into the index. -
INCLUDE
- Only the specified table attributes are projected into the index. The list of projected attributes is inNonKeyAttributes
. -
ALL
- All of the table attributes are projected into the index.
-
-
NonKeyAttributes
- A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided inNonKeyAttributes
, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
-
-
IndexSizeBytes
- Represents the total size of the index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. -
ItemCount
- Represents the number of items in the index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.
If the table is in the
DELETING
state, no information about indexes will be returned. -
-
-
hasGlobalSecondaryIndexes
public final boolean hasGlobalSecondaryIndexes()For responses, this returns true if the service returned a value for the GlobalSecondaryIndexes 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. -
globalSecondaryIndexes
The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value. Each element is composed of:
-
Backfilling
- If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table. It is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during aCreateTable
operation.)You can delete an index that is being created during the
Backfilling
phase whenIndexStatus
is set to CREATING andBackfilling
is true. You can't delete the index that is being created whenIndexStatus
is set to CREATING andBackfilling
is false. (This attribute does not appear for indexes that were created during aCreateTable
operation.) -
IndexName
- The name of the global secondary index. -
IndexSizeBytes
- The total size of the global secondary index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. -
IndexStatus
- The current status of the global secondary index:-
CREATING
- The index is being created. -
UPDATING
- The index is being updated. -
DELETING
- The index is being deleted. -
ACTIVE
- The index is ready for use.
-
-
ItemCount
- The number of items in the global secondary index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. -
KeySchema
- Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. -
Projection
- Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:-
ProjectionType
- One of the following:-
KEYS_ONLY
- Only the index and primary keys are projected into the index. -
INCLUDE
- In addition to the attributes described inKEYS_ONLY
, the secondary index will include other non-key attributes that you specify. -
ALL
- All of the table attributes are projected into the index.
-
-
NonKeyAttributes
- A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided inNonKeyAttributes
, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
-
-
ProvisionedThroughput
- The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases.
If the table is in the
DELETING
state, no information about indexes will be returned.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
hasGlobalSecondaryIndexes()
method.- Returns:
- The global secondary indexes, if any, on the table. Each index is scoped to a given partition key value.
Each element is composed of:
-
Backfilling
- If true, then the index is currently in the backfilling phase. Backfilling occurs only when a new global secondary index is added to the table. It is the process by which DynamoDB populates the new index with data from the table. (This attribute does not appear for indexes that were created during aCreateTable
operation.)You can delete an index that is being created during the
Backfilling
phase whenIndexStatus
is set to CREATING andBackfilling
is true. You can't delete the index that is being created whenIndexStatus
is set to CREATING andBackfilling
is false. (This attribute does not appear for indexes that were created during aCreateTable
operation.) -
IndexName
- The name of the global secondary index. -
IndexSizeBytes
- The total size of the global secondary index, in bytes. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. -
IndexStatus
- The current status of the global secondary index:-
CREATING
- The index is being created. -
UPDATING
- The index is being updated. -
DELETING
- The index is being deleted. -
ACTIVE
- The index is ready for use.
-
-
ItemCount
- The number of items in the global secondary index. DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value. -
KeySchema
- Specifies the complete index key schema. The attribute names in the key schema must be between 1 and 255 characters (inclusive). The key schema must begin with the same partition key as the table. -
Projection
- Specifies attributes that are copied (projected) from the table into the index. These are in addition to the primary key attributes and index key attributes, which are automatically projected. Each attribute specification is composed of:-
ProjectionType
- One of the following:-
KEYS_ONLY
- Only the index and primary keys are projected into the index. -
INCLUDE
- In addition to the attributes described inKEYS_ONLY
, the secondary index will include other non-key attributes that you specify. -
ALL
- All of the table attributes are projected into the index.
-
-
NonKeyAttributes
- A list of one or more non-key attribute names that are projected into the secondary index. The total count of attributes provided inNonKeyAttributes
, summed across all of the secondary indexes, must not exceed 100. If you project the same attribute into two different indexes, this counts as two distinct attributes when determining the total.
-
-
ProvisionedThroughput
- The provisioned throughput settings for the global secondary index, consisting of read and write capacity units, along with data about increases and decreases.
If the table is in the
DELETING
state, no information about indexes will be returned. -
-
-
streamSpecification
The current DynamoDB Streams configuration for the table.
- Returns:
- The current DynamoDB Streams configuration for the table.
-
latestStreamLabel
A timestamp, in ISO 8601 format, for this stream.
Note that
LatestStreamLabel
is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:-
Amazon Web Services customer ID
-
Table name
-
StreamLabel
- Returns:
- A timestamp, in ISO 8601 format, for this stream.
Note that
LatestStreamLabel
is not a unique identifier for the stream, because it is possible that a stream from another table might have the same timestamp. However, the combination of the following three elements is guaranteed to be unique:-
Amazon Web Services customer ID
-
Table name
-
StreamLabel
-
-
-
latestStreamArn
The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.
- Returns:
- The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.
-
globalTableVersion
Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.
- Returns:
- Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.
-
hasReplicas
public final boolean hasReplicas()For responses, this returns true if the service returned a value for the Replicas 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. -
replicas
Represents replicas of the table.
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
hasReplicas()
method.- Returns:
- Represents replicas of the table.
-
restoreSummary
Contains details for the restore.
- Returns:
- Contains details for the restore.
-
sseDescription
The description of the server-side encryption status on the specified table.
- Returns:
- The description of the server-side encryption status on the specified table.
-
archivalSummary
Contains information about the table archive.
- Returns:
- Contains information about the table archive.
-
tableClassSummary
Contains details of the table class.
- Returns:
- Contains details of the table class.
-
deletionProtectionEnabled
Indicates whether deletion protection is enabled (true) or disabled (false) on the table.
- Returns:
- Indicates whether deletion protection is enabled (true) or disabled (false) on the table.
-
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<TableDescription.Builder,
TableDescription> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
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
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. -
getValueForField
-
sdkFields
-