:doc:`IoT <../../iot>` / Client / register_certificate

********************
register_certificate
********************



.. py:method:: IoT.Client.register_certificate(**kwargs)

  

  Registers a device certificate with IoT in the same `certificate mode <https://docs.aws.amazon.com/iot/latest/apireference/API_CertificateDescription.html#iot-Type-CertificateDescription-certificateMode>`__ 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 <https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions>`__ action.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/iot-2015-05-28/RegisterCertificate>`_  


  **Request Syntax**
  ::

    response = client.register_certificate(
        certificatePem='string',
        caCertificatePem='string',
        setAsActive=True|False,
        status='ACTIVE'|'INACTIVE'|'REVOKED'|'PENDING_TRANSFER'|'REGISTER_INACTIVE'|'PENDING_ACTIVATION'
    )
    
  :type certificatePem: string
  :param certificatePem: **[REQUIRED]** 

    The certificate data, in PEM format.

    

  
  :type caCertificatePem: string
  :param caCertificatePem: 

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

    

  
  :type setAsActive: boolean
  :param setAsActive: 

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

     

    Valid values: ``ACTIVE | INACTIVE``

    

  
  :type status: string
  :param status: 

    The status of the register certificate request. Valid values that you can use include ``ACTIVE``, ``INACTIVE``, and ``REVOKED``.

    

  
  
  :rtype: 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**
  
  *   :py:class:`IoT.Client.exceptions.ResourceAlreadyExistsException`

  
  *   :py:class:`IoT.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`IoT.Client.exceptions.CertificateValidationException`

  
  *   :py:class:`IoT.Client.exceptions.CertificateStateException`

  
  *   :py:class:`IoT.Client.exceptions.CertificateConflictException`

  
  *   :py:class:`IoT.Client.exceptions.ThrottlingException`

  
  *   :py:class:`IoT.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`IoT.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`IoT.Client.exceptions.InternalFailureException`

  