Skip to main content

user_import_jobs

Creates, updates, deletes, gets or lists a user_import_jobs resource.

Overview

Nameuser_import_jobs
TypeResource
Idaws.cognito_idp.user_import_jobs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
cloud_watch_logs_role_arnstringThe 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. (pattern: <code>arn:[\w+=/,.@-]+:[\w+=/,.@-]+:([\w+=/,.@-]*)?:[0-9]+:[\w+=/,.@-]+(:[\w+=/,.@-]+)?(:[\w+=/,.@-]+)?</code>)
completion_datestring (date-time)The date when the user import job was completed.
completion_messagestringThe message returned when the user import job is completed. (pattern: <code>[\w]+</code>)
creation_datestring (date-time)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.
failed_usersinteger (int64)The number of users that couldn't be imported.
imported_usersinteger (int64)The number of users that were successfully imported.
job_idstringThe ID of the user import job. (pattern: <code>import-[0-9a-zA-Z-]+</code>)
job_namestringThe friendly name of the user import job. (pattern: <code>[\w\s+=,.@-]+</code>)
password_hashing_algorithmstringThe password hashing algorithm used to generate the hashes in the CSV file for this import job. Valid values: BCRYPT | SCRYPT | ARGON2ID | PBKDF2_SHA256 (BCRYPT, SCRYPT, ARGON2ID, PBKDF2_SHA256)
pre_signed_urlstringThe pre-signed URL target for uploading the CSV file.
skipped_usersinteger (int64)The number of users that were skipped.
start_datestring (date-time)The date when the user import job was started.
statusstringThe 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. (Created, Pending, InProgress, Stopping, Expired, Stopped, Failed, Succeeded)
user_pool_idstringThe ID of the user pool that the users are being imported into. (pattern: <code>[\w-]+_[0-9a-zA-Z]+</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_user_import_jobselectregionDescribes a user import job. For more information about user CSV import, see Importing users from a CSV file.
list_user_import_jobsselectregionGiven 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. 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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints
create_user_import_jobinsertregion, JobName, UserPoolId, CloudWatchLogsRoleArnCreates a user import job. You can import users into user pools from a comma-separated values (CSV) file without adding Amazon Cognito MAU costs to your Amazon Web Services bill. 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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Describes a user import job. For more information about user CSV import, see Importing users from a CSV file.

SELECT
cloud_watch_logs_role_arn,
completion_date,
completion_message,
creation_date,
failed_users,
imported_users,
job_id,
job_name,
password_hashing_algorithm,
pre_signed_url,
skipped_users,
start_date,
status,
user_pool_id
FROM aws.cognito_idp.user_import_jobs
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates a user import job. You can import users into user pools from a comma-separated values (CSV) file without adding Amazon Cognito MAU costs to your Amazon Web Services bill. 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 Signing Amazon Web Services API Requests Using the Amazon Cognito user pools API and user pool endpoints

INSERT INTO aws.cognito_idp.user_import_jobs (
JobName,
UserPoolId,
CloudWatchLogsRoleArn,
PasswordHashingAlgorithm,
region
)
SELECT
'{{ JobName }}' /* required */,
'{{ UserPoolId }}' /* required */,
'{{ CloudWatchLogsRoleArn }}' /* required */,
'{{ PasswordHashingAlgorithm }}',
'{{ region }}'
RETURNING
user_import_job
;