Class TableBase
- All Implemented Interfaces:
ITableRef,IEnvironmentAware,IResource,ITable,IEncryptedResource,IResourceWithPolicy,IResourceWithPolicyV2,software.amazon.jsii.JsiiSerializable,software.constructs.IConstruct,software.constructs.IDependable
- Direct Known Subclasses:
Table
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationModeNested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IEncryptedResource
IEncryptedResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IResourceWithPolicy
IResourceWithPolicy.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.services.dynamodb.ITable
ITable.Jsii$DefaultNested classes/interfaces inherited from interface software.amazon.awscdk.interfaces.dynamodb.ITableRef
ITableRef.Jsii$Default -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTableBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedTableBase(software.amazon.jsii.JsiiObjectRef objRef) protectedprotectedTableBase(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionabstract AddToResourcePolicyResultaddToResourcePolicy(PolicyStatement statement) Adds a statement to the resource policy associated with this table.abstract IKeyKMS encryption key, if this table uses a customer-managed encryption key.Grant a predefined set of permissions on this Table.protected abstract BooleanDeprecated.This member is still filled but it is not readAdditional regions other than the main one that this table is replicated to.abstract PolicyDocumentResource policy to assign to table.Grant a predefined set of permissions on this Table's Stream, if present.abstract StringArn of the dynamodb table.abstract StringTable name of the dynamodb table.A reference to a Table resource.abstract StringARN of the table's stream, if there is one.grant(IGrantable grantee, String... actions) Adds an IAM policy statement associated with this table to an IAM principal's policy.grantFullAccess(IGrantable grantee) Permits all DynamoDB operations ("dynamodb:*") to an IAM principal.grantOnKey(IGrantable grantee, String... actions) Gives permissions to a grantable entity to perform actions on the encryption key.grantReadData(IGrantable grantee) Permits an IAM principal all data read operations from this table: BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, DescribeTable.grantReadWriteData(IGrantable grantee) Permits an IAM principal to all data read/write operations to this table.grantStream(IGrantable grantee, String... actions) Adds an IAM policy statement associated with this table's stream to an IAM principal's policy.grantStreamRead(IGrantable grantee) Permits an IAM principal all stream data read operations for this table's stream: DescribeStream, GetRecords, GetShardIterator, ListStreams.grantTableListStreams(IGrantable grantee) Permits an IAM Principal to list streams attached to current dynamodb table.grantWriteData(IGrantable grantee) Permits an IAM principal all data write operations to this table: BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable.Return the given named metric for this Table.metric(String metricName, MetricOptions props) Return the given named metric for this Table.Metric for the conditional check failed requests this table.Metric for the conditional check failed requests this table.Metric for the consumed read capacity units this table.Metric for the consumed read capacity units this table.Metric for the consumed write capacity units this table.Metric for the consumed write capacity units this table.Metric for the successful request latency this table.Metric for the successful request latency this table.Deprecated.usemetricSystemErrorsForOperations.metricSystemErrors(MetricOptions props) Deprecated.usemetricSystemErrorsForOperations.Metric for the system errors this table.Metric for the system errors this table.Deprecated.Do not use this function.Deprecated.Do not use this function.metricThrottledRequestsForOperation(String operation) How many requests are throttled on this table, for the given operation.metricThrottledRequestsForOperation(String operation, MetricOptions props) How many requests are throttled on this table, for the given operation.How many requests are throttled on this table.How many requests are throttled on this table.Metric for the user errors.metricUserErrors(MetricOptions props) Metric for the user errors.abstract voidsetResourcePolicy(PolicyDocument value) Resource policy to assign to table.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResourceMethods inherited from class software.constructs.Construct
getNode, isConstruct, toStringMethods 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, wait, wait, waitMethods inherited from interface software.constructs.IConstruct
getNodeMethods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getStackMethods inherited from interface software.amazon.awscdk.services.iam.IResourceWithPolicy
getEnvMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
TableBase
protected TableBase(software.amazon.jsii.JsiiObjectRef objRef) -
TableBase
protected TableBase(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
TableBase
@Stability(Stable) protected TableBase(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) - Parameters:
scope- This parameter is required.id- This parameter is required.props-
-
TableBase
@Stability(Stable) protected TableBase(@NotNull software.constructs.Construct scope, @NotNull String id) - Parameters:
scope- This parameter is required.id- This parameter is required.
-
-
Method Details
-
addToResourcePolicy
@Stability(Stable) @NotNull public abstract AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement) Adds a statement to the resource policy associated with this table.- Specified by:
addToResourcePolicyin interfaceIResourceWithPolicyV2- Parameters:
statement- This parameter is required.
-
grant
@Stability(Stable) @NotNull public Grant grant(@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. -
grantFullAccess
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.
- Specified by:
grantFullAccessin interfaceITable- Parameters:
grantee- The principal to grant access to. This parameter is required.
-
grantOnKey
@Stability(Stable) @NotNull public GrantOnKeyResult grantOnKey(@NotNull IGrantable grantee, @NotNull String... actions) Gives permissions to a grantable entity to perform actions on the encryption key.- Specified by:
grantOnKeyin interfaceIEncryptedResource- Parameters:
grantee- This parameter is required.actions- This parameter is required.
-
grantReadData
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.
- Specified by:
grantReadDatain interfaceITable- Parameters:
grantee- The principal to grant access to. This parameter is required.
-
grantReadWriteData
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.
- Specified by:
grantReadWriteDatain interfaceITable- Parameters:
grantee- The principal to grant access to. This parameter is required.
-
grantStream
@Stability(Stable) @NotNull public Grant grantStream(@NotNull IGrantable grantee, @NotNull String... 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.- Specified by:
grantStreamin interfaceITable- Parameters:
grantee- The principal (no-op if undefined). This parameter is required.actions- The set of actions to allow (i.e. "dynamodb:DescribeStream", "dynamodb:GetRecords", ...). This parameter is required.
-
grantStreamRead
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.
- Specified by:
grantStreamReadin interfaceITable- Parameters:
grantee- The principal to grant access to. This parameter is required.
-
grantTableListStreams
Permits an IAM Principal to list streams attached to current dynamodb table.- Specified by:
grantTableListStreamsin interfaceITable- Parameters:
grantee- The principal (no-op if undefined). This parameter is required.
-
grantWriteData
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.
- Specified by:
grantWriteDatain interfaceITable- Parameters:
grantee- The principal to grant access to. This parameter is required.
-
metric
@Stability(Stable) @NotNull public Metric metric(@NotNull String metricName, @Nullable MetricOptions props) Return the given named metric for this Table.By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties. -
metric
Return the given named metric for this Table.By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties. -
metricConditionalCheckFailedRequests
@Stability(Stable) @NotNull public Metric metricConditionalCheckFailedRequests(@Nullable MetricOptions props) Metric for the conditional check failed requests this table.By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricConditionalCheckFailedRequestsin interfaceITable- Parameters:
props-
-
metricConditionalCheckFailedRequests
Metric for the conditional check failed requests this table.By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricConditionalCheckFailedRequestsin interfaceITable
-
metricConsumedReadCapacityUnits
@Stability(Stable) @NotNull public Metric metricConsumedReadCapacityUnits(@Nullable MetricOptions props) Metric for the consumed read capacity units this table.By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricConsumedReadCapacityUnitsin interfaceITable- Parameters:
props-
-
metricConsumedReadCapacityUnits
Metric for the consumed read capacity units this table.By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricConsumedReadCapacityUnitsin interfaceITable
-
metricConsumedWriteCapacityUnits
@Stability(Stable) @NotNull public Metric metricConsumedWriteCapacityUnits(@Nullable MetricOptions props) Metric for the consumed write capacity units this table.By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricConsumedWriteCapacityUnitsin interfaceITable- Parameters:
props-
-
metricConsumedWriteCapacityUnits
Metric for the consumed write capacity units this table.By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricConsumedWriteCapacityUnitsin interfaceITable
-
metricSuccessfulRequestLatency
@Stability(Stable) @NotNull public Metric metricSuccessfulRequestLatency(@Nullable MetricOptions props) Metric for the successful request latency this table.By default, the metric will be calculated as an average over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricSuccessfulRequestLatencyin interfaceITable- Parameters:
props-
-
metricSuccessfulRequestLatency
Metric for the successful request latency this table.By default, the metric will be calculated as an average over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricSuccessfulRequestLatencyin interfaceITable
-
metricSystemErrors
@Stability(Deprecated) @Deprecated @NotNull public Metric metricSystemErrors(@Nullable MetricOptions props) Deprecated.usemetricSystemErrorsForOperations.(deprecated) Metric for the system errors this table.- Parameters:
props-
-
metricSystemErrors
Deprecated.usemetricSystemErrorsForOperations.(deprecated) Metric for the system errors this table. -
metricSystemErrorsForOperations
@Stability(Stable) @NotNull public IMetric metricSystemErrorsForOperations(@Nullable SystemErrorsForOperationsMetricOptions props) Metric for the system errors this table.This will sum errors across all possible operations. Note that by default, each individual metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricSystemErrorsForOperationsin interfaceITable- Parameters:
props-
-
metricSystemErrorsForOperations
Metric for the system errors this table.This will sum errors across all possible operations. Note that by default, each individual metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricSystemErrorsForOperationsin interfaceITable
-
metricThrottledRequests
@Stability(Deprecated) @Deprecated @NotNull public Metric metricThrottledRequests(@Nullable MetricOptions props) Deprecated.Do not use this function. It returns an invalid metric. UsemetricThrottledRequestsForOperationinstead.(deprecated) How many requests are throttled on this table.Default: sum over 5 minutes
- Specified by:
metricThrottledRequestsin interfaceITable- Parameters:
props-
-
metricThrottledRequests
Deprecated.Do not use this function. It returns an invalid metric. UsemetricThrottledRequestsForOperationinstead.(deprecated) How many requests are throttled on this table.Default: sum over 5 minutes
- Specified by:
metricThrottledRequestsin interfaceITable
-
metricThrottledRequestsForOperation
@Stability(Stable) @NotNull public Metric metricThrottledRequestsForOperation(@NotNull String operation, @Nullable MetricOptions props) How many requests are throttled on this table, for the given operation.Default: sum over 5 minutes
- Parameters:
operation- This parameter is required.props-
-
metricThrottledRequestsForOperation
@Stability(Stable) @NotNull public Metric metricThrottledRequestsForOperation(@NotNull String operation) How many requests are throttled on this table, for the given operation.Default: sum over 5 minutes
- Parameters:
operation- This parameter is required.
-
metricThrottledRequestsForOperations
@Stability(Stable) @NotNull public IMetric metricThrottledRequestsForOperations(@Nullable OperationsMetricOptions props) How many requests are throttled on this table.This will sum errors across all possible operations. Note that by default, each individual metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricThrottledRequestsForOperationsin interfaceITable- Parameters:
props-
-
metricThrottledRequestsForOperations
How many requests are throttled on this table.This will sum errors across all possible operations. Note that by default, each individual metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricThrottledRequestsForOperationsin interfaceITable
-
metricUserErrors
Metric for the user errors.Note that this metric reports user errors across all the tables in the account and region the table resides in.
By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricUserErrorsin interfaceITable- Parameters:
props-
-
metricUserErrors
Metric for the user errors.Note that this metric reports user errors across all the tables in the account and region the table resides in.
By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statisticandperiodproperties.- Specified by:
metricUserErrorsin interfaceITable
-
getGrants
Grant a predefined set of permissions on this Table. -
getHasIndex
-
getRegionalArns
Deprecated.This member is still filled but it is not read -
getStreamGrants
Grant a predefined set of permissions on this Table's Stream, if present.Will throw if the Table has not been configured for streaming.
-
getTableArn
Arn of the dynamodb table.- Specified by:
getTableArnin interfaceITable
-
getTableName
Table name of the dynamodb table.- Specified by:
getTableNamein interfaceITable
-
getTableRef
A reference to a Table resource.- Specified by:
getTableRefin interfaceITableRef
-
getEncryptionKey
KMS encryption key, if this table uses a customer-managed encryption key.- Specified by:
getEncryptionKeyin interfaceITable
-
getRegions
Additional regions other than the main one that this table is replicated to. -
getTableStreamArn
ARN of the table's stream, if there is one.- Specified by:
getTableStreamArnin interfaceITable
-
getResourcePolicy
Resource policy to assign to table. -
setResourcePolicy
Resource policy to assign to table.
-