

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# モノのタイプを非推奨にする
<a name="deprecate-thing-type"></a>

モノのタイプは変更不可能です。定義した後に変更することはできません。ただし、特定のタイプにユーザーが新しいモノを関連付けないようにするには、そのタイプを非推奨にすることができます。そのタイプに関連付けられている既存のモノはすべて、変更されません。

モノのタイプを非推奨にするには、**DeprecateThingType** コマンドを使用します。

```
$ aws iot deprecate-thing-type --thing-type-name "myThingType"
```

**DescribeThingType** コマンドを使用して、結果を表示できます。

```
$ aws iot describe-thing-type --thing-type-name "StopLight":
```

```
{
    "thingTypeName": "StopLight",
    "thingTypeProperties": {
        "searchableAttributes": [
            "wattage",
            "numOfLights",
            "model"
        ],
        "thingTypeDescription": "traffic light type",
    },
    "thingTypeMetadata": {
        "deprecated": true,
        "creationDate": 1468425854308,
        "deprecationDate": 1468446026349
    }
}
```

モノのタイプの廃止は、操作を元に戻すことができます。`--undo-deprecate` フラッグを **DeprecateThingType** CLI コマンドと共に使用して、廃止を取り消すことができます。

```
$ aws iot deprecate-thing-type --thing-type-name "myThingType" --undo-deprecate
```

**DescribeThingType** CLI コマンドを使用して、結果を表示できます。

```
$ aws iot describe-thing-type --thing-type-name "StopLight":
```

```
{
    "thingTypeName": "StopLight",
    "thingTypeArn": "arn:aws:iot:us-east-1:123456789012:thingtype/StopLight",
    "thingTypeId": "12345678abcdefgh12345678ijklmnop12345678"
    "thingTypeProperties": {
        "searchableAttributes": [
            "wattage",
            "numOfLights",
            "model"
        ],
        "thingTypeDescription": "traffic light type"
    },
    "thingTypeMetadata": {
        "deprecated": false,
        "creationDate": 1468425854308,
    }
}
```