:doc:`ComputeOptimizerAutomation <../../compute-optimizer-automation>` / Client / list_tags_for_resource

**********************
list_tags_for_resource
**********************



.. py:method:: ComputeOptimizerAutomation.Client.list_tags_for_resource(**kwargs)

  

  Lists the tags for a specified resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/compute-optimizer-automation-2025-09-22/ListTagsForResource>`_  


  **Request Syntax**
  ::

    response = client.list_tags_for_resource(
        resourceArn='string'
    )
    
  :type resourceArn: string
  :param resourceArn: **[REQUIRED]** 

    The ARN of the resource to list tags for.

    

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

    
    ::

      {
          'tags': [
              {
                  'key': 'string',
                  'value': 'string'
              },
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **tags** *(list) --* 

        The list of tags associated with the specified resource.

        
        

        - *(dict) --* 

          A key-value pair used to categorize and organize Amazon Web Services resources and automation rules.

          
          

          - **key** *(string) --* 

            The tag key, which can be up to 128 characters long.

            
          

          - **value** *(string) --* 

            The tag value, which can be up to 256 characters long.

            
      
    
  
  **Exceptions**
  
  *   :py:class:`ComputeOptimizerAutomation.Client.exceptions.InvalidParameterValueException`

  
  *   :py:class:`ComputeOptimizerAutomation.Client.exceptions.ForbiddenException`

  
  *   :py:class:`ComputeOptimizerAutomation.Client.exceptions.OptInRequiredException`

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

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

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

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

  
  *   :py:class:`ComputeOptimizerAutomation.Client.exceptions.ServiceUnavailableException`

  