Class CfnAnomalySubscription
java.lang.Object
software.amazon.jsii.JsiiObject
software.constructs.Construct
software.amazon.awscdk.CfnElement
software.amazon.awscdk.CfnRefElement
software.amazon.awscdk.CfnResource
software.amazon.awscdk.services.ce.CfnAnomalySubscription
- All Implemented Interfaces:
IInspectable
,software.amazon.jsii.JsiiSerializable
,software.constructs.IConstruct
,software.constructs.IDependable
@Generated(value="jsii-pacmak/1.104.0 (build e79254c)",
date="2024-11-06T23:25:05.242Z")
@Stability(Stable)
public class CfnAnomalySubscription
extends CfnResource
implements IInspectable
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();
- See Also:
-
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.constructs.IConstruct
software.constructs.IConstruct.Jsii$Default
Nested classes/interfaces inherited from interface software.amazon.awscdk.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
ModifierConstructorDescriptionprotected
CfnAnomalySubscription
(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protected
CfnAnomalySubscription
(software.amazon.jsii.JsiiObjectRef objRef) CfnAnomalySubscription
(software.constructs.Construct scope, String id, CfnAnomalySubscriptionProps props) -
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.Tags to assign to subscription.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) Tags to assign to subscription.void
setResourceTags
(IResolvable value) Tags to assign to subscription.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.CfnResource
addDeletionOverride, addDependency, addDependsOn, addMetadata, addOverride, addPropertyDeletionOverride, addPropertyOverride, applyRemovalPolicy, applyRemovalPolicy, applyRemovalPolicy, getAtt, getAtt, getCfnOptions, getCfnResourceType, getMetadata, getUpdatedProperites, getUpdatedProperties, isCfnResource, obtainDependencies, obtainResourceDependencies, removeDependency, replaceDependency, shouldSynthesize, toString, validateProperties
Methods inherited from class software.amazon.awscdk.CfnRefElement
getRef
Methods inherited from class software.amazon.awscdk.CfnElement
getCreationStack, getLogicalId, getStack, isCfnElement, overrideLogicalId
Methods inherited from class software.constructs.Construct
getNode, isConstruct
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 software.constructs.Construct scope, @NotNull String id, @NotNull CfnAnomalySubscriptionProps props) - Parameters:
scope
- Scope in which this resource is defined. This parameter is required.id
- Construct identifier for this resource (unique in its scope). This parameter is required.props
- Resource properties. This parameter is required.
-
-
Method Details
-
inspect
Examines the CloudFormation resource and discloses attributes.- Specified by:
inspect
in interfaceIInspectable
- 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 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. -
setFrequency
The frequency that anomaly notifications are sent. -
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
Tags to assign to subscription. -
setResourceTags
Tags to assign to subscription. -
setResourceTags
Tags to assign to subscription. -
getThreshold
(deprecated). -
setThreshold
(deprecated). -
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. -
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.
-