interface Attribute
Language | Type name |
---|---|
![]() | Amazon.CDK.AWS.DynamoDB.Attribute |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#Attribute |
![]() | software.amazon.awscdk.services.dynamodb.Attribute |
![]() | aws_cdk.aws_dynamodb.Attribute |
![]() | aws-cdk-lib » aws_dynamodb » Attribute |
Represents an attribute for describing the key schema for the table and indexes.
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' },
],
});
Properties
Name | Type | Description |
---|---|---|
name | string | The name of an attribute. |
type | Attribute | The data type of an attribute. |
name
Type:
string
The name of an attribute.
type
Type:
Attribute
The data type of an attribute.