CognitoIdentityProvider / Client / describe_risk_configuration

describe_risk_configuration#

CognitoIdentityProvider.Client.describe_risk_configuration(**kwargs)#

Describes the risk configuration.

See also: AWS API Documentation

Request Syntax

response = client.describe_risk_configuration(
    UserPoolId='string',
    ClientId='string'
)
Parameters:
  • UserPoolId (string) –

    [REQUIRED]

    The user pool ID.

  • ClientId (string) – The app client ID.

Return type:

dict

Returns:

Response Syntax

{
    'RiskConfiguration': {
        'UserPoolId': 'string',
        'ClientId': 'string',
        'CompromisedCredentialsRiskConfiguration': {
            'EventFilter': [
                'SIGN_IN'|'PASSWORD_CHANGE'|'SIGN_UP',
            ],
            'Actions': {
                'EventAction': 'BLOCK'|'NO_ACTION'
            }
        },
        'AccountTakeoverRiskConfiguration': {
            'NotifyConfiguration': {
                'From': 'string',
                'ReplyTo': 'string',
                'SourceArn': 'string',
                'BlockEmail': {
                    'Subject': 'string',
                    'HtmlBody': 'string',
                    'TextBody': 'string'
                },
                'NoActionEmail': {
                    'Subject': 'string',
                    'HtmlBody': 'string',
                    'TextBody': 'string'
                },
                'MfaEmail': {
                    'Subject': 'string',
                    'HtmlBody': 'string',
                    'TextBody': 'string'
                }
            },
            'Actions': {
                'LowAction': {
                    'Notify': True|False,
                    'EventAction': 'BLOCK'|'MFA_IF_CONFIGURED'|'MFA_REQUIRED'|'NO_ACTION'
                },
                'MediumAction': {
                    'Notify': True|False,
                    'EventAction': 'BLOCK'|'MFA_IF_CONFIGURED'|'MFA_REQUIRED'|'NO_ACTION'
                },
                'HighAction': {
                    'Notify': True|False,
                    'EventAction': 'BLOCK'|'MFA_IF_CONFIGURED'|'MFA_REQUIRED'|'NO_ACTION'
                }
            }
        },
        'RiskExceptionConfiguration': {
            'BlockedIPRangeList': [
                'string',
            ],
            'SkippedIPRangeList': [
                'string',
            ]
        },
        'LastModifiedDate': datetime(2015, 1, 1)
    }
}

Response Structure

  • (dict) –

    • RiskConfiguration (dict) –

      The risk configuration.

      • UserPoolId (string) –

        The user pool ID.

      • ClientId (string) –

        The app client ID.

      • CompromisedCredentialsRiskConfiguration (dict) –

        The compromised credentials risk configuration object, including the EventFilter and the EventAction.

        • EventFilter (list) –

          Perform the action for these events. The default is to perform all events if no event filter is specified.

          • (string) –

        • Actions (dict) –

          The compromised credentials risk configuration actions.

          • EventAction (string) –

            The event action.

      • AccountTakeoverRiskConfiguration (dict) –

        The account takeover risk configuration object, including the NotifyConfiguration object and Actions to take if there is an account takeover.

        • NotifyConfiguration (dict) –

          The notify configuration used to construct email notifications.

          • From (string) –

            The email address that is sending the email. The address must be either individually verified with Amazon Simple Email Service, or from a domain that has been verified with Amazon SES.

          • ReplyTo (string) –

            The destination to which the receiver of an email should reply to.

          • SourceArn (string) –

            The Amazon Resource Name (ARN) of the identity that is associated with the sending authorization policy. This identity permits Amazon Cognito to send for the email address specified in the From parameter.

          • BlockEmail (dict) –

            Email template used when a detected risk event is blocked.

            • Subject (string) –

              The email subject.

            • HtmlBody (string) –

              The email HTML body.

            • TextBody (string) –

              The email text body.

          • NoActionEmail (dict) –

            The email template used when a detected risk event is allowed.

            • Subject (string) –

              The email subject.

            • HtmlBody (string) –

              The email HTML body.

            • TextBody (string) –

              The email text body.

          • MfaEmail (dict) –

            The multi-factor authentication (MFA) email template used when MFA is challenged as part of a detected risk.

            • Subject (string) –

              The email subject.

            • HtmlBody (string) –

              The email HTML body.

            • TextBody (string) –

              The email text body.

        • Actions (dict) –

          Account takeover risk configuration actions.

          • LowAction (dict) –

            Action to take for a low risk.

            • Notify (boolean) –

              Flag specifying whether to send a notification.

            • EventAction (string) –

              The action to take in response to the account takeover action. Valid values are as follows:

              • BLOCK Choosing this action will block the request.

              • MFA_IF_CONFIGURED Present an MFA challenge if user has configured it, else allow the request.

              • MFA_REQUIRED Present an MFA challenge if user has configured it, else block the request.

              • NO_ACTION Allow the user to sign in.

          • MediumAction (dict) –

            Action to take for a medium risk.

            • Notify (boolean) –

              Flag specifying whether to send a notification.

            • EventAction (string) –

              The action to take in response to the account takeover action. Valid values are as follows:

              • BLOCK Choosing this action will block the request.

              • MFA_IF_CONFIGURED Present an MFA challenge if user has configured it, else allow the request.

              • MFA_REQUIRED Present an MFA challenge if user has configured it, else block the request.

              • NO_ACTION Allow the user to sign in.

          • HighAction (dict) –

            Action to take for a high risk.

            • Notify (boolean) –

              Flag specifying whether to send a notification.

            • EventAction (string) –

              The action to take in response to the account takeover action. Valid values are as follows:

              • BLOCK Choosing this action will block the request.

              • MFA_IF_CONFIGURED Present an MFA challenge if user has configured it, else allow the request.

              • MFA_REQUIRED Present an MFA challenge if user has configured it, else block the request.

              • NO_ACTION Allow the user to sign in.

      • RiskExceptionConfiguration (dict) –

        The configuration to override the risk decision.

        • BlockedIPRangeList (list) –

          Overrides the risk decision to always block the pre-authentication requests. The IP range is in CIDR notation, a compact representation of an IP address and its routing prefix.

          • (string) –

        • SkippedIPRangeList (list) –

          Risk detection isn’t performed on the IP addresses in this range list. The IP range is in CIDR notation.

          • (string) –

      • LastModifiedDate (datetime) –

        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 Date object.

Exceptions

  • CognitoIdentityProvider.Client.exceptions.ResourceNotFoundException

  • CognitoIdentityProvider.Client.exceptions.InvalidParameterException

  • CognitoIdentityProvider.Client.exceptions.TooManyRequestsException

  • CognitoIdentityProvider.Client.exceptions.NotAuthorizedException

  • CognitoIdentityProvider.Client.exceptions.UserPoolAddOnNotEnabledException

  • CognitoIdentityProvider.Client.exceptions.InternalErrorException