:doc:`PinpointSMSVoiceV2 <../../pinpoint-sms-voice-v2>` / Client / tag_resource

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



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

  

  Adds or overwrites only the specified tags for the specified resource. When you specify an existing tag key, the value is overwritten with the new value. Each tag consists of a key and an optional value. Tag keys must be unique per resource. For more information about tags, see `Tags <https://docs.aws.amazon.com/sms-voice/latest/userguide/phone-numbers-tags.html>`__ in the *End User Messaging SMS User Guide*.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/pinpoint-sms-voice-v2-2022-03-31/TagResource>`_  


  **Request Syntax**
  ::

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

    The Amazon Resource Name (ARN) of the resource.

    

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

    An array of key and value pair tags that are associated with the resource.

    

  
    - *(dict) --* 

      The list of tags to be added to the specified topic.

      

    
      - **Key** *(string) --* **[REQUIRED]** 

        The key identifier, or name, of the tag.

        

      
      - **Value** *(string) --* **[REQUIRED]** 

        The string value associated with the key of the tag.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ServiceQuotaExceededException`

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

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

  
  *   :py:class:`PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException`

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

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

  