deleteMembers method

Future<DeleteMembersResponse> deleteMembers({
  1. required List<String> accountIds,
  2. required String graphArn,
})

Deletes one or more member accounts from the master account behavior graph. This operation can only be called by a Detective master account. That account cannot use DeleteMembers to delete their own account from the behavior graph. To disable a behavior graph, the master account uses the DeleteGraph API method.

May throw ConflictException. May throw InternalServerException. May throw ResourceNotFoundException. May throw ValidationException.

Parameter accountIds : The list of AWS account identifiers for the member accounts to delete from the behavior graph.

Parameter graphArn : The ARN of the behavior graph to delete members from.

Implementation

Future<DeleteMembersResponse> deleteMembers({
  required List<String> accountIds,
  required String graphArn,
}) async {
  ArgumentError.checkNotNull(accountIds, 'accountIds');
  ArgumentError.checkNotNull(graphArn, 'graphArn');
  final $payload = <String, dynamic>{
    'AccountIds': accountIds,
    'GraphArn': graphArn,
  };
  final response = await _protocol.send(
    payload: $payload,
    method: 'POST',
    requestUri: '/graph/members/removal',
    exceptionFnMap: _exceptionFns,
  );
  return DeleteMembersResponse.fromJson(response);
}