PrimaryKeyObject - Amazon Serverless Application Model
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

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.

YAML

Name: String Type: String

Properties

Name

Attribute name of the primary key.

Type: String

Required: Yes

Amazon CloudFormation compatibility: This property is passed directly to the AttributeName property of the AWS::DynamoDB::Table AttributeDefinition data type.

Additional notes: This property is also passed to the AttributeName property of an AWS::DynamoDB::Table KeySchema data type.

Type

The data type for the primary key.

Valid values: String, Number, Binary

Type: String

Required: Yes

Amazon CloudFormation compatibility: This property is passed directly to the AttributeType property of the AWS::DynamoDB::Table AttributeDefinition data type.

Examples

PrimaryKey

Primary key example.

YAML

Properties: PrimaryKey: Name: MyPrimaryKey Type: String