CfnUserPoolRiskConfigurationAttachmentPropsMixin
- class aws_cdk.mixins_preview.aws_cognito.mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin(props, *, strategy=None)
Bases:
MixinThe
AWS::Cognito::UserPoolRiskConfigurationAttachmentresource sets the risk configuration that is used for Amazon Cognito advanced security features.You can specify risk configuration for a single client (with a specific
clientId) or for all clients (by setting theclientIdtoALL). If you specifyALL, the default configuration is used for every client that has had no risk configuration set previously. If you specify risk configuration for a particular client, it no longer falls back to theALLconfiguration.- See:
- CloudformationResource:
AWS::Cognito::UserPoolRiskConfigurationAttachment
- Mixin:
true
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview import mixins from aws_cdk.mixins_preview.aws_cognito import mixins as cognito_mixins cfn_user_pool_risk_configuration_attachment_props_mixin = cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin(cognito_mixins.CfnUserPoolRiskConfigurationAttachmentMixinProps( account_takeover_risk_configuration=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverRiskConfigurationTypeProperty( actions=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionsTypeProperty( high_action=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionTypeProperty( event_action="eventAction", notify=False ), low_action=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionTypeProperty( event_action="eventAction", notify=False ), medium_action=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionTypeProperty( event_action="eventAction", notify=False ) ), notify_configuration=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyConfigurationTypeProperty( block_email=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyEmailTypeProperty( html_body="htmlBody", subject="subject", text_body="textBody" ), from="from", mfa_email=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyEmailTypeProperty( html_body="htmlBody", subject="subject", text_body="textBody" ), no_action_email=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyEmailTypeProperty( html_body="htmlBody", subject="subject", text_body="textBody" ), reply_to="replyTo", source_arn="sourceArn" ) ), client_id="clientId", compromised_credentials_risk_configuration=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.CompromisedCredentialsRiskConfigurationTypeProperty( actions=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.CompromisedCredentialsActionsTypeProperty( event_action="eventAction" ), event_filter=["eventFilter"] ), risk_exception_configuration=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.RiskExceptionConfigurationTypeProperty( blocked_ip_range_list=["blockedIpRangeList"], skipped_ip_range_list=["skippedIpRangeList"] ), user_pool_id="userPoolId" ), strategy=mixins.PropertyMergeStrategy.OVERRIDE )
Create a mixin to apply properties to
AWS::Cognito::UserPoolRiskConfigurationAttachment.- Parameters:
props (
Union[CfnUserPoolRiskConfigurationAttachmentMixinProps,Dict[str,Any]]) – L1 properties to apply.strategy (
Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE
Methods
- apply_to(construct)
Apply the mixin properties to the construct.
- Parameters:
construct (
IConstruct)- Return type:
- supports(construct)
Check if this mixin supports the given construct.
- Parameters:
construct (
IConstruct)- Return type:
bool
Attributes
- CFN_PROPERTY_KEYS = ['accountTakeoverRiskConfiguration', 'clientId', 'compromisedCredentialsRiskConfiguration', 'riskExceptionConfiguration', 'userPoolId']
Static Methods
- classmethod is_mixin(x)
(experimental) Checks if
xis a Mixin.- Parameters:
x (
Any) – Any object.- Return type:
bool- Returns:
true if
xis an object created from a class which extendsMixin.- Stability:
experimental
AccountTakeoverActionTypeProperty
- class CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionTypeProperty(*, event_action=None, notify=None)
Bases:
objectThe automated response to a risk level for adaptive authentication in full-function, or
ENFORCED, mode.You can assign an action to each risk level that advanced security features evaluates.
- Parameters:
event_action (
Optional[str]) – The action to take for the attempted account takeover action for the associated risk level. Valid values are as follows: -BLOCK: Block the request. -MFA_IF_CONFIGURED: Present an MFA challenge if possible. MFA is possible if the user pool has active MFA methods that the user can set up. For example, if the user pool only supports SMS message MFA but the user doesn’t have a phone number attribute, MFA setup isn’t possible. If MFA setup isn’t possible, allow the request. -MFA_REQUIRED: Present an MFA challenge if possible. Block the request if a user hasn’t set up MFA. To sign in with required MFA, users must have an email address or phone number attribute, or a registered TOTP factor. -NO_ACTION: Take no action. Permit sign-in.notify (
Union[bool,IResolvable,None]) – Determines whether Amazon Cognito sends a user a notification message when your user pools assesses a user’s session at the associated risk level.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_cognito import mixins as cognito_mixins account_takeover_action_type_property = cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionTypeProperty( event_action="eventAction", notify=False )
Attributes
- event_action
The action to take for the attempted account takeover action for the associated risk level.
Valid values are as follows:
BLOCK: Block the request.MFA_IF_CONFIGURED: Present an MFA challenge if possible. MFA is possible if the user pool has active MFA methods that the user can set up. For example, if the user pool only supports SMS message MFA but the user doesn’t have a phone number attribute, MFA setup isn’t possible. If MFA setup isn’t possible, allow the request.MFA_REQUIRED: Present an MFA challenge if possible. Block the request if a user hasn’t set up MFA. To sign in with required MFA, users must have an email address or phone number attribute, or a registered TOTP factor.NO_ACTION: Take no action. Permit sign-in.
- notify
Determines whether Amazon Cognito sends a user a notification message when your user pools assesses a user’s session at the associated risk level.
AccountTakeoverActionsTypeProperty
- class CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionsTypeProperty(*, high_action=None, low_action=None, medium_action=None)
Bases:
objectA list of account-takeover actions for each level of risk that Amazon Cognito might assess with advanced security features.
- Parameters:
high_action (
Union[IResolvable,AccountTakeoverActionTypeProperty,Dict[str,Any],None]) – The action that you assign to a high-risk assessment by threat protection.low_action (
Union[IResolvable,AccountTakeoverActionTypeProperty,Dict[str,Any],None]) – The action that you assign to a low-risk assessment by threat protection.medium_action (
Union[IResolvable,AccountTakeoverActionTypeProperty,Dict[str,Any],None]) – The action that you assign to a medium-risk assessment by threat protection.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_cognito import mixins as cognito_mixins account_takeover_actions_type_property = cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionsTypeProperty( high_action=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionTypeProperty( event_action="eventAction", notify=False ), low_action=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionTypeProperty( event_action="eventAction", notify=False ), medium_action=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionTypeProperty( event_action="eventAction", notify=False ) )
Attributes
- high_action
The action that you assign to a high-risk assessment by threat protection.
- low_action
The action that you assign to a low-risk assessment by threat protection.
- medium_action
The action that you assign to a medium-risk assessment by threat protection.
AccountTakeoverRiskConfigurationTypeProperty
- class CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverRiskConfigurationTypeProperty(*, actions=None, notify_configuration=None)
Bases:
objectThe settings for automated responses and notification templates for adaptive authentication with advanced security features.
- Parameters:
actions (
Union[IResolvable,AccountTakeoverActionsTypeProperty,Dict[str,Any],None]) – A list of account-takeover actions for each level of risk that Amazon Cognito might assess with threat protection.notify_configuration (
Union[IResolvable,NotifyConfigurationTypeProperty,Dict[str,Any],None]) – The settings for composing and sending an email message when threat protection assesses a risk level with adaptive authentication. When you choose to notify users inAccountTakeoverRiskConfiguration, Amazon Cognito sends an email message using the method and template that you set with this data type.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_cognito import mixins as cognito_mixins account_takeover_risk_configuration_type_property = cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverRiskConfigurationTypeProperty( actions=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionsTypeProperty( high_action=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionTypeProperty( event_action="eventAction", notify=False ), low_action=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionTypeProperty( event_action="eventAction", notify=False ), medium_action=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.AccountTakeoverActionTypeProperty( event_action="eventAction", notify=False ) ), notify_configuration=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyConfigurationTypeProperty( block_email=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyEmailTypeProperty( html_body="htmlBody", subject="subject", text_body="textBody" ), from="from", mfa_email=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyEmailTypeProperty( html_body="htmlBody", subject="subject", text_body="textBody" ), no_action_email=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyEmailTypeProperty( html_body="htmlBody", subject="subject", text_body="textBody" ), reply_to="replyTo", source_arn="sourceArn" ) )
Attributes
- actions
A list of account-takeover actions for each level of risk that Amazon Cognito might assess with threat protection.
- notify_configuration
The settings for composing and sending an email message when threat protection assesses a risk level with adaptive authentication.
When you choose to notify users in
AccountTakeoverRiskConfiguration, Amazon Cognito sends an email message using the method and template that you set with this data type.
CompromisedCredentialsActionsTypeProperty
- class CfnUserPoolRiskConfigurationAttachmentPropsMixin.CompromisedCredentialsActionsTypeProperty(*, event_action=None)
Bases:
objectSettings for user pool actions when Amazon Cognito detects compromised credentials with advanced security features in full-function
ENFORCEDmode.- Parameters:
event_action (
Optional[str]) – The action that Amazon Cognito takes when it detects compromised credentials.- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_cognito import mixins as cognito_mixins compromised_credentials_actions_type_property = cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.CompromisedCredentialsActionsTypeProperty( event_action="eventAction" )
Attributes
- event_action
The action that Amazon Cognito takes when it detects compromised credentials.
CompromisedCredentialsRiskConfigurationTypeProperty
- class CfnUserPoolRiskConfigurationAttachmentPropsMixin.CompromisedCredentialsRiskConfigurationTypeProperty(*, actions=None, event_filter=None)
Bases:
objectSettings for compromised-credentials actions and authentication-event sources with advanced security features in full-function
ENFORCEDmode.- Parameters:
actions (
Union[IResolvable,CompromisedCredentialsActionsTypeProperty,Dict[str,Any],None]) – Settings for the actions that you want your user pool to take when Amazon Cognito detects compromised credentials.event_filter (
Optional[Sequence[str]]) – Settings for the sign-in activity where you want to configure compromised-credentials actions. Defaults to all events.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_cognito import mixins as cognito_mixins compromised_credentials_risk_configuration_type_property = cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.CompromisedCredentialsRiskConfigurationTypeProperty( actions=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.CompromisedCredentialsActionsTypeProperty( event_action="eventAction" ), event_filter=["eventFilter"] )
Attributes
- actions
Settings for the actions that you want your user pool to take when Amazon Cognito detects compromised credentials.
- event_filter
Settings for the sign-in activity where you want to configure compromised-credentials actions.
Defaults to all events.
NotifyConfigurationTypeProperty
- class CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyConfigurationTypeProperty(*, block_email=None, from_=None, mfa_email=None, no_action_email=None, reply_to=None, source_arn=None)
Bases:
objectThe configuration for Amazon SES email messages that advanced security features sends to a user when your adaptive authentication automated response has a Notify action.
- Parameters:
block_email (
Union[IResolvable,NotifyEmailTypeProperty,Dict[str,Any],None]) – The template for the email message that your user pool sends when a detected risk event is blocked.from – The email address that sends the email message. The address must be either individually verified with Amazon Simple Email Service, or from a domain that has been verified with Amazon SES.
mfa_email (
Union[IResolvable,NotifyEmailTypeProperty,Dict[str,Any],None]) – The template for the email message that your user pool sends when MFA is challenged in response to a detected risk.no_action_email (
Union[IResolvable,NotifyEmailTypeProperty,Dict[str,Any],None]) – The template for the email message that your user pool sends when no action is taken in response to a detected risk.reply_to (
Optional[str]) – The reply-to email address of an email template. Can be an email address in the formatadmin@example.comorAdministrator <admin@example.com>.source_arn (
Optional[str]) – 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 theFromparameter.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_cognito import mixins as cognito_mixins notify_configuration_type_property = cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyConfigurationTypeProperty( block_email=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyEmailTypeProperty( html_body="htmlBody", subject="subject", text_body="textBody" ), from="from", mfa_email=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyEmailTypeProperty( html_body="htmlBody", subject="subject", text_body="textBody" ), no_action_email=cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyEmailTypeProperty( html_body="htmlBody", subject="subject", text_body="textBody" ), reply_to="replyTo", source_arn="sourceArn" )
Attributes
- block_email
The template for the email message that your user pool sends when a detected risk event is blocked.
- from_
The email address that sends the email message.
The address must be either individually verified with Amazon Simple Email Service, or from a domain that has been verified with Amazon SES.
- mfa_email
The template for the email message that your user pool sends when MFA is challenged in response to a detected risk.
- no_action_email
The template for the email message that your user pool sends when no action is taken in response to a detected risk.
- reply_to
The reply-to email address of an email template.
Can be an email address in the format
admin@example.comorAdministrator <admin@example.com>.
- source_arn
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
Fromparameter.
NotifyEmailTypeProperty
- class CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyEmailTypeProperty(*, html_body=None, subject=None, text_body=None)
Bases:
objectThe template for email messages that advanced security features sends to a user when your threat protection automated response has a Notify action.
- Parameters:
html_body (
Optional[str]) – The body of an email notification formatted in HTML. Choose anHtmlBodyor aTextBodyto send an HTML-formatted or plaintext message, respectively.subject (
Optional[str]) – The subject of the threat protection email notification.text_body (
Optional[str]) – The body of an email notification formatted in plaintext. Choose anHtmlBodyor aTextBodyto send an HTML-formatted or plaintext message, respectively.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_cognito import mixins as cognito_mixins notify_email_type_property = cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.NotifyEmailTypeProperty( html_body="htmlBody", subject="subject", text_body="textBody" )
Attributes
- html_body
The body of an email notification formatted in HTML.
Choose an
HtmlBodyor aTextBodyto send an HTML-formatted or plaintext message, respectively.
- subject
The subject of the threat protection email notification.
- text_body
The body of an email notification formatted in plaintext.
Choose an
HtmlBodyor aTextBodyto send an HTML-formatted or plaintext message, respectively.
RiskExceptionConfigurationTypeProperty
- class CfnUserPoolRiskConfigurationAttachmentPropsMixin.RiskExceptionConfigurationTypeProperty(*, blocked_ip_range_list=None, skipped_ip_range_list=None)
Bases:
objectExceptions to the risk evaluation configuration, including always-allow and always-block IP address ranges.
- Parameters:
blocked_ip_range_list (
Optional[Sequence[str]]) – An always-block IP address list. Overrides the risk decision and always blocks authentication requests. This parameter is displayed and set in CIDR notation.skipped_ip_range_list (
Optional[Sequence[str]]) – An always-allow IP address list. Risk detection isn’t performed on the IP addresses in this range list. This parameter is displayed and set in CIDR notation.
- See:
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk.mixins_preview.aws_cognito import mixins as cognito_mixins risk_exception_configuration_type_property = cognito_mixins.CfnUserPoolRiskConfigurationAttachmentPropsMixin.RiskExceptionConfigurationTypeProperty( blocked_ip_range_list=["blockedIpRangeList"], skipped_ip_range_list=["skippedIpRangeList"] )
Attributes
- blocked_ip_range_list
An always-block IP address list.
Overrides the risk decision and always blocks authentication requests. This parameter is displayed and set in CIDR notation.
- skipped_ip_range_list
An always-allow IP address list.
Risk detection isn’t performed on the IP addresses in this range list. This parameter is displayed and set in CIDR notation.