2016/09/01 - Amazon Cognito Identity Provider - 6 new5 updated api methods
Changes Update cognito-idp client to latest version
Starts the user import.
Request Syntax
client.start_user_import_job( UserPoolId='string', JobId='string' )
string
[REQUIRED]
The user pool ID for the user pool that the users are being imported into.
string
[REQUIRED]
The job ID for the user import job.
dict
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 when the user import job was created.
StartDate (datetime) --
The date when the user import job was started.
CompletionDate (datetime) --
The date when the user imoprt 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 cannot be started.
CloudWatchLogsRoleArn (string) --
The role 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 could not be imported.
CompletionMessage (string) --
The message returned when the user import job is completed.
Lists the user import jobs.
Request Syntax
client.list_user_import_jobs( UserPoolId='string', MaxResults=123, PaginationToken='string' )
string
[REQUIRED]
The user pool ID for the user pool that the users are being imported into.
integer
[REQUIRED]
The maximum number of import jobs you want the request to return.
string
An identifier that was returned from the previous call to this operation, which can be used to return the next set of import jobs in the list.
dict
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) --
The user import job type.
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 when the user import job was created.
StartDate (datetime) --
The date when the user import job was started.
CompletionDate (datetime) --
The date when the user imoprt 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 cannot be started.
CloudWatchLogsRoleArn (string) --
The role 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 could not be imported.
CompletionMessage (string) --
The message returned when the user import job is completed.
PaginationToken (string) --
An identifier that can be used to return the next set of user import jobs in the list.
Gets the header information for the .csv file to be used as input for the user import job.
Request Syntax
client.get_csv_header( UserPoolId='string' )
string
[REQUIRED]
The user pool ID for the user pool that the users are to be imported into.
dict
Response Syntax
{ 'UserPoolId': 'string', 'CSVHeader': [ 'string', ] }
Response Structure
(dict) --
Represents the response from the server to the request to get the header information for the .csv file for the user import job.
UserPoolId (string) --
The user pool ID for the user pool that the users are to be imported into.
CSVHeader (list) --
The header information for the .csv file for the user import job.
(string) --
Creates the user import job.
Request Syntax
client.create_user_import_job( JobName='string', UserPoolId='string', CloudWatchLogsRoleArn='string' )
string
[REQUIRED]
The job name for the user import job.
string
[REQUIRED]
The user pool ID for the user pool that the users are being imported into.
string
[REQUIRED]
The role ARN for the Amazon CloudWatch Logging role for the user import job.
dict
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 create 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 when the user import job was created.
StartDate (datetime) --
The date when the user import job was started.
CompletionDate (datetime) --
The date when the user imoprt 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 cannot be started.
CloudWatchLogsRoleArn (string) --
The role 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 could not be imported.
CompletionMessage (string) --
The message returned when the user import job is completed.
Stops the user import job.
Request Syntax
client.stop_user_import_job( UserPoolId='string', JobId='string' )
string
[REQUIRED]
The user pool ID for the user pool that the users are being imported into.
string
[REQUIRED]
The job ID for the user import job.
dict
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 stop 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 when the user import job was created.
StartDate (datetime) --
The date when the user import job was started.
CompletionDate (datetime) --
The date when the user imoprt 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 cannot be started.
CloudWatchLogsRoleArn (string) --
The role 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 could not be imported.
CompletionMessage (string) --
The message returned when the user import job is completed.
Describes the user import job.
Request Syntax
client.describe_user_import_job( UserPoolId='string', JobId='string' )
string
[REQUIRED]
The user pool ID for the user pool that the users are being imported into.
string
[REQUIRED]
The job ID for the user import job.
dict
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 describe 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 when the user import job was created.
StartDate (datetime) --
The date when the user import job was started.
CompletionDate (datetime) --
The date when the user imoprt 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 cannot be started.
CloudWatchLogsRoleArn (string) --
The role 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 could not be imported.
CompletionMessage (string) --
The message returned when the user import job is completed.
{'AuthFlow': {'REFRESH_TOKEN'}}
Initiates the authentication flow, as an administrator.
Request Syntax
client.admin_initiate_auth( UserPoolId='string', ClientId='string', AuthFlow='USER_SRP_AUTH'|'REFRESH_TOKEN_AUTH'|'REFRESH_TOKEN'|'CUSTOM_AUTH'|'ADMIN_NO_SRP_AUTH', AuthParameters={ 'string': 'string' }, ClientMetadata={ 'string': 'string' } )
string
[REQUIRED]
The ID of the Amazon Cognito user pool.
string
[REQUIRED]
The client app ID.
string
[REQUIRED]
The authentication flow.
dict
The authentication parameters.
(string) --
(string) --
dict
The client app metadata.
(string) --
(string) --
dict
Response Syntax
{ 'ChallengeName': 'SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH', 'Session': 'string', 'ChallengeParameters': { 'string': 'string' }, 'AuthenticationResult': { 'AccessToken': 'string', 'ExpiresIn': 123, 'TokenType': 'string', 'RefreshToken': 'string', 'IdToken': 'string', 'NewDeviceMetadata': { 'DeviceKey': 'string', 'DeviceGroupKey': 'string' } } }
Response Structure
(dict) --
Initiates the authentication response, as an administrator.
ChallengeName (string) --
The name of the challenge.
Session (string) --
The session.
ChallengeParameters (dict) --
The challenge parameters.
(string) --
(string) --
AuthenticationResult (dict) --
The result type of the authentication result.
AccessToken (string) --
The access token of the authentication result.
ExpiresIn (integer) --
The expiration period of the authentication result.
TokenType (string) --
The token type of the authentication result.
RefreshToken (string) --
The refresh token of the authentication result.
IdToken (string) --
The ID token of the authentication result.
NewDeviceMetadata (dict) --
The new device metadata from an authentication result.
DeviceKey (string) --
The device key.
DeviceGroupKey (string) --
The device group key.
{'ExplicitAuthFlows': {'CUSTOM_AUTH_FLOW_ONLY'}}Response
{'UserPoolClient': {'ExplicitAuthFlows': {'CUSTOM_AUTH_FLOW_ONLY'}}}
Creates the user pool client.
Request Syntax
client.create_user_pool_client( UserPoolId='string', ClientName='string', GenerateSecret=True|False, RefreshTokenValidity=123, ReadAttributes=[ 'string', ], WriteAttributes=[ 'string', ], ExplicitAuthFlows=[ 'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY', ] )
string
[REQUIRED]
The user pool ID for the user pool where you want to create a user pool client.
string
[REQUIRED]
The client name for the user pool client you would like to create.
boolean
Boolean to specify whether you want to generate a secret for the user pool client being created.
integer
Refreshes the token validity.
list
The read attributes.
(string) --
list
The write attributes.
(string) --
list
The explicit authentication flows.
(string) --
dict
Response Syntax
{ 'UserPoolClient': { 'UserPoolId': 'string', 'ClientName': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'LastModifiedDate': datetime(2015, 1, 1), 'CreationDate': datetime(2015, 1, 1), 'RefreshTokenValidity': 123, 'ReadAttributes': [ 'string', ], 'WriteAttributes': [ 'string', ], 'ExplicitAuthFlows': [ 'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY', ] } }
Response Structure
(dict) --
Represents the response from the server to create a user pool client.
UserPoolClient (dict) --
The user pool client that was just created.
UserPoolId (string) --
The user pool ID for the user pool client.
ClientName (string) --
The client name from the user pool request of the client type.
ClientId (string) --
The ID of the client associated with the user pool.
ClientSecret (string) --
The client secret from the user pool request of the client type.
LastModifiedDate (datetime) --
The last modified date from the user pool request of the client type.
CreationDate (datetime) --
The creation date from the user pool request of the client type.
RefreshTokenValidity (integer) --
The validity of the refresh token.
ReadAttributes (list) --
The Read-only attributes.
(string) --
WriteAttributes (list) --
The writeable attributes.
(string) --
ExplicitAuthFlows (list) --
The explicit authentication flows.
(string) --
{'UserPoolClient': {'ExplicitAuthFlows': {'CUSTOM_AUTH_FLOW_ONLY'}}}
Client method for returning the configuration information and metadata of the specified user pool client.
Request Syntax
client.describe_user_pool_client( UserPoolId='string', ClientId='string' )
string
[REQUIRED]
The user pool ID for the user pool you want to describe.
string
[REQUIRED]
The ID of the client associated with the user pool.
dict
Response Syntax
{ 'UserPoolClient': { 'UserPoolId': 'string', 'ClientName': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'LastModifiedDate': datetime(2015, 1, 1), 'CreationDate': datetime(2015, 1, 1), 'RefreshTokenValidity': 123, 'ReadAttributes': [ 'string', ], 'WriteAttributes': [ 'string', ], 'ExplicitAuthFlows': [ 'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY', ] } }
Response Structure
(dict) --
Represents the response from the server from a request to describe the user pool client.
UserPoolClient (dict) --
The user pool client from a server response to describe the user pool client.
UserPoolId (string) --
The user pool ID for the user pool client.
ClientName (string) --
The client name from the user pool request of the client type.
ClientId (string) --
The ID of the client associated with the user pool.
ClientSecret (string) --
The client secret from the user pool request of the client type.
LastModifiedDate (datetime) --
The last modified date from the user pool request of the client type.
CreationDate (datetime) --
The creation date from the user pool request of the client type.
RefreshTokenValidity (integer) --
The validity of the refresh token.
ReadAttributes (list) --
The Read-only attributes.
(string) --
WriteAttributes (list) --
The writeable attributes.
(string) --
ExplicitAuthFlows (list) --
The explicit authentication flows.
(string) --
{'AuthFlow': {'REFRESH_TOKEN'}}
Initiates the authentication flow.
Request Syntax
client.initiate_auth( AuthFlow='USER_SRP_AUTH'|'REFRESH_TOKEN_AUTH'|'REFRESH_TOKEN'|'CUSTOM_AUTH'|'ADMIN_NO_SRP_AUTH', AuthParameters={ 'string': 'string' }, ClientMetadata={ 'string': 'string' }, ClientId='string' )
string
[REQUIRED]
The authentication flow.
dict
The authentication parameters.
(string) --
(string) --
dict
The client app's metadata.
(string) --
(string) --
string
[REQUIRED]
The client ID.
dict
Response Syntax
{ 'ChallengeName': 'SMS_MFA'|'PASSWORD_VERIFIER'|'CUSTOM_CHALLENGE'|'DEVICE_SRP_AUTH'|'DEVICE_PASSWORD_VERIFIER'|'ADMIN_NO_SRP_AUTH', 'Session': 'string', 'ChallengeParameters': { 'string': 'string' }, 'AuthenticationResult': { 'AccessToken': 'string', 'ExpiresIn': 123, 'TokenType': 'string', 'RefreshToken': 'string', 'IdToken': 'string', 'NewDeviceMetadata': { 'DeviceKey': 'string', 'DeviceGroupKey': 'string' } } }
Response Structure
(dict) --
Initiates the authentication response.
ChallengeName (string) --
The name of the challenge.
Session (string) --
The session.
ChallengeParameters (dict) --
The challenge parameters.
(string) --
(string) --
AuthenticationResult (dict) --
The result type of the authentication result.
AccessToken (string) --
The access token of the authentication result.
ExpiresIn (integer) --
The expiration period of the authentication result.
TokenType (string) --
The token type of the authentication result.
RefreshToken (string) --
The refresh token of the authentication result.
IdToken (string) --
The ID token of the authentication result.
NewDeviceMetadata (dict) --
The new device metadata from an authentication result.
DeviceKey (string) --
The device key.
DeviceGroupKey (string) --
The device group key.
{'ExplicitAuthFlows': {'CUSTOM_AUTH_FLOW_ONLY'}}Response
{'UserPoolClient': {'ExplicitAuthFlows': {'CUSTOM_AUTH_FLOW_ONLY'}}}
Allows the developer to update the specified user pool client and password policy.
Request Syntax
client.update_user_pool_client( UserPoolId='string', ClientId='string', ClientName='string', RefreshTokenValidity=123, ReadAttributes=[ 'string', ], WriteAttributes=[ 'string', ], ExplicitAuthFlows=[ 'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY', ] )
string
[REQUIRED]
The user pool ID for the user pool where you want to update the user pool client.
string
[REQUIRED]
The ID of the client associated with the user pool.
string
The client name from the update user pool client request.
integer
The validity of the refresh token.
list
The read-only attributes of the user pool.
(string) --
list
The writeable attributes of the user pool.
(string) --
list
Explicit authentication flows.
(string) --
dict
Response Syntax
{ 'UserPoolClient': { 'UserPoolId': 'string', 'ClientName': 'string', 'ClientId': 'string', 'ClientSecret': 'string', 'LastModifiedDate': datetime(2015, 1, 1), 'CreationDate': datetime(2015, 1, 1), 'RefreshTokenValidity': 123, 'ReadAttributes': [ 'string', ], 'WriteAttributes': [ 'string', ], 'ExplicitAuthFlows': [ 'ADMIN_NO_SRP_AUTH'|'CUSTOM_AUTH_FLOW_ONLY', ] } }
Response Structure
(dict) --
Represents the response from the server to the request to update the user pool client.
UserPoolClient (dict) --
The user pool client value from the response from the server when an update user pool client request is made.
UserPoolId (string) --
The user pool ID for the user pool client.
ClientName (string) --
The client name from the user pool request of the client type.
ClientId (string) --
The ID of the client associated with the user pool.
ClientSecret (string) --
The client secret from the user pool request of the client type.
LastModifiedDate (datetime) --
The last modified date from the user pool request of the client type.
CreationDate (datetime) --
The creation date from the user pool request of the client type.
RefreshTokenValidity (integer) --
The validity of the refresh token.
ReadAttributes (list) --
The Read-only attributes.
(string) --
WriteAttributes (list) --
The writeable attributes.
(string) --
ExplicitAuthFlows (list) --
The explicit authentication flows.
(string) --