updateAllowList method

Future<UpdateAllowListResponse> updateAllowList({
  1. required AllowListCriteria criteria,
  2. required String id,
  3. required String name,
  4. String? description,
})

Updates the settings for an allow list.

May throw AccessDeniedException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ThrottlingException. May throw ValidationException.

Parameter criteria : The criteria that specify the text or text pattern to ignore. The criteria can be the location and name of an S3 object that lists specific text to ignore (s3WordsList), or a regular expression that defines a text pattern to ignore (regex).

You can change a list's underlying criteria, such as the name of the S3 object or the regular expression to use. However, you can't change the type from s3WordsList to regex or the other way around.

Parameter id : The unique identifier for the Amazon Macie resource that the request applies to.

Parameter name : A custom name for the allow list. The name can contain as many as 128 characters.

Parameter description : A custom description of the allow list. The description can contain as many as 512 characters.

Implementation

Future<UpdateAllowListResponse> updateAllowList({
  required AllowListCriteria criteria,
  required String id,
  required String name,
  String? description,
}) async {
  final $payload = <String, dynamic>{
    'criteria': criteria,
    'name': name,
    if (description != null) 'description': description,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'PUT',
    requestUri: '/allow-lists/${Uri.encodeComponent(id)}',
    exceptionFnMap: _exceptionFns,
  );
  return UpdateAllowListResponse.fromJson(response);
}