disassociateS3Resources method

Future<DisassociateS3ResourcesResult> disassociateS3Resources({
  1. required List<S3Resource> associatedS3Resources,
  2. String? memberAccountId,
})

Removes specified S3 resources from being monitored by Amazon Macie Classic. If memberAccountId isn't specified, the action removes specified S3 resources from Macie Classic for the current master account. If memberAccountId is specified, the action removes specified S3 resources from Macie Classic for the specified member account.

May throw InvalidInputException. May throw AccessDeniedException. May throw InternalException.

Parameter associatedS3Resources : The S3 resources (buckets or prefixes) that you want to remove from being monitored and classified by Amazon Macie Classic.

Parameter memberAccountId : The ID of the Amazon Macie Classic member account whose resources you want to remove from being monitored by Amazon Macie Classic.

Implementation

Future<DisassociateS3ResourcesResult> disassociateS3Resources({
  required List<S3Resource> associatedS3Resources,
  String? memberAccountId,
}) async {
  ArgumentError.checkNotNull(associatedS3Resources, 'associatedS3Resources');
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'MacieService.DisassociateS3Resources'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'associatedS3Resources': associatedS3Resources,
      if (memberAccountId != null) 'memberAccountId': memberAccountId,
    },
  );

  return DisassociateS3ResourcesResult.fromJson(jsonResponse.body);
}