UNPKG

@aws-sdk/client-cognito-identity-provider

Version:

AWS SDK for JavaScript Cognito Identity Provider Client for Node.js, Browser and React Native

1,092 lines 152 kB
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, AuthFlowType, ChallengeNameType, CodeDeliveryDetailsType, CompromisedCredentialsRiskConfigurationType, CustomDomainConfigType, DeletionProtectionType, DeviceConfigurationType, DeviceRememberedStatusType, DeviceType, EmailConfigurationType, EmailMfaConfigType, EmailMfaSettingsType, ExplicitAuthFlowsType, FeedbackValueType, GroupType, IdentityProviderType, IdentityProviderTypeType, LambdaConfigType, LogConfigurationType, LogDeliveryConfigurationType, ManagedLoginBrandingType, MFAOptionType, OAuthFlowType, PreventUserExistenceErrorTypes, ResourceServerScopeType, ResourceServerType, RiskConfigurationType, RiskExceptionConfigurationType, SmsConfigurationType, SmsMfaConfigType, SMSMfaSettingsType, SoftwareTokenMfaConfigType, SoftwareTokenMfaSettingsType, StatusType, TokenValidityUnitsType, UICustomizationType, UserAttributeUpdateSettingsType, UserContextDataType, UserImportJobType, UserPoolAddOnsType, UserPoolClientType, UserPoolMfaType, UserPoolPolicyType, UserPoolTierType, UserType, UserVerificationType, VerificationMessageTemplateType, VerifiedAttributeType } from "./models_0"; /** * <p>Settings for multi-factor authentication (MFA) with passkey, or webauthN, biometric * and security-key devices in a user pool. Configures the following:</p> * <ul> * <li> * <p>Configuration at the user-pool level for whether you want to require passkey * configuration as an MFA factor, or include it as a choice.</p> * </li> * <li> * <p>The user pool relying-party ID. This is the 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> * <p>This data type is a request parameter of <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserPoolMfaConfig.html">SetUserPoolMfaConfig</a> and a response parameter of <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_GetUserPoolMfaConfig.html">GetUserPoolMfaConfig</a>. </p> * @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>Sets or displays your user-pool treatment for MFA with a passkey. You can override * other MFA options and require passkey MFA, or you can set it as preferred. When passkey * MFA is preferred, the hosted UI encourages users to register a passkey at * sign-in.</p> * @public */ UserVerification?: UserVerificationType | undefined; } /** * @public */ export interface GetUserPoolMfaConfigResponse { /** * <p>Shows user pool SMS message configuration for 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 user pool email message configuration for MFA. Includes the subject and body of * the email message template for MFA messages. To activate this setting, <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html"> * advanced security features</a> must be active in your user pool.</p> * @public */ EmailMfaConfiguration?: EmailMfaConfigType | undefined; /** * <p>The multi-factor authentication (MFA) configuration. Valid values include:</p> * <ul> * <li> * <p> * <code>OFF</code> MFA won't be used for any users.</p> * </li> * <li> * <p> * <code>ON</code> MFA is required for all users to sign in.</p> * </li> * <li> * <p> * <code>OPTIONAL</code> MFA will be required only for individual users who have * an MFA factor activated.</p> * </li> * </ul> * @public */ MfaConfiguration?: UserPoolMfaType | undefined; /** * <p>Shows user pool configuration for MFA with passkeys from biometric devices and * security keys.</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 user who you want to sign out.</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. The <code>AuthParameters</code> * that you must submit are linked to the flow that you submit. For example:</p> * <ul> * <li> * <p> * <code>USER_AUTH</code>: 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.</p> * </li> * <li> * <p> * <code>REFRESH_TOKEN_AUTH</code>: Receive new ID and access tokens when you * pass a <code>REFRESH_TOKEN</code> parameter with a valid refresh token as the * value.</p> * </li> * <li> * <p> * <code>USER_SRP_AUTH</code>: Receive secure remote password (SRP) variables for * the next challenge, <code>PASSWORD_VERIFIER</code>, when you pass * <code>USERNAME</code> and <code>SRP_A</code> parameters.</p> * </li> * <li> * <p> * <code>USER_PASSWORD_AUTH</code>: Receive new tokens or the next challenge, for * example <code>SOFTWARE_TOKEN_MFA</code>, when you pass <code>USERNAME</code> and * <code>PASSWORD</code> parameters.</p> * </li> * </ul> * <p>Valid values include the following:</p> * <dl> * <dt>USER_AUTH</dt> * <dd> * <p>The entry point for sign-in with passwords, one-time passwords, biometric * devices, and security keys.</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>Provide a valid refresh token and receive new ID and access tokens. 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>Username-password authentication with the password sent directly in the * request. For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-authentication-flow.html#Built-in-authentication-flow-and-challenges">Admin authentication flow</a>.</p> * </dd> * </dl> * <p> * <code>ADMIN_USER_PASSWORD_AUTH</code> is a flow type of <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminInitiateAuth.html">AdminInitiateAuth</a> 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. The required values depend on the value * of <code>AuthFlow</code>:</p> * <ul> * <li> * <p>For <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>For <code>USER_SRP_AUTH</code>: <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>For <code>USER_PASSWORD_AUTH</code>: <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>For <code>REFRESH_TOKEN_AUTH/REFRESH_TOKEN</code>: <code>REFRESH_TOKEN</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>For <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 use the InitiateAuth API action, Amazon Cognito invokes the Lambda functions that are * specified for various triggers. The ClientMetadata value is passed as input to the * functions for only the following triggers:</p> * <ul> * <li> * <p>Pre signup</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, which * the function receives as input. This payload contains a <code>validationData</code> * attribute, which provides the data that you assigned to the ClientMetadata parameter in * your InitiateAuth request. In your function code in Lambda, you can process the * <code>validationData</code> value to enhance your workflow for your specific * needs.</p> * <p>When you use the InitiateAuth API action, Amazon Cognito also invokes the functions for the * following triggers, but it doesn't provide the ClientMetadata value 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"> * Customizing user pool Workflows with Lambda Triggers</a> in the <i>Amazon Cognito Developer Guide</i>.</p> * <note> * <p>When you use the ClientMetadata parameter, remember that Amazon Cognito won't do the * following:</p> * <ul> * <li> * <p>Store the ClientMetadata 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 ClientMetadata * parameter serves no purpose.</p> * </li> * <li> * <p>Validate the ClientMetadata value.</p> * </li> * <li> * <p>Encrypt the ClientMetadata value. Don't use Amazon Cognito to provide sensitive * information.</p> * </li> * </ul> * </note> * @public */ ClientMetadata?: Record<string, string> | undefined; /** * <p>The app client ID.</p> * @public */ ClientId: string | undefined; /** * <p>The Amazon Pinpoint analytics metadata that contributes to your metrics for * <code>InitiateAuth</code> calls.</p> * @public */ AnalyticsMetadata?: AnalyticsMetadataType | undefined; /** * <p>Contextual data about your user session, such as the device fingerprint, IP address, or location. Amazon Cognito advanced * security 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> * @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.</p> * @public */ Session?: string | undefined; } /** * <p>Initiates the authentication response.</p> * @public */ export interface InitiateAuthResponse { /** * <p>The name of the challenge that you're responding to with this call. This name is * returned in the <code>InitiateAuth</code> response if you must pass another * challenge.</p> * <p>Valid values include the following:</p> * <note> * <p>All of the following challenges require <code>USERNAME</code> and * <code>SECRET_HASH</code> (if applicable) 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 passkey, or webauthN, factor. These are * typically biometric devices or 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>: Next challenge is to supply an * <code>SMS_MFA_CODE</code>that your user pool delivered in an SMS message.</p> * </li> * <li> * <p> * <code>EMAIL_OTP</code>: Next challenge is to supply an * <code>EMAIL_OTP_CODE</code> that your user pool delivered in an email * message.</p> * </li> * <li> * <p> * <code>PASSWORD_VERIFIER</code>: Next challenge is to supply * <code>PASSWORD_CLAIM_SIGNATURE</code>, * <code>PASSWORD_CLAIM_SECRET_BLOCK</code>, and <code>TIMESTAMP</code> after * the 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.</p> * </li> * <li> * <p> * <code>DEVICE_SRP_AUTH</code>: If device tracking was activated on your user * pool and the previous challenges were passed, this challenge is returned so that * Amazon Cognito can start tracking this device.</p> * </li> * <li> * <p> * <code>DEVICE_PASSWORD_VERIFIER</code>: Similar to * <code>PASSWORD_VERIFIER</code>, but for devices only.</p> * </li> * <li> * <p> * <code>NEW_PASSWORD_REQUIRED</code>: For users who are required to change their * passwords after successful first login.</p> * <p>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. For more information, see <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_RespondToAuthChallenge.html">RespondToAuthChallenge</a>.</p> * <p>Amazon Cognito only returns this challenge for users who have temporary passwords. * Because of this, and because in some cases you can create users who don't have * values for required attributes, take care to collect and submit * required-attribute values for all users who don't have passwords. You can create * a user in the Amazon Cognito console without, for example, a required * <code>birthdate</code> attribute. The API response from Amazon Cognito won't prompt * you to submit a birthdate for the user if they don't have a password.</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>RespondToAuthChallenge</code>, set a value for any keys that Amazon Cognito returned in the <code>requiredAttributes</code> parameter, * then use the <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 software token MFA, use the session returned here from * <code>InitiateAuth</code> as an input to * <code>AssociateSoftwareToken</code>. Use the session returned by * <code>VerifySoftwareToken</code> as an input to * <code>RespondToAuthChallenge</code> with challenge name * <code>MFA_SETUP</code> to complete sign-in. To set up SMS MFA, an * administrator should help the user to add a phone number to their account, and * then the user should call <code>InitiateAuth</code> again to restart * sign-in.</p> * </li> * </ul> * @public */ ChallengeName?: ChallengeNameType | undefined; /** * <p>The session that should pass both ways in challenge-response calls to the service. If * the caller must pass another challenge, they return a session with other challenge * parameters. Include this session identifier in a <code>RespondToAuthChallenge</code> API * request.</p> * @public */ Session?: string | undefined; /** * <p>The challenge parameters. These are returned in the <code>InitiateAuth</code> response * if you must pass another challenge. The responses in this parameter should be used to * compute inputs to the next call (<code>RespondToAuthChallenge</code>). </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 the authentication response. This result is only returned if the caller * doesn't need to pass another challenge. If the caller does need to pass another * challenge before it gets tokens, <code>ChallengeName</code>, * <code>ChallengeParameters</code>, and <code>Session</code> are returned.</p> * @public */ AuthenticationResult?: AuthenticationResultType | undefined; /** * <p>This response parameter prompts a user to select from multiple available challenges * that they can complete authentication with. For example, they might be able to continue * with passwordless authentication or with a one-time password from an SMS message.</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 user whose list of devices you want to * view.</p> * @public */ AccessToken: string | undefined; /** * <p>The limit of the device request.</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>The devices returned in the list devices response.</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 user pool ID for the user pool.</p> * @public */ UserPoolId: string | undefined; /** * <p>The limit of the request to list groups.</p> * @public */ Limit?: number | undefined; /** * <p>An identifier that was returned from the previous call to this operation, which can be * used to return the next set of items in the list.</p> * @public */ NextToken?: string | undefined; } /** * @public */ export interface ListGroupsResponse { /** * <p>The group objects for the groups.</p> * @public */ Groups?: GroupType[] | undefined; /** * <p>An identifier that was returned from the previous call to this operation, which can be * used to return the next set of items in the list.</p> * @public */ NextToken?: string | undefined; } /** * @public */ export interface ListIdentityProvidersRequest { /** * <p>The user pool ID.</p> * @public */ UserPoolId: string | undefined; /** * <p>The maximum number of IdPs to return.</p> * @public */ MaxResults?: number | undefined; /** * <p>A pagination token.</p> * @public */ NextToken?: string | undefined; } /** * <p>The details of a user pool identity provider (IdP), including name and type.</p> * <p>This data type is a response parameter of <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListIdentityProviders.html">ListIdentityProviders</a>.</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>A list of IdP objects.</p> * @public */ Providers: ProviderDescription[] | undefined; /** * <p>A pagination token.</p> * @public */ NextToken?: string | undefined; } /** * @public */ export interface ListResourceServersRequest { /** * <p>The user pool ID for the user pool.</p> * @public */ UserPoolId: string | undefined; /** * <p>The maximum number of resource servers to return.</p> * @public */ MaxResults?: number | undefined; /** * <p>A pagination token.</p> * @public */ NextToken?: string | undefined; } /** * @public */ export interface ListResourceServersResponse { /** * <p>The resource servers.</p> * @public */ ResourceServers: ResourceServerType[] | undefined; /** * <p>A pagination token.</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 user pool ID for the user pool that the users are being imported into.</p> * @public */ UserPoolId: string | undefined; /** * <p>The maximum number of import jobs you want the request to return.</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>The user import jobs.</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 user pool ID for the user pool where you want to list user pool clients.</p> * @public */ UserPoolId: string | undefined; /** * <p>The maximum number of results you want the request to return when listing the user * pool clients.</p> * @public */ MaxResults?: number | undefined; /** * <p>An identifier that was returned from the previous call to this operation, which can be * used to return the next set of items in the list.</p> * @public */ NextToken?: string | undefined; } /** * <p>A short description of a user pool app client.</p> * <p>This data type is a response parameter of <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUserPoolClients.html">ListUserPoolClients</a>. </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>The user pool clients in the response that lists user pool clients.</p> * @public */ UserPoolClients?: UserPoolClientDescription[] | undefined; /** * <p>An identifier that was returned from the previous call to this operation, which can be * used to return the next set of items in the list.</p> * @public */ NextToken?: string | undefined; } /** * <p>Represents the request to list user pools.</p> * @public */ export interface ListUserPoolsRequest { /** * <p>An identifier that was returned from the previous call to this operation, which can be * used to return the next set of items in the list.</p> * @public */ NextToken?: string | undefined; /** * <p>The maximum number of results you want the request to return when listing the user * pools.</p> * @public */ MaxResults: number | undefined; } /** * <p>A short description of a user pool.</p> * <p>This data type is a response parameter of <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_ListUserPools.html">ListUserPools</a>. </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; /** * @deprecated * * <p>The user pool status.</p> * @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>The user pools from the response to list users.</p> * @public */ UserPools?: UserPoolDescriptionType[] | undefined; /** * <p>An identifier that was returned from the previous call to this operation, which can be * used to return the next set of items in the list.</p> * @public */ NextToken?: string | undefined; } /** * <p>Represents the request to list users.</p> * @public */ export interface ListUsersRequest { /** * <p>The user pool ID for the user pool on which the search should be performed.</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>Maximum number of users to be returned.</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>A filter string of the form <code>"AttributeName Filter-Type "AttributeValue"</code>. * Quotation marks within the filter string must be escaped using the backslash * (<code>\</code>) character. For example, <code>"family_name = * \"Reddy\""</code>.</p> * <ul> * <li> * <p> * <i>AttributeName</i>: The name of the attribute to search for. * You can only search for one attribute at a time.</p> * </li> * <li> * <p> * <i>Filter-Type</i>: For an exact match, use <code>=</code>, for * example, "<code>given_name = \"Jon\"</code>". For a prefix ("starts with") * match, use <code>^=</code>, for example, "<code>given_name ^= \"Jon\"</code>". * </p> * </li> * <li> * <p> * <i>AttributeValue</i>: The attribute value that must be matched * for each user.</p> * </li> * </ul> * <p>If the filter string is empty, <code>ListUsers</code> returns all users in the user * pool.</p> * <p>You can only search for the following standard attributes:</p> * <ul> * <li> * <p> * <code>username</code> (case-sensitive)</p> * </li> * <li> * <p> * <code>email</code> * </p> * </li> * <li> * <p> * <code>phone_number</code> * </p> * </li> * <li> * <p> * <code>name</code> * </p> * </li> * <li> * <p> * <code>given_name</code> * </p> * </li> * <li> * <p> * <code>family_name</code> * </p> * </li> * <li> * <p> * <code>preferred_username</code> * </p> * </li> * <li> * <p> * <code>cognito:user_status</code> (called <b>Status</b> in the Console) (case-insensitive)</p> * </li> * <li> * <p> * <code>status (called <b>Enabled</b> in the Console) * (case-sensitive)</code> * </p> * </li> * <li> * <p> * <code>sub</code> * </p> * </li> * </ul> * <p>Custom attributes aren't searchable.</p> * <note> * <p>You can also list users with a client-side filter. The server-side filter matches * no more than one attribute. For an advanced search, use a client-side filter with * the <code>--query</code> parameter of the <code>list-users</code> action in the * CLI. When you use a client-side filter, ListUsers returns a paginated list of zero * or more users. You can receive multiple pages in a row with zero results. Repeat the * query with each pagination token that is returned until you receive a null * pagination token value, and then review the combined result. </p> * <p>For more information about server-side and client-side filtering, see <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html">FilteringCLI output</a> in the <a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-usage-filter.html">Command Line Interface * User Guide</a>. </p> * </note> * <p>For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/how-to-manage-user-accounts.html#cognito-user-pools-searching-for-users-using-listusers-api">Searching for Users Using the ListUsers API</a> and <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/how-to-manage-user-accounts.html#cognito-user-pools-searching-for-users-listusers-api-examples">Examples of Using the ListUsers API</a> in the <i>Amazon Cognito Developer * Guide</i>.</p> * @public */ Filter?: string | undefined; } /** * <p>The response from the request to list users.</p> * @public */ export interface ListUsersResponse { /** * <p>A list of the user pool users, and their attributes, that match your query.</p> * <note> * <p>Amazon Cognito creates a profile in your user pool for each native user in your user pool, * and each unique user ID from your third-party identity providers (IdPs). When you * link users with the <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminLinkProviderForUser.html">AdminLinkProviderForUser</a> API operation, the output of * <code>ListUsers</code> displays both the IdP user and the native user that you * linked. You can identify IdP users in the <code>Users</code> object of this API * response by the IdP prefix that Amazon Cognito appends to <code>Username</code>.</p> * </note> * @public */ Users?: UserType[] | 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 ListUsersInGroupRequest { /** * <p>The user pool ID for the user pool.</p> * @public */ UserPoolId: string | undefined; /** * <p>The name of the group.</p> * @public */ GroupName: string | undefined; /** * <p>The maximum number of users that you want to retrieve before pagination.</p> * @public */ Limit?: number | undefined; /** * <p>An identifier that was returned from the previous call to this operation, which can be * used to return the next set of items in the list.</p> * @public */ NextToken?: string | undefined; } /** * @public */ export interface ListUsersInGroupResponse { /** * <p>A list of users in the group, and their attributes.</p> * @public */ Users?: UserType[] | undefined; /** * <p>An identifier that you can use in a later request to return the next set of items in * the list.</p> * @public */ NextToken?: string | undefined; } /** * @public */ export interface ListWebAuthnCredentialsRequest { /** * <p>A valid access token that Amazon Cognito issued to the user whose registered passkeys you want * to list.</p> * @public */ AccessToken: string | undefined; /** * <p>An identifier that was returned from the previous call to this operation, which can be * used to return the next set of items in the list.</p> * @public */ NextToken?: string | undefined; /** * <p>The maximum number of the user's passkey credentials that you want to * return.</p> * @public */ MaxResults?: number | undefi