PrimaryKeyObject - Amazon Serverless Application Model
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

PrimaryKeyObject

描述主键属性的对象。

语法

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

YAML

Name: String Type: String

属性

Name

主键的属性名称。

类型:字符串

必需:是

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

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

Type

主键的数据类型。

有效值StringNumberBinary

类型:字符串

必需:是

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

示例

PrimaryKey

主键示例。

YAML

Properties: PrimaryKey: Name: MyPrimaryKey Type: String