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

*********
list_tags
*********



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

  

  Lists the tags, if any, that are associated with your private CA or one that has been shared with you. Tags are labels that you can use to identify and organize your CAs. Each tag consists of a key and an optional value. Call the `TagCertificateAuthority <https://docs.aws.amazon.com/privateca/latest/APIReference/API_TagCertificateAuthority.html>`__ action to add one or more tags to your CA. Call the `UntagCertificateAuthority <https://docs.aws.amazon.com/privateca/latest/APIReference/API_UntagCertificateAuthority.html>`__ action to remove tags.

  

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


  **Request Syntax**
  ::

    response = client.list_tags(
        MaxResults=123,
        NextToken='string',
        CertificateAuthorityArn='string'
    )
    
  :type MaxResults: integer
  :param MaxResults: 

    Use this parameter when paginating results to specify the maximum number of items to return in the response. If additional items exist beyond the number you specify, the **NextToken** element is sent in the response. Use this **NextToken** value in a subsequent request to retrieve additional items.

    

  
  :type NextToken: string
  :param NextToken: 

    Use this parameter when paginating results in a subsequent request after you receive a response with truncated results. Set it to the value of **NextToken** from the response you just received.

    

  
  :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**

    
    ::

      {
          'NextToken': 'string',
          'Tags': [
              {
                  'Key': 'string',
                  'Value': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **NextToken** *(string) --* 

        When the list is truncated, this value is present and should be used for the **NextToken** parameter in a subsequent pagination request.

        
      

      - **Tags** *(list) --* 

        The tags associated with your private 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) --* 

            Key (name) of the tag.

            
          

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

            Value of the tag.

            
      
    
  
  **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`

  