aws-cdk-lib.aws_dynamodb.Attribute

interface Attribute

LanguageType name
.NETAmazon.CDK.AWS.DynamoDB.Attribute
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awsdynamodb#Attribute
Javasoftware.amazon.awscdk.services.dynamodb.Attribute
Pythonaws_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 cloudwatch from 'aws-cdk-lib/aws-cloudwatch';

const table = new dynamodb.Table(this, 'Table', {
  partitionKey: { name: 'id', type: dynamodb.AttributeType.STRING },
});

const metric = table.metricThrottledRequestsForOperations({
  operations: [dynamodb.Operation.PUT_ITEM],
  period: Duration.minutes(1),
});

new cloudwatch.Alarm(this, 'Alarm', {
  metric: metric,
  evaluationPeriods: 1,
  threshold: 1,
});

Properties

NameTypeDescription
namestringThe name of an attribute.
typeAttributeTypeThe data type of an attribute.

name

Type: string

The name of an attribute.


type

Type: AttributeType

The data type of an attribute.