Class TableBaseV2
- All Implemented Interfaces:
IResource
,ITable
,ITableV2
,IResourceWithPolicy
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
- Direct Known Subclasses:
TableV2
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.IResource
IResource.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.iam.IResourceWithPolicy
IResourceWithPolicy.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.services.dynamodb.ITableV2
ITableV2.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
TableBaseV2
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
TableBaseV2
(software.amazon.jsii.JsiiObjectRef objRef) protected
TableBaseV2
(software.constructs.Construct scope, String id) protected
TableBaseV2
(software.constructs.Construct scope, String id, ResourceProps props) -
Method Summary
Modifier and TypeMethodDescriptionaddToResourcePolicy
(PolicyStatement statement) Adds a statement to the resource policy associated with this file system.abstract IKey
The KMS encryption key for the table.protected abstract Boolean
protected abstract String
abstract PolicyDocument
The resource policy for the table.abstract String
The ARN of the table.abstract String
The ID of the table.abstract String
The name of the table.abstract String
The stream ARN of the table.grant
(IGrantable grantee, @NotNull String... actions) Adds an IAM policy statement associated with this table to an IAM principal's policy.grantFullAccess
(IGrantable grantee) Permits an IAM principal to all DynamoDB operations ('dynamodb:*') on this table.grantReadData
(IGrantable grantee) Permits an IAM principal all data read operations on this table.grantReadWriteData
(IGrantable grantee) Permits an IAM principal to all data read/write operations on this table.grantStream
(IGrantable grantee, @NotNull String... actions) Adds an IAM policy statement associated with this table to an IAM principal's policy.grantStreamRead
(IGrantable grantee) Adds an IAM policy statement associated with this table to an IAM principal's policy.grantTableListStreams
(IGrantable grantee) Permits an IAM principal to list streams attached to this table.grantWriteData
(IGrantable grantee) Permits an IAM principal all data write operations on this table.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 for this table.Metric for the conditional check failed requests for this table.Metric for the consumed read capacity units for this table.Metric for the consumed read capacity units for this table.Metric for the consumed write capacity units for this table.Metric for the consumed write capacity units for this table.Metric for the successful request latency for this table.Metric for the successful request latency for this table.Deprecated.metricSystemErrors
(MetricOptions props) Deprecated.usemetricSystemErrorsForOperations
.Metric for the system errors for this table.Metric for the system errors for 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, OperationsMetricOptions 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 for this table.metricUserErrors
(MetricOptions props) Metric for the user errors for this table.abstract void
setResourcePolicy
(PolicyDocument value) The resource policy for the table.Methods inherited from class software.amazon.awscdk.Resource
applyRemovalPolicy, generatePhysicalName, getEnv, getPhysicalName, getResourceArnAttribute, getResourceNameAttribute, getStack, isOwnedResource, isResource
Methods inherited from class software.constructs.Construct
getNode, isConstruct, toString
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.constructs.IConstruct
getNode
Methods inherited from interface software.amazon.awscdk.IResource
applyRemovalPolicy, getEnv, getStack
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Constructor Details
-
TableBaseV2
protected TableBaseV2(software.amazon.jsii.JsiiObjectRef objRef) -
TableBaseV2
protected TableBaseV2(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
TableBaseV2
@Stability(Stable) protected TableBaseV2(@NotNull software.constructs.Construct scope, @NotNull String id, @Nullable ResourceProps props) - Parameters:
scope
- This parameter is required.id
- This parameter is required.props
-
-
TableBaseV2
@Stability(Stable) protected TableBaseV2(@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 AddToResourcePolicyResult addToResourcePolicy(@NotNull PolicyStatement statement) Adds a statement to the resource policy associated with this file system.A resource policy will be automatically created upon the first call to
addToResourcePolicy
.Note that this does not work with imported file systems.
- Specified by:
addToResourcePolicy
in interfaceIResourceWithPolicy
- Parameters:
statement
- The policy statement to add. This parameter is required.
-
grant
@Stability(Stable) @NotNull public Grant grant(@NotNull IGrantable grantee, @NotNull @NotNull String... actions) Adds an IAM policy statement associated with this table to an IAM principal's policy.Note: If
encryptionKey
is present, appropriate grants to the key needs to be added separately using thetable.encryptionKey.grant*
methods. -
grantFullAccess
Permits an IAM principal to all DynamoDB operations ('dynamodb:*') on this table.Note: Appropriate grants will also be added to the customer-managed KMS keys associated with this table if one was configured.
- Specified by:
grantFullAccess
in interfaceITable
- Parameters:
grantee
- the principal to grant access to. This parameter is required.
-
grantReadData
Permits an IAM principal all data read operations on this table.Actions: BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, DescribeTable.
Note: Appropriate grants will also be added to the customer-managed KMS keys associated with this table if one was configured.
- Specified by:
grantReadData
in interfaceITable
- Parameters:
grantee
- the principal to grant access to. This parameter is required.
-
grantReadWriteData
Permits an IAM principal to all data read/write operations on this table.Actions: BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable.
Note: Appropriate grants will also be added to the customer-managed KMS keys associated with this table if one was configured.
- Specified by:
grantReadWriteData
in interfaceITable
- Parameters:
grantee
- the principal to grant access to. This parameter is required.
-
grantStream
@Stability(Stable) @NotNull public Grant grantStream(@NotNull IGrantable grantee, @NotNull @NotNull String... actions) Adds an IAM policy statement associated with this table to an IAM principal's policy.Note: If
encryptionKey
is present, appropriate grants to the key needs to be added separately using thetable.encryptionKey.grant*
methods.- Specified by:
grantStream
in 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', etc.). This parameter is required.
-
grantStreamRead
Adds an IAM policy statement associated with this table to an IAM principal's policy.Actions: DescribeStream, GetRecords, GetShardIterator, ListStreams.
Note: Appropriate grants will also be added to the customer-managed KMS keys associated with this table if one was configured.
- Specified by:
grantStreamRead
in interfaceITable
- Parameters:
grantee
- the principal to grant access to. This parameter is required.
-
grantTableListStreams
Permits an IAM principal to list streams attached to this table.- Specified by:
grantTableListStreams
in interfaceITable
- Parameters:
grantee
- the principal to grant access to. This parameter is required.
-
grantWriteData
Permits an IAM principal all data write operations on this table.Actions: BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable.
Note: Appropriate grants will also be added to the customer-managed KMS keys associated with this table if one was configured.
- Specified by:
grantWriteData
in 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
statistic
andperiod
properties. -
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
statistic
andperiod
properties. -
metricConditionalCheckFailedRequests
@Stability(Stable) @NotNull public Metric metricConditionalCheckFailedRequests(@Nullable MetricOptions props) Metric for the conditional check failed requests 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
statistic
andperiod
properties.- Specified by:
metricConditionalCheckFailedRequests
in interfaceITable
- Parameters:
props
-
-
metricConditionalCheckFailedRequests
Metric for the conditional check failed requests 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
statistic
andperiod
properties.- Specified by:
metricConditionalCheckFailedRequests
in interfaceITable
-
metricConsumedReadCapacityUnits
@Stability(Stable) @NotNull public Metric metricConsumedReadCapacityUnits(@Nullable MetricOptions props) Metric for the consumed read capacity units 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
statistic
andperiod
properties.- Specified by:
metricConsumedReadCapacityUnits
in interfaceITable
- Parameters:
props
-
-
metricConsumedReadCapacityUnits
Metric for the consumed read capacity units 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
statistic
andperiod
properties.- Specified by:
metricConsumedReadCapacityUnits
in interfaceITable
-
metricConsumedWriteCapacityUnits
@Stability(Stable) @NotNull public Metric metricConsumedWriteCapacityUnits(@Nullable MetricOptions props) Metric for the consumed write capacity units 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
statistic
andperiod
properties.- Specified by:
metricConsumedWriteCapacityUnits
in interfaceITable
- Parameters:
props
-
-
metricConsumedWriteCapacityUnits
Metric for the consumed write capacity units 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
statistic
andperiod
properties.- Specified by:
metricConsumedWriteCapacityUnits
in interfaceITable
-
metricSuccessfulRequestLatency
@Stability(Stable) @NotNull public Metric metricSuccessfulRequestLatency(@Nullable MetricOptions props) Metric for the successful request latency for 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
statistic
andperiod
properties.- Specified by:
metricSuccessfulRequestLatency
in interfaceITable
- Parameters:
props
-
-
metricSuccessfulRequestLatency
Metric for the successful request latency for 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
statistic
andperiod
properties.- Specified by:
metricSuccessfulRequestLatency
in 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 for this table. This will sum errors across all possible operations.By default, each individual metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statistic
andperiod
properties.- Specified by:
metricSystemErrorsForOperations
in interfaceITable
- Parameters:
props
-
-
metricSystemErrorsForOperations
Metric for the system errors for this table. This will sum errors across all possible operations.By default, each individual metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statistic
andperiod
properties.- Specified by:
metricSystemErrorsForOperations
in interfaceITable
-
metricThrottledRequests
@Stability(Deprecated) @Deprecated @NotNull public Metric metricThrottledRequests(@Nullable MetricOptions props) Deprecated.Do not use this function. It returns an invalid metric. UsemetricThrottledRequestsForOperation
instead.(deprecated) How many requests are throttled on this table.By default, each individual metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statistic
andperiod
properties.- Specified by:
metricThrottledRequests
in interfaceITable
- Parameters:
props
-
-
metricThrottledRequests
Deprecated.Do not use this function. It returns an invalid metric. UsemetricThrottledRequestsForOperation
instead.(deprecated) How many requests are throttled on this table.By default, each individual metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statistic
andperiod
properties.- Specified by:
metricThrottledRequests
in interfaceITable
-
metricThrottledRequestsForOperation
@Stability(Stable) @NotNull public IMetric metricThrottledRequestsForOperation(@NotNull String operation, @Nullable OperationsMetricOptions props) How many requests are throttled on this table for the given operation.By default, the metric will be calculated as an average over a period of 5 minutes. You can customize this by using the
statistic
andperiod
properties.- Parameters:
operation
- This parameter is required.props
-
-
metricThrottledRequestsForOperation
@Stability(Stable) @NotNull public IMetric metricThrottledRequestsForOperation(@NotNull String operation) How many requests are throttled on this table for the given operation.By default, the metric will be calculated as an average over a period of 5 minutes. You can customize this by using the
statistic
andperiod
properties.- 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.By default, each individual metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statistic
andperiod
properties.- Specified by:
metricThrottledRequestsForOperations
in interfaceITable
- Parameters:
props
-
-
metricThrottledRequestsForOperations
How many requests are throttled on this table. This will sum errors across all possible operations.By default, each individual metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the
statistic
andperiod
properties.- Specified by:
metricThrottledRequestsForOperations
in interfaceITable
-
metricUserErrors
Metric for the user errors for this table.Note: 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
statistic
andperiod
properties.- Specified by:
metricUserErrors
in interfaceITable
- Parameters:
props
-
-
metricUserErrors
Metric for the user errors for this table.Note: 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
statistic
andperiod
properties.- Specified by:
metricUserErrors
in interfaceITable
-
getHasIndex
-
getRegion
-
getTableArn
The ARN of the table.- Specified by:
getTableArn
in interfaceITable
-
getTableName
The name of the table.- Specified by:
getTableName
in interfaceITable
-
getEncryptionKey
The KMS encryption key for the table.- Specified by:
getEncryptionKey
in interfaceITable
-
getTableId
The ID of the table.- Specified by:
getTableId
in interfaceITableV2
-
getTableStreamArn
The stream ARN of the table.- Specified by:
getTableStreamArn
in interfaceITable
-
getResourcePolicy
The resource policy for the table. -
setResourcePolicy
The resource policy for the table.
-
metricSystemErrorsForOperations
.