:doc:`AppRunner <../../apprunner>` / Client / tag_resource

************
tag_resource
************



.. py:method:: AppRunner.Client.tag_resource(**kwargs)

  

  Add tags to, or update the tag values of, an App Runner resource. A tag is a key-value pair.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/apprunner-2020-05-15/TagResource>`_  


  **Request Syntax**
  ::

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

    The Amazon Resource Name (ARN) of the resource that you want to update tags for.

     

    It must be the ARN of an App Runner resource.

    

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

    A list of tag key-value pairs to add or update. If a key is new to the resource, the tag is added with the provided value. If a key is already associated with the resource, the value of the tag is updated.

    

  
    - *(dict) --* 

      Describes a tag that is applied to an App Runner resource. A tag is a metadata item consisting of a key-value pair.

      

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

        The key of the tag.

        

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

        The value of the tag.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`AppRunner.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`AppRunner.Client.exceptions.InternalServiceErrorException`

  
  *   :py:class:`AppRunner.Client.exceptions.InvalidRequestException`

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

  