:doc:`AppConfig <../../appconfig>` / Client / tag_resource

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



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

  

  Assigns metadata to an AppConfig resource. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define. You can specify a maximum of 50 tags for a resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/appconfig-2019-10-09/TagResource>`_  


  **Request Syntax**
  ::

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

    The ARN of the resource for which to retrieve tags.

    

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

    The key-value string map. The valid character set is [a-zA-Z+-=._:/]. The tag key can be up to 128 characters and must not start with ``aws:``. The tag value can be up to 256 characters.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

  
  *   :py:class:`AppConfig.Client.exceptions.BadRequestException`

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

  

  **Examples**

  The following tag-resource example tags an application resource.
  ::

    response = client.tag_resource(
        ResourceArn='arn:aws:appconfig:us-east-1:111122223333:application/339ohji',
        Tags={
            'group1': '1',
        },
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  