StreamGrants
- class aws_cdk.aws_dynamodb.StreamGrants(*, table, table_stream_arn, encryption_key=None)
Bases:
objectA set of permissions to grant on a 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. from aws_cdk import aws_dynamodb as dynamodb from aws_cdk import aws_kms as kms from aws_cdk.interfaces import aws_dynamodb as interfaces_dynamodb # key: kms.Key # table_ref: interfaces_dynamodb.ITableRef stream_grants = dynamodb.StreamGrants( table=table_ref, table_stream_arn="tableStreamArn", # the properties below are optional encryption_key=key )
- Parameters:
Methods
- actions(grantee, *actions)
Adds an IAM policy statement associated with this table’s stream to an IAM principal’s policy.
If
encryptionKeyis present, appropriate grants to the key needs to be added separately using thetable.encryptionKey.grant*methods.- Parameters:
grantee (
IGrantable) – The principal (no-op if undefined).actions (
str) – The set of actions to allow (i.e. “dynamodb:DescribeStream”, “dynamodb:GetRecords”, …).
- Return type:
- list(grantee)
Permits an IAM Principal to list streams attached to current dynamodb table.
- Parameters:
grantee (
IGrantable) – The principal (no-op if undefined).- Return type:
- read(grantee)
Permits an IAM principal all stream data read operations for this table’s stream: DescribeStream, GetRecords, GetShardIterator, ListStreams.
Appropriate grants will also be added to the customer-managed KMS key if one was configured.
- Parameters:
grantee (
IGrantable) – The principal to grant access to.- Return type: