Inspector / Client / remove_attributes_from_findings

remove_attributes_from_findings#

Inspector.Client.remove_attributes_from_findings(**kwargs)#

Removes entire attributes (key and value pairs) from the findings that are specified by the ARNs of the findings where an attribute with the specified key exists.

See also: AWS API Documentation

Request Syntax

response = client.remove_attributes_from_findings(
    findingArns=[
        'string',
    ],
    attributeKeys=[
        'string',
    ]
)
Parameters:
  • findingArns (list) –

    [REQUIRED]

    The ARNs that specify the findings that you want to remove attributes from.

    • (string) –

  • attributeKeys (list) –

    [REQUIRED]

    The array of attribute keys that you want to remove from specified findings.

    • (string) –

Return type:

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) –

      Attributes 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

  • Inspector.Client.exceptions.InternalException

  • Inspector.Client.exceptions.InvalidInputException

  • Inspector.Client.exceptions.AccessDeniedException

  • Inspector.Client.exceptions.NoSuchEntityException

  • Inspector.Client.exceptions.ServiceTemporarilyUnavailableException

Examples

Removes entire attributes (key and value pairs) from the findings that are specified by the ARNs of the findings where an attribute with the specified key exists.

response = client.remove_attributes_from_findings(
    attributeKeys=[
        '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': {
        '...': '...',
    },
}