:doc:`mediapackagev2 <../../mediapackagev2>` / Client / tag_resource

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



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

  

  Assigns one of more tags (key-value pairs) to the specified MediaPackage resource.

   

  Tags can help you organize and categorize your resources. You can also use them to scope user permissions, by granting a user permission to access or change only resources with certain tag values. You can use the TagResource operation with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value that you specify replaces the previous value for that tag.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mediapackagev2-2022-12-25/TagResource>`_  


  **Request Syntax**
  ::

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

    The ARN of the MediaPackage resource that you're adding tags to.

    

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

    Contains a map of the key-value pairs for the resource tag or tags assigned to the resource.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  
  :returns: None
  **Exceptions**
  
  *   :py:class:`mediapackagev2.Client.exceptions.ValidationException`

  