enum AttributeType
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.DynamoDB.AttributeType |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#AttributeType |
![]() | software.amazon.awscdk.services.dynamodb.AttributeType |
![]() | aws_cdk.aws_dynamodb.AttributeType |
![]() | aws-cdk-lib » aws_dynamodb » AttributeType |
Data types for attributes within a table.
Example
import * as cdk from 'aws-cdk-lib';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'Stack', { env: { region: 'us-west-2' } });
const globalTable = new dynamodb.TableV2(stack, 'GlobalTable', {
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
// applies to all replicas, i.e., us-west-2, us-east-1, us-east-2
removalPolicy: cdk.RemovalPolicy.DESTROY,
replicas: [
{ region: 'us-east-1' },
{ region: 'us-east-2' },
],
});
Members
Name | Description |
---|---|
BINARY | Up to 400KiB of binary data (which must be encoded as base64 before sending to DynamoDB). |
NUMBER | Numeric values made of up to 38 digits (positive, negative or zero). |
STRING | Up to 400KiB of UTF-8 encoded text. |
BINARY
Up to 400KiB of binary data (which must be encoded as base64 before sending to DynamoDB).
NUMBER
Numeric values made of up to 38 digits (positive, negative or zero).
STRING
Up to 400KiB of UTF-8 encoded text.