listUserImportJobs method
Given a user pool ID, returns user import jobs and their details. Import jobs are retained in user pool configuration so that you can stage, stop, start, review, and delete them. For more information about user import, see Importing users from a CSV file.
Learn more
- Signing Amazon Web Services API Requests
- Using the Amazon Cognito user pools API and user pool endpoints
May throw InternalErrorException.
May throw InvalidParameterException.
May throw NotAuthorizedException.
May throw OperationNotEnabledException.
May throw ResourceNotFoundException.
May throw TooManyRequestsException.
Parameter maxResults :
The maximum number of import jobs that you want Amazon Cognito to return
in the response.
Parameter userPoolId :
The ID of the user pool where you want to list import jobs.
Parameter paginationToken :
This API operation returns a limited number of results. The pagination
token is an identifier that you can present in an additional API request
with the same parameters. When you include the pagination token, Amazon
Cognito returns the next set of items after the current list. Subsequent
requests return a new pagination token. By use of this token, you can
paginate through the full list of items.
Implementation
Future<ListUserImportJobsResponse> listUserImportJobs({
required int maxResults,
required String userPoolId,
String? paginationToken,
}) async {
_s.validateNumRange(
'maxResults',
maxResults,
1,
60,
isRequired: true,
);
final headers = <String, String>{
'Content-Type': 'application/x-amz-json-1.1',
'X-Amz-Target': 'AWSCognitoIdentityProviderService.ListUserImportJobs'
};
final jsonResponse = await _protocol.send(
method: 'POST',
requestUri: '/',
exceptionFnMap: _exceptionFns,
// TODO queryParams
headers: headers,
payload: {
'MaxResults': maxResults,
'UserPoolId': userPoolId,
if (paginationToken != null) 'PaginationToken': paginationToken,
},
);
return ListUserImportJobsResponse.fromJson(jsonResponse.body);
}