@aws-sdk/client-cognito-identity-provider
Version:
AWS SDK for JavaScript Cognito Identity Provider Client for Node.js, Browser and React Native
1,039 lines • 187 kB
TypeScript
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
import { DocumentType as __DocumentType } from "@smithy/types";
import { CognitoIdentityProviderServiceException as __BaseException } from "./CognitoIdentityProviderServiceException";
import { AccountRecoverySettingType, AccountTakeoverRiskConfigurationType, AdminCreateUserConfigType, AnalyticsConfigurationType, AnalyticsMetadataType, AssetType, AttributeType, AuthenticationResultType, AuthFactorType, AuthFlowType, ChallengeNameType, CodeDeliveryDetailsType, CompromisedCredentialsRiskConfigurationType, CustomDomainConfigType, DeletionProtectionType, DeviceConfigurationType, DeviceRememberedStatusType, DeviceType, EmailConfigurationType, EmailMfaSettingsType, ExplicitAuthFlowsType, FeedbackValueType, GroupType, IdentityProviderType, IdentityProviderTypeType, LambdaConfigType, LogConfigurationType, LogDeliveryConfigurationType, ManagedLoginBrandingType, MFAOptionType, OAuthFlowType, PreventUserExistenceErrorTypes, RefreshTokenRotationType, ResourceServerScopeType, ResourceServerType, RiskConfigurationType, RiskExceptionConfigurationType, SmsConfigurationType, SMSMfaSettingsType, SoftwareTokenMfaSettingsType, StatusType, TokenValidityUnitsType, UICustomizationType, UserAttributeUpdateSettingsType, UserContextDataType, UserImportJobType, UserPoolAddOnsType, UserPoolClientType, UserPoolMfaType, UserPoolPolicyType, UserPoolTierType, UserType, VerificationMessageTemplateType, VerifiedAttributeType } from "./models_0";
/**
* @public
*/
export interface GetUserAuthFactorsRequest {
/**
* <p>A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
* <code>aws.cognito.signin.user.admin</code>.</p>
* @public
*/
AccessToken: string | undefined;
}
/**
* @public
*/
export interface GetUserAuthFactorsResponse {
/**
* <p>The name of the user who is eligible for the authentication factors in the
* response.</p>
* @public
*/
Username: string | undefined;
/**
* <p>The challenge method that Amazon Cognito returns to the user in response to sign-in requests.
* Users can prefer SMS message, email message, or TOTP MFA.</p>
* @public
*/
PreferredMfaSetting?: string | undefined;
/**
* <p>The MFA options that are activated for the user. The possible values in this list are
* <code>SMS_MFA</code>, <code>EMAIL_OTP</code>, and
* <code>SOFTWARE_TOKEN_MFA</code>.</p>
* @public
*/
UserMFASettingList?: string[] | undefined;
/**
* <p>The authentication types that are available to the user with <code>USER_AUTH</code>
* sign-in, for example <code>["PASSWORD", "WEB_AUTHN"]</code>.</p>
* @public
*/
ConfiguredUserAuthFactors?: AuthFactorType[] | undefined;
}
/**
* @public
*/
export interface GetUserPoolMfaConfigRequest {
/**
* <p>The ID of the user pool where you want to query WebAuthn and MFA configuration.</p>
* @public
*/
UserPoolId: string | undefined;
}
/**
* <p>Sets or shows configuration for user pool email message MFA and sign-in with one-time
* passwords (OTPs). Includes the subject and body of the email message template for
* sign-in and MFA messages. To activate this setting, your user pool must be in the <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/feature-plans-features-essentials.html">
* Essentials tier</a> or higher.</p>
* @public
*/
export interface EmailMfaConfigType {
/**
* <p>The template for the email messages that your user pool sends to users with codes for
* MFA and sign-in with email OTPs. The message must contain the <code>\{####\}</code>
* placeholder. In the message, Amazon Cognito replaces this placeholder with the code. If you
* don't provide this parameter, Amazon Cognito sends messages in the default format.</p>
* @public
*/
Message?: string | undefined;
/**
* <p>The subject of the email messages that your user pool sends to users with codes for
* MFA and email OTP sign-in.</p>
* @public
*/
Subject?: string | undefined;
}
/**
* <p>The configuration of multi-factor authentication (MFA) with SMS messages in a user
* pool.</p>
* @public
*/
export interface SmsMfaConfigType {
/**
* <p>The SMS authentication message that will be sent to users with the code they must sign
* in with. The message must contain the <code>\{####\}</code> placeholder. Your user pool
* replaces the placeholder with the MFA code. If this parameter isn't provided, your user
* pool sends a default message.</p>
* @public
*/
SmsAuthenticationMessage?: string | undefined;
/**
* <p>User pool configuration for delivery of SMS messages with Amazon Simple Notification Service. To send SMS
* messages with Amazon SNS in the Amazon Web Services Region that you want, the Amazon Cognito user pool uses an
* Identity and Access Management (IAM) role in your Amazon Web Services account.</p>
* <p>You can set <code>SmsConfiguration</code> in <code>CreateUserPool</code> and <code>
* UpdateUserPool</code>, or in <code>SetUserPoolMfaConfig</code>.</p>
* @public
*/
SmsConfiguration?: SmsConfigurationType | undefined;
}
/**
* <p>Settings for time-based one-time password (TOTP) multi-factor authentication (MFA) in
* a user pool. Enables and disables availability of this feature.</p>
* @public
*/
export interface SoftwareTokenMfaConfigType {
/**
* <p>The activation state of TOTP MFA.</p>
* @public
*/
Enabled?: boolean | undefined;
}
/**
* @public
* @enum
*/
export declare const UserVerificationType: {
readonly PREFERRED: "preferred";
readonly REQUIRED: "required";
};
/**
* @public
*/
export type UserVerificationType = (typeof UserVerificationType)[keyof typeof UserVerificationType];
/**
* <p>Settings for authentication (MFA) with passkey, or webauthN, biometric and
* security-key devices in a user pool. Configures the following:</p>
* <ul>
* <li>
* <p>Configuration for requiring user-verification support in passkeys.</p>
* </li>
* <li>
* <p>The user pool relying-party ID. This is the domain, typically your user pool
* domain, that user's passkey providers should trust as a receiver of passkey
* authentication.</p>
* </li>
* <li>
* <p>The providers that you want to allow as origins for passkey
* authentication.</p>
* </li>
* </ul>
* @public
*/
export interface WebAuthnConfigurationType {
/**
* <p>Sets or displays the authentication domain, typically your user pool domain, that
* passkey providers must use as a relying party (RP) in their configuration.</p>
* <p>Under the following conditions, the passkey relying party ID must be the
* fully-qualified domain name of your custom domain:</p>
* <ul>
* <li>
* <p>The user pool is configured for passkey authentication.</p>
* </li>
* <li>
* <p>The user pool has a custom domain, whether or not it also has a prefix
* domain.</p>
* </li>
* <li>
* <p>Your application performs authentication with managed login or the classic
* hosted UI.</p>
* </li>
* </ul>
* @public
*/
RelyingPartyId?: string | undefined;
/**
* <p>When <code>required</code>, users can only register and sign in users with passkeys
* that are capable of <a href="https://www.w3.org/TR/webauthn-2/#enum-userVerificationRequirement">user
* verification</a>. When <code>preferred</code>, your user pool doesn't
* require the use of authenticators with user verification but encourages it.</p>
* @public
*/
UserVerification?: UserVerificationType | undefined;
}
/**
* @public
*/
export interface GetUserPoolMfaConfigResponse {
/**
* <p>Shows user pool configuration for SMS message MFA. Includes the message template and
* the SMS message sending configuration for Amazon SNS.</p>
* @public
*/
SmsMfaConfiguration?: SmsMfaConfigType | undefined;
/**
* <p>Shows user pool configuration for time-based one-time password (TOTP) MFA. Includes
* TOTP enabled or disabled state.</p>
* @public
*/
SoftwareTokenMfaConfiguration?: SoftwareTokenMfaConfigType | undefined;
/**
* <p>Shows configuration for user pool email message MFA and sign-in with one-time
* passwords (OTPs). Includes the subject and body of the email message template for
* sign-in and MFA messages. To activate this setting, your user pool must be in the <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/feature-plans-features-essentials.html">
* Essentials tier</a> or higher.</p>
* @public
*/
EmailMfaConfiguration?: EmailMfaConfigType | undefined;
/**
* <p>Displays the state of multi-factor authentication (MFA) as on, off, or optional. When
* <code>ON</code>, all users must set up MFA before they can sign in. When
* <code>OPTIONAL</code>, your application must make a client-side determination of
* whether a user wants to register an MFA device. For user pools with adaptive
* authentication with threat protection, choose <code>OPTIONAL</code>.</p>
* <p>When <code>MfaConfiguration</code> is <code>OPTIONAL</code>, managed login
* doesn't automatically prompt users to set up MFA. Amazon Cognito generates MFA prompts in
* API responses and in managed login for users who have chosen and configured a preferred
* MFA factor.</p>
* @public
*/
MfaConfiguration?: UserPoolMfaType | undefined;
/**
* <p>Shows user pool configuration for sign-in with passkey authenticators like biometric
* devices and security keys. Passkeys are not eligible MFA factors. They are instead an
* eligible primary sign-in factor for <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flows-selection-sdk.html#authentication-flows-selection-choice">choice-based authentication</a>, or the
* <code>USER_AUTH</code> flow.</p>
* @public
*/
WebAuthnConfiguration?: WebAuthnConfigurationType | undefined;
}
/**
* <p>Represents the request to sign out all devices.</p>
* @public
*/
export interface GlobalSignOutRequest {
/**
* <p>A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
* <code>aws.cognito.signin.user.admin</code>.</p>
* @public
*/
AccessToken: string | undefined;
}
/**
* <p>The response to the request to sign out all devices.</p>
* @public
*/
export interface GlobalSignOutResponse {
}
/**
* <p>Initiates the authentication request.</p>
* @public
*/
export interface InitiateAuthRequest {
/**
* <p>The authentication flow that you want to initiate. Each <code>AuthFlow</code> has
* linked <code>AuthParameters</code> that you must submit. The following are some example
* flows.</p>
* <dl>
* <dt>USER_AUTH</dt>
* <dd>
* <p>The entry point for <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flows-selection-sdk.html#authentication-flows-selection-choice">choice-based authentication</a> with passwords,
* one-time passwords, and WebAuthn authenticators. Request a preferred
* authentication type or review available authentication types. From the
* offered authentication types, select one in a challenge response and then
* authenticate with that method in an additional challenge response.
* To activate this setting, your user pool must be in the <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/feature-plans-features-essentials.html">
* Essentials tier</a> or higher.</p>
* </dd>
* <dt>USER_SRP_AUTH</dt>
* <dd>
* <p>Username-password authentication with the Secure Remote Password (SRP)
* protocol. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow.html#Using-SRP-password-verification-in-custom-authentication-flow">Use SRP password verification in custom
* authentication flow</a>.</p>
* </dd>
* <dt>REFRESH_TOKEN_AUTH and REFRESH_TOKEN</dt>
* <dd>
* <p>Receive new ID and access tokens when you pass a
* <code>REFRESH_TOKEN</code> parameter with a valid refresh token as the
* value. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-the-refresh-token.html">Using the refresh token</a>.</p>
* </dd>
* <dt>CUSTOM_AUTH</dt>
* <dd>
* <p>Custom authentication with Lambda triggers. For more information, see
* <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-challenge.html">Custom authentication challenge Lambda
* triggers</a>.</p>
* </dd>
* <dt>USER_PASSWORD_AUTH</dt>
* <dd>
* <p>Client-side username-password authentication with the password sent
* directly in the request. For more information about client-side and
* server-side authentication, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flows-public-server-side.html">SDK authorization models</a>.</p>
* </dd>
* </dl>
* <p>
* <code>ADMIN_USER_PASSWORD_AUTH</code> is a flow type of <code>AdminInitiateAuth</code>
* and isn't valid for InitiateAuth. <code>ADMIN_NO_SRP_AUTH</code> is a legacy server-side
* username-password flow and isn't valid for InitiateAuth.</p>
* @public
*/
AuthFlow: AuthFlowType | undefined;
/**
* <p>The authentication parameters. These are inputs corresponding to the
* <code>AuthFlow</code> that you're invoking.</p>
* <p>The required values are specific to the <a>InitiateAuthRequest$AuthFlow</a>.</p>
* <p>The following are some authentication flows and their parameters. Add a
* <code>SECRET_HASH</code> parameter if your app client has a client secret.</p>
* <ul>
* <li>
* <p>
* <code>USER_AUTH</code>: <code>USERNAME</code> (required),
* <code>PREFERRED_CHALLENGE</code>. If you don't provide a value for
* <code>PREFERRED_CHALLENGE</code>, Amazon Cognito responds with the
* <code>AvailableChallenges</code> parameter that specifies the available
* sign-in methods.</p>
* </li>
* <li>
* <p>
* <code>USER_SRP_AUTH</code>: <code>USERNAME</code> (required),
* <code>SRP_A</code> (required), <code>DEVICE_KEY</code>.</p>
* </li>
* <li>
* <p>
* <code>USER_PASSWORD_AUTH</code>: <code>USERNAME</code> (required),
* <code>PASSWORD</code> (required), <code>DEVICE_KEY</code>.</p>
* </li>
* <li>
* <p>
* <code>REFRESH_TOKEN_AUTH/REFRESH_TOKEN</code>: <code>REFRESH_TOKEN</code>
* (required), <code>DEVICE_KEY</code>.</p>
* </li>
* <li>
* <p>
* <code>CUSTOM_AUTH</code>: <code>USERNAME</code> (required),
* <code>SECRET_HASH</code> (if app client is configured with client secret),
* <code>DEVICE_KEY</code>. To start the authentication flow with password
* verification, include <code>ChallengeName: SRP_A</code> and <code>SRP_A: (The
* SRP_A Value)</code>.</p>
* </li>
* </ul>
* <p>For more information about <code>SECRET_HASH</code>, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/signing-up-users-in-your-app.html#cognito-user-pools-computing-secret-hash">Computing secret hash values</a>. For information about
* <code>DEVICE_KEY</code>, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html">Working with user devices in your user pool</a>.</p>
* @public
*/
AuthParameters?: Record<string, string> | undefined;
/**
* <p>A map of custom key-value pairs that you can provide as input for certain custom
* workflows that this action triggers.</p>
* <p>You create custom workflows by assigning Lambda functions to user pool triggers.
* When you send an <code>InitiateAuth</code> request, Amazon Cognito invokes the Lambda functions
* that are specified for various triggers. The <code>ClientMetadata</code> value is passed
* as input to the functions for only the following triggers.</p>
* <ul>
* <li>
* <p>Pre sign-up</p>
* </li>
* <li>
* <p>Pre authentication</p>
* </li>
* <li>
* <p>User migration</p>
* </li>
* </ul>
* <p>When Amazon Cognito invokes the functions for these triggers, it passes a JSON payload as input
* to the function. This payload contains a <code>validationData</code> attribute with the
* data that you assigned to the <code>ClientMetadata</code> parameter in your
* <code>InitiateAuth</code> request. In your function, <code>validationData</code> can
* contribute to operations that require data that isn't in the default
* payload.</p>
* <p>
* <code>InitiateAuth</code> requests invokes the following triggers without
* <code>ClientMetadata</code> as input.</p>
* <ul>
* <li>
* <p>Post authentication</p>
* </li>
* <li>
* <p>Custom message</p>
* </li>
* <li>
* <p>Pre token generation</p>
* </li>
* <li>
* <p>Create auth challenge</p>
* </li>
* <li>
* <p>Define auth challenge</p>
* </li>
* <li>
* <p>Custom email sender</p>
* </li>
* <li>
* <p>Custom SMS sender</p>
* </li>
* </ul>
* <p>For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-identity-pools-working-with-aws-lambda-triggers.html">
* Using Lambda triggers</a> in the <i>Amazon Cognito Developer Guide</i>.</p>
* <note>
* <p>When you use the <code>ClientMetadata</code> parameter, note that Amazon Cognito won't do the
* following:</p>
* <ul>
* <li>
* <p>Store the <code>ClientMetadata</code> value. This data is available only
* to Lambda triggers that are assigned to a user pool to support custom
* workflows. If your user pool configuration doesn't include triggers, the
* <code>ClientMetadata</code> parameter serves no purpose.</p>
* </li>
* <li>
* <p>Validate the <code>ClientMetadata</code> value.</p>
* </li>
* <li>
* <p>Encrypt the <code>ClientMetadata</code> value. Don't send sensitive
* information in this parameter.</p>
* </li>
* </ul>
* </note>
* @public
*/
ClientMetadata?: Record<string, string> | undefined;
/**
* <p>The ID of the app client that your user wants to sign in to.</p>
* @public
*/
ClientId: string | undefined;
/**
* <p>Information that supports analytics outcomes with Amazon Pinpoint, including the
* user's endpoint ID. The endpoint ID is a destination for Amazon Pinpoint push notifications, for example a device identifier,
* email address, or phone number.</p>
* @public
*/
AnalyticsMetadata?: AnalyticsMetadataType | undefined;
/**
* <p>Contextual data about your user session like the device fingerprint, IP address, or location. Amazon Cognito threat
* protection evaluates the risk of an authentication event based on the context that your app generates and passes to Amazon Cognito
* when it makes API requests.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-viewing-threat-protection-app.html">Collecting data for threat protection in
* applications</a>.</p>
* @public
*/
UserContextData?: UserContextDataType | undefined;
/**
* <p>The optional session ID from a <code>ConfirmSignUp</code> API request. You can sign in
* a user directly from the sign-up process with the <code>USER_AUTH</code> authentication
* flow. When you pass the session ID to <code>InitiateAuth</code>, Amazon Cognito assumes the SMS
* or email message one-time verification password from <code>ConfirmSignUp</code> as the
* primary authentication factor. You're not required to submit this code a second
* time. This option is only valid for users who have confirmed their sign-up and are
* signing in for the first time within the authentication flow session duration of the
* session ID.</p>
* @public
*/
Session?: string | undefined;
}
/**
* <p>Initiates the authentication response.</p>
* @public
*/
export interface InitiateAuthResponse {
/**
* <p>The name of an additional authentication challenge that you must respond to.</p>
* <p>Possible challenges include the following:</p>
* <note>
* <p>All of the following challenges require <code>USERNAME</code> and, when the app
* client has a client secret, <code>SECRET_HASH</code> in the parameters.</p>
* </note>
* <ul>
* <li>
* <p>
* <code>WEB_AUTHN</code>: Respond to the challenge with the results of a
* successful authentication with a WebAuthn authenticator, or passkey. Examples
* of WebAuthn authenticators include biometric devices and security keys.</p>
* </li>
* <li>
* <p>
* <code>PASSWORD</code>: Respond with <code>USER_PASSWORD_AUTH</code>
* parameters: <code>USERNAME</code> (required), <code>PASSWORD</code> (required),
* <code>SECRET_HASH</code> (required if the app client is configured with a
* client secret), <code>DEVICE_KEY</code>.</p>
* </li>
* <li>
* <p>
* <code>PASSWORD_SRP</code>: Respond with <code>USER_SRP_AUTH</code> parameters:
* <code>USERNAME</code> (required), <code>SRP_A</code> (required),
* <code>SECRET_HASH</code> (required if the app client is configured with a
* client secret), <code>DEVICE_KEY</code>.</p>
* </li>
* <li>
* <p>
* <code>SELECT_CHALLENGE</code>: Respond to the challenge with
* <code>USERNAME</code> and an <code>ANSWER</code> that matches one of the
* challenge types in the <code>AvailableChallenges</code> response
* parameter.</p>
* </li>
* <li>
* <p>
* <code>SMS_MFA</code>: Respond with an
* <code>SMS_MFA_CODE</code> that your user pool delivered in an SMS message.</p>
* </li>
* <li>
* <p>
* <code>EMAIL_OTP</code>: Respond with an
* <code>EMAIL_OTP_CODE</code> that your user pool delivered in an email
* message.</p>
* </li>
* <li>
* <p>
* <code>PASSWORD_VERIFIER</code>: Respond with
* <code>PASSWORD_CLAIM_SIGNATURE</code>,
* <code>PASSWORD_CLAIM_SECRET_BLOCK</code>, and <code>TIMESTAMP</code> after
* client-side SRP calculations.</p>
* </li>
* <li>
* <p>
* <code>CUSTOM_CHALLENGE</code>: This is returned if your custom authentication
* flow determines that the user should pass another challenge before tokens are
* issued. The parameters of the challenge are determined by your Lambda function.</p>
* </li>
* <li>
* <p>
* <code>DEVICE_SRP_AUTH</code>: Respond with the initial parameters of device SRP
* authentication. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html#user-pools-remembered-devices-signing-in-with-a-device">Signing in with a device</a>.</p>
* </li>
* <li>
* <p>
* <code>DEVICE_PASSWORD_VERIFIER</code>: Respond with
* <code>PASSWORD_CLAIM_SIGNATURE</code>,
* <code>PASSWORD_CLAIM_SECRET_BLOCK</code>, and <code>TIMESTAMP</code> after
* client-side SRP calculations. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-device-tracking.html#user-pools-remembered-devices-signing-in-with-a-device">Signing in with a device</a>.</p>
* </li>
* <li>
* <p>
* <code>NEW_PASSWORD_REQUIRED</code>: For users who are required to change their
* passwords after successful first login. Respond to this challenge with
* <code>NEW_PASSWORD</code> and any required attributes that Amazon Cognito returned in
* the <code>requiredAttributes</code> parameter. You can also set values for
* attributes that aren't required by your user pool and that your app client
* can write.</p>
* <p>Amazon Cognito only returns this challenge for users who have temporary passwords.
* When you create passwordless users, you must provide values for all required
* attributes.</p>
* <note>
* <p>In a <code>NEW_PASSWORD_REQUIRED</code> challenge response, you can't modify a required attribute that already has a value.
* In <code>AdminRespondToAuthChallenge</code> or <code>RespondToAuthChallenge</code>, set a value for any keys that Amazon Cognito returned in the
* <code>requiredAttributes</code> parameter, then use the <code>AdminUpdateUserAttributes</code> or <code>UpdateUserAttributes</code> API
* operation to modify the value of any additional attributes.</p>
* </note>
* </li>
* <li>
* <p>
* <code>MFA_SETUP</code>: For users who are required to setup an MFA factor
* before they can sign in. The MFA types activated for the user pool will be
* listed in the challenge parameters <code>MFAS_CAN_SETUP</code> value. </p>
* <p>To set up time-based one-time password (TOTP) MFA, use the session returned
* in this challenge from <code>InitiateAuth</code> or <code>AdminInitiateAuth</code>
* as an input to <code>AssociateSoftwareToken</code>. Then, use the session returned
* by <code>VerifySoftwareToken</code> as an input to
* <code>RespondToAuthChallenge</code> or <code>AdminRespondToAuthChallenge</code>
* with challenge name <code>MFA_SETUP</code> to complete sign-in.
* </p>
* <p>To set up SMS or email MFA, collect a <code>phone_number</code> or
* <code>email</code> attribute for the user. Then restart the authentication
* flow with an <code>InitiateAuth</code> or <code>AdminInitiateAuth</code> request.
* </p>
* </li>
* </ul>
* @public
*/
ChallengeName?: ChallengeNameType | undefined;
/**
* <p>The session identifier that links a challenge response to the initial authentication
* request. If the user must pass another challenge, Amazon Cognito returns a session ID and
* challenge parameters.</p>
* @public
*/
Session?: string | undefined;
/**
* <p>The required parameters of the <code>ChallengeName</code> challenge.</p>
* <p>All challenges require <code>USERNAME</code>. They also require
* <code>SECRET_HASH</code> if your app client has a client secret.</p>
* @public
*/
ChallengeParameters?: Record<string, string> | undefined;
/**
* <p>The result of a successful and complete authentication request. This result is only
* returned if the user doesn't need to pass another challenge. If they must pass another
* challenge before they get tokens, Amazon Cognito returns a challenge in
* <code>ChallengeName</code>, <code>ChallengeParameters</code>, and
* <code>Session</code> response parameters.</p>
* @public
*/
AuthenticationResult?: AuthenticationResultType | undefined;
/**
* <p>This response parameter lists the available authentication challenges that users can
* select from in <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/authentication-flows-selection-sdk.html#authentication-flows-selection-choice">choice-based authentication</a>. For example, they might be
* able to choose between passkey authentication, a one-time password from an SMS message,
* and a traditional password.</p>
* @public
*/
AvailableChallenges?: ChallengeNameType[] | undefined;
}
/**
* <p>Represents the request to list the devices.</p>
* @public
*/
export interface ListDevicesRequest {
/**
* <p>A valid access token that Amazon Cognito issued to the currently signed-in user. Must include a scope claim for
* <code>aws.cognito.signin.user.admin</code>.</p>
* @public
*/
AccessToken: string | undefined;
/**
* <p>The maximum number of devices that you want Amazon Cognito to return in the response.</p>
* @public
*/
Limit?: number | undefined;
/**
* <p>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.</p>
* @public
*/
PaginationToken?: string | undefined;
}
/**
* <p>Represents the response to list devices.</p>
* @public
*/
export interface ListDevicesResponse {
/**
* <p>An array of devices and their details. Each entry that's returned includes device
* information, last-accessed and created dates, and the device key.</p>
* @public
*/
Devices?: DeviceType[] | undefined;
/**
* <p>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.</p>
* @public
*/
PaginationToken?: string | undefined;
}
/**
* @public
*/
export interface ListGroupsRequest {
/**
* <p>The ID of the user pool where you want to list user groups.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>The maximum number of groups that you want Amazon Cognito to return in the response.</p>
* @public
*/
Limit?: number | undefined;
/**
* <p>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.</p>
* @public
*/
NextToken?: string | undefined;
}
/**
* @public
*/
export interface ListGroupsResponse {
/**
* <p>An array of groups and their details. Each entry that's returned includes
* description, precedence, and IAM role values.</p>
* @public
*/
Groups?: GroupType[] | undefined;
/**
* <p>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.</p>
* @public
*/
NextToken?: string | undefined;
}
/**
* @public
*/
export interface ListIdentityProvidersRequest {
/**
* <p>The ID of the user pool where you want to list IdPs.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>The maximum number of IdPs that you want Amazon Cognito to return in the response.</p>
* @public
*/
MaxResults?: number | undefined;
/**
* <p>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.</p>
* @public
*/
NextToken?: string | undefined;
}
/**
* <p>The details of a user pool identity provider (IdP), including name and type.</p>
* @public
*/
export interface ProviderDescription {
/**
* <p>The name of the IdP, for example <code>MySAMLProvider</code>.</p>
* @public
*/
ProviderName?: string | undefined;
/**
* <p>The type of the provider, for example <code>SAML</code>. Amazon Cognito supports SAML 2.0,
* OIDC, and social IdPs. User pools list supported social IdPs by name in this response
* parameter: Facebook, Google, Login with Amazon, and Sign in with Apple.</p>
* @public
*/
ProviderType?: IdentityProviderTypeType | undefined;
/**
* <p>The date and time when the item was modified. 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 <code>Date</code> object.</p>
* @public
*/
LastModifiedDate?: Date | undefined;
/**
* <p>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 <code>Date</code> object.</p>
* @public
*/
CreationDate?: Date | undefined;
}
/**
* @public
*/
export interface ListIdentityProvidersResponse {
/**
* <p>An array of the IdPs in your user pool. For each, the response includes identifiers,
* the IdP name and type, and trust-relationship details like the issuer URL.</p>
* @public
*/
Providers: ProviderDescription[] | undefined;
/**
* <p>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.</p>
* @public
*/
NextToken?: string | undefined;
}
/**
* @public
*/
export interface ListResourceServersRequest {
/**
* <p>The ID of the user pool where you want to list resource servers.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>The maximum number of resource servers that you want Amazon Cognito to return in the
* response.</p>
* @public
*/
MaxResults?: number | undefined;
/**
* <p>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.</p>
* @public
*/
NextToken?: string | undefined;
}
/**
* @public
*/
export interface ListResourceServersResponse {
/**
* <p>An array of resource servers and the details of their configuration. For each, the
* response includes names, identifiers, and custom scopes.</p>
* @public
*/
ResourceServers: ResourceServerType[] | undefined;
/**
* <p>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.</p>
* @public
*/
NextToken?: string | undefined;
}
/**
* @public
*/
export interface ListTagsForResourceRequest {
/**
* <p>The Amazon Resource Name (ARN) of the user pool that the tags are assigned to.</p>
* @public
*/
ResourceArn: string | undefined;
}
/**
* @public
*/
export interface ListTagsForResourceResponse {
/**
* <p>The tags that are assigned to the user pool.</p>
* @public
*/
Tags?: Record<string, string> | undefined;
}
/**
* <p>Represents the request to list the user import jobs.</p>
* @public
*/
export interface ListUserImportJobsRequest {
/**
* <p>The ID of the user pool where you want to list import jobs.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>The maximum number of import jobs that you want Amazon Cognito to return in the
* response.</p>
* @public
*/
MaxResults: number | undefined;
/**
* <p>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.</p>
* @public
*/
PaginationToken?: string | undefined;
}
/**
* <p>Represents the response from the server to the request to list the user import
* jobs.</p>
* @public
*/
export interface ListUserImportJobsResponse {
/**
* <p>An array of user import jobs from the requested user pool. For each, the response
* includes logging destination, status, and the Amazon S3 pre-signed URL for CSV upload.</p>
* @public
*/
UserImportJobs?: UserImportJobType[] | undefined;
/**
* <p>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.</p>
* @public
*/
PaginationToken?: string | undefined;
}
/**
* <p>Represents the request to list the user pool clients.</p>
* @public
*/
export interface ListUserPoolClientsRequest {
/**
* <p>The ID of the user pool where you want to list user pool clients.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>The maximum number of app clients that you want Amazon Cognito to return in the
* response.</p>
* @public
*/
MaxResults?: number | undefined;
/**
* <p>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.</p>
* @public
*/
NextToken?: string | undefined;
}
/**
* <p>A short description of a user pool app client.</p>
* @public
*/
export interface UserPoolClientDescription {
/**
* <p>The app client ID.</p>
* @public
*/
ClientId?: string | undefined;
/**
* <p>The ID of the user pool that's associated with the app client.</p>
* @public
*/
UserPoolId?: string | undefined;
/**
* <p>The app client name.</p>
* @public
*/
ClientName?: string | undefined;
}
/**
* <p>Represents the response from the server that lists user pool clients.</p>
* @public
*/
export interface ListUserPoolClientsResponse {
/**
* <p>An array of app clients and their details. Includes app client ID and name.</p>
* @public
*/
UserPoolClients?: UserPoolClientDescription[] | undefined;
/**
* <p>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.</p>
* @public
*/
NextToken?: string | undefined;
}
/**
* <p>Represents the request to list user pools.</p>
* @public
*/
export interface ListUserPoolsRequest {
/**
* <p>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.</p>
* @public
*/
NextToken?: string | undefined;
/**
* <p>The maximum number of user pools that you want Amazon Cognito to return in the response.</p>
* @public
*/
MaxResults: number | undefined;
}
/**
* <p>A short description of a user pool.</p>
* @public
*/
export interface UserPoolDescriptionType {
/**
* <p>The user pool ID.</p>
* @public
*/
Id?: string | undefined;
/**
* <p>The user pool name.</p>
* @public
*/
Name?: string | undefined;
/**
* <p>A collection of user pool Lambda triggers. Amazon Cognito invokes triggers at several possible
* stages of user pool operations. Triggers can modify the outcome of the operations that
* invoked them.</p>
* @public
*/
LambdaConfig?: LambdaConfigType | undefined;
/**
* <p>The user pool status.</p>
*
* @deprecated
* @public
*/
Status?: StatusType | undefined;
/**
* <p>The date and time when the item was modified. 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 <code>Date</code> object.</p>
* @public
*/
LastModifiedDate?: Date | undefined;
/**
* <p>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 <code>Date</code> object.</p>
* @public
*/
CreationDate?: Date | undefined;
}
/**
* <p>Represents the response to list user pools.</p>
* @public
*/
export interface ListUserPoolsResponse {
/**
* <p>An array of user pools and their configuration details.</p>
* @public
*/
UserPools?: UserPoolDescriptionType[] | undefined;
/**
* <p>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.</p>
* @public
*/
NextToken?: string | undefined;
}
/**
* <p>Represents the request to list users.</p>
* @public
*/
export interface ListUsersRequest {
/**
* <p>The ID of the user pool where you want to display or search for users.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>A JSON array of user attribute names, for example <code>given_name</code>, that you
* want Amazon Cognito to include in the response for each user. When you don't provide an
* <code>AttributesToGet</code> parameter, Amazon Cognito returns all attributes for each
* user.</p>
* <p>Use <code>AttributesToGet</code> with required attributes in your user pool, or in
* conjunction with <code>Filter</code>. Amazon Cognito returns an error if not all users in the
* results have set a value for the attribute you request. Attributes that you can't
* filter on, including custom attributes, must have a value set in every user profile
* before an <code>AttributesToGet</code> parameter returns results.</p>
* @public
*/
AttributesToGet?: string[] | undefined;
/**
* <p>The maximum number of users that you want Amazon Cognito to return in the response.</p>
* @public
*/
Limit?: number | undefined;
/**
* <p>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.</p>
* @publ