TableAttributesV2

class aws_cdk.aws_dynamodb.TableAttributesV2(*, encryption_key=None, global_indexes=None, grant_index_permissions=None, local_indexes=None, table_arn=None, table_id=None, table_name=None, table_stream_arn=None)

Bases: object

Attributes of a DynamoDB table.

Parameters:
  • encryption_key (Optional[IKey]) – KMS encryption key for the table. Default: - no KMS encryption key

  • global_indexes (Optional[Sequence[str]]) – The name of the global indexes set for the table. Note: You must set either this property or localIndexes if you want permissions to be granted for indexes as well as the table itself. Default: - no global indexes

  • grant_index_permissions (Optional[bool]) – Whether or not to grant permissions for all indexes of the table. Note: If false, permissions will only be granted to indexes when globalIndexes or localIndexes is specified. Default: false

  • local_indexes (Optional[Sequence[str]]) – The name of the local indexes set for the table. Note: You must set either this property or globalIndexes if you want permissions to be granted for indexes as well as the table itself. Default: - no local indexes

  • table_arn (Optional[str]) – The ARN of the table. Note: You must specify this or the tableName. Default: - table arn generated using tableName and region of stack

  • table_id (Optional[str]) – The ID of the table. Default: - no table id

  • table_name (Optional[str]) – The name of the table. Note: You must specify this or the tableArn. Default: - table name retrieved from provided tableArn

  • table_stream_arn (Optional[str]) – The stream ARN of the table. Default: - no table stream ARN

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_dynamodb as dynamodb
from aws_cdk import aws_kms as kms

# key: kms.Key

table_attributes_v2 = dynamodb.TableAttributesV2(
    encryption_key=key,
    global_indexes=["globalIndexes"],
    grant_index_permissions=False,
    local_indexes=["localIndexes"],
    table_arn="tableArn",
    table_id="tableId",
    table_name="tableName",
    table_stream_arn="tableStreamArn"
)

Attributes

encryption_key

KMS encryption key for the table.

Default:
  • no KMS encryption key

global_indexes

The name of the global indexes set for the table.

Note: You must set either this property or localIndexes if you want permissions to be granted for indexes as well as the table itself.

Default:
  • no global indexes

grant_index_permissions

Whether or not to grant permissions for all indexes of the table.

Note: If false, permissions will only be granted to indexes when globalIndexes or localIndexes is specified.

Default:

false

local_indexes

The name of the local indexes set for the table.

Note: You must set either this property or globalIndexes if you want permissions to be granted for indexes as well as the table itself.

Default:
  • no local indexes

table_arn

The ARN of the table.

Note: You must specify this or the tableName.

Default:
  • table arn generated using tableName and region of stack

table_id

The ID of the table.

Default:
  • no table id

table_name

The name of the table.

Note: You must specify this or the tableArn.

Default:
  • table name retrieved from provided tableArn

table_stream_arn

The stream ARN of the table.

Default:
  • no table stream ARN