java.lang.Object
software.amazon.jsii.JsiiObject
All Implemented Interfaces:
IConstruct, IDependable, IInspectable, software.amazon.jsii.JsiiSerializable, software.constructs.IConstruct

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:29:59.806Z") @Stability(Stable) public class CfnAlert extends CfnResource implements IInspectable
A CloudFormation AWS::LookoutMetrics::Alert.

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

Example:

 // The code below shows an example of how to instantiate this type.
 // The values are placeholders you should change.
 import software.amazon.awscdk.services.lookoutmetrics.*;
 CfnAlert cfnAlert = CfnAlert.Builder.create(this, "MyCfnAlert")
         .action(ActionProperty.builder()
                 .lambdaConfiguration(LambdaConfigurationProperty.builder()
                         .lambdaArn("lambdaArn")
                         .roleArn("roleArn")
                         .build())
                 .snsConfiguration(SNSConfigurationProperty.builder()
                         .roleArn("roleArn")
                         .snsTopicArn("snsTopicArn")
                         .build())
                 .build())
         .alertSensitivityThreshold(123)
         .anomalyDetectorArn("anomalyDetectorArn")
         // the properties below are optional
         .alertDescription("alertDescription")
         .alertName("alertName")
         .build();
 
  • Field Details

    • CFN_RESOURCE_TYPE_NAME

      @Stability(Stable) public static final String CFN_RESOURCE_TYPE_NAME
      The CloudFormation resource type name for this resource class.
  • Constructor Details

    • CfnAlert

      protected CfnAlert(software.amazon.jsii.JsiiObjectRef objRef)
    • CfnAlert

      protected CfnAlert(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
    • CfnAlert

      @Stability(Stable) public CfnAlert(@NotNull Construct scope, @NotNull String id, @NotNull CfnAlertProps props)
      Create a new AWS::LookoutMetrics::Alert.

      Parameters:
      scope -
      • scope in which this resource is defined.
      This parameter is required.
      id -
      • scoped id of the resource.
      This parameter is required.
      props -
      • resource properties.
      This parameter is required.
  • Method Details

    • inspect

      @Stability(Stable) public void inspect(@NotNull TreeInspector inspector)
      Examines the CloudFormation resource and discloses attributes.

      Specified by:
      inspect in interface IInspectable
      Parameters:
      inspector -
      • tree inspector to collect and process attributes.
      This parameter is required.
    • renderProperties

      @Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
      Overrides:
      renderProperties in class CfnResource
      Parameters:
      props - This parameter is required.
    • getAttrArn

      @Stability(Stable) @NotNull public String getAttrArn()
      The Amazon Resource Name (ARN) of the alert.

      For example, arn:aws:lookoutmetrics:us-east-2:123456789012:Alert:my-alert

    • getCfnProperties

      @Stability(Stable) @NotNull protected Map<String,Object> getCfnProperties()
      Overrides:
      getCfnProperties in class CfnResource
    • getAction

      @Stability(Stable) @NotNull public Object getAction()
      Action that will be triggered when there is an alert.
    • setAction

      @Stability(Stable) public void setAction(@NotNull CfnAlert.ActionProperty value)
      Action that will be triggered when there is an alert.
    • setAction

      @Stability(Stable) public void setAction(@NotNull IResolvable value)
      Action that will be triggered when there is an alert.
    • getAlertSensitivityThreshold

      @Stability(Stable) @NotNull public Number getAlertSensitivityThreshold()
      An integer from 0 to 100 specifying the alert sensitivity threshold.
    • setAlertSensitivityThreshold

      @Stability(Stable) public void setAlertSensitivityThreshold(@NotNull Number value)
      An integer from 0 to 100 specifying the alert sensitivity threshold.
    • getAnomalyDetectorArn

      @Stability(Stable) @NotNull public String getAnomalyDetectorArn()
      The ARN of the detector to which the alert is attached.
    • setAnomalyDetectorArn

      @Stability(Stable) public void setAnomalyDetectorArn(@NotNull String value)
      The ARN of the detector to which the alert is attached.
    • getAlertDescription

      @Stability(Stable) @Nullable public String getAlertDescription()
      A description of the alert.
    • setAlertDescription

      @Stability(Stable) public void setAlertDescription(@Nullable String value)
      A description of the alert.
    • getAlertName

      @Stability(Stable) @Nullable public String getAlertName()
      The name of the alert.
    • setAlertName

      @Stability(Stable) public void setAlertName(@Nullable String value)
      The name of the alert.