import { Command as $Command } from "@smithy/core/client"; import type { MetadataBearer as __MetadataBearer } from "@smithy/types"; import type { CognitoIdentityProviderClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../CognitoIdentityProviderClient"; import type { SetRiskConfigurationRequest, SetRiskConfigurationResponse } from "../models/models_0"; /** * @public */ export type { __MetadataBearer }; export { $Command }; /** * @public * * The input for {@link SetRiskConfigurationCommand}. */ export interface SetRiskConfigurationCommandInput extends SetRiskConfigurationRequest { } /** * @public * * The output of {@link SetRiskConfigurationCommand}. */ export interface SetRiskConfigurationCommandOutput extends SetRiskConfigurationResponse, __MetadataBearer { } declare const SetRiskConfigurationCommand_base: { new (input: SetRiskConfigurationCommandInput): import("@smithy/core/client").CommandImpl; new (input: SetRiskConfigurationCommandInput): import("@smithy/core/client").CommandImpl; getEndpointParameterInstructions(): { [x: string]: unknown; }; }; /** *

Configures threat protection for a user pool or app client. Sets configuration for the * following.

* *

To set the risk configuration for the user pool to defaults, send this request with * only the UserPoolId parameter. To reset the threat protection settings of * an app client to be inherited from the user pool, send UserPoolId and * ClientId parameters only. To change threat protection to audit-only or * off, update the value of UserPoolAddOns in an UpdateUserPool * request. To activate this setting, your user pool must be on the * Plus tier.

*

In secondary regions for user pools with multi-region replication, only the * SourceARN and From attributes of * NotifyConfiguration can be modified to configure region-specific SES * integration. All other risk configuration settings must match the existing values to * maintain consistency across replicas.

* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript * import { CognitoIdentityProviderClient, SetRiskConfigurationCommand } from "@aws-sdk/client-cognito-identity-provider"; // ES Modules import * // const { CognitoIdentityProviderClient, SetRiskConfigurationCommand } = require("@aws-sdk/client-cognito-identity-provider"); // CommonJS import * // import type { CognitoIdentityProviderClientConfig } from "@aws-sdk/client-cognito-identity-provider"; * const config = {}; // type is CognitoIdentityProviderClientConfig * const client = new CognitoIdentityProviderClient(config); * const input = { // SetRiskConfigurationRequest * UserPoolId: "STRING_VALUE", // required * ClientId: "STRING_VALUE", * CompromisedCredentialsRiskConfiguration: { // CompromisedCredentialsRiskConfigurationType * EventFilter: [ // EventFiltersType * "SIGN_IN" || "PASSWORD_CHANGE" || "SIGN_UP", * ], * Actions: { // CompromisedCredentialsActionsType * EventAction: "BLOCK" || "NO_ACTION", // required * }, * }, * AccountTakeoverRiskConfiguration: { // AccountTakeoverRiskConfigurationType * NotifyConfiguration: { // NotifyConfigurationType * From: "STRING_VALUE", * ReplyTo: "STRING_VALUE", * SourceArn: "STRING_VALUE", // required * BlockEmail: { // NotifyEmailType * Subject: "STRING_VALUE", // required * HtmlBody: "STRING_VALUE", * TextBody: "STRING_VALUE", * }, * NoActionEmail: { * Subject: "STRING_VALUE", // required * HtmlBody: "STRING_VALUE", * TextBody: "STRING_VALUE", * }, * MfaEmail: { * Subject: "STRING_VALUE", // required * HtmlBody: "STRING_VALUE", * TextBody: "STRING_VALUE", * }, * }, * Actions: { // AccountTakeoverActionsType * LowAction: { // AccountTakeoverActionType * Notify: true || false, // required * EventAction: "BLOCK" || "MFA_IF_CONFIGURED" || "MFA_REQUIRED" || "NO_ACTION", // required * }, * MediumAction: { * Notify: true || false, // required * EventAction: "BLOCK" || "MFA_IF_CONFIGURED" || "MFA_REQUIRED" || "NO_ACTION", // required * }, * HighAction: { * Notify: true || false, // required * EventAction: "BLOCK" || "MFA_IF_CONFIGURED" || "MFA_REQUIRED" || "NO_ACTION", // required * }, * }, * }, * RiskExceptionConfiguration: { // RiskExceptionConfigurationType * BlockedIPRangeList: [ // BlockedIPRangeListType * "STRING_VALUE", * ], * SkippedIPRangeList: [ // SkippedIPRangeListType * "STRING_VALUE", * ], * }, * }; * const command = new SetRiskConfigurationCommand(input); * const response = await client.send(command); * // { // SetRiskConfigurationResponse * // RiskConfiguration: { // RiskConfigurationType * // UserPoolId: "STRING_VALUE", * // ClientId: "STRING_VALUE", * // CompromisedCredentialsRiskConfiguration: { // CompromisedCredentialsRiskConfigurationType * // EventFilter: [ // EventFiltersType * // "SIGN_IN" || "PASSWORD_CHANGE" || "SIGN_UP", * // ], * // Actions: { // CompromisedCredentialsActionsType * // EventAction: "BLOCK" || "NO_ACTION", // required * // }, * // }, * // AccountTakeoverRiskConfiguration: { // AccountTakeoverRiskConfigurationType * // NotifyConfiguration: { // NotifyConfigurationType * // From: "STRING_VALUE", * // ReplyTo: "STRING_VALUE", * // SourceArn: "STRING_VALUE", // required * // BlockEmail: { // NotifyEmailType * // Subject: "STRING_VALUE", // required * // HtmlBody: "STRING_VALUE", * // TextBody: "STRING_VALUE", * // }, * // NoActionEmail: { * // Subject: "STRING_VALUE", // required * // HtmlBody: "STRING_VALUE", * // TextBody: "STRING_VALUE", * // }, * // MfaEmail: { * // Subject: "STRING_VALUE", // required * // HtmlBody: "STRING_VALUE", * // TextBody: "STRING_VALUE", * // }, * // }, * // Actions: { // AccountTakeoverActionsType * // LowAction: { // AccountTakeoverActionType * // Notify: true || false, // required * // EventAction: "BLOCK" || "MFA_IF_CONFIGURED" || "MFA_REQUIRED" || "NO_ACTION", // required * // }, * // MediumAction: { * // Notify: true || false, // required * // EventAction: "BLOCK" || "MFA_IF_CONFIGURED" || "MFA_REQUIRED" || "NO_ACTION", // required * // }, * // HighAction: { * // Notify: true || false, // required * // EventAction: "BLOCK" || "MFA_IF_CONFIGURED" || "MFA_REQUIRED" || "NO_ACTION", // required * // }, * // }, * // }, * // RiskExceptionConfiguration: { // RiskExceptionConfigurationType * // BlockedIPRangeList: [ // BlockedIPRangeListType * // "STRING_VALUE", * // ], * // SkippedIPRangeList: [ // SkippedIPRangeListType * // "STRING_VALUE", * // ], * // }, * // LastModifiedDate: new Date("TIMESTAMP"), * // }, * // }; * * ``` * * @param SetRiskConfigurationCommandInput - {@link SetRiskConfigurationCommandInput} * @returns {@link SetRiskConfigurationCommandOutput} * @see {@link SetRiskConfigurationCommandInput} for command's `input` shape. * @see {@link SetRiskConfigurationCommandOutput} for command's `response` shape. * @see {@link CognitoIdentityProviderClientResolvedConfig | config} for CognitoIdentityProviderClient's `config` shape. * * @throws {@link CodeDeliveryFailureException} (client fault) *

This exception is thrown when a verification code fails to deliver * successfully.

* * @throws {@link InternalErrorException} (server fault) *

This exception is thrown when Amazon Cognito encounters an internal error.

* * @throws {@link InvalidEmailRoleAccessPolicyException} (client fault) *

This exception is thrown when Amazon Cognito isn't allowed to use your email identity. HTTP * status code: 400.

* * @throws {@link InvalidParameterException} (client fault) *

This exception is thrown when the Amazon Cognito service encounters an invalid * parameter.

* * @throws {@link NotAuthorizedException} (client fault) *

This exception is thrown when a user isn't authorized.

* * @throws {@link OperationNotEnabledException} (client fault) *

This exception is thrown when an operation is not available in the current region or for the current user pool configuration. This can occur when attempting to perform operations that are not supported in secondary replica regions.

* * @throws {@link ResourceNotFoundException} (client fault) *

This exception is thrown when the Amazon Cognito service can't find the requested * resource.

* * @throws {@link TooManyRequestsException} (client fault) *

This exception is thrown when the user has made too many requests for a given * operation.

* * @throws {@link UserPoolAddOnNotEnabledException} (client fault) *

This exception is thrown when user pool add-ons aren't enabled.

* * @throws {@link CognitoIdentityProviderServiceException} *

Base exception class for all service exceptions from CognitoIdentityProvider service.

* * * @public */ export declare class SetRiskConfigurationCommand extends SetRiskConfigurationCommand_base { /** @internal type navigation helper, not in runtime. */ protected static __types: { api: { input: SetRiskConfigurationRequest; output: SetRiskConfigurationResponse; }; sdk: { input: SetRiskConfigurationCommandInput; output: SetRiskConfigurationCommandOutput; }; }; }