PrimaryKeyObject - AWS Serverless Application Model

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

PrimaryKeyObject

描述主键属性的对象。

语法

要在您的 AWS Serverless Application Model (AWS SAM) 模板中声明此实体,请使用以下语法。

YAML

Name: String Type: String

属性

Name

主键的属性名称。

类型:字符串

必需:是

CloudFormation 兼容性:此属性直接传递给 AWS::DynamoDB::Table AttributeDefinition 数据类型的 AttributeName 属性。

附加说明:此属性还会传递给 AWS::DynamoDB::Table KeySchema 数据类型的 AttributeName 属性。

Type

主键的数据类型。

有效值StringNumberBinary

类型:字符串

必需:是

CloudFormation 兼容性:此属性直接传递给 AWS::DynamoDB::Table AttributeDefinition 数据类型的 AttributeType 属性。

示例

PrimaryKey

主键示例。

YAML

Properties: PrimaryKey: Name: MyPrimaryKey Type: String