import { Table } from 'aws-dynamodb-table-multi-gsis'
new Table(scope: Construct, id: string, props: TableProps)
Name | Type | Description |
---|---|---|
scope |
@aws-cdk/core.Construct |
No description. |
id |
string |
No description. |
props |
@aws-cdk/aws-dynamodb.TableProps |
No description. |
- Type: @aws-cdk/core.Construct
- Type: string
- Type: @aws-cdk/aws-dynamodb.TableProps
Name | Description |
---|---|
toString |
Returns a string representation of this construct. |
applyRemovalPolicy |
Apply the given removal policy to this resource. |
addGlobalSecondaryIndex |
Add a global secondary index of table. |
addLocalSecondaryIndex |
Add a local secondary index of table. |
autoScaleGlobalSecondaryIndexReadCapacity |
Enable read capacity scaling for the given GSI. |
autoScaleGlobalSecondaryIndexWriteCapacity |
Enable write capacity scaling for the given GSI. |
autoScaleReadCapacity |
Enable read capacity scaling for this table. |
autoScaleWriteCapacity |
Enable write capacity scaling for this table. |
grant |
Adds an IAM policy statement associated with this table to an IAM principal's policy. |
grantFullAccess |
Permits all DynamoDB operations ("dynamodb:*") to an IAM principal. |
grantReadData |
Permits an IAM principal all data read operations from this table: BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan. |
grantReadWriteData |
Permits an IAM principal to all data read/write operations to this table. |
grantStream |
Adds an IAM policy statement associated with this table's stream to an IAM principal's policy. |
grantStreamRead |
Permits an IAM principal all stream data read operations for this table's stream: DescribeStream, GetRecords, GetShardIterator, ListStreams. |
grantTableListStreams |
Permits an IAM Principal to list streams attached to current dynamodb table. |
grantWriteData |
Permits an IAM principal all data write operations to this table: BatchWriteItem, PutItem, UpdateItem, DeleteItem. |
metric |
Return the given named metric for this Table. |
metricConditionalCheckFailedRequests |
Metric for the conditional check failed requests this table. |
metricConsumedReadCapacityUnits |
Metric for the consumed read capacity units this table. |
metricConsumedWriteCapacityUnits |
Metric for the consumed write capacity units this table. |
metricSuccessfulRequestLatency |
Metric for the successful request latency this table. |
metricSystemErrors |
Metric for the system errors this table. |
metricSystemErrorsForOperations |
Metric for the system errors this table. |
metricThrottledRequests |
How many requests are throttled on this table. |
metricThrottledRequestsForOperation |
How many requests are throttled on this table, for the given operation. |
metricUserErrors |
Metric for the user errors. |
schema |
Get schema attributes of table or index. |
public toString(): string
Returns a string representation of this construct.
public applyRemovalPolicy(policy: RemovalPolicy): void
Apply the given removal policy to this resource.
The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced. The resource can be deleted (RemovalPolicy.DESTROY
), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN
).
- Type: @aws-cdk/core.RemovalPolicy
public addGlobalSecondaryIndex(props: GlobalSecondaryIndexProps): void
Add a global secondary index of table.
- Type: @aws-cdk/aws-dynamodb.GlobalSecondaryIndexProps
the property of global secondary index.
public addLocalSecondaryIndex(props: LocalSecondaryIndexProps): void
Add a local secondary index of table.
- Type: @aws-cdk/aws-dynamodb.LocalSecondaryIndexProps
the property of local secondary index.
public autoScaleGlobalSecondaryIndexReadCapacity(indexName: string, props: EnableScalingProps): IScalableTableAttribute
Enable read capacity scaling for the given GSI.
- Type: string
- Type: @aws-cdk/aws-dynamodb.EnableScalingProps
public autoScaleGlobalSecondaryIndexWriteCapacity(indexName: string, props: EnableScalingProps): IScalableTableAttribute
Enable write capacity scaling for the given GSI.
- Type: string
- Type: @aws-cdk/aws-dynamodb.EnableScalingProps
public autoScaleReadCapacity(props: EnableScalingProps): IScalableTableAttribute
Enable read capacity scaling for this table.
- Type: @aws-cdk/aws-dynamodb.EnableScalingProps
public autoScaleWriteCapacity(props: EnableScalingProps): IScalableTableAttribute
Enable write capacity scaling for this table.
- Type: @aws-cdk/aws-dynamodb.EnableScalingProps
public grant(grantee: IGrantable, actions: string): Grant
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 the table.encryptionKey.grant*
methods.
- Type: @aws-cdk/aws-iam.IGrantable
The principal (no-op if undefined).
- Type: string
The set of actions to allow (i.e. "dynamodb:PutItem", "dynamodb:GetItem", ...).
public grantFullAccess(grantee: IGrantable): Grant
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.
- Type: @aws-cdk/aws-iam.IGrantable
The principal to grant access to.
public grantReadData(grantee: IGrantable): Grant
Permits an IAM principal all data read operations from this table: BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan.
Appropriate grants will also be added to the customer-managed KMS key if one was configured.
- Type: @aws-cdk/aws-iam.IGrantable
The principal to grant access to.
public grantReadWriteData(grantee: IGrantable): Grant
Permits an IAM principal to all data read/write operations to this table.
BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, BatchWriteItem, PutItem, UpdateItem, DeleteItem Appropriate grants will also be added to the customer-managed KMS key if one was configured.
- Type: @aws-cdk/aws-iam.IGrantable
The principal to grant access to.
public grantStream(grantee: IGrantable, actions: string): Grant
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 the table.encryptionKey.grant*
methods.
- Type: @aws-cdk/aws-iam.IGrantable
The principal (no-op if undefined).
- Type: string
The set of actions to allow (i.e. "dynamodb:DescribeStream", "dynamodb:GetRecords", ...).
public grantStreamRead(grantee: IGrantable): Grant
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.
- Type: @aws-cdk/aws-iam.IGrantable
The principal to grant access to.
public grantTableListStreams(grantee: IGrantable): Grant
Permits an IAM Principal to list streams attached to current dynamodb table.
- Type: @aws-cdk/aws-iam.IGrantable
The principal (no-op if undefined).
public grantWriteData(grantee: IGrantable): Grant
Permits an IAM principal all data write operations to this table: BatchWriteItem, PutItem, UpdateItem, DeleteItem.
Appropriate grants will also be added to the customer-managed KMS key if one was configured.
- Type: @aws-cdk/aws-iam.IGrantable
The principal to grant access to.
public metric(metricName: string, props?: MetricOptions): 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
and period
properties.
- Type: string
- Type: @aws-cdk/aws-cloudwatch.MetricOptions
public metricConditionalCheckFailedRequests(props?: MetricOptions): Metric
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
and period
properties.
- Type: @aws-cdk/aws-cloudwatch.MetricOptions
public metricConsumedReadCapacityUnits(props?: MetricOptions): Metric
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
and period
properties.
- Type: @aws-cdk/aws-cloudwatch.MetricOptions
public metricConsumedWriteCapacityUnits(props?: MetricOptions): Metric
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
and period
properties.
- Type: @aws-cdk/aws-cloudwatch.MetricOptions
public metricSuccessfulRequestLatency(props?: MetricOptions): Metric
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
and period
properties.
- Type: @aws-cdk/aws-cloudwatch.MetricOptions
public metricSystemErrors(props?: MetricOptions): Metric
Metric for the system errors this table.
- Type: @aws-cdk/aws-cloudwatch.MetricOptions
public metricSystemErrorsForOperations(props?: SystemErrorsForOperationsMetricOptions): IMetric
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
and period
properties.
- Type: @aws-cdk/aws-dynamodb.SystemErrorsForOperationsMetricOptions
public metricThrottledRequests(props?: MetricOptions): Metric
How many requests are throttled on this table.
Default: sum over 5 minutes
- Type: @aws-cdk/aws-cloudwatch.MetricOptions
public metricThrottledRequestsForOperation(operation: string, props?: MetricOptions): Metric
How many requests are throttled on this table, for the given operation.
Default: sum over 5 minutes
- Type: string
- Type: @aws-cdk/aws-cloudwatch.MetricOptions
public metricUserErrors(props?: MetricOptions): Metric
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
and period
properties.
- Type: @aws-cdk/aws-cloudwatch.MetricOptions
public schema(indexName?: string): SchemaOptions
Get schema attributes of table or index.
- Type: string
Name | Description |
---|---|
isConstruct |
Return whether the given object is a Construct. |
isResource |
Check whether the given construct is a Resource. |
fromTableArn |
Creates a Table construct that represents an external table via table arn. |
fromTableAttributes |
Creates a Table construct that represents an external table. |
fromTableName |
Creates a Table construct that represents an external table via table name. |
grantListStreams |
Permits an IAM Principal to list all DynamoDB Streams. |
import { Table } from 'aws-dynamodb-table-multi-gsis'
Table.isConstruct(x: any)
Return whether the given object is a Construct.
- Type: any
import { Table } from 'aws-dynamodb-table-multi-gsis'
Table.isResource(construct: IConstruct)
Check whether the given construct is a Resource.
- Type: @aws-cdk/core.IConstruct
import { Table } from 'aws-dynamodb-table-multi-gsis'
Table.fromTableArn(scope: Construct, id: string, tableArn: string)
Creates a Table construct that represents an external table via table arn.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct's name.
- Type: string
The table's ARN.
import { Table } from 'aws-dynamodb-table-multi-gsis'
Table.fromTableAttributes(scope: Construct, id: string, attrs: TableAttributes)
Creates a Table construct that represents an external table.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct's name.
- Type: @aws-cdk/aws-dynamodb.TableAttributes
A TableAttributes
object.
import { Table } from 'aws-dynamodb-table-multi-gsis'
Table.fromTableName(scope: Construct, id: string, tableName: string)
Creates a Table construct that represents an external table via table name.
- Type: constructs.Construct
The parent creating construct (usually this
).
- Type: string
The construct's name.
- Type: string
The table's name.
import { Table } from 'aws-dynamodb-table-multi-gsis'
Table.grantListStreams(grantee: IGrantable)
Permits an IAM Principal to list all DynamoDB Streams.
- Type: @aws-cdk/aws-iam.IGrantable
The principal (no-op if undefined).
Name | Type | Description |
---|---|---|
node |
@aws-cdk/core.ConstructNode |
The construct tree node associated with this construct. |
env |
@aws-cdk/core.ResourceEnvironment |
The environment this resource belongs to. |
stack |
@aws-cdk/core.Stack |
The stack in which this resource is defined. |
tableArn |
string |
Arn of the dynamodb table. |
tableName |
string |
Table name of the dynamodb table. |
encryptionKey |
@aws-cdk/aws-kms.IKey |
KMS encryption key, if this table uses a customer-managed encryption key. |
tableStreamArn |
string |
ARN of the table's stream, if there is one. |
public readonly node: ConstructNode;
- Type: @aws-cdk/core.ConstructNode
The construct tree node associated with this construct.
public readonly env: ResourceEnvironment;
- Type: @aws-cdk/core.ResourceEnvironment
The environment this resource belongs to.
For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.
public readonly stack: Stack;
- Type: @aws-cdk/core.Stack
The stack in which this resource is defined.
public readonly tableArn: string;
- Type: string
Arn of the dynamodb table.
public readonly tableName: string;
- Type: string
Table name of the dynamodb table.
public readonly encryptionKey: IKey;
- Type: @aws-cdk/aws-kms.IKey
KMS encryption key, if this table uses a customer-managed encryption key.
public readonly tableStreamArn: string;
- Type: string
ARN of the table's stream, if there is one.