

As traduções são geradas por tradução automática. Em caso de conflito entre o conteúdo da tradução e da versão original em inglês, a versão em inglês prevalecerá.

# Reprovar um tipo de objeto
<a name="deprecate-thing-type"></a>

Os tipos de objeto são imutáveis. Eles não podem ser alterados depois que são definidos. No entanto, você pode reprovar um tipo de objeto para impedir que os usuários associem novas objetos a ele. Todas as objetos existentes associadas ao tipo de objeto são inalteradas.

Para tornar um tipo de objeto obsoleto, use o comando **DeprecateThingType**:

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

Você pode usar o comando **DescribeThingType** para exibir o resultado:

```
$ 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
    }
}
```

Reprovar um tipo de objeto é uma operação reversível. Você pode desfazer uma reprovação usando o sinalizador `--undo-deprecate` com o comando CLI **DeprecateThingType**:

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

Você pode usar o comando CLI **DescribeThingType** para exibir o resultado:

```
$ 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,
    }
}
```