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

**************************
add_attributes_to_findings
**************************



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

  

  Assigns attributes (key and value pairs) to the findings that are specified by the ARNs of the findings.

  

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


  **Request Syntax**
  ::

    response = client.add_attributes_to_findings(
        findingArns=[
            'string',
        ],
        attributes=[
            {
                'key': 'string',
                'value': 'string'
            },
        ]
    )
    
  :type findingArns: list
  :param findingArns: **[REQUIRED]** 

    The ARNs that specify the findings that you want to assign attributes to.

    

  
    - *(string) --* 

    

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

    The array of attributes that you want to assign to specified findings.

    

  
    - *(dict) --* 

      This data type is used as a request parameter in the  AddAttributesToFindings and  CreateAssessmentTemplate actions.

      

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

        The attribute key.

        

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

        The value assigned to the attribute key.

        

      
    

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

    
    ::

      {
          'failedItems': {
              'string': {
                  'failureCode': 'INVALID_ARN'|'DUPLICATE_ARN'|'ITEM_DOES_NOT_EXIST'|'ACCESS_DENIED'|'LIMIT_EXCEEDED'|'INTERNAL_ERROR',
                  'retryable': True|False
              }
          }
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **failedItems** *(dict) --* 

        Attribute details that cannot be described. An error code is provided for each failed item.

        
        

        - *(string) --* 
          

          - *(dict) --* 

            Includes details about the failed items.

            
            

            - **failureCode** *(string) --* 

              The status code of a failed item.

              
            

            - **retryable** *(boolean) --* 

              Indicates whether you can immediately retry a request for this item for a specified resource.

              
        
    
  
  
  **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**

  Assigns attributes (key and value pairs) to the findings that are specified by the ARNs of the findings.
  ::

    response = client.add_attributes_to_findings(
        attributes=[
            {
                'key': 'Example',
                'value': 'example',
            },
        ],
        findingArns=[
            'arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-8l1VIE0D/run/0-Z02cjjug/finding/0-T8yM9mEU',
        ],
    )
    
    print(response)

  
  Expected Output:
  ::

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

  