Menu
AWS IoT
Developer Guide

CreateThingType

Creates a new thing type.

Request syntax:

POST /thing-types/thingTypeName Content-type: application/json { "thingTypeProperties": { "thingTypeDescription": "string", "searchableAttributes": [ "string" ] } }

URI Request Parameters:

Name

Type

Req?

Description

thingTypeName

ThingTypeName

yes

The name of the thing type.

Request Body Parameters:

Name

Type

Req?

Description

thingTypeProperties

ThingTypeProperties

no

The ThingTypeProperties for the thing type to create. It contains information about the new thing type including a description, and a list of searchable thing attribute names.

Response syntax:

Content-type: application/json { "thingTypeName": "string", "thingTypeArn": "string", "thingTypeId": "string" }

Response Body Parameters:

Name

Type

Req?

Description

thingTypeName

ThingTypeName

no

The name of the thing type.

thingTypeArn

ThingTypeArn

no

The Amazon Resource Name (ARN) of the thing type.

thingTypeId

ThingTypeId

no

The thing type ID.

Errors:

InvalidRequestException

The contents of the request were invalid. For example, this code is returned when an UpdateJobExecution request contains invalid status details. The message contains details about the error.

HTTP response code: 400

ThrottlingException

The rate exceeds the limit.

HTTP response code: 429

UnauthorizedException

You are not authorized to perform this operation.

HTTP response code: 401

ServiceUnavailableException

The service is temporarily unavailable.

HTTP response code: 503

InternalFailureException

An unexpected error has occurred.

HTTP response code: 500

ResourceAlreadyExistsException

The resource already exists.

HTTP response code: 409

CLI

Synopsis:

aws iot create-thing-type \ --thing-type-name <value> \ [--thing-type-properties <value>] \ [--cli-input-json <value>] \ [--generate-cli-skeleton]

cli-input-json format:

{ "thingTypeName": "string", "thingTypeProperties": { "thingTypeDescription": "string", "searchableAttributes": [ "string" ] } }

cli-input-json fields:

Name

Type

Description

thingTypeName

string

length max:128 min:1

pattern: [a-zA-Z0-9:_-]+

The name of the thing type.

thingTypeProperties

ThingTypeProperties

The ThingTypeProperties for the thing type to create. It contains information about the new thing type including a description, and a list of searchable thing attribute names.

thingTypeDescription

string

length max:2028

pattern: [\\p{Graph} ]*

The description of the thing type.

searchableAttributes

list

member: AttributeName

java class: java.util.List

A list of searchable thing attribute names.

AttributeName

string

length max:128

pattern: [a-zA-Z0-9_.,@/:#-]+

Output:

{ "thingTypeName": "string", "thingTypeArn": "string", "thingTypeId": "string" }

cli output fields:

Name

Type

Description

thingTypeName

string

length max:128 min:1

pattern: [a-zA-Z0-9:_-]+

The name of the thing type.

thingTypeArn

string

The Amazon Resource Name (ARN) of the thing type.

thingTypeId

string

The thing type ID.

On this page: