:doc:`Inspector <../../inspector>` / Client / set_tags_for_resource

*********************
set_tags_for_resource
*********************



.. py:method:: Inspector.Client.set_tags_for_resource(**kwargs)

  

  Sets tags (key and value pairs) to the assessment template that is specified by the ARN of the assessment template.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/inspector-2016-02-16/SetTagsForResource>`_  


  **Request Syntax**
  ::

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

    The ARN of the assessment template that you want to set tags to.

    

  
  :type tags: list
  :param tags: 

    A collection of key and value pairs that you want to set to the assessment template.

    

  
    - *(dict) --* 

      A key and value pair. This data type is used as a request parameter in the  SetTagsForResource action and a response element in the  ListTagsForResource action.

      

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

        A tag key.

        

      
      - **value** *(string) --* 

        A value assigned to a tag key.

        

      
    

  
  :returns: None
  **Exceptions**
  
  *   :py:class:`Inspector.Client.exceptions.InternalException`

  
  *   :py:class:`Inspector.Client.exceptions.InvalidInputException`

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

  
  *   :py:class:`Inspector.Client.exceptions.NoSuchEntityException`

  
  *   :py:class:`Inspector.Client.exceptions.ServiceTemporarilyUnavailableException`

  

  **Examples**

  Sets tags (key and value pairs) to the assessment template that is specified by the ARN of the assessment template.
  ::

    response = client.set_tags_for_resource(
        resourceArn='arn:aws:inspector:us-west-2:123456789012:target/0-nvgVhaxX/template/0-7sbz2Kz0',
        tags=[
            {
                'key': 'Example',
                'value': 'example',
            },
        ],
    )
    
    print(response)

  
  Expected Output:
  ::

    {
        'ResponseMetadata': {
            '...': '...',
        },
    }

  