

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

# 单个事物预调配
<a name="single-thing-provisioning"></a>

要配置事物，请使用 [RegisterThing](https://docs.aws.amazon.com/iot/latest/apireference/API_RegisterThing.html)API 或 `register-thing` CLI 命令。`register-thing` CLI 命令接受以下参数：

--template-body  
预调配模板。

--parameters  
在预调配模板中使用的参数的名称-值对列表，采用 JSON 格式（例如，`{"ThingName" : "MyProvisionedThing", "CSR" : "csr-text"}`）。

请参阅[预置模板](provision-template.md)。

[RegisterThing](https://docs.aws.amazon.com/iot/latest/apireference/API_RegisterThing.html)或者`register-thing`返回 ARNs 资源及其创建的证书的文本：

```
{
    "certificatePem": "certificate-text",
    "resourceArns": {
    "PolicyLogicalName": "arn:aws:iot:us-west-2:123456789012:policy/2A6577675B7CD1823E271C7AAD8184F44630FFD7",
    "certificate": "arn:aws:iot:us-west-2:123456789012:cert/cd82bb924d4c6ccbb14986dcb4f40f30d892cc6b3ce7ad5008ed6542eea2b049",
    "thing": "arn:aws:iot:us-west-2:123456789012:thing/MyProvisionedThing"
    }
}
```

如果在字典中省略了参数，则使用默认值。如果未指定默认值，则不使用值来替换参数。