:doc:`PaymentCryptographyControlPlane <../../payment-cryptography>` / Client / get_public_key_certificate

**************************
get_public_key_certificate
**************************



.. py:method:: PaymentCryptographyControlPlane.Client.get_public_key_certificate(**kwargs)

  

  Gets the public key certificate of the asymmetric key pair that exists within Amazon Web Services Payment Cryptography.

   

  Unlike the private key of an asymmetric key, which never leaves Amazon Web Services Payment Cryptography unencrypted, callers with ``GetPublicKeyCertificate`` permission can download the public key certificate of the asymmetric key. You can share the public key certificate to allow others to encrypt messages and verify signatures outside of Amazon Web Services Payment Cryptography

   

  **Cross-account use:** This operation can't be used across different Amazon Web Services accounts.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/payment-cryptography-2021-09-14/GetPublicKeyCertificate>`_  


  **Request Syntax**
  ::

    response = client.get_public_key_certificate(
        KeyIdentifier='string'
    )
    
  :type KeyIdentifier: string
  :param KeyIdentifier: **[REQUIRED]** 

    The ``KeyARN`` of the asymmetric key pair.

    

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

    
    ::

      {
          'KeyCertificate': 'string',
          'KeyCertificateChain': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **KeyCertificate** *(string) --* 

        The public key component of the asymmetric key pair in a certificate PEM format (base64 encoded). It is signed by the root certificate authority (CA). The certificate expires in 90 days.

        
      

      - **KeyCertificateChain** *(string) --* 

        The root certificate authority (CA) that signed the public key certificate in PEM format (base64 encoded) of the asymmetric key pair.

        
  
  **Exceptions**
  
  *   :py:class:`PaymentCryptographyControlPlane.Client.exceptions.ServiceUnavailableException`

  
  *   :py:class:`PaymentCryptographyControlPlane.Client.exceptions.ValidationException`

  
  *   :py:class:`PaymentCryptographyControlPlane.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`PaymentCryptographyControlPlane.Client.exceptions.ResourceNotFoundException`

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

  
  *   :py:class:`PaymentCryptographyControlPlane.Client.exceptions.InternalServerException`

  