AttributeDefinitionProperty Struct
Represents an attribute for describing the schema for the table and indexes.
| Source | |
|---|---|
| Type last changed |
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',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_dynamodb as dynamodb
attribute_definition_property = dynamodb.CfnTable.AttributeDefinitionProperty(
attribute_name="attributeName",
attribute_type="attributeType"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.dynamodb.*;
AttributeDefinitionProperty attributeDefinitionProperty = AttributeDefinitionProperty.builder()
.attributeName("attributeName")
.attributeType("attributeType")
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.DynamoDB;
var attributeDefinitionProperty = new AttributeDefinitionProperty {
AttributeName = "attributeName",
AttributeType = "attributeType"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
attributeDefinitionProperty := &AttributeDefinitionProperty{
AttributeName: jsii.String("attributeName"),
AttributeType: jsii.String("attributeType"),
}
Properties
attributeNamestringattribute_namestrattributeNameStringAttributeNamestringAttributeName*string required #A name for the attribute.
attributeTypestringattribute_typestrattributeTypeStringAttributeTypestringAttributeType*string required #The data type for the attribute, where:.
S- the attribute is of type StringN- the attribute is of type NumberB- the attribute is of type Binary