:doc:`CloudWatchInternetMonitor <../../internetmonitor>` / Client / tag_resource

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



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

  

  Adds a tag to a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor. You can add a maximum of 50 tags in Internet Monitor.

   

  A minimum of one tag is required for this call. It returns an error if you use the ``TagResource`` request with 0 tags.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/internetmonitor-2021-06-03/TagResource>`_  


  **Request Syntax**
  ::

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

    The Amazon Resource Name (ARN) for a tag that you add to a resource. Tags are supported only for monitors in Amazon CloudWatch Internet Monitor.

    

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

    Tags that you add to a resource. You can add a maximum of 50 tags in Internet Monitor.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`CloudWatchInternetMonitor.Client.exceptions.TooManyRequestsException`

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

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

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

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

  