@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:40.731Z") @Stability(value=Stable) public class CfnAlert extends CfnResource implements IInspectable
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();
| Modifier and Type | Class and Description |
|---|---|
static interface |
CfnAlert.ActionProperty
A configuration that specifies the action to perform when anomalies are detected.
|
static class |
CfnAlert.Builder
A fluent builder for
CfnAlert. |
static interface |
CfnAlert.LambdaConfigurationProperty
Contains information about a Lambda configuration.
|
static interface |
CfnAlert.SNSConfigurationProperty
Contains information about the SNS topic to which you want to send your alerts and the IAM role that has access to that topic.
|
software.amazon.jsii.JsiiObject.InitializationModeIInspectable.Jsii$Default, IInspectable.Jsii$Proxy| Modifier and Type | Field and Description |
|---|---|
static String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
| Modifier | Constructor and Description |
|---|---|
|
CfnAlert(software.constructs.Construct scope,
String id,
CfnAlertProps props)
Create a new `AWS::LookoutMetrics::Alert`.
|
protected |
CfnAlert(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
CfnAlert(software.amazon.jsii.JsiiObjectRef objRef) |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAction()
Action that will be triggered when there is an alert.
|
String |
getAlertDescription()
A description of the alert.
|
String |
getAlertName()
The name of the alert.
|
Number |
getAlertSensitivityThreshold()
An integer from 0 to 100 specifying the alert sensitivity threshold.
|
String |
getAnomalyDetectorArn()
The ARN of the detector to which the alert is attached.
|
String |
getAttrArn()
The Amazon Resource Name (ARN) of the alert.
|
protected Map<String,Object> |
getCfnProperties() |
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected Map<String,Object> |
renderProperties(Map<String,Object> props) |
void |
setAction(CfnAlert.ActionProperty value)
Action that will be triggered when there is an alert.
|
void |
setAction(IResolvable value)
Action that will be triggered when there is an alert.
|
void |
setAlertDescription(String value)
A description of the alert.
|
void |
setAlertName(String value)
The name of the alert.
|
void |
setAlertSensitivityThreshold(Number value)
An integer from 0 to 100 specifying the alert sensitivity threshold.
|
void |
setAnomalyDetectorArn(String value)
The ARN of the detector to which the alert is attached.
|
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, shouldSynthesize, toString, validatePropertiesgetRefgetCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalIdjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet@Stability(value=Stable) public static final String CFN_RESOURCE_TYPE_NAME
protected CfnAlert(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnAlert(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable)
public CfnAlert(@NotNull
software.constructs.Construct scope,
@NotNull
String id,
@NotNull
CfnAlertProps props)
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.@Stability(value=Stable)
public void inspect(@NotNull
TreeInspector inspector)
inspect in interface IInspectableinspector - - tree inspector to collect and process attributes. This parameter is required.@Stability(value=Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String,Object> props)
renderProperties in class CfnResourceprops - This parameter is required.@Stability(value=Stable) @NotNull public String getAttrArn()
For example, arn:aws:lookoutmetrics:us-east-2:123456789012:Alert:my-alert
@Stability(value=Stable) @NotNull protected Map<String,Object> getCfnProperties()
getCfnProperties in class CfnResource@Stability(value=Stable) @NotNull public Object getAction()
@Stability(value=Stable)
public void setAction(@NotNull
CfnAlert.ActionProperty value)
@Stability(value=Stable)
public void setAction(@NotNull
IResolvable value)
@Stability(value=Stable) @NotNull public Number getAlertSensitivityThreshold()
@Stability(value=Stable)
public void setAlertSensitivityThreshold(@NotNull
Number value)
@Stability(value=Stable) @NotNull public String getAnomalyDetectorArn()
@Stability(value=Stable)
public void setAnomalyDetectorArn(@NotNull
String value)
@Stability(value=Stable) @Nullable public String getAlertDescription()
@Stability(value=Stable)
public void setAlertDescription(@Nullable
String value)
@Stability(value=Stable) @Nullable public String getAlertName()
@Stability(value=Stable)
public void setAlertName(@Nullable
String value)
Copyright © 2022. All rights reserved.