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

************
update_alias
************



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

  

  Associates an existing Amazon Web Services Payment Cryptography alias with a different key. Each alias is associated with only one Amazon Web Services Payment Cryptography key at a time, although a key can have multiple aliases. The alias and the Amazon Web Services Payment Cryptography key must be in the same Amazon Web Services account and Amazon Web Services Region

   

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

   

  **Related operations:**

   

  
  * `CreateAlias <https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_CreateAlias.html>`__
   
  * `DeleteAlias <https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_DeleteAlias.html>`__
   
  * `GetAlias <https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_GetAlias.html>`__
   
  * `ListAliases <https://docs.aws.amazon.com/payment-cryptography/latest/APIReference/API_ListAliases.html>`__
  

  

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


  **Request Syntax**
  ::

    response = client.update_alias(
        AliasName='string',
        KeyArn='string'
    )
    
  :type AliasName: string
  :param AliasName: **[REQUIRED]** 

    The alias whose associated key is changing.

    

  
  :type KeyArn: string
  :param KeyArn: 

    The ``KeyARN`` for the key that you are updating or removing from the alias.

    

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

    
    ::

      {
          'Alias': {
              'AliasName': 'string',
              'KeyArn': 'string'
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **Alias** *(dict) --* 

        The alias name.

        
        

        - **AliasName** *(string) --* 

          A friendly name that you can use to refer to a key. The value must begin with ``alias/``.

           

          .. warning::

             

            Do not include confidential or sensitive information in this field. This field may be displayed in plaintext in CloudTrail logs and other output.

            

          
        

        - **KeyArn** *(string) --* 

          The ``KeyARN`` of the key associated with the alias.

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

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

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

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

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

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

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

  