TableAttributes
- class aws_cdk.aws_dynamodb.TableAttributes(*, encryption_key=None, global_indexes=None, local_indexes=None, table_arn=None, table_name=None, table_stream_arn=None)
Bases:
object
Reference to a dynamodb table.
- Parameters:
encryption_key (
Optional
[IKey
]) – KMS encryption key, if this table uses a customer-managed encryption key. Default: - no keyglobal_indexes (
Optional
[Sequence
[str
]]) – The name of the global indexes set for this Table. Note that you need to set either this property, or {@link localIndexes}, if you want methods like grantReadData() to grant permissions for indexes as well as the table itself. Default: - no global indexeslocal_indexes (
Optional
[Sequence
[str
]]) – The name of the local indexes set for this Table. Note that you need to set either this property, or {@link globalIndexes}, if you want methods like grantReadData() to grant permissions for indexes as well as the table itself. Default: - no local indexestable_arn (
Optional
[str
]) – The ARN of the dynamodb table. One of this, or {@link tableName}, is required. Default: - no table arntable_name (
Optional
[str
]) – The table name of the dynamodb table. One of this, or {@link tableArn}, is required. Default: - no table nametable_stream_arn (
Optional
[str
]) – The ARN of the table’s stream. Default: - no table stream
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.aws_dynamodb as dynamodb import aws_cdk.aws_kms as kms # key: kms.Key table_attributes = dynamodb.TableAttributes( encryption_key=key, global_indexes=["globalIndexes"], local_indexes=["localIndexes"], table_arn="tableArn", table_name="tableName", table_stream_arn="tableStreamArn" )
Attributes
- encryption_key
KMS encryption key, if this table uses a customer-managed encryption key.
- Default:
no key
- global_indexes
The name of the global indexes set for this Table.
Note that you need to set either this property, or {@link localIndexes}, if you want methods like grantReadData() to grant permissions for indexes as well as the table itself.
- Default:
no global indexes
- local_indexes
The name of the local indexes set for this Table.
Note that you need to set either this property, or {@link globalIndexes}, if you want methods like grantReadData() to grant permissions for indexes as well as the table itself.
- Default:
no local indexes
- table_arn
The ARN of the dynamodb table.
One of this, or {@link tableName}, is required.
- Default:
no table arn
- table_name
The table name of the dynamodb table.
One of this, or {@link tableArn}, is required.
- Default:
no table name
- table_stream_arn
The ARN of the table’s stream.
- Default:
no table stream