

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

# 更新事物
<a name="update-thing"></a>

您可以使用 **UpdateThing** 命令更新事物。此命令仅更新事物的属性。您无法更改事物的名称。要更改事物的名称，请创建一个新事物，为其指定新名称，然后删除旧事物。

```
$ aws iot update-thing --thing-name "MyLightBulb" --attribute-payload "{\"attributes\": {\"wattage\":\"150\", \"model\":\"456\"}}"
```

**UpdateThing** 命令不会生成任何输出。您可以使用 **DescribeThing** 命令查看结果：

```
$ aws iot describe-thing --thing-name "MyLightBulb"
{
    "attributes": {
        "model": "456",
        "wattage": "150"
    },
    "version": 2,
    "thingName": "MyLightBulb"
}
```

有关更多信息，请参阅《 AWS CLI 命令参考》中的 [update-thing](https://docs.aws.amazon.com//cli/latest/reference/iot/update-thing.html)。