class Amazonite::DynamoDB::TableDescription

Overview

Represents the properties of a table.

Included Modules

Defined in:

dynamodb/table_description.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]
def self.new(attribute_definitions : Array(AttributeDefinition) | Nil = nil, table_name : String | Nil = nil, key_schema : Array(KeySchemaElement) | Nil = nil, table_status : TableStatus | Nil = nil, creation_date_time : Time | Nil = nil, provisioned_throughput : ProvisionedThroughputDescription | Nil = nil, table_size_bytes : Int64 | Nil = nil, item_count : Int64 | Nil = nil, table_arn : String | Nil = nil, table_id : String | Nil = nil, billing_mode_summary : BillingModeSummary | Nil = nil, local_secondary_indexes : Array(LocalSecondaryIndexDescription) | Nil = nil, global_secondary_indexes : Array(GlobalSecondaryIndexDescription) | Nil = nil, stream_specification : StreamSpecification | Nil = nil, latest_stream_label : String | Nil = nil, latest_stream_arn : String | Nil = nil, global_table_version : String | Nil = nil, replicas : Array(ReplicaDescription) | Nil = nil, global_table_witnesses : Array(GlobalTableWitnessDescription) | Nil = nil, global_table_settings_replication_mode : GlobalTableSettingsReplicationMode | Nil = nil, restore_summary : RestoreSummary | Nil = nil, sse_description : SSEDescription | Nil = nil, archival_summary : ArchivalSummary | Nil = nil, table_class_summary : TableClassSummary | Nil = nil, deletion_protection_enabled : Bool | Nil = nil, on_demand_throughput : OnDemandThroughput | Nil = nil, warm_throughput : TableWarmThroughputDescription | Nil = nil, multi_region_consistency : MultiRegionConsistency | Nil = nil, vector_indexes : Array(VectorIndexDescription) | Nil = nil) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def archival_summary : ArchivalSummary | Nil #

Contains information about the table archive.


[View source]
def archival_summary=(archival_summary : ArchivalSummary | Nil) #

Contains information about the table archive.


[View source]
def attribute_definitions : Array(AttributeDefinition) | Nil #

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.


[View source]
def attribute_definitions=(attribute_definitions : Array(AttributeDefinition) | Nil) #

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.


[View source]
def billing_mode_summary : BillingModeSummary | Nil #

Contains the details for the read/write capacity mode.


[View source]
def billing_mode_summary=(billing_mode_summary : BillingModeSummary | Nil) #

Contains the details for the read/write capacity mode.


[View source]
def creation_date_time : Time | Nil #

The date and time when the table was created, in UNIX epoch time format.


[View source]
def creation_date_time=(creation_date_time : Time | Nil) #

The date and time when the table was created, in UNIX epoch time format.


[View source]
def deletion_protection_enabled : Bool | Nil #

Indicates whether deletion protection is enabled (true) or disabled (false) on the table.


[View source]
def deletion_protection_enabled=(deletion_protection_enabled : Bool | Nil) #

Indicates whether deletion protection is enabled (true) or disabled (false) on the table.


[View source]
def global_secondary_indexes : Array(GlobalSecondaryIndexDescription) | Nil #

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 a CreateTable operation.)

You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING and Backfilling is false. (This attribute does not appear for indexes that were created during a CreateTable 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 in KEYS_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 in NonKeyAttributes, 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. This limit only applies when you specify the ProjectionType of INCLUDE. You still can specify the ProjectionType of ALL to project all attributes from the source table, even if the table has more than 100 attributes.

  • 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.


[View source]
def global_secondary_indexes=(global_secondary_indexes : Array(GlobalSecondaryIndexDescription) | Nil) #

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 a CreateTable operation.)

You can delete an index that is being created during the Backfilling phase when IndexStatus is set to CREATING and Backfilling is true. You can't delete the index that is being created when IndexStatus is set to CREATING and Backfilling is false. (This attribute does not appear for indexes that were created during a CreateTable 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 in KEYS_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 in NonKeyAttributes, 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. This limit only applies when you specify the ProjectionType of INCLUDE. You still can specify the ProjectionType of ALL to project all attributes from the source table, even if the table has more than 100 attributes.

  • 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.


[View source]
def global_table_settings_replication_mode : GlobalTableSettingsReplicationMode | Nil #

Indicates one of the settings synchronization modes for the global table:

  • ENABLED: Indicates that the settings synchronization mode for the global table is enabled.

  • DISABLED: Indicates that the settings synchronization mode for the global table is disabled.

  • ENABLED_WITH_OVERRIDES: This mode is set by default for a same account global table. Indicates that certain global table settings can be overridden.


[View source]
def global_table_settings_replication_mode=(global_table_settings_replication_mode : GlobalTableSettingsReplicationMode | Nil) #

Indicates one of the settings synchronization modes for the global table:

  • ENABLED: Indicates that the settings synchronization mode for the global table is enabled.

  • DISABLED: Indicates that the settings synchronization mode for the global table is disabled.

  • ENABLED_WITH_OVERRIDES: This mode is set by default for a same account global table. Indicates that certain global table settings can be overridden.


[View source]
def global_table_version : String | Nil #

Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.


[View source]
def global_table_version=(global_table_version : String | Nil) #

Represents the version of global tables in use, if the table is replicated across Amazon Web Services Regions.


[View source]
def global_table_witnesses : Array(GlobalTableWitnessDescription) | Nil #

The witness Region and its current status in the MRSC global table. Only one witness Region can be configured per MRSC global table.


[View source]
def global_table_witnesses=(global_table_witnesses : Array(GlobalTableWitnessDescription) | Nil) #

The witness Region and its current status in the MRSC global table. Only one witness Region can be configured per MRSC global table.


[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def item_count : Int64 | Nil #

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.


[View source]
def item_count=(item_count : Int64 | Nil) #

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.


[View source]
def key_schema : Array(KeySchemaElement) | Nil #

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.


[View source]
def key_schema=(key_schema : Array(KeySchemaElement) | Nil) #

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.


[View source]
def latest_stream_arn : String | Nil #

The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.


[View source]
def latest_stream_arn=(latest_stream_arn : String | Nil) #

The Amazon Resource Name (ARN) that uniquely identifies the latest stream for this table.


[View source]
def latest_stream_label : String | Nil #

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


[View source]
def latest_stream_label=(latest_stream_label : String | Nil) #

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


[View source]
def local_secondary_indexes : Array(LocalSecondaryIndexDescription) | Nil #

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 in NonKeyAttributes.

  • 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 in NonKeyAttributes, 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. This limit only applies when you specify the ProjectionType of INCLUDE. You still can specify the ProjectionType of ALL to project all attributes from the source table, even if the table has more than 100 attributes.

  • 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.


[View source]
def local_secondary_indexes=(local_secondary_indexes : Array(LocalSecondaryIndexDescription) | Nil) #

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 in NonKeyAttributes.

  • 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 in NonKeyAttributes, 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. This limit only applies when you specify the ProjectionType of INCLUDE. You still can specify the ProjectionType of ALL to project all attributes from the source table, even if the table has more than 100 attributes.

  • 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.


[View source]
def multi_region_consistency : MultiRegionConsistency | Nil #

Indicates one of the following consistency modes for a global table:

  • EVENTUAL: Indicates that the global table is configured for multi-Region eventual consistency (MREC).

  • STRONG: Indicates that the global table is configured for multi-Region strong consistency (MRSC).

If you don't specify this field, the global table consistency mode defaults to EVENTUAL. For more information about global tables consistency modes, see Consistency modes in DynamoDB developer guide.


[View source]
def multi_region_consistency=(multi_region_consistency : MultiRegionConsistency | Nil) #

Indicates one of the following consistency modes for a global table:

  • EVENTUAL: Indicates that the global table is configured for multi-Region eventual consistency (MREC).

  • STRONG: Indicates that the global table is configured for multi-Region strong consistency (MRSC).

If you don't specify this field, the global table consistency mode defaults to EVENTUAL. For more information about global tables consistency modes, see Consistency modes in DynamoDB developer guide.


[View source]
def on_demand_throughput : OnDemandThroughput | Nil #

The maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits, MaxWriteRequestUnits, or both.


[View source]
def on_demand_throughput=(on_demand_throughput : OnDemandThroughput | Nil) #

The maximum number of read and write units for the specified on-demand table. If you use this parameter, you must specify MaxReadRequestUnits, MaxWriteRequestUnits, or both.


[View source]
def provisioned_throughput : ProvisionedThroughputDescription | Nil #

The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.


[View source]
def provisioned_throughput=(provisioned_throughput : ProvisionedThroughputDescription | Nil) #

The provisioned throughput settings for the table, consisting of read and write capacity units, along with data about increases and decreases.


[View source]
def replicas : Array(ReplicaDescription) | Nil #

Represents replicas of the table.


[View source]
def replicas=(replicas : Array(ReplicaDescription) | Nil) #

Represents replicas of the table.


[View source]
def restore_summary : RestoreSummary | Nil #

Contains details for the restore.


[View source]
def restore_summary=(restore_summary : RestoreSummary | Nil) #

Contains details for the restore.


[View source]
def sse_description : SSEDescription | Nil #

The description of the server-side encryption status on the specified table.


[View source]
def sse_description=(sse_description : SSEDescription | Nil) #

The description of the server-side encryption status on the specified table.


[View source]
def stream_specification : StreamSpecification | Nil #

The current DynamoDB Streams configuration for the table.


[View source]
def stream_specification=(stream_specification : StreamSpecification | Nil) #

The current DynamoDB Streams configuration for the table.


[View source]
def table_arn : String | Nil #

The Amazon Resource Name (ARN) that uniquely identifies the table.


[View source]
def table_arn=(table_arn : String | Nil) #

The Amazon Resource Name (ARN) that uniquely identifies the table.


[View source]
def table_class_summary : TableClassSummary | Nil #

Contains details of the table class.


[View source]
def table_class_summary=(table_class_summary : TableClassSummary | Nil) #

Contains details of the table class.


[View source]
def table_id : String | Nil #

A unique identifier for the table, in UUID format, generated by DynamoDB when the table is created.


[View source]
def table_id=(table_id : String | Nil) #

A unique identifier for the table, in UUID format, generated by DynamoDB when the table is created.


[View source]
def table_name : String | Nil #

The name of the table.


[View source]
def table_name=(table_name : String | Nil) #

The name of the table.


[View source]
def table_size_bytes : Int64 | Nil #

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.


[View source]
def table_size_bytes=(table_size_bytes : Int64 | Nil) #

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.


[View source]
def table_status : TableStatus | Nil #

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 when UPDATING.

  • 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.


[View source]
def table_status=(table_status : TableStatus | Nil) #

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 when UPDATING.

  • 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.


[View source]
def validate! : Nil #

[View source]
def vector_indexes : Array(VectorIndexDescription) | Nil #

The vector indexes, if any, on the table. Each element is composed of:

  • IndexName - The name of the vector index.

  • IndexStatus - The current status of the vector index: CREATING, ACTIVE, or DELETING.

  • Backfilling - Specifies whether the index is currently backfilling. During backfill, SearchVectors operations might return incomplete results.

  • VectorAttribute - The attribute that contains vector embeddings.

  • Dimensions - The number of dimensions in each vector.

  • DistanceFunction - The distance function used to calculate similarity (COSINE, EUCLIDEAN, or DOT_PRODUCT).

  • SearchSchema - The partition key and inline filter attributes for the vector index.

  • Projection - Specifies attributes that are copied (projected) from the table into the vector index.

  • IndexArn - The Amazon Resource Name (ARN) that uniquely identifies the index.

  • IndexSizeBytes - The total size of the vector index, in bytes. Amazon DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

  • ItemCount - The number of items indexed in the vector index. Amazon DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.


[View source]
def vector_indexes=(vector_indexes : Array(VectorIndexDescription) | Nil) #

The vector indexes, if any, on the table. Each element is composed of:

  • IndexName - The name of the vector index.

  • IndexStatus - The current status of the vector index: CREATING, ACTIVE, or DELETING.

  • Backfilling - Specifies whether the index is currently backfilling. During backfill, SearchVectors operations might return incomplete results.

  • VectorAttribute - The attribute that contains vector embeddings.

  • Dimensions - The number of dimensions in each vector.

  • DistanceFunction - The distance function used to calculate similarity (COSINE, EUCLIDEAN, or DOT_PRODUCT).

  • SearchSchema - The partition key and inline filter attributes for the vector index.

  • Projection - Specifies attributes that are copied (projected) from the table into the vector index.

  • IndexArn - The Amazon Resource Name (ARN) that uniquely identifies the index.

  • IndexSizeBytes - The total size of the vector index, in bytes. Amazon DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.

  • ItemCount - The number of items indexed in the vector index. Amazon DynamoDB updates this value approximately every six hours. Recent changes might not be reflected in this value.


[View source]
def warm_throughput : TableWarmThroughputDescription | Nil #

Describes the warm throughput value of the base table.


[View source]
def warm_throughput=(warm_throughput : TableWarmThroughputDescription | Nil) #

Describes the warm throughput value of the base table.


[View source]