stopUserImportJob method

Future<StopUserImportJobResponse> stopUserImportJob({
  1. required String jobId,
  2. required String userPoolId,
})

Instructs your user pool to stop a running job that's importing users from a CSV file that contains their usernames and attributes. For more information about importing users from a CSV file, see Importing users from a CSV file.

May throw InternalErrorException. May throw InvalidParameterException. May throw NotAuthorizedException. May throw OperationNotEnabledException. May throw PreconditionNotMetException. May throw ResourceNotFoundException. May throw TooManyRequestsException.

Parameter jobId : The ID of a running user import job.

Parameter userPoolId : The ID of the user pool that you want to stop.

Implementation

Future<StopUserImportJobResponse> stopUserImportJob({
  required String jobId,
  required String userPoolId,
}) async {
  final headers = <String, String>{
    'Content-Type': 'application/x-amz-json-1.1',
    'X-Amz-Target': 'AWSCognitoIdentityProviderService.StopUserImportJob'
  };
  final jsonResponse = await _protocol.send(
    method: 'POST',
    requestUri: '/',
    exceptionFnMap: _exceptionFns,
    // TODO queryParams
    headers: headers,
    payload: {
      'JobId': jobId,
      'UserPoolId': userPoolId,
    },
  );

  return StopUserImportJobResponse.fromJson(jsonResponse.body);
}