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

*************************
tag_certificate_authority
*************************



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

  

  Adds one or more tags to your private CA. Tags are labels that you can use to identify and organize your Amazon Web Services resources. Each tag consists of a key and an optional value. You specify the private CA on input by its Amazon Resource Name (ARN). You specify the tag by using a key-value pair. You can apply a tag to just one private CA if you want to identify a specific characteristic of that CA, or you can apply the same tag to multiple private CAs if you want to filter for a common relationship among those CAs. To remove one or more tags, use the `UntagCertificateAuthority <https://docs.aws.amazon.com/privateca/latest/APIReference/API_UntagCertificateAuthority.html>`__ action. Call the `ListTags <https://docs.aws.amazon.com/privateca/latest/APIReference/API_ListTags.html>`__ action to see what tags are associated with your CA.

   

  .. note::

    

    To attach tags to a private CA during the creation procedure, a CA administrator must first associate an inline IAM policy with the ``CreateCertificateAuthority`` action and explicitly allow tagging. For more information, see `Attaching tags to a CA at the time of creation <https://docs.aws.amazon.com/privateca/latest/userguide/auth-InlinePolicies.html#policy-tag-ca>`__.

    

  

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


  **Request Syntax**
  ::

    response = client.tag_certificate_authority(
        CertificateAuthorityArn='string',
        Tags=[
            {
                'Key': 'string',
                'Value': 'string'
            },
        ]
    )
    
  :type CertificateAuthorityArn: string
  :param CertificateAuthorityArn: **[REQUIRED]** 

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

     

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

    

  
  :type Tags: list
  :param Tags: **[REQUIRED]** 

    List of tags to be associated with the CA.

    

  
    - *(dict) --* 

      Tags are labels that you can use to identify and organize your private CAs. Each tag consists of a key and an optional value. You can associate up to 50 tags with a private CA. To add one or more tags to a private CA, call the `TagCertificateAuthority <https://docs.aws.amazon.com/privateca/latest/APIReference/API_TagCertificateAuthority.html>`__ action. To remove a tag, call the `UntagCertificateAuthority <https://docs.aws.amazon.com/privateca/latest/APIReference/API_UntagCertificateAuthority.html>`__ action.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        Key (name) of the tag.

        

      
      - **Value** *(string) --* 

        Value of the tag.

        

      
    

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

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

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

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

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

  