interface Attribute
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.DynamoDB.Attribute |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#Attribute |
Java | software.amazon.awscdk.services.dynamodb.Attribute |
Python | aws_cdk.aws_dynamodb.Attribute |
TypeScript (source) | 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 mrscTable = new dynamodb.TableV2(stack, 'MRSCTable', {
partitionKey: { name: 'pk', type: dynamodb.AttributeType.STRING },
multiRegionConsistency: dynamodb.MultiRegionConsistency.STRONG,
replicas: [
{ region: 'us-east-1' },
],
witnessRegion: '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.

.NET
Go
Java
Python
TypeScript (