RegisterThing - AWS IoT

RegisterThing

Provisions a thing in the device registry. RegisterThing calls other AWS IoT control plane APIs. These calls might exceed your account level AWS IoT Throttling Limits and cause throttle errors. Please contact AWS Customer Support to raise your throttling limits if necessary.

Requires permission to access the RegisterThing action.

Request Syntax

POST /things HTTP/1.1 Content-type: application/json { "parameters": { "string" : "string" }, "templateBody": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

parameters

The parameters for provisioning a thing. See Provisioning Templates for more information.

Type: String to string map

Key Length Constraints: Minimum length of 0. Maximum length of 2048.

Key Pattern: [\s\S]*

Value Length Constraints: Minimum length of 0. Maximum length of 4096.

Value Pattern: [\s\S]*

Required: No

templateBody

The provisioning template. See Provisioning Devices That Have Device Certificates for more information.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 10240.

Pattern: [\s\S]*

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "certificatePem": "string", "resourceArns": { "string" : "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

certificatePem

The certificate data, in PEM format.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 65536.

Pattern: [\s\S]*

resourceArns

ARNs for the generated resources.

Type: String to string map

Errors

ConflictingResourceUpdateException

A conflicting resource update exception. This exception is thrown when two pending updates cause a conflict.

HTTP Status Code: 409

InternalFailureException

An unexpected error has occurred.

HTTP Status Code: 500

InvalidRequestException

The request is not valid.

HTTP Status Code: 400

ResourceRegistrationFailureException

The resource registration failed.

HTTP Status Code: 400

ServiceUnavailableException

The service is temporarily unavailable.

HTTP Status Code: 503

ThrottlingException

The rate exceeds the limit.

HTTP Status Code: 400

UnauthorizedException

You are not authorized to perform this operation.

HTTP Status Code: 401

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: