CognitoIdentityProvider / Client / list_user_import_jobs
list_user_import_jobs#
- CognitoIdentityProvider.Client.list_user_import_jobs(**kwargs)#
Lists user import jobs for a user pool.
Note
Amazon Cognito evaluates Identity and Access Management (IAM) policies in requests for this API operation. For this operation, you must use IAM credentials to authorize requests, and you must grant yourself the corresponding IAM permission in a policy.
Learn more
See also: AWS API Documentation
Request Syntax
response = client.list_user_import_jobs( UserPoolId='string', MaxResults=123, PaginationToken='string' )
- Parameters:
UserPoolId (string) –
[REQUIRED]
The ID of the user pool that the users are being imported into.
MaxResults (integer) –
[REQUIRED]
The maximum number of import jobs you want the request to return.
PaginationToken (string) – 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.
- Return type:
dict
- Returns:
Response Syntax
{ 'UserImportJobs': [ { 'JobName': 'string', 'JobId': 'string', 'UserPoolId': 'string', 'PreSignedUrl': 'string', 'CreationDate': datetime(2015, 1, 1), 'StartDate': datetime(2015, 1, 1), 'CompletionDate': datetime(2015, 1, 1), 'Status': 'Created'|'Pending'|'InProgress'|'Stopping'|'Expired'|'Stopped'|'Failed'|'Succeeded', 'CloudWatchLogsRoleArn': 'string', 'ImportedUsers': 123, 'SkippedUsers': 123, 'FailedUsers': 123, 'CompletionMessage': 'string' }, ], 'PaginationToken': 'string' }
Response Structure
(dict) –
Represents the response from the server to the request to list the user import jobs.
UserImportJobs (list) –
The user import jobs.
(dict) –
A user import job in a user pool. Describes the status of user import with a CSV file. For more information, see Importing users into user pools from a CSV file.
This data type is a request parameter of CreateUserImportJob, DescribeUserImportJob, ListUserImportJobs, StartUserImportJob, and StopUserImportJob.
JobName (string) –
The friendly name of the user import job.
JobId (string) –
The ID of the user import job.
UserPoolId (string) –
The ID of the user pool that the users are being imported into.
PreSignedUrl (string) –
The pre-signed URL target for uploading the CSV file.
CreationDate (datetime) –
The date and time when the item was created. Amazon Cognito returns this timestamp in UNIX epoch time format. Your SDK might render the output in a human-readable format like ISO 8601 or a Java
Date
object.StartDate (datetime) –
The date when the user import job was started.
CompletionDate (datetime) –
The date when the user import job was completed.
Status (string) –
The status of the user import job. One of the following:
Created
- The job was created but not started.Pending
- A transition state. You have started the job, but it has not begun importing users yet.InProgress
- The job has started, and users are being imported.Stopping
- You have stopped the job, but the job has not stopped importing users yet.Stopped
- You have stopped the job, and the job has stopped importing users.Succeeded
- The job has completed successfully.Failed
- The job has stopped due to an error.Expired
- You created a job, but did not start the job within 24-48 hours. All data associated with the job was deleted, and the job can’t be started.
CloudWatchLogsRoleArn (string) –
The role Amazon Resource Name (ARN) for the Amazon CloudWatch Logging role for the user import job. For more information, see “Creating the CloudWatch Logs IAM Role” in the Amazon Cognito Developer Guide.
ImportedUsers (integer) –
The number of users that were successfully imported.
SkippedUsers (integer) –
The number of users that were skipped.
FailedUsers (integer) –
The number of users that couldn’t be imported.
CompletionMessage (string) –
The message returned when the user import job is completed.
PaginationToken (string) –
The identifier that Amazon Cognito returned with the previous request to this operation. When you include a pagination token in your request, Amazon Cognito returns the next set of items in the list. By use of this token, you can paginate through the full list of items.
Exceptions
CognitoIdentityProvider.Client.exceptions.ResourceNotFoundException
CognitoIdentityProvider.Client.exceptions.InvalidParameterException
CognitoIdentityProvider.Client.exceptions.TooManyRequestsException
CognitoIdentityProvider.Client.exceptions.NotAuthorizedException
CognitoIdentityProvider.Client.exceptions.InternalErrorException