Menu
AWS IoT
API Reference (API Version 2015-05-28)

RegisterCertificate

Registers a device certificate with AWS IoT. If you have more than one CA certificate that has the same subject field, you must specify the CA certificate that was used to sign the device certificate being registered.

Request Syntax

Copy
POST /certificate/register?setAsActive=setAsActive HTTP/1.1 Content-type: application/json { "caCertificatePem": "string", "certificatePem": "string", "status": "string" }

URI Request Parameters

The request requires the following URI parameters.

setAsActive

This parameter has been deprecated.

A boolean value that specifies if the CA certificate is set to active.

Request Body

The request accepts the following data in JSON format.

caCertificatePem

The CA certificate used to sign the device certificate being registered.

Type: String

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

Required: No

certificatePem

The certificate data, in PEM format.

Type: String

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

Required: Yes

status

The status of the register certificate request.

Type: String

Valid Values: ACTIVE | INACTIVE | REVOKED | PENDING_TRANSFER | REGISTER_INACTIVE | PENDING_ACTIVATION

Required: No

Response Syntax

Copy
HTTP/1.1 200 Content-type: application/json { "certificateArn": "string", "certificateId": "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.

certificateArn

The certificate ARN.

Type: String

certificateId

The certificate identifier.

Type: String

Length Constraints: Fixed length of 64.

Pattern: (0x)?[a-fA-F0-9]+

Errors

CertificateConflictException

Unable to verify the CA certificate used to sign the device certificate you are attempting to register. This is happens when you have registered more than one CA certificate that has the same subject field and public key.

HTTP Status Code: 409

CertificateStateException

The certificate operation is not allowed.

HTTP Status Code: 406

CertificateValidationException

The certificate is invalid.

HTTP Status Code: 400

InternalFailureException

An unexpected error has occurred.

HTTP Status Code: 500

InvalidRequestException

The request is not valid.

HTTP Status Code: 400

ResourceAlreadyExistsException

The resource already exists.

HTTP Status Code: 409

ServiceUnavailableException

The service is temporarily unavailable.

HTTP Status Code: 503

ThrottlingException

The rate exceeds the limit.

HTTP Status Code: 429

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: