:doc:`ACMPCA <../../acm-pca>` / Client / get_certificate_authority_csr

*****************************
get_certificate_authority_csr
*****************************



.. py:method:: ACMPCA.Client.get_certificate_authority_csr(**kwargs)

  

  Retrieves the certificate signing request (CSR) for your private certificate authority (CA). The CSR is created when you call the `CreateCertificateAuthority <https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html>`__ action. Sign the CSR with your Amazon Web Services Private CA-hosted or on-premises root or subordinate CA. Then import the signed certificate back into Amazon Web Services Private CA by calling the `ImportCertificateAuthorityCertificate <https://docs.aws.amazon.com/privateca/latest/APIReference/API_ImportCertificateAuthorityCertificate.html>`__ action. The CSR is returned as a base64 PEM-encoded string.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/acm-pca-2017-08-22/GetCertificateAuthorityCsr>`_  


  **Request Syntax**
  ::

    response = client.get_certificate_authority_csr(
        CertificateAuthorityArn='string'
    )
    
  :type CertificateAuthorityArn: string
  :param CertificateAuthorityArn: **[REQUIRED]** 

    The Amazon Resource Name (ARN) that was returned when you called the `CreateCertificateAuthority <https://docs.aws.amazon.com/privateca/latest/APIReference/API_CreateCertificateAuthority.html>`__ action. This must be of the form:

     

    ``arn:aws:acm-pca:region:account:certificate-authority/12345678-1234-1234-1234-123456789012``

    

  
  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'Csr': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Csr** *(string) --* 

        The base64 PEM-encoded certificate signing request (CSR) for your private CA certificate.

        
  
  **Exceptions**
  
  *   :py:class:`ACMPCA.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`ACMPCA.Client.exceptions.InvalidArnException`

  
  *   :py:class:`ACMPCA.Client.exceptions.InvalidStateException`

  
  *   :py:class:`ACMPCA.Client.exceptions.RequestFailedException`

  
  *   :py:class:`ACMPCA.Client.exceptions.RequestInProgressException`

  