:doc:`Route53Resolver <../../route53resolver>` / Client / tag_resource

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



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

  

  Adds one or more tags to a specified resource.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/route53resolver-2018-04-01/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) for the resource that you want to add tags to. To get the ARN for a resource, use the applicable ``Get`` or ``List`` command:

     

    
    * `GetResolverEndpoint <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverEndpoint.html>`__
     
    * `GetResolverRule <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverRule.html>`__
     
    * `GetResolverRuleAssociation <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_GetResolverRuleAssociation.html>`__
     
    * `ListResolverEndpoints <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverEndpoints.html>`__
     
    * `ListResolverRuleAssociations <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRuleAssociations.html>`__
     
    * `ListResolverRules <https://docs.aws.amazon.com/Route53/latest/APIReference/API_route53resolver_ListResolverRules.html>`__
    

    

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

    The tags that you want to add to the specified resource.

    

  
    - *(dict) --* 

      One tag that you want to add to the specified resource. A tag consists of a ``Key`` (a name for the tag) and a ``Value``.

      

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

        The name for the tag. For example, if you want to associate Resolver resources with the account IDs of your customers for billing purposes, the value of ``Key`` might be ``account-id``.

        

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

        The value for the tag. For example, if ``Key`` is ``account-id``, then ``Value`` might be the ID of the customer account that you're creating the resource for.

        

      
    

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

    
    ::

      {}
      
    **Response Structure**

    

    - *(dict) --* 
  
  **Exceptions**
  
  *   :py:class:`Route53Resolver.Client.exceptions.LimitExceededException`

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

  
  *   :py:class:`Route53Resolver.Client.exceptions.InvalidParameterException`

  
  *   :py:class:`Route53Resolver.Client.exceptions.InvalidRequestException`

  
  *   :py:class:`Route53Resolver.Client.exceptions.InvalidTagException`

  
  *   :py:class:`Route53Resolver.Client.exceptions.InternalServiceErrorException`

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

  