CognitoIdentityProvider / Client / start_user_import_job
start_user_import_job#
- CognitoIdentityProvider.Client.start_user_import_job(**kwargs)#
Starts the user import.
See also: AWS API Documentation
Request Syntax
response = client.start_user_import_job( UserPoolId='string', JobId='string' )
- Parameters:
UserPoolId (string) –
[REQUIRED]
The user pool ID for the user pool that the users are being imported into.
JobId (string) –
[REQUIRED]
The job ID for the user import job.
- Return type:
dict
- Returns:
Response Syntax
{ 'UserImportJob': { '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' } }
Response Structure
(dict) –
Represents the response from the server to the request to start the user import job.
UserImportJob (dict) –
The job object that represents the user import job.
JobName (string) –
The job name for the user import job.
JobId (string) –
The job ID for the user import job.
UserPoolId (string) –
The user pool ID for the user pool that the users are being imported into.
PreSignedUrl (string) –
The pre-signed URL to be used to upload 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.
Exceptions
CognitoIdentityProvider.Client.exceptions.ResourceNotFoundException
CognitoIdentityProvider.Client.exceptions.InvalidParameterException
CognitoIdentityProvider.Client.exceptions.TooManyRequestsException
CognitoIdentityProvider.Client.exceptions.InternalErrorException
CognitoIdentityProvider.Client.exceptions.PreconditionNotMetException
CognitoIdentityProvider.Client.exceptions.NotAuthorizedException