IoT / Client / register_certificate

register_certificate#

IoT.Client.register_certificate(**kwargs)#

Registers a device certificate with IoT in the same certificate mode as the signing CA. 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.

Requires permission to access the RegisterCertificate action.

See also: AWS API Documentation

Request Syntax

response = client.register_certificate(
    certificatePem='string',
    caCertificatePem='string',
    setAsActive=True|False,
    status='ACTIVE'|'INACTIVE'|'REVOKED'|'PENDING_TRANSFER'|'REGISTER_INACTIVE'|'PENDING_ACTIVATION'
)
Parameters:
  • certificatePem (string) –

    [REQUIRED]

    The certificate data, in PEM format.

  • caCertificatePem (string) – The CA certificate used to sign the device certificate being registered.

  • setAsActive (boolean) –

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

    Valid values: ACTIVE | INACTIVE

  • status (string) – The status of the register certificate request. Valid values that you can use include ACTIVE, INACTIVE, and REVOKED.

Return type:

dict

Returns:

Response Syntax

{
    'certificateArn': 'string',
    'certificateId': 'string'
}

Response Structure

  • (dict) –

    The output from the RegisterCertificate operation.

    • certificateArn (string) –

      The certificate ARN.

    • certificateId (string) –

      The certificate identifier.

Exceptions

  • IoT.Client.exceptions.ResourceAlreadyExistsException

  • IoT.Client.exceptions.InvalidRequestException

  • IoT.Client.exceptions.CertificateValidationException

  • IoT.Client.exceptions.CertificateStateException

  • IoT.Client.exceptions.CertificateConflictException

  • IoT.Client.exceptions.ThrottlingException

  • IoT.Client.exceptions.UnauthorizedException

  • IoT.Client.exceptions.ServiceUnavailableException

  • IoT.Client.exceptions.InternalFailureException