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.
Parameters:
Raises:
Examples:
Remove attributes from findings
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.
>>> await client.remove_attributes_from_findings(finding_arns=['arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-8l1VIE0D/run/0-Z02cjjug/finding/0-T8yM9mEU'], attribute_keys=['key=Example,value=example'])
Source code in docs_src/capo_inspector/_services/async_inspector.py
| async def remove_attributes_from_findings(
self,
finding_arns: "capo_inspector.types.add_remove_attributes_finding_arn_list.AddRemoveAttributesFindingArnList",
attribute_keys: "capo_inspector.types.user_attribute_key_list.UserAttributeKeyList",
*,
config_overrides: Optional[AsyncInspectorClientConfig] = None,
) -> "capo_inspector.types.remove_attributes_from_findings_response.RemoveAttributesFromFindingsResponse":
"""<p>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.</p>
Args:
finding_arns: <p>The ARNs that specify the findings that you want to remove attributes from.</p>
attribute_keys: <p>The array of attribute keys that you want to remove from specified findings.</p>
Raises:
capo_inspector.errors.access_denied_exception.AccessDeniedException: <p>You do not have required permissions to access the requested resource.</p>
capo_inspector.errors.internal_exception.InternalException: <p>Internal server error.</p>
capo_inspector.errors.invalid_input_exception.InvalidInputException: <p>The request was rejected because an invalid or out-of-range value was supplied for an input parameter.</p>
capo_inspector.errors.no_such_entity_exception.NoSuchEntityException: <p>The request was rejected because it referenced an entity that does not exist. The error code describes the entity.</p>
capo_inspector.errors.service_temporarily_unavailable_exception.ServiceTemporarilyUnavailableException: <p>The serice is temporary unavailable.</p>
capo_inspector.errors.UnknownServiceError: The service returned an error code this client does not model.
Examples:
Remove attributes from findings
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.
>>> await client.remove_attributes_from_findings(finding_arns=['arn:aws:inspector:us-west-2:123456789012:target/0-0kFIPusq/template/0-8l1VIE0D/run/0-Z02cjjug/finding/0-T8yM9mEU'], attribute_keys=['key=Example,value=example'])
"""
async def _handler(
req: "AsyncOperationRequest[capo_inspector.types.remove_attributes_from_findings_request.RemoveAttributesFromFindingsRequest]",
) -> AsyncOperationResponse[
"capo_inspector.types.remove_attributes_from_findings_response.RemoveAttributesFromFindingsResponse"
]:
import capo_inspector._operations.inspector_service.remove_attributes_from_findings
(
output,
http_response,
) = await capo_inspector._operations.inspector_service.remove_attributes_from_findings.async_remove_attributes_from_findings(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("RemoveAttributesFromFindings")
)
input_: capo_inspector.types.remove_attributes_from_findings_request.RemoveAttributesFromFindingsRequest = {
"finding_arns": finding_arns,
"attribute_keys": attribute_keys,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|