TableAttributesV2 Struct
Attributes of a DynamoDB table.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_dynamodb as dynamodb } from 'aws-cdk-lib';
import { aws_kms as kms } from 'aws-cdk-lib';
declare const key: kms.Key;
const tableAttributesV2: dynamodb.TableAttributesV2 = {
encryptionKey: key,
globalIndexes: ['globalIndexes'],
grantIndexPermissions: false,
localIndexes: ['localIndexes'],
tableArn: 'tableArn',
tableId: 'tableId',
tableName: 'tableName',
tableStreamArn: 'tableStreamArn',
};
Properties
KMS encryption key for the table.
Default: no KMS encryption key
globalIndexesstring[]global_indexestyping.List[str]globalIndexesList<String>GlobalIndexesstring[]GlobalIndexes*[]*string#The name of the global indexes set for the table.
Default: no global indexes
Note: You must set either this property or localIndexes if you want permissions to be granted for indexes as well as the table itself.
grantIndexPermissionsbooleangrant_index_permissionsboolgrantIndexPermissionsBooleanGrantIndexPermissionsboolGrantIndexPermissions*bool= false#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.
localIndexesstring[]local_indexestyping.List[str]localIndexesList<String>LocalIndexesstring[]LocalIndexes*[]*string#The name of the local indexes set for the table.
Default: no local indexes
Note: You must set either this property or globalIndexes if you want permissions to be granted for indexes as well as the table itself.
The ARN of the table.
Default: table arn generated using tableName and region of stack
Note: You must specify this or the tableName.
The ID of the table.
Default: no table id
The name of the table.
Default: table name retrieved from provided tableArn
Note: You must specify this or the tableArn.
tableStreamArnstringtable_stream_arnstrtableStreamArnStringTableStreamArnstringTableStreamArn*string#The stream ARN of the table.
Default: no table stream ARN