CfnAlertPropsMixin

class aws_cdk.mixins_preview.aws_lookoutmetrics.mixins.CfnAlertPropsMixin(props, *, strategy=None)

Bases: Mixin

End of support notice: On Oct 9, 2025, AWS will end support for Amazon Lookout for Metrics.

After Oct 9, 2025, you will no longer be able to access the Amazon Lookout for Metrics console or Amazon Lookout for Metrics resources. For more information, see Amazon Lookout for Metrics end of support .

The AWS::LookoutMetrics::Alert type creates an alert for an anomaly detector.

see:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lookoutmetrics-alert.html

cloudformationResource:

AWS::LookoutMetrics::Alert

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_lookoutmetrics import mixins as lookoutmetrics_mixins

cfn_alert_props_mixin = lookoutmetrics_mixins.CfnAlertPropsMixin(lookoutmetrics_mixins.CfnAlertMixinProps(
    action=lookoutmetrics_mixins.CfnAlertPropsMixin.ActionProperty(
        lambda_configuration=lookoutmetrics_mixins.CfnAlertPropsMixin.LambdaConfigurationProperty(
            lambda_arn="lambdaArn",
            role_arn="roleArn"
        ),
        sns_configuration=lookoutmetrics_mixins.CfnAlertPropsMixin.SNSConfigurationProperty(
            role_arn="roleArn",
            sns_topic_arn="snsTopicArn"
        )
    ),
    alert_description="alertDescription",
    alert_name="alertName",
    alert_sensitivity_threshold=123,
    anomaly_detector_arn="anomalyDetectorArn"
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::LookoutMetrics::Alert.

Parameters:
  • props (Union[CfnAlertMixinProps, 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:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['action', 'alertDescription', 'alertName', 'alertSensitivityThreshold', 'anomalyDetectorArn']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

ActionProperty

class CfnAlertPropsMixin.ActionProperty(*, lambda_configuration=None, sns_configuration=None)

Bases: object

A configuration that specifies the action to perform when anomalies are detected.

Parameters:
See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-alert-action.html

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_lookoutmetrics import mixins as lookoutmetrics_mixins

action_property = lookoutmetrics_mixins.CfnAlertPropsMixin.ActionProperty(
    lambda_configuration=lookoutmetrics_mixins.CfnAlertPropsMixin.LambdaConfigurationProperty(
        lambda_arn="lambdaArn",
        role_arn="roleArn"
    ),
    sns_configuration=lookoutmetrics_mixins.CfnAlertPropsMixin.SNSConfigurationProperty(
        role_arn="roleArn",
        sns_topic_arn="snsTopicArn"
    )
)

Attributes

lambda_configuration

A configuration for an AWS Lambda channel.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-alert-action.html#cfn-lookoutmetrics-alert-action-lambdaconfiguration

sns_configuration

A configuration for an Amazon SNS channel.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-alert-action.html#cfn-lookoutmetrics-alert-action-snsconfiguration

LambdaConfigurationProperty

class CfnAlertPropsMixin.LambdaConfigurationProperty(*, lambda_arn=None, role_arn=None)

Bases: object

Contains information about a Lambda configuration.

Parameters:
  • lambda_arn (Optional[str]) – The ARN of the Lambda function.

  • role_arn (Optional[str]) – The ARN of an IAM role that has permission to invoke the Lambda function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-alert-lambdaconfiguration.html

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_lookoutmetrics import mixins as lookoutmetrics_mixins

lambda_configuration_property = lookoutmetrics_mixins.CfnAlertPropsMixin.LambdaConfigurationProperty(
    lambda_arn="lambdaArn",
    role_arn="roleArn"
)

Attributes

lambda_arn

The ARN of the Lambda function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-alert-lambdaconfiguration.html#cfn-lookoutmetrics-alert-lambdaconfiguration-lambdaarn

role_arn

The ARN of an IAM role that has permission to invoke the Lambda function.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-alert-lambdaconfiguration.html#cfn-lookoutmetrics-alert-lambdaconfiguration-rolearn

SNSConfigurationProperty

class CfnAlertPropsMixin.SNSConfigurationProperty(*, role_arn=None, sns_topic_arn=None)

Bases: object

Contains information about the SNS topic to which you want to send your alerts and the IAM role that has access to that topic.

Parameters:
  • role_arn (Optional[str]) – The ARN of the IAM role that has access to the target SNS topic.

  • sns_topic_arn (Optional[str]) – The ARN of the target SNS topic.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-alert-snsconfiguration.html

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_lookoutmetrics import mixins as lookoutmetrics_mixins

s_nSConfiguration_property = lookoutmetrics_mixins.CfnAlertPropsMixin.SNSConfigurationProperty(
    role_arn="roleArn",
    sns_topic_arn="snsTopicArn"
)

Attributes

role_arn

The ARN of the IAM role that has access to the target SNS topic.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-alert-snsconfiguration.html#cfn-lookoutmetrics-alert-snsconfiguration-rolearn

sns_topic_arn

The ARN of the target SNS topic.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-lookoutmetrics-alert-snsconfiguration.html#cfn-lookoutmetrics-alert-snsconfiguration-snstopicarn