Class CfnAnomalySubscription
- All Implemented Interfaces:
IConstruct
,IDependable
,IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
AWS::CE::AnomalySubscription
.
The AWS::CE::AnomalySubscription
resource (also referred to as an alert subscription) is a Cost Explorer resource type that sends notifications about specific anomalies that meet an alerting criteria defined by you.
You can specify the frequency of the alerts and the subscribers to notify.
Anomaly subscriptions can be associated with one or more AWS::CE::AnomalyMonitor
resources, and they only send notifications about anomalies detected by those associated monitors. You can also configure a threshold to further control which anomalies are included in the notifications.
Anomalies that don’t exceed the chosen threshold and therefore don’t trigger notifications from an anomaly subscription will still be available on the console and from the GetAnomalies
API.
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.ce.*; CfnAnomalySubscription cfnAnomalySubscription = CfnAnomalySubscription.Builder.create(this, "MyCfnAnomalySubscription") .frequency("frequency") .monitorArnList(List.of("monitorArnList")) .subscribers(List.of(SubscriberProperty.builder() .address("address") .type("type") // the properties below are optional .status("status") .build())) .subscriptionName("subscriptionName") // the properties below are optional .resourceTags(List.of(ResourceTagProperty.builder() .key("key") .value("value") .build())) .threshold(123) .thresholdExpression("thresholdExpression") .build();
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
A fluent builder forCfnAnomalySubscription
.static interface
The tag structure that contains a tag key and value.static interface
The recipient ofAnomalySubscription
notifications.Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IConstruct
IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.core.IInspectable
IInspectable.Jsii$Default, IInspectable.Jsii$Proxy
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The CloudFormation resource type name for this resource class. -
Constructor Summary
ModifierConstructorDescriptionCfnAnomalySubscription
(Construct scope, String id, CfnAnomalySubscriptionProps props) Create a newAWS::CE::AnomalySubscription
.protected
CfnAnomalySubscription
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnAnomalySubscription
(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionYour unique account identifier.TheAnomalySubscription
Amazon Resource Name (ARN).The frequency that anomaly notifications are sent.A list of cost anomaly monitors.AWS::CE::AnomalySubscription.ResourceTags
.A list of subscribers to notify.The name for the subscription.(deprecated).An Expression object in JSON string format used to specify the anomalies that you want to generate alerts for.void
inspect
(TreeInspector inspector) Examines the CloudFormation resource and discloses attributes.renderProperties
(Map<String, Object> props) void
setFrequency
(String value) The frequency that anomaly notifications are sent.void
setMonitorArnList
(List<String> value) A list of cost anomaly monitors.void
setResourceTags
(List<Object> value) AWS::CE::AnomalySubscription.ResourceTags
.void
setResourceTags
(IResolvable value) AWS::CE::AnomalySubscription.ResourceTags
.void
setSubscribers
(List<Object> value) A list of subscribers to notify.void
setSubscribers
(IResolvable value) A list of subscribers to notify.void
setSubscriptionName
(String value) The name for the subscription.void
setThreshold
(Number value) (deprecated).void
setThresholdExpression
(String value) An Expression object in JSON string format used to specify the anomalies that you want to generate alerts for.Methods inherited from class software.amazon.awscdk.core.CfnResource
addDeletionOverride, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, isCfnResource, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.core.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.core.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.amazon.awscdk.core.Construct
getNode, isConstruct, onPrepare, onSynthesize, onValidate, prepare, synthesize, validate
Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSet
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
-
-
Constructor Details
-
CfnAnomalySubscription
protected CfnAnomalySubscription(software.amazon.jsii.JsiiObjectRef objRef) -
CfnAnomalySubscription
protected CfnAnomalySubscription(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) -
CfnAnomalySubscription
@Stability(Stable) public CfnAnomalySubscription(@NotNull Construct scope, @NotNull String id, @NotNull CfnAnomalySubscriptionProps props) Create a newAWS::CE::AnomalySubscription
.- Parameters:
scope
-- scope in which this resource is defined.
id
-- scoped id of the resource.
props
-- resource properties.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- Parameters:
inspector
-- tree inspector to collect and process attributes.
-
renderProperties
@Stability(Stable) @NotNull protected Map<String,Object> renderProperties(@NotNull Map<String, Object> props) - Overrides:
renderProperties
in classCfnResource
- Parameters:
props
- This parameter is required.
-
getAttrAccountId
Your unique account identifier. -
getAttrSubscriptionArn
TheAnomalySubscription
Amazon Resource Name (ARN). -
getCfnProperties
- Overrides:
getCfnProperties
in classCfnResource
-
getFrequency
The frequency that anomaly notifications are sent.Notifications are sent either over email (for DAILY and WEEKLY frequencies) or SNS (for IMMEDIATE frequency). For more information, see Creating an Amazon SNS topic for anomaly notifications .
-
setFrequency
The frequency that anomaly notifications are sent.Notifications are sent either over email (for DAILY and WEEKLY frequencies) or SNS (for IMMEDIATE frequency). For more information, see Creating an Amazon SNS topic for anomaly notifications .
-
getMonitorArnList
A list of cost anomaly monitors. -
setMonitorArnList
A list of cost anomaly monitors. -
getSubscribers
A list of subscribers to notify. -
setSubscribers
A list of subscribers to notify. -
setSubscribers
A list of subscribers to notify. -
getSubscriptionName
The name for the subscription. -
setSubscriptionName
The name for the subscription. -
getResourceTags
AWS::CE::AnomalySubscription.ResourceTags
. -
setResourceTags
AWS::CE::AnomalySubscription.ResourceTags
. -
setResourceTags
AWS::CE::AnomalySubscription.ResourceTags
. -
getThreshold
(deprecated).An absolute dollar value that must be exceeded by the anomaly's total impact (see Impact for more details) for an anomaly notification to be generated.
This field has been deprecated. To specify a threshold, use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.
One of Threshold or ThresholdExpression is required for
AWS::CE::AnomalySubscription
. You cannot specify both. -
setThreshold
(deprecated).An absolute dollar value that must be exceeded by the anomaly's total impact (see Impact for more details) for an anomaly notification to be generated.
This field has been deprecated. To specify a threshold, use ThresholdExpression. Continued use of Threshold will be treated as shorthand syntax for a ThresholdExpression.
One of Threshold or ThresholdExpression is required for
AWS::CE::AnomalySubscription
. You cannot specify both. -
getThresholdExpression
An Expression object in JSON string format used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions areANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types areAND
andOR
. The match optionGREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000 in string format.One of Threshold or ThresholdExpression is required for
AWS::CE::AnomalySubscription
. You cannot specify both.For further information, see the Examples section of this page.
-
setThresholdExpression
An Expression object in JSON string format used to specify the anomalies that you want to generate alerts for. This supports dimensions and nested expressions. The supported dimensions areANOMALY_TOTAL_IMPACT_ABSOLUTE
andANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types areAND
andOR
. The match optionGREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000 in string format.One of Threshold or ThresholdExpression is required for
AWS::CE::AnomalySubscription
. You cannot specify both.For further information, see the Examples section of this page.
-