TableGrantsProps Struct
Construction properties for TableGrants.
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_iam as iam } from 'aws-cdk-lib';
import { aws_dynamodb as interfaces_dynamodb } from 'aws-cdk-lib/interfaces';
declare const encryptedResource: iam.IEncryptedResource;
declare const resourceWithPolicyV2: iam.IResourceWithPolicyV2;
declare const tableRef: interfaces_dynamodb.ITableRef;
const tableGrantsProps: dynamodb.TableGrantsProps = {
table: tableRef,
// the properties below are optional
encryptedResource: encryptedResource,
hasIndex: false,
policyResource: resourceWithPolicyV2,
regions: ['regions'],
};
Properties
encryptedResourceIEncryptedResourceencrypted_resourceIEncryptedResourceencryptedResourceIEncryptedResourceEncryptedResourceIEncryptedResourceEncryptedResourceIEncryptedResource= A best-effort attempt will be ma…deprecated#- Leave this field undefined. If the table is encrypted with a customer-managed KMS key, appropriate grants to the key will be automatically added.
default
Default: A best-effort attempt will be made to discover an associated KMS key and grant permissions to it.
Whether this table has indexes.
If so, permissions are granted on all table indexes as well.
policyResourceIResourceWithPolicyV2policy_resourceIResourceWithPolicyV2policyResourceIResourceWithPolicyV2PolicyResourceIResourceWithPolicyV2PolicyResourceIResourceWithPolicyV2= A best-effort attempt will be ma…deprecated#- Leave this field undefined. A best-effort attempt will be made to discover a resource policy and add permissions to it.
default
Default: A best-effort attempt will be made to discover a resource policy and add permissions to it.
regionsstring[]regionstyping.List[str]regionsList<String>Regionsstring[]Regions*[]*string= No regions#Additional regions other than the main one that this table is replicated to.