Class CfnAnomalySubscription
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.
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.CE
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnAnomalySubscription : CfnResource, IInspectable
Syntax (vb)
Public Class CfnAnomalySubscription
Inherits CfnResource
Implements IInspectable
Remarks
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.
CloudformationResource: AWS::CE::AnomalySubscription
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.CE;
var cfnAnomalySubscription = new CfnAnomalySubscription(this, "MyCfnAnomalySubscription", new CfnAnomalySubscriptionProps {
Frequency = "frequency",
MonitorArnList = new [] { "monitorArnList" },
Subscribers = new [] { new SubscriberProperty {
Address = "address",
Type = "type",
// the properties below are optional
Status = "status"
} },
SubscriptionName = "subscriptionName",
// the properties below are optional
ResourceTags = new [] { new ResourceTagProperty {
Key = "key",
Value = "value"
} },
Threshold = 123,
ThresholdExpression = "thresholdExpression"
});
Synopsis
Constructors
CfnAnomalySubscription(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnAnomalySubscription(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
CfnAnomalySubscription(Construct, String, ICfnAnomalySubscriptionProps) |
Properties
AttrAccountId | Your unique account identifier. |
AttrSubscriptionArn | The |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Frequency | The frequency that anomaly notifications are sent. |
MonitorArnList | A list of cost anomaly monitors. |
ResourceTags | Tags to assign to subscription. |
Subscribers | A list of subscribers to notify. |
SubscriptionName | The name for the subscription. |
Threshold | (deprecated). |
ThresholdExpression | 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 are |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnAnomalySubscription(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnAnomalySubscription(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnAnomalySubscription(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnAnomalySubscription(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
CfnAnomalySubscription(Construct, String, ICfnAnomalySubscriptionProps)
public CfnAnomalySubscription(Construct scope, string id, ICfnAnomalySubscriptionProps props)
Parameters
- scope Constructs.Construct
Scope in which this resource is defined.
- id System.String
Construct identifier for this resource (unique in its scope).
- props ICfnAnomalySubscriptionProps
Resource properties.
Properties
AttrAccountId
Your unique account identifier.
public virtual string AttrAccountId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: AccountId
AttrSubscriptionArn
The AnomalySubscription
Amazon Resource Name (ARN).
public virtual string AttrSubscriptionArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: SubscriptionArn
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Frequency
The frequency that anomaly notifications are sent.
public virtual string Frequency { get; set; }
Property Value
System.String
MonitorArnList
A list of cost anomaly monitors.
public virtual string[] MonitorArnList { get; set; }
Property Value
System.String[]
ResourceTags
Tags to assign to subscription.
public virtual object ResourceTags { get; set; }
Property Value
System.Object
Subscribers
A list of subscribers to notify.
public virtual object Subscribers { get; set; }
Property Value
System.Object
SubscriptionName
The name for the subscription.
public virtual string SubscriptionName { get; set; }
Property Value
System.String
Threshold
(deprecated).
public virtual Nullable<double> Threshold { get; set; }
Property Value
System.Nullable<System.Double>
ThresholdExpression
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 are ANOMALY_TOTAL_IMPACT_ABSOLUTE
and ANOMALY_TOTAL_IMPACT_PERCENTAGE
, corresponding to an anomaly’s TotalImpact and TotalImpactPercentage, respectively (see Impact for more details). The supported nested expression types are AND
and OR
. The match option GREATER_THAN_OR_EQUAL
is required. Values must be numbers between 0 and 10,000,000,000 in string format.
public virtual string ThresholdExpression { get; set; }
Property Value
System.String
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>