Class TableBase
- All Implemented Interfaces:
IResource
,ITable
,IResourceWithPolicy
,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.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.ITable
ITable.Jsii$Default
-
Constructor Summary
ModifierConstructorDescriptionprotected
TableBase
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
TableBase
(software.amazon.jsii.JsiiObjectRef objRef) protected
protected
TableBase
(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
KMS encryption key, if this table uses a customer-managed encryption key.protected abstract Boolean
abstract PolicyDocument
Resource policy to assign to table.abstract String
Arn of the dynamodb table.abstract String
Table name of the dynamodb table.abstract String
ARN of the table's stream, if there is one.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 all DynamoDB operations ("dynamodb:*") to an IAM principal.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, @NotNull 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.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 void
setResourcePolicy
(PolicyDocument value) Resource policy to assign to 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
-
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 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.If
encryptionKey
is 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:
grantFullAccess
in interfaceITable
- Parameters:
grantee
- The principal to grant access to. 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:
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 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:
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's stream to an IAM principal's policy.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", ...). 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:
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 current dynamodb table.- Specified by:
grantTableListStreams
in 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:
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 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 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 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 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 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 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 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 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 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
statistic
andperiod
properties.- Specified by:
metricSystemErrorsForOperations
in 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
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.Default: sum over 5 minutes
- 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.Default: sum over 5 minutes
- Specified by:
metricThrottledRequests
in 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
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. 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
statistic
andperiod
properties.- Specified by:
metricThrottledRequestsForOperations
in 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
statistic
andperiod
properties.- Specified by:
metricUserErrors
in 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
statistic
andperiod
properties.- Specified by:
metricUserErrors
in interfaceITable
-
getHasIndex
-
getRegionalArns
-
getTableArn
Arn of the dynamodb table.- Specified by:
getTableArn
in interfaceITable
-
getTableName
Table name of the dynamodb table.- Specified by:
getTableName
in interfaceITable
-
getEncryptionKey
KMS encryption key, if this table uses a customer-managed encryption key.- Specified by:
getEncryptionKey
in interfaceITable
-
getTableStreamArn
ARN of the table's stream, if there is one.- Specified by:
getTableStreamArn
in interfaceITable
-
getResourcePolicy
Resource policy to assign to table. -
setResourcePolicy
Resource policy to assign to table.
-
metricSystemErrorsForOperations
.