:doc:`CloudTrail <../../cloudtrail>` / Client / list_tags

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



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

  

  Lists the tags for the specified trails, event data stores, dashboards, or channels in the current Region.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/cloudtrail-2013-11-01/ListTags>`_  


  **Request Syntax**
  ::

    response = client.list_tags(
        ResourceIdList=[
            'string',
        ],
        NextToken='string'
    )
    
  :type ResourceIdList: list
  :param ResourceIdList: **[REQUIRED]** 

    Specifies a list of trail, event data store, dashboard, or channel ARNs whose tags will be listed. The list has a limit of 20 ARNs.

     

    Example trail ARN format: ``arn:aws:cloudtrail:us-east-2:123456789012:trail/MyTrail``

     

    Example event data store ARN format: ``arn:aws:cloudtrail:us-east-2:123456789012:eventdatastore/EXAMPLE-f852-4e8f-8bd1-bcf6cEXAMPLE``

     

    Example dashboard ARN format: ``arn:aws:cloudtrail:us-east-1:123456789012:dashboard/exampleDash``

     

    Example channel ARN format: ``arn:aws:cloudtrail:us-east-2:123456789012:channel/01234567890``

    

  
    - *(string) --* 

    

  :type NextToken: string
  :param NextToken: 

    Reserved for future use.

    

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

    
    ::

      {
          'ResourceTagList': [
              {
                  'ResourceId': 'string',
                  'TagsList': [
                      {
                          'Key': 'string',
                          'Value': 'string'
                      },
                  ]
              },
          ],
          'NextToken': 'string'
      }
      
    **Response Structure**

    

    - *(dict) --* 

      Returns the objects or data listed below if successful. Otherwise, returns an error.

      
      

      - **ResourceTagList** *(list) --* 

        A list of resource tags.

        
        

        - *(dict) --* 

          A resource tag.

          
          

          - **ResourceId** *(string) --* 

            Specifies the ARN of the resource.

            
          

          - **TagsList** *(list) --* 

            A list of tags.

            
            

            - *(dict) --* 

              A custom key-value pair associated with a resource such as a CloudTrail trail, event data store, dashboard, or channel.

              
              

              - **Key** *(string) --* 

                The key in a key-value pair. The key must be must be no longer than 128 Unicode characters. The key must be unique for the resource to which it applies.

                
              

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

                The value in a key-value pair of a tag. The value must be no longer than 256 Unicode characters.

                
          
        
      
    
      

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

        Reserved for future use.

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

  
  *   :py:class:`CloudTrail.Client.exceptions.CloudTrailARNInvalidException`

  
  *   :py:class:`CloudTrail.Client.exceptions.EventDataStoreARNInvalidException`

  
  *   :py:class:`CloudTrail.Client.exceptions.ChannelARNInvalidException`

  
  *   :py:class:`CloudTrail.Client.exceptions.ResourceTypeNotSupportedException`

  
  *   :py:class:`CloudTrail.Client.exceptions.InvalidTrailNameException`

  
  *   :py:class:`CloudTrail.Client.exceptions.InactiveEventDataStoreException`

  
  *   :py:class:`CloudTrail.Client.exceptions.EventDataStoreNotFoundException`

  
  *   :py:class:`CloudTrail.Client.exceptions.UnsupportedOperationException`

  
  *   :py:class:`CloudTrail.Client.exceptions.OperationNotPermittedException`

  
  *   :py:class:`CloudTrail.Client.exceptions.InvalidTokenException`

  
  *   :py:class:`CloudTrail.Client.exceptions.NoManagementAccountSLRExistsException`

  