PrimaryKeyObject - AWS Serverless Application Model
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

PrimaryKeyObject

The object describing the properties of a primary key.

Syntax

To declare this entity in your AWS Serverless Application Model (AWS SAM) template, use the following syntax.

YAML

Name: String Type: String

Properties

Name

Attribute name of the primary key.

Type: String

Required: Yes

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

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