Class TableGrants
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.dynamodb.TableGrants
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.127.0 (build 2117ad5)",
date="2026-04-02T21:55:08.828Z")
@Stability(Stable)
public class TableGrants
extends software.amazon.jsii.JsiiObject
A set of permissions to grant on a Table.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.dynamodb.*;
import software.amazon.awscdk.services.iam.*;
import software.amazon.awscdk.interfaces.dynamodb.*;
IEncryptedResource encryptedResource;
IResourceWithPolicyV2 resourceWithPolicyV2;
ITableRef tableRef;
TableGrants tableGrants = TableGrants.Builder.create()
.table(tableRef)
// the properties below are optional
.encryptedResource(encryptedResource)
.hasIndex(false)
.policyResource(resourceWithPolicyV2)
.regions(List.of("regions"))
.build();
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Constructor Summary
ConstructorsModifierConstructorDescriptionTableGrants(TableGrantsProps props) protectedTableGrants(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedTableGrants(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionactions(IGrantable grantee, String... actions) Adds an IAM policy statement associated with this table to an IAM principal's policy.static TableGrantsCreates a TableGrants object for a given table.static TableGrantsCreates a TableGrants object for a given table.static TableGrantsCreates a TableGrants object for a given table.fullAccess(IGrantable grantee) Permits all DynamoDB operations ("dynamodb:*") to an IAM principal.voidmultiAccountReplicationFrom(String sourceReplicaArn) Grants permissions for this table to act as a destination for multi-account global table replication.voidmultiAccountReplicationTo(String destinationReplicaArn) Grants permissions for this table to act as a source for multi-account global table replication.readData(IGrantable grantee) Permits an IAM principal all data read operations from this table: BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, DescribeTable.readWriteData(IGrantable grantee) Permits an IAM principal to all data read/write operations to this table.writeData(IGrantable grantee) Permits an IAM principal all data write operations to this table: BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
TableGrants
protected TableGrants(software.amazon.jsii.JsiiObjectRef objRef) -
TableGrants
protected TableGrants(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
TableGrants
- Parameters:
props- This parameter is required.
-
-
Method Details
-
fromTable
@Stability(Stable) @NotNull public static TableGrants fromTable(@NotNull ITableRef table, @Nullable List<String> regions, @Nullable Boolean hasIndex) Creates a TableGrants object for a given table.- Parameters:
table- This parameter is required.regions-hasIndex-
-
fromTable
@Stability(Stable) @NotNull public static TableGrants fromTable(@NotNull ITableRef table, @Nullable List<String> regions) Creates a TableGrants object for a given table.- Parameters:
table- This parameter is required.regions-
-
fromTable
Creates a TableGrants object for a given table.- Parameters:
table- This parameter is required.
-
actions
@Stability(Stable) @NotNull public Grant actions(@NotNull IGrantable grantee, @NotNull String... actions) Adds an IAM policy statement associated with this table 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- The principal (no-op if undefined). This parameter is required.actions- The set of actions to allow (i.e. "dynamodb:PutItem", "dynamodb:GetItem", ...). This parameter is required.
-
fullAccess
Permits all DynamoDB operations ("dynamodb:*") to an IAM principal.Appropriate grants will also be added to the customer-managed KMS key if one was configured.
- Parameters:
grantee- The principal to grant access to. This parameter is required.
-
multiAccountReplicationFrom
Grants permissions for this table to act as a destination for multi-account global table replication.- Parameters:
sourceReplicaArn- The ARN of the source replica table in the other account. This parameter is required.
-
multiAccountReplicationTo
Grants permissions for this table to act as a source for multi-account global table replication.- Parameters:
destinationReplicaArn- The ARN of the destination replica table in the other account. This parameter is required.
-
readData
Permits an IAM principal all data read operations from this table: BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, DescribeTable.Appropriate grants will also be added to the customer-managed KMS key if one was configured.
- Parameters:
grantee- The principal to grant access to. This parameter is required.
-
readWriteData
Permits an IAM principal to all data read/write operations to this table.BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable
Appropriate grants will also be added to the customer-managed KMS key if one was configured.
- Parameters:
grantee- The principal to grant access to. This parameter is required.
-
writeData
Permits an IAM principal all data write operations to this table: BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable.Appropriate grants will also be added to the customer-managed KMS key if one was configured.
- Parameters:
grantee- The principal to grant access to. This parameter is required.
-