Skip to content
v2.274.0

AttributeDefinitionProperty Struct ​

Represents an attribute for describing the schema for the table and indexes.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_dynamodb as dynamodb } from 'aws-cdk-lib';
const attributeDefinitionProperty: dynamodb.CfnTable.AttributeDefinitionProperty = {
  attributeName: 'attributeName',
  attributeType: 'attributeType',
};

Properties ​

attributeNamestringattribute_namestrattributeNameStringAttributeNamestringAttributeName*stringrequired#
A name for the attribute.
attributeTypestringattribute_typestrattributeTypeStringAttributeTypestringAttributeType*stringrequired#
The data type for the attribute, where:.
  • S - the attribute is of type String
  • N - the attribute is of type Number
  • B - the attribute is of type Binary