:doc:`RedshiftServerless <../../redshift-serverless>` / Client / tag_resource

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



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

  

  Assigns one or more tags to a resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/redshift-serverless-2021-04-21/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 to tag.

    

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

    The map of the key-value pairs used to tag the resource.

    

  
    - *(dict) --* 

      A map of key-value pairs.

      

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

        The key to use in the tag.

        

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

        The value of the tag.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`RedshiftServerless.Client.exceptions.InternalServerException`

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

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

  
  *   :py:class:`RedshiftServerless.Client.exceptions.TooManyTagsException`

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

  