:doc:`MediaConnect <../../mediaconnect>` / Client / tag_resource

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



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

  

  Associates the specified tags to a resource with the specified ``resourceArn`` in the current region. If existing tags on a resource are not specified in the request parameters, they are not changed. When a resource is deleted, the tags associated with that resource are deleted as well.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediaconnect-2018-11-14/TagResource>`_  


  **Request Syntax**
  ::

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

    The Amazon Resource Name (ARN) that identifies the MediaConnect resource to which to add tags.

    

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

    A map from tag keys to values. Tag keys can have a maximum character length of 128 characters, and tag values can have a maximum length of 256 characters.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  
  :returns: None
  **Exceptions**
  
  *   :py:class:`MediaConnect.Client.exceptions.BadRequestException`

  
  *   :py:class:`MediaConnect.Client.exceptions.InternalServerErrorException`

  
  *   :py:class:`MediaConnect.Client.exceptions.NotFoundException`

  