@aws-sdk/client-cognito-identity-provider
Version:
AWS SDK for JavaScript Cognito Identity Provider Client for Node.js, Browser and React Native
1,181 lines • 72.1 kB
TypeScript
import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
import { CognitoIdentityProviderServiceException as __BaseException } from "./CognitoIdentityProviderServiceException";
import { AccountRecoverySettingType, AccountTakeoverRiskConfigurationType, AdminCreateUserConfigType, AnalyticsConfigurationType, AnalyticsMetadataType, AttributeType, AuthenticationResultType, ChallengeNameType, CodeDeliveryDetailsType, CompromisedCredentialsRiskConfigurationType, CustomDomainConfigType, DeletionProtectionType, DeviceConfigurationType, DeviceRememberedStatusType, EmailConfigurationType, EmailMfaConfigType, EmailMfaSettingsType, ExplicitAuthFlowsType, FeedbackValueType, GroupType, IdentityProviderType, LambdaConfigType, LogConfigurationType, LogDeliveryConfigurationType, MFAOptionType, OAuthFlowType, PreventUserExistenceErrorTypes, ResourceServerScopeType, ResourceServerType, RiskConfigurationType, RiskExceptionConfigurationType, SmsConfigurationType, SmsMfaConfigType, SMSMfaSettingsType, SoftwareTokenMfaConfigType, SoftwareTokenMfaSettingsType, TokenValidityUnitsType, UICustomizationType, UserAttributeUpdateSettingsType, UserContextDataType, UserImportJobType, UserPoolAddOnsType, UserPoolClientType, UserPoolMfaType, UserPoolPolicyType, VerificationMessageTemplateType, VerifiedAttributeType } from "./models_0";
/**
* <p>The response to respond to the authentication challenge.</p>
* @public
*/
export interface RespondToAuthChallengeResponse {
/**
* <p>The challenge name. For more information, see <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html">InitiateAuth</a>.</p>
* @public
*/
ChallengeName?: ChallengeNameType;
/**
* <p>The session that should be passed both ways in challenge-response calls to the
* service. If the caller must pass another challenge, they return a session with other
* challenge parameters. This session should be passed as it is to the next
* <code>RespondToAuthChallenge</code> API call.</p>
* @public
*/
Session?: string;
/**
* <p>The challenge parameters. For more information, see <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_InitiateAuth.html">InitiateAuth</a>.</p>
* @public
*/
ChallengeParameters?: Record<string, string>;
/**
* <p>The result returned by the server in response to the request to respond to the
* authentication challenge.</p>
* @public
*/
AuthenticationResult?: AuthenticationResultType;
}
/**
* @public
*/
export interface RevokeTokenRequest {
/**
* <p>The refresh token that you want to revoke.</p>
* @public
*/
Token: string | undefined;
/**
* <p>The client ID for the token that you want to revoke.</p>
* @public
*/
ClientId: string | undefined;
/**
* <p>The secret for the client ID. This is required only if the client ID has a
* secret.</p>
* @public
*/
ClientSecret?: string;
}
/**
* @public
*/
export interface RevokeTokenResponse {
}
/**
* <p>Exception that is thrown when the request isn't authorized. This can happen due to an
* invalid access token in the request.</p>
* @public
*/
export declare class UnauthorizedException extends __BaseException {
readonly name: "UnauthorizedException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<UnauthorizedException, __BaseException>);
}
/**
* <p>Exception that is thrown when you attempt to perform an operation that isn't enabled
* for the user pool client.</p>
* @public
*/
export declare class UnsupportedOperationException extends __BaseException {
readonly name: "UnsupportedOperationException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<UnsupportedOperationException, __BaseException>);
}
/**
* <p>Exception that is thrown when an unsupported token is passed to an operation.</p>
* @public
*/
export declare class UnsupportedTokenTypeException extends __BaseException {
readonly name: "UnsupportedTokenTypeException";
readonly $fault: "client";
/**
* @internal
*/
constructor(opts: __ExceptionOptionType<UnsupportedTokenTypeException, __BaseException>);
}
/**
* @public
*/
export interface SetLogDeliveryConfigurationRequest {
/**
* <p>The ID of the user pool where you want to configure logging.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>A collection of the logging configurations for a user pool.</p>
* @public
*/
LogConfigurations: LogConfigurationType[] | undefined;
}
/**
* @public
*/
export interface SetLogDeliveryConfigurationResponse {
/**
* <p>The detailed activity logging configuration that you applied to the requested user
* pool.</p>
* @public
*/
LogDeliveryConfiguration?: LogDeliveryConfigurationType;
}
/**
* @public
*/
export interface SetRiskConfigurationRequest {
/**
* <p>The user pool ID. </p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>The app client ID. If <code>ClientId</code> is null, then the risk configuration is
* mapped to <code>userPoolId</code>. When the client ID is null, the same risk
* configuration is applied to all the clients in the userPool.</p>
* <p>Otherwise, <code>ClientId</code> is mapped to the client. When the client ID isn't
* null, the user pool configuration is overridden and the risk configuration for the
* client is used instead.</p>
* @public
*/
ClientId?: string;
/**
* <p>The compromised credentials risk configuration.</p>
* @public
*/
CompromisedCredentialsRiskConfiguration?: CompromisedCredentialsRiskConfigurationType;
/**
* <p>The account takeover risk configuration.</p>
* @public
*/
AccountTakeoverRiskConfiguration?: AccountTakeoverRiskConfigurationType;
/**
* <p>The configuration to override the risk decision.</p>
* @public
*/
RiskExceptionConfiguration?: RiskExceptionConfigurationType;
}
/**
* @public
*/
export interface SetRiskConfigurationResponse {
/**
* <p>The risk configuration.</p>
* @public
*/
RiskConfiguration: RiskConfigurationType | undefined;
}
/**
* @public
*/
export interface SetUICustomizationRequest {
/**
* <p>The user pool ID for the user pool.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>The client ID for the client app.</p>
* @public
*/
ClientId?: string;
/**
* <p>The CSS values in the UI customization.</p>
* @public
*/
CSS?: string;
/**
* <p>The uploaded logo image for the UI customization.</p>
* @public
*/
ImageFile?: Uint8Array;
}
/**
* @public
*/
export interface SetUICustomizationResponse {
/**
* <p>The UI customization information.</p>
* @public
*/
UICustomization: UICustomizationType | undefined;
}
/**
* @public
*/
export interface SetUserMFAPreferenceRequest {
/**
* <p>User preferences for SMS message MFA. Activates or deactivates SMS MFA and sets it as
* the preferred MFA method when multiple methods are available.</p>
* @public
*/
SMSMfaSettings?: SMSMfaSettingsType;
/**
* <p>User preferences for time-based one-time password (TOTP) MFA. Activates or deactivates
* TOTP MFA and sets it as the preferred MFA method when multiple methods are
* available.</p>
* @public
*/
SoftwareTokenMfaSettings?: SoftwareTokenMfaSettingsType;
/**
* <p>User preferences for email message MFA. Activates or deactivates email MFA and sets it
* as the preferred MFA method when multiple methods are available. 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
*/
EmailMfaSettings?: EmailMfaSettingsType;
/**
* <p>A valid access token that Amazon Cognito issued to the user whose MFA preference you want to
* set.</p>
* @public
*/
AccessToken: string | undefined;
}
/**
* @public
*/
export interface SetUserMFAPreferenceResponse {
}
/**
* @public
*/
export interface SetUserPoolMfaConfigRequest {
/**
* <p>The user pool ID.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>Configures user pool SMS messages for MFA. Sets the message template and the SMS
* message sending configuration for Amazon SNS.</p>
* @public
*/
SmsMfaConfiguration?: SmsMfaConfigType;
/**
* <p>Configures a user pool for time-based one-time password (TOTP) MFA. Enables or
* disables TOTP.</p>
* @public
*/
SoftwareTokenMfaConfiguration?: SoftwareTokenMfaConfigType;
/**
* <p>Configures user pool email messages for MFA. Sets 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;
/**
* <p>The MFA configuration. If you set the MfaConfiguration value to ‘ON’, only users who
* have set up an MFA factor can sign in. To learn more, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-mfa.html">Adding Multi-Factor
* Authentication (MFA) to a user pool</a>. 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;
}
/**
* @public
*/
export interface SetUserPoolMfaConfigResponse {
/**
* <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;
/**
* <p>Shows user pool configuration for time-based one-time password (TOTP) MFA. Includes
* TOTP enabled or disabled state.</p>
* @public
*/
SoftwareTokenMfaConfiguration?: SoftwareTokenMfaConfigType;
/**
* <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;
/**
* <p>The 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 enabled.</p>
* </li>
* </ul>
* @public
*/
MfaConfiguration?: UserPoolMfaType;
}
/**
* <p>Represents the request to set user settings.</p>
* @public
*/
export interface SetUserSettingsRequest {
/**
* <p>A valid access token that Amazon Cognito issued to the user whose user settings you want to
* configure.</p>
* @public
*/
AccessToken: string | undefined;
/**
* <p>You can use this parameter only to set an SMS configuration that uses SMS for
* delivery.</p>
* @public
*/
MFAOptions: MFAOptionType[] | undefined;
}
/**
* <p>The response from the server for a set user settings request.</p>
* @public
*/
export interface SetUserSettingsResponse {
}
/**
* <p>Represents the request to register a user.</p>
* @public
*/
export interface SignUpRequest {
/**
* <p>The ID of the client associated with the user pool.</p>
* @public
*/
ClientId: string | undefined;
/**
* <p>A keyed-hash message authentication code (HMAC) calculated using the secret key of a
* user pool client and username plus the client ID in the message.</p>
* @public
*/
SecretHash?: string;
/**
* <p>The username of the user that you want to sign up. The value of this parameter is
* typically a username, but can be any alias attribute in your user pool.</p>
* @public
*/
Username: string | undefined;
/**
* <p>The password of the user you want to register.</p>
* @public
*/
Password: string | undefined;
/**
* <p>An array of name-value pairs representing user attributes.</p>
* <p>For custom attributes, you must prepend the <code>custom:</code> prefix to the
* attribute name.</p>
* @public
*/
UserAttributes?: AttributeType[];
/**
* <p>Temporary user attributes that contribute to the outcomes of your pre sign-up Lambda
* trigger. This set of key-value pairs are for custom validation of information that you
* collect from your users but don't need to retain.</p>
* <p>Your Lambda function can analyze this additional data and act on it. Your function
* might perform external API operations like logging user attributes and validation data
* to Amazon CloudWatch Logs. Validation data might also affect the response that your function returns
* to Amazon Cognito, like automatically confirming the user if they sign up from within your
* network.</p>
* <p>For more information about the pre sign-up Lambda trigger, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-lambda-pre-sign-up.html">Pre sign-up Lambda trigger</a>.</p>
* @public
*/
ValidationData?: AttributeType[];
/**
* <p>The Amazon Pinpoint analytics metadata that contributes to your metrics for
* <code>SignUp</code> calls.</p>
* @public
*/
AnalyticsMetadata?: AnalyticsMetadataType;
/**
* <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;
/**
* <p>A map of custom key-value pairs that you can provide as input for any custom workflows
* that this action triggers.</p>
* <p>You create custom workflows by assigning Lambda functions to user pool triggers.
* When you use the SignUp API action, Amazon Cognito invokes any functions that are assigned to the
* following triggers: <i>pre sign-up</i>, <i>custom
* message</i>, and <i>post confirmation</i>. When Amazon Cognito invokes
* any of these functions, it passes a JSON payload, which the function receives as input.
* This payload contains a <code>clientMetadata</code> attribute, which provides the data
* that you assigned to the ClientMetadata parameter in your SignUp request. In your
* function code in Lambda, you can process the <code>clientMetadata</code> value to enhance
* your workflow for your specific needs.</p>
* <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>;
}
/**
* <p>The response from the server for a registration request.</p>
* @public
*/
export interface SignUpResponse {
/**
* <p>A response from the server indicating that a user registration has been
* confirmed.</p>
* @public
*/
UserConfirmed: boolean | undefined;
/**
* <p>The code delivery details returned by the server response to the user registration
* request.</p>
* @public
*/
CodeDeliveryDetails?: CodeDeliveryDetailsType;
/**
* <p>The 128-bit ID of the authenticated user. This isn't the same as
* <code>username</code>.</p>
* @public
*/
UserSub: string | undefined;
}
/**
* <p>Represents the request to start the user import job.</p>
* @public
*/
export interface StartUserImportJobRequest {
/**
* <p>The user pool ID for the user pool that the users are being imported into.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>The job ID for the user import job.</p>
* @public
*/
JobId: string | undefined;
}
/**
* <p>Represents the response from the server to the request to start the user import
* job.</p>
* @public
*/
export interface StartUserImportJobResponse {
/**
* <p>The job object that represents the user import job.</p>
* @public
*/
UserImportJob?: UserImportJobType;
}
/**
* <p>Represents the request to stop the user import job.</p>
* @public
*/
export interface StopUserImportJobRequest {
/**
* <p>The user pool ID for the user pool that the users are being imported into.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>The job ID for the user import job.</p>
* @public
*/
JobId: string | undefined;
}
/**
* <p>Represents the response from the server to the request to stop the user import
* job.</p>
* @public
*/
export interface StopUserImportJobResponse {
/**
* <p>The job object that represents the user import job.</p>
* @public
*/
UserImportJob?: UserImportJobType;
}
/**
* @public
*/
export interface TagResourceRequest {
/**
* <p>The Amazon Resource Name (ARN) of the user pool to assign the tags to.</p>
* @public
*/
ResourceArn: string | undefined;
/**
* <p>The tags to assign to the user pool.</p>
* @public
*/
Tags: Record<string, string> | undefined;
}
/**
* @public
*/
export interface TagResourceResponse {
}
/**
* @public
*/
export interface UntagResourceRequest {
/**
* <p>The Amazon Resource Name (ARN) of the user pool that the tags are assigned to.</p>
* @public
*/
ResourceArn: string | undefined;
/**
* <p>The keys of the tags to remove from the user pool.</p>
* @public
*/
TagKeys: string[] | undefined;
}
/**
* @public
*/
export interface UntagResourceResponse {
}
/**
* @public
*/
export interface UpdateAuthEventFeedbackRequest {
/**
* <p>The user pool ID.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>The username of the user that you want to query or modify. The value of this parameter
* is typically your user's username, but it can be any of their alias attributes. If
* <code>username</code> isn't an alias attribute in your user pool, this value
* must be the <code>sub</code> of a local user or the username of a user from a
* third-party IdP.</p>
* @public
*/
Username: string | undefined;
/**
* <p>The event ID.</p>
* @public
*/
EventId: string | undefined;
/**
* <p>The feedback token.</p>
* @public
*/
FeedbackToken: string | undefined;
/**
* <p>The authentication event feedback value. When you provide a <code>FeedbackValue</code>
* value of <code>valid</code>, you tell Amazon Cognito that you trust a user session where Amazon Cognito
* has evaluated some level of risk. When you provide a <code>FeedbackValue</code> value of
* <code>invalid</code>, you tell Amazon Cognito that you don't trust a user session, or you
* don't believe that Amazon Cognito evaluated a high-enough risk level.</p>
* @public
*/
FeedbackValue: FeedbackValueType | undefined;
}
/**
* @public
*/
export interface UpdateAuthEventFeedbackResponse {
}
/**
* <p>Represents the request to update the device status.</p>
* @public
*/
export interface UpdateDeviceStatusRequest {
/**
* <p>A valid access token that Amazon Cognito issued to the user whose device status you want to
* update.</p>
* @public
*/
AccessToken: string | undefined;
/**
* <p>The device key.</p>
* @public
*/
DeviceKey: string | undefined;
/**
* <p>The status of whether a device is remembered.</p>
* @public
*/
DeviceRememberedStatus?: DeviceRememberedStatusType;
}
/**
* <p>The response to the request to update the device status.</p>
* @public
*/
export interface UpdateDeviceStatusResponse {
}
/**
* @public
*/
export interface UpdateGroupRequest {
/**
* <p>The name of the group.</p>
* @public
*/
GroupName: string | undefined;
/**
* <p>The user pool ID for the user pool.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>A string containing the new description of the group.</p>
* @public
*/
Description?: string;
/**
* <p>The new role Amazon Resource Name (ARN) for the group. This is used for setting the
* <code>cognito:roles</code> and <code>cognito:preferred_role</code> claims in the
* token.</p>
* @public
*/
RoleArn?: string;
/**
* <p>The new precedence value for the group. For more information about this parameter, see
* <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_CreateGroup.html">CreateGroup</a>.</p>
* @public
*/
Precedence?: number;
}
/**
* @public
*/
export interface UpdateGroupResponse {
/**
* <p>The group object for the group.</p>
* @public
*/
Group?: GroupType;
}
/**
* @public
*/
export interface UpdateIdentityProviderRequest {
/**
* <p>The user pool ID.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>The IdP name.</p>
* @public
*/
ProviderName: string | undefined;
/**
* <p>The scopes, URLs, and identifiers for your external identity provider. The following
* examples describe the provider detail keys for each IdP type. These values and their
* schema are subject to change. Social IdP <code>authorize_scopes</code> values must match
* the values listed here.</p>
* <dl>
* <dt>OpenID Connect (OIDC)</dt>
* <dd>
* <p>Amazon Cognito accepts the following elements when it can't discover endpoint
* URLs from <code>oidc_issuer</code>: <code>attributes_url</code>,
* <code>authorize_url</code>, <code>jwks_uri</code>,
* <code>token_url</code>.</p>
* <p>Create or update request: <code>"ProviderDetails": \{
* "attributes_request_method": "GET", "attributes_url":
* "https://auth.example.com/userInfo", "authorize_scopes": "openid profile
* email", "authorize_url": "https://auth.example.com/authorize",
* "client_id": "1example23456789", "client_secret":
* "provider-app-client-secret", "jwks_uri":
* "https://auth.example.com/.well-known/jwks.json", "oidc_issuer":
* "https://auth.example.com", "token_url": "https://example.com/token"
* \}</code>
* </p>
* <p>Describe response: <code>"ProviderDetails": \{ "attributes_request_method":
* "GET", "attributes_url": "https://auth.example.com/userInfo",
* "attributes_url_add_attributes": "false", "authorize_scopes": "openid
* profile email", "authorize_url": "https://auth.example.com/authorize",
* "client_id": "1example23456789", "client_secret":
* "provider-app-client-secret", "jwks_uri":
* "https://auth.example.com/.well-known/jwks.json", "oidc_issuer":
* "https://auth.example.com", "token_url": "https://example.com/token"
* \}</code>
* </p>
* </dd>
* <dt>SAML</dt>
* <dd>
* <p>Create or update request with Metadata URL: <code>"ProviderDetails": \{ "IDPInit": "true",
* "IDPSignout": "true", "EncryptedResponses" : "true", "MetadataURL":
* "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm":
* "rsa-sha256" \}</code>
* </p>
* <p>Create or update request with Metadata file: <code>"ProviderDetails": \{ "IDPInit": "true",
* "IDPSignout": "true", "EncryptedResponses" : "true",
* "MetadataFile": "[metadata XML]", "RequestSigningAlgorithm":
* "rsa-sha256" \}</code>
* </p>
* <p>The value of <code>MetadataFile</code> must be the plaintext metadata document with all
* quote (") characters escaped by backslashes.</p>
* <p>Describe response: <code>"ProviderDetails": \{ "IDPInit": "true",
* "IDPSignout": "true", "EncryptedResponses" : "true", "ActiveEncryptionCertificate": "[certificate]",
* "MetadataURL": "https://auth.example.com/sso/saml/metadata", "RequestSigningAlgorithm":
* "rsa-sha256", "SLORedirectBindingURI":
* "https://auth.example.com/slo/saml", "SSORedirectBindingURI":
* "https://auth.example.com/sso/saml" \}</code>
* </p>
* </dd>
* <dt>LoginWithAmazon</dt>
* <dd>
* <p>Create or update request: <code>"ProviderDetails": \{ "authorize_scopes":
* "profile postal_code", "client_id":
* "amzn1.application-oa2-client.1example23456789", "client_secret":
* "provider-app-client-secret"</code>
* </p>
* <p>Describe response: <code>"ProviderDetails": \{ "attributes_url":
* "https://api.amazon.com/user/profile", "attributes_url_add_attributes":
* "false", "authorize_scopes": "profile postal_code", "authorize_url":
* "https://www.amazon.com/ap/oa", "client_id":
* "amzn1.application-oa2-client.1example23456789", "client_secret":
* "provider-app-client-secret", "token_request_method": "POST",
* "token_url": "https://api.amazon.com/auth/o2/token" \}</code>
* </p>
* </dd>
* <dt>Google</dt>
* <dd>
* <p>Create or update request: <code>"ProviderDetails": \{ "authorize_scopes":
* "email profile openid", "client_id":
* "1example23456789.apps.googleusercontent.com", "client_secret":
* "provider-app-client-secret" \}</code>
* </p>
* <p>Describe response: <code>"ProviderDetails": \{ "attributes_url":
* "https://people.googleapis.com/v1/people/me?personFields=",
* "attributes_url_add_attributes": "true", "authorize_scopes": "email
* profile openid", "authorize_url":
* "https://accounts.google.com/o/oauth2/v2/auth", "client_id":
* "1example23456789.apps.googleusercontent.com", "client_secret":
* "provider-app-client-secret", "oidc_issuer":
* "https://accounts.google.com", "token_request_method": "POST",
* "token_url": "https://www.googleapis.com/oauth2/v4/token"
* \}</code>
* </p>
* </dd>
* <dt>SignInWithApple</dt>
* <dd>
* <p>Create or update request: <code>"ProviderDetails": \{ "authorize_scopes":
* "email name", "client_id": "com.example.cognito", "private_key": "1EXAMPLE",
* "key_id": "2EXAMPLE", "team_id": "3EXAMPLE" \}</code>
* </p>
* <p>Describe response: <code>"ProviderDetails": \{
* "attributes_url_add_attributes": "false", "authorize_scopes": "email
* name", "authorize_url": "https://appleid.apple.com/auth/authorize",
* "client_id": "com.example.cognito", "key_id": "1EXAMPLE", "oidc_issuer":
* "https://appleid.apple.com", "team_id": "2EXAMPLE",
* "token_request_method": "POST", "token_url":
* "https://appleid.apple.com/auth/token" \}</code>
* </p>
* </dd>
* <dt>Facebook</dt>
* <dd>
* <p>Create or update request: <code>"ProviderDetails": \{ "api_version": "v17.0",
* "authorize_scopes": "public_profile, email", "client_id": "1example23456789",
* "client_secret": "provider-app-client-secret" \}</code>
* </p>
* <p>Describe response: <code>"ProviderDetails":
* \{ "api_version": "v17.0", "attributes_url": "https://graph.facebook.com/v17.0/me?fields=",
* "attributes_url_add_attributes": "true", "authorize_scopes": "public_profile, email",
* "authorize_url": "https://www.facebook.com/v17.0/dialog/oauth", "client_id":
* "1example23456789", "client_secret": "provider-app-client-secret", "token_request_method":
* "GET", "token_url": "https://graph.facebook.com/v17.0/oauth/access_token" \}</code>
* </p>
* </dd>
* </dl>
* @public
*/
ProviderDetails?: Record<string, string>;
/**
* <p>The IdP attribute mapping to be changed.</p>
* @public
*/
AttributeMapping?: Record<string, string>;
/**
* <p>A list of IdP identifiers.</p>
* @public
*/
IdpIdentifiers?: string[];
}
/**
* @public
*/
export interface UpdateIdentityProviderResponse {
/**
* <p>The identity provider details.</p>
* @public
*/
IdentityProvider: IdentityProviderType | undefined;
}
/**
* @public
*/
export interface UpdateResourceServerRequest {
/**
* <p>The user pool ID for the user pool.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>A unique resource server identifier for the resource server. The identifier can be an
* API friendly name like <code>solar-system-data</code>. You can also set an API URL like
* <code>https://solar-system-data-api.example.com</code> as your identifier.</p>
* <p>Amazon Cognito represents scopes in the access token in the format
* <code>$resource-server-identifier/$scope</code>. Longer scope-identifier strings
* increase the size of your access tokens.</p>
* @public
*/
Identifier: string | undefined;
/**
* <p>The name of the resource server.</p>
* @public
*/
Name: string | undefined;
/**
* <p>The scope values to be set for the resource server.</p>
* @public
*/
Scopes?: ResourceServerScopeType[];
}
/**
* @public
*/
export interface UpdateResourceServerResponse {
/**
* <p>The resource server.</p>
* @public
*/
ResourceServer: ResourceServerType | undefined;
}
/**
* <p>Represents the request to update user attributes.</p>
* @public
*/
export interface UpdateUserAttributesRequest {
/**
* <p>An array of name-value pairs representing user attributes.</p>
* <p>For custom attributes, you must prepend the <code>custom:</code> prefix to the
* attribute name.</p>
* <p>If you have set an attribute to require verification before Amazon Cognito updates its value,
* this request doesn’t immediately update the value of that attribute. After your user
* receives and responds to a verification message to verify the new value, Amazon Cognito updates
* the attribute value. Your user can sign in and receive messages with the original
* attribute value until they verify the new value.</p>
* @public
*/
UserAttributes: AttributeType[] | undefined;
/**
* <p>A valid access token that Amazon Cognito issued to the user whose user attributes you want to
* update.</p>
* @public
*/
AccessToken: string | undefined;
/**
* <p>A map of custom key-value pairs that you can provide as input for any custom workflows
* that this action initiates. </p>
* <p>You create custom workflows by assigning Lambda functions to user pool triggers. When
* you use the UpdateUserAttributes API action, Amazon Cognito invokes the function that is assigned
* to the <i>custom message</i> trigger. When Amazon Cognito invokes this function, it
* passes a JSON payload, which the function receives as input. This payload contains a
* <code>clientMetadata</code> attribute, which provides the data that you assigned to
* the ClientMetadata parameter in your UpdateUserAttributes request. In your function code
* in Lambda, you can process the <code>clientMetadata</code> value to enhance your workflow
* for your specific needs.</p>
* <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>;
}
/**
* <p>Represents the response from the server for the request to update user
* attributes.</p>
* @public
*/
export interface UpdateUserAttributesResponse {
/**
* <p>The code delivery details list from the server for the request to update user
* attributes.</p>
* @public
*/
CodeDeliveryDetailsList?: CodeDeliveryDetailsType[];
}
/**
* <p>Represents the request to update the user pool.</p>
* @public
*/
export interface UpdateUserPoolRequest {
/**
* <p>The user pool ID for the user pool you want to update.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>A container with the policies you want to update in a user pool.</p>
* @public
*/
Policies?: UserPoolPolicyType;
/**
* <p>When active, <code>DeletionProtection</code> prevents accidental deletion of your user
* pool. Before you can delete a user pool that you have protected against deletion, you
* must deactivate this feature.</p>
* <p>When you try to delete a protected user pool in a <code>DeleteUserPool</code> API request,
* Amazon Cognito returns an <code>InvalidParameterException</code> error. To delete a protected user pool,
* send a new <code>DeleteUserPool</code> request after you deactivate deletion protection in an
* <code>UpdateUserPool</code> API request.</p>
* @public
*/
DeletionProtection?: DeletionProtectionType;
/**
* <p>The Lambda configuration information from the request to update the user pool.</p>
* @public
*/
LambdaConfig?: LambdaConfigType;
/**
* <p>The attributes that are automatically verified when Amazon Cognito requests to update user
* pools.</p>
* @public
*/
AutoVerifiedAttributes?: VerifiedAttributeType[];
/**
* <p>This parameter is no longer used. See <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_VerificationMessageTemplateType.html">VerificationMessageTemplateType</a>.</p>
* @public
*/
SmsVerificationMessage?: string;
/**
* <p>This parameter is no longer used. See <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_VerificationMessageTemplateType.html">VerificationMessageTemplateType</a>.</p>
* @public
*/
EmailVerificationMessage?: string;
/**
* <p>This parameter is no longer used. See <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_VerificationMessageTemplateType.html">VerificationMessageTemplateType</a>.</p>
* @public
*/
EmailVerificationSubject?: string;
/**
* <p>The template for verification messages.</p>
* @public
*/
VerificationMessageTemplate?: VerificationMessageTemplateType;
/**
* <p>The contents of the SMS authentication message.</p>
* @public
*/
SmsAuthenticationMessage?: string;
/**
* <p>The settings for updates to user attributes. These settings include the property <code>AttributesRequireVerificationBeforeUpdate</code>,
* a user-pool setting that tells Amazon Cognito how to handle changes to the value of your users' email address and phone number attributes. For
* more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-email-phone-verification.html#user-pool-settings-verifications-verify-attribute-updates">
* Verifying updates to email addresses and phone numbers</a>.</p>
* @public
*/
UserAttributeUpdateSettings?: UserAttributeUpdateSettingsType;
/**
* <p>Possible values include:</p>
* <ul>
* <li>
* <p>
* <code>OFF</code> - MFA tokens aren't required and can't be specified during user
* registration.</p>
* </li>
* <li>
* <p>
* <code>ON</code> - MFA tokens are required for all user registrations. You can
* only specify ON when you're initially creating a user pool. You can use the
* <a href="https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_SetUserPoolMfaConfig.html">SetUserPoolMfaConfig</a> API operation to turn MFA "ON" for existing
* user pools. </p>
* </li>
* <li>
* <p>
* <code>OPTIONAL</code> - Users have the option when registering to create an MFA
* token.</p>
* </li>
* </ul>
* @public
*/
MfaConfiguration?: UserPoolMfaType;
/**
* <p>The device-remembering configuration for a user pool. A null value indicates that you
* have deactivated device remembering in your user pool.</p>
* <note>
* <p>When you provide a value for any <code>DeviceConfiguration</code> field, you
* activate the Amazon Cognito device-remembering feature.</p>
* </note>
* @public
*/
DeviceConfiguration?: DeviceConfigurationType;
/**
* <p>The email configuration of your user pool. The email configuration type sets your
* preferred sending method, Amazon Web Services Region, and sender for email invitation and verification
* messages from your user pool.</p>
* @public
*/
EmailConfiguration?: EmailConfigurationType;
/**
* <p>The SMS configuration with the settings that your Amazon Cognito user pool must use to send an
* SMS message from your Amazon Web Services account through 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>
* @public
*/
SmsConfiguration?: SmsConfigurationType;
/**
* <p>The tag keys and values to assign to the user pool. A tag is a label that you can use
* to categorize and manage user pools in different ways, such as by purpose, owner,
* environment, or other criteria.</p>
* @public
*/
UserPoolTags?: Record<string, string>;
/**
* <p>The configuration for <code>AdminCreateUser</code> requests.</p>
* @public
*/
AdminCreateUserConfig?: AdminCreateUserConfigType;
/**
* <p>User pool add-ons. Contains settings for activation of advanced security features. To
* log user security information but take no action, set to <code>AUDIT</code>. To
* configure automatic security responses to risky traffic to your user pool, set to
* <code>ENFORCED</code>.</p>
* <p>For more information, see <a href="https://docs.aws.amazon.com/cognito/latest/developerguide/cognito-user-pool-settings-advanced-security.html">Adding advanced security to a user pool</a>.</p>
* @public
*/
UserPoolAddOns?: UserPoolAddOnsType;
/**
* <p>The available verified method a user can use to recover their password when they call
* <code>ForgotPassword</code>. You can use this setting to define a preferred method
* when a user has more than one method available. With this setting, SMS doesn't qualify
* for a valid password recovery mechanism if the user also has SMS multi-factor
* authentication (MFA) activated. In the absence of this setting, Amazon Cognito uses the legacy
* behavior to determine the recovery method where SMS is preferred through email.</p>
* @public
*/
AccountRecoverySetting?: AccountRecoverySettingType;
}
/**
* <p>Represents the response from the server when you make a request to update the user
* pool.</p>
* @public
*/
export interface UpdateUserPoolResponse {
}
/**
* <p>Represents the request to update the user pool client.</p>
* @public
*/
export interface UpdateUserPoolClientRequest {
/**
* <p>The user pool ID for the user pool where you want to update the user pool
* client.</p>
* @public
*/
UserPoolId: string | undefined;
/**
* <p>The ID of the client associated with the user pool.</p>
* @public
*/
ClientId: string | undefined;
/**
* <p>The client name from the update user pool client request.</p>
* @public
*/
ClientName?: string;
/**
* <p>The refresh token time limit. After this limit expires, your user can't use
* their refresh token. To specify the time unit for <code>RefreshTokenValidity</code> as
* <code>seconds</code>, <code>minutes</code>, <code>hours</code>, or <code>days</code>,
* set a <code>TokenValidityUnits</code> value in your API request.</p>
* <p>For example, when you set <code>RefreshTokenValidity</code> as <code>10</code> and
* <code>TokenValidityUnits</code> as <code>days</code>, your user can refresh their session
* and retrieve new access and ID tokens for 10 days.</p>
* <p>The default time unit for <code>RefreshTokenValidity</code> in an API request is days.
* You can't set <code>RefreshTokenValidity</code> to 0. If you do, Amazon Cognito overrides the
* value with the default value of 30 days. <i>Valid range</i> is displayed below
* in seconds.</p>
* <p>If you don't specify otherwise in the configuration of your app client, your refresh
* tokens are valid for 30 days.</p>
* @public
*/
RefreshTokenValidity?: number;
/**
* <p>The access token time limit. After this limit expires, your user can't use
* their access token. To specify the time unit for <code>AccessTokenValidity</code> as
* <code>seconds</code>, <code>minutes</code>, <code>hours</code>, or <code>days</code>,
* set a <code>TokenValidityUnits</code> value in your API request.</p>
* <p>For example, when you set <code>AccessTokenValidity</code> to <code>10</code> and
* <code>TokenValidityUnits</code> to <code>hours</code>, your user can authorize access with
* their access token for 10 hours.</p>
* <p>The default time unit for <code>AccessTokenValidity</code> in an API request is hours.
* <i>Valid range</i> is displayed below in seconds.</p>
* <p>If you don't specify otherwise in the configuration of your app client, your access
* tokens are valid for one hour.</p>
* @public
*/
AccessTokenValidity?: number;
/**
* <p>The ID token time limit. After this limit expires, your user can't use
* their ID token. To specify the time unit for <code>IdTokenValidity</code> as
* <code>seconds</code>, <code>minutes</code>, <code>hours</code>, or <code>days</code>,
* set a <code>TokenValidityUnits</code> value in your API request.</p>
* <p>For example, when you set <code>IdTokenValidity</code> as <code>10</code> and
* <code>TokenValidityUnits</code> as <code>hours</code>, your user can authenticate their
* session with their ID token for 10 hours.</p>
* <p>The default time unit for <code>IdTokenValidity</code> in an API request is hours.
* <i>Valid range</i> is displayed below in seconds.</p>
*