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

RegisterCACertificate

Registers a CA certificate with AWS IoT. This CA certificate can then be used to sign device certificates, which can be then registered with AWS IoT. You can register up to 10 CA certificates per AWS account that have the same subject field. This enables you to have up to 10 certificate authorities sign your device certificates. If you have more than one CA certificate registered, make sure you pass the CA certificate when you register your device certificates with the RegisterCertificate API.

Request Syntax

POST /cacertificate?allowAutoRegistration=allowAutoRegistration&setAsActive=setAsActive HTTP/1.1
Content-type: application/json

{
   "caCertificate": "string",
   "verificationCertificate": "string"
}

URI Request Parameters

The request requires the following URI parameters.

allowAutoRegistration

Allows this CA certificate to be used for auto registration of device certificates.

setAsActive

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

Request Body

The request accepts the following data in JSON format.

caCertificate

The CA certificate.

Type: String

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

Required: Yes

verificationCertificate

The private key verification certificate.

Type: String

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

Required: Yes

Response Syntax

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 CA certificate ARN.

Type: String

certificateId

The CA certificate identifier.

Type: String

Length Constraints: Fixed length of 64.

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

Errors

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

LimitExceededException

The number of attached entities exceeds the limit.

HTTP Status Code: 410

RegistrationCodeValidationException

The registration code is invalid.

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: