class CfnTablePropsMixin
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.DynamoDB.Mixins.CfnTablePropsMixin |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awsdynamodb/mixins#CfnTablePropsMixin |
Java | software.amazon.awscdk.mixins.preview.services.dynamodb.mixins.CfnTablePropsMixin |
Python | aws_cdk.mixins_preview.aws_dynamodb.mixins.CfnTablePropsMixin |
TypeScript | @aws-cdk/mixins-preview » aws_dynamodb » mixins » CfnTablePropsMixin |
Implements
IMixin
Extends
Mixin
The AWS::DynamoDB::Table resource creates a DynamoDB table. For more information, see CreateTable in the Amazon DynamoDB API Reference .
You should be aware of the following behaviors when working with DynamoDB tables:
- AWS CloudFormation typically creates DynamoDB tables in parallel. However, if your template includes multiple DynamoDB tables with indexes, you must declare dependencies so that the tables are created sequentially. Amazon DynamoDB limits the number of tables with secondary indexes that are in the creating state. If you create multiple tables with indexes at the same time, DynamoDB returns an error and the stack operation fails. For an example, see DynamoDB Table with a DependsOn Attribute .
Our guidance is to use the latest schema documented for your AWS CloudFormation templates. This schema supports the provisioning of all table settings below. When using this schema in your AWS CloudFormation templates, please ensure that your Identity and Access Management ( IAM ) policies are updated with appropriate permissions to allow for the authorization of these setting changes.
See also: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-dynamodb-table.html
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { mixins } from '@aws-cdk/mixins-preview';
import { mixins as dynamodb_mixins } from '@aws-cdk/mixins-preview/aws-dynamodb';
declare const policyDocument: any;
const cfnTablePropsMixin = new dynamodb_mixins.CfnTablePropsMixin({
attributeDefinitions: [{
attributeName: 'attributeName',
attributeType: 'attributeType',
}],
billingMode: 'billingMode',
contributorInsightsSpecification: {
enabled: false,
mode: 'mode',
},
deletionProtectionEnabled: false,
globalSecondaryIndexes: [{
contributorInsightsSpecification: {
enabled: false,
mode: 'mode',
},
indexName: 'indexName',
keySchema: [{
attributeName: 'attributeName',
keyType: 'keyType',
}],
onDemandThroughput: {
maxReadRequestUnits: 123,
maxWriteRequestUnits: 123,
},
projection: {
nonKeyAttributes: ['nonKeyAttributes'],
projectionType: 'projectionType',
},
provisionedThroughput: {
readCapacityUnits: 123,
writeCapacityUnits: 123,
},
warmThroughput: {
readUnitsPerSecond: 123,
writeUnitsPerSecond: 123,
},
}],
importSourceSpecification: {
inputCompressionType: 'inputCompressionType',
inputFormat: 'inputFormat',
inputFormatOptions: {
csv: {
delimiter: 'delimiter',
headerList: ['headerList'],
},
},
s3BucketSource: {
s3Bucket: 's3Bucket',
s3BucketOwner: 's3BucketOwner',
s3KeyPrefix: 's3KeyPrefix',
},
},
keySchema: [{
attributeName: 'attributeName',
keyType: 'keyType',
}],
kinesisStreamSpecification: {
approximateCreationDateTimePrecision: 'approximateCreationDateTimePrecision',
streamArn: 'streamArn',
},
localSecondaryIndexes: [{
indexName: 'indexName',
keySchema: [{
attributeName: 'attributeName',
keyType: 'keyType',
}],
projection: {
nonKeyAttributes: ['nonKeyAttributes'],
projectionType: 'projectionType',
},
}],
onDemandThroughput: {
maxReadRequestUnits: 123,
maxWriteRequestUnits: 123,
},
pointInTimeRecoverySpecification: {
pointInTimeRecoveryEnabled: false,
recoveryPeriodInDays: 123,
},
provisionedThroughput: {
readCapacityUnits: 123,
writeCapacityUnits: 123,
},
resourcePolicy: {
policyDocument: policyDocument,
},
sseSpecification: {
kmsMasterKeyId: 'kmsMasterKeyId',
sseEnabled: false,
sseType: 'sseType',
},
streamSpecification: {
resourcePolicy: {
policyDocument: policyDocument,
},
streamViewType: 'streamViewType',
},
tableClass: 'tableClass',
tableName: 'tableName',
tags: [{
key: 'key',
value: 'value',
}],
timeToLiveSpecification: {
attributeName: 'attributeName',
enabled: false,
},
warmThroughput: {
readUnitsPerSecond: 123,
writeUnitsPerSecond: 123,
},
}, /* all optional props */ {
strategy: mixins.PropertyMergeStrategy.OVERRIDE,
});
Initializer
new CfnTablePropsMixin(props: CfnTableMixinProps, options?: CfnPropertyMixinOptions)
Parameters
- props
Cfn— L1 properties to apply.Table Mixin Props - options
Cfn— Mixin options.Property Mixin Options
Create a mixin to apply properties to AWS::DynamoDB::Table.
Properties
| Name | Type | Description |
|---|---|---|
| props | Cfn | |
| strategy | Property | |
| static CFN_PROPERTY_KEYS | string[] |
props
Type:
Cfn
strategy
Type:
Property
static CFN_PROPERTY_KEYS
Type:
string[]
Methods
| Name | Description |
|---|---|
| apply | Apply the mixin properties to the construct. |
| supports(construct) | Check if this mixin supports the given construct. |
applyTo(construct)
public applyTo(construct: IConstruct): IConstruct
Parameters
- construct
IConstruct
Returns
Apply the mixin properties to the construct.
supports(construct)
public supports(construct: IConstruct): boolean
Parameters
- construct
IConstruct
Returns
boolean
Check if this mixin supports the given construct.

.NET
Go
Java
Python
TypeScript