removeAttributesFromFindings method

Future<RemoveAttributesFromFindingsResponse> removeAttributesFromFindings({
  1. required List<String> attributeKeys,
  2. required List<String> findingArns,
})

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.

May throw InternalException. May throw InvalidInputException. May throw AccessDeniedException. May throw NoSuchEntityException. May throw ServiceTemporarilyUnavailableException.

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

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

Implementation

Future<RemoveAttributesFromFindingsResponse> removeAttributesFromFindings({
  required List<String> attributeKeys,
  required List<String> findingArns,
}) async {
  ArgumentError.checkNotNull(attributeKeys, 'attributeKeys');
  ArgumentError.checkNotNull(findingArns, 'findingArns');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'InspectorService.RemoveAttributesFromFindings'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'attributeKeys': attributeKeys,
      'findingArns': findingArns,
    },
  );

  return RemoveAttributesFromFindingsResponse.fromJson(jsonResponse.body);
}