PrimaryKeyObject
The object describing the properties of a primary key.
Syntax
To declare this entity in your Amazon Serverless Application Model (Amazon SAM) template, use the following syntax.
Properties
-
Name -
Attribute name of the primary key.
Type: String
Required: Yes
Amazon CloudFormation compatibility: This property is passed directly to the
AttributeNameproperty of theAWS::DynamoDB::TableAttributeDefinitiondata type.Additional notes: This property is also passed to the AttributeName property of an
AWS::DynamoDB::Table KeySchemadata type. -
Type -
The data type for the primary key.
Valid values:
String,Number,BinaryType: String
Required: Yes
Amazon CloudFormation compatibility: This property is passed directly to the
AttributeTypeproperty of theAWS::DynamoDB::TableAttributeDefinitiondata type.
Examples
PrimaryKey
Primary key example.
YAML
Properties: PrimaryKey: Name: MyPrimaryKey Type: String