as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持

ContentIDBuilder

ContentIDBuilder

用于创建ContentId对象的构建器。

构造函数

new ContentIdBuilder()

new ContentIdBuilder(): ContentIdBuilder

返回值

ContentIdBuilder

方法

build()

build(): ContentId

使用在构建器上设置的字段构建ContentId对象。

返回值

ContentId

创建的ContentId对象。

抛出

如果未设置必填字段,则会引发InvalidArgumentError


id()

id(id): ContentIdBuilder

在关联命名空间下的亚马逊目录中设置可解析的ID。这是必填字段。如果未设置此字段,build() 将失败。

参数

id

string

可在关联的命名空间下解析的ID。

返回值

ContentIdBuilder

当前的ContentIdBuilder对象。


idNamespace()

idNamespace(idNamespace): ContentIdBuilder

设置应在其下解析ID的命名空间。有关可接受的值,请参阅ContentIdNamespaces。这是必填字段。如果未设置此字段,build() 将失败。

参数

idNamespace

string

用于在其下解析ID的命名空间。

返回值

ContentIdBuilder

当前的ContentIdBuilder对象。


Last updated: 2025年10月2日