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

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



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

  

  Adds or overwrites only the specified tags for the specified Application Migration Service resource or resources. When you specify an existing tag key, the value is overwritten with the new value. Each resource can have a maximum of 50 tags. Each tag consists of a key and optional value.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/mgn-2020-02-26/TagResource>`_  


  **Request Syntax**
  ::

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

    Tag resource by ARN.

    

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

    Tag resource by Tags.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

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

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

  
  *   :py:class:`mgn.Client.exceptions.ValidationException`

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

  