updateS3Resources method

Future<UpdateS3ResourcesResult> updateS3Resources({
  1. required List<S3ResourceClassificationUpdate> s3ResourcesUpdate,
  2. String? memberAccountId,
})

Updates the classification types for the specified S3 resources. If memberAccountId isn't specified, the action updates the classification types of the S3 resources associated with Amazon Macie Classic for the current master account. If memberAccountId is specified, the action updates the classification types of the S3 resources associated with Amazon Macie Classic for the specified member account.

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

Parameter s3ResourcesUpdate : The S3 resources whose classification types you want to update.

Parameter memberAccountId : The AWS ID of the Amazon Macie Classic member account whose S3 resources' classification types you want to update.

Implementation

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

  return UpdateS3ResourcesResult.fromJson(jsonResponse.body);
}