@Generated(value="jsii-pacmak/1.73.0 (build 6faeda3)", date="2023-01-31T18:36:48.775Z") 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.
|
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
IConstruct.Jsii$Default
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
|
Modifier | Constructor and Description |
---|---|
|
CfnAlert(Construct scope,
java.lang.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 |
---|---|
java.lang.Object |
getAction()
Action that will be triggered when there is an alert.
|
java.lang.String |
getAlertDescription()
A description of the alert.
|
java.lang.String |
getAlertName()
The name of the alert.
|
java.lang.Number |
getAlertSensitivityThreshold()
An integer from 0 to 100 specifying the alert sensitivity threshold.
|
java.lang.String |
getAnomalyDetectorArn()
The ARN of the detector to which the alert is attached.
|
java.lang.String |
getAttrArn()
The Amazon Resource Name (ARN) of the alert.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
getCfnProperties() |
void |
inspect(TreeInspector inspector)
Examines the CloudFormation resource and discloses attributes.
|
protected java.util.Map<java.lang.String,java.lang.Object> |
renderProperties(java.util.Map<java.lang.String,java.lang.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(java.lang.String value)
A description of the alert.
|
void |
setAlertName(java.lang.String value)
The name of the alert.
|
void |
setAlertSensitivityThreshold(java.lang.Number value)
An integer from 0 to 100 specifying the alert sensitivity threshold.
|
void |
setAnomalyDetectorArn(java.lang.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, isCfnResource, shouldSynthesize, toString, validateProperties
getRef
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
public static final java.lang.String CFN_RESOURCE_TYPE_NAME
protected CfnAlert(software.amazon.jsii.JsiiObjectRef objRef)
protected CfnAlert(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public CfnAlert(Construct scope, java.lang.String id, 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.public void inspect(TreeInspector inspector)
inspect
in interface IInspectable
inspector
- - tree inspector to collect and process attributes. This parameter is required.protected java.util.Map<java.lang.String,java.lang.Object> renderProperties(java.util.Map<java.lang.String,java.lang.Object> props)
renderProperties
in class CfnResource
props
- This parameter is required.public java.lang.String getAttrArn()
For example, arn:aws:lookoutmetrics:us-east-2:123456789012:Alert:my-alert
protected java.util.Map<java.lang.String,java.lang.Object> getCfnProperties()
getCfnProperties
in class CfnResource
public java.lang.Object getAction()
public void setAction(CfnAlert.ActionProperty value)
public void setAction(IResolvable value)
public java.lang.Number getAlertSensitivityThreshold()
public void setAlertSensitivityThreshold(java.lang.Number value)
public java.lang.String getAnomalyDetectorArn()
public void setAnomalyDetectorArn(java.lang.String value)
public java.lang.String getAlertDescription()
public void setAlertDescription(java.lang.String value)
public java.lang.String getAlertName()
public void setAlertName(java.lang.String value)