1. Packages
  2. AWS Cloud Control
  3. API Docs
  4. ce
  5. AnomalySubscription

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

aws-native.ce.AnomalySubscription

Explore with Pulumi AI

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi

AWS Cost Anomaly Detection leverages advanced Machine Learning technologies to identify anomalous spend and root causes, so you can quickly take action. Create subscription to be notified

Example Usage

Example

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;

return await Deployment.RunAsync(() => 
{
    var anomalySubscription = new AwsNative.Ce.AnomalySubscription("anomalySubscription", new()
    {
        SubscriptionName = "SubscriptionName",
        ThresholdExpression = "{ \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"Values\": [ \"100\" ], \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ] } }",
        MonitorArnList = new[] {},
        Subscribers = new[]
        {
            new AwsNative.Ce.Inputs.AnomalySubscriptionSubscriberArgs
            {
                Address = "abc@def.com",
                Type = AwsNative.Ce.AnomalySubscriptionSubscriberType.Email,
            },
        },
        Frequency = AwsNative.Ce.AnomalySubscriptionFrequency.Daily,
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ce"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ce.NewAnomalySubscription(ctx, "anomalySubscription", &ce.AnomalySubscriptionArgs{
			SubscriptionName:    pulumi.String("SubscriptionName"),
			ThresholdExpression: pulumi.String("{ \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"Values\": [ \"100\" ], \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ] } }"),
			MonitorArnList:      pulumi.StringArray{},
			Subscribers: ce.AnomalySubscriptionSubscriberArray{
				&ce.AnomalySubscriptionSubscriberArgs{
					Address: pulumi.String("abc@def.com"),
					Type:    ce.AnomalySubscriptionSubscriberTypeEmail,
				},
			},
			Frequency: ce.AnomalySubscriptionFrequencyDaily,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";

const anomalySubscription = new aws_native.ce.AnomalySubscription("anomalySubscription", {
    subscriptionName: "SubscriptionName",
    thresholdExpression: "{ \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"Values\": [ \"100\" ], \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ] } }",
    monitorArnList: [],
    subscribers: [{
        address: "abc@def.com",
        type: aws_native.ce.AnomalySubscriptionSubscriberType.Email,
    }],
    frequency: aws_native.ce.AnomalySubscriptionFrequency.Daily,
});
Copy
import pulumi
import pulumi_aws_native as aws_native

anomaly_subscription = aws_native.ce.AnomalySubscription("anomalySubscription",
    subscription_name="SubscriptionName",
    threshold_expression="{ \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"Values\": [ \"100\" ], \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ] } }",
    monitor_arn_list=[],
    subscribers=[{
        "address": "abc@def.com",
        "type": aws_native.ce.AnomalySubscriptionSubscriberType.EMAIL,
    }],
    frequency=aws_native.ce.AnomalySubscriptionFrequency.DAILY)
Copy

Coming soon!

Example

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;

return await Deployment.RunAsync(() => 
{
    var anomalySubscription = new AwsNative.Ce.AnomalySubscription("anomalySubscription", new()
    {
        SubscriptionName = "Subscription 1",
        ThresholdExpression = "{ \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }",
        Frequency = AwsNative.Ce.AnomalySubscriptionFrequency.Daily,
        MonitorArnList = new[] {},
        Subscribers = new[]
        {
            new AwsNative.Ce.Inputs.AnomalySubscriptionSubscriberArgs
            {
                Type = AwsNative.Ce.AnomalySubscriptionSubscriberType.Email,
                Address = "abc@def.com",
            },
        },
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ce"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ce.NewAnomalySubscription(ctx, "anomalySubscription", &ce.AnomalySubscriptionArgs{
			SubscriptionName:    pulumi.String("Subscription 1"),
			ThresholdExpression: pulumi.String("{ \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }"),
			Frequency:           ce.AnomalySubscriptionFrequencyDaily,
			MonitorArnList:      pulumi.StringArray{},
			Subscribers: ce.AnomalySubscriptionSubscriberArray{
				&ce.AnomalySubscriptionSubscriberArgs{
					Type:    ce.AnomalySubscriptionSubscriberTypeEmail,
					Address: pulumi.String("abc@def.com"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";

const anomalySubscription = new aws_native.ce.AnomalySubscription("anomalySubscription", {
    subscriptionName: "Subscription 1",
    thresholdExpression: "{ \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }",
    frequency: aws_native.ce.AnomalySubscriptionFrequency.Daily,
    monitorArnList: [],
    subscribers: [{
        type: aws_native.ce.AnomalySubscriptionSubscriberType.Email,
        address: "abc@def.com",
    }],
});
Copy
import pulumi
import pulumi_aws_native as aws_native

anomaly_subscription = aws_native.ce.AnomalySubscription("anomalySubscription",
    subscription_name="Subscription 1",
    threshold_expression="{ \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }",
    frequency=aws_native.ce.AnomalySubscriptionFrequency.DAILY,
    monitor_arn_list=[],
    subscribers=[{
        "type": aws_native.ce.AnomalySubscriptionSubscriberType.EMAIL,
        "address": "abc@def.com",
    }])
Copy

Coming soon!

Example

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;

return await Deployment.RunAsync(() => 
{
    var anomalySubscription = new AwsNative.Ce.AnomalySubscription("anomalySubscription", new()
    {
        SubscriptionName = "SubscriptionName",
        ThresholdExpression = "{ \"And\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }",
        MonitorArnList = new[] {},
        Subscribers = new[]
        {
            new AwsNative.Ce.Inputs.AnomalySubscriptionSubscriberArgs
            {
                Address = "abc@def.com",
                Type = AwsNative.Ce.AnomalySubscriptionSubscriberType.Email,
            },
        },
        Frequency = AwsNative.Ce.AnomalySubscriptionFrequency.Daily,
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ce"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ce.NewAnomalySubscription(ctx, "anomalySubscription", &ce.AnomalySubscriptionArgs{
			SubscriptionName:    pulumi.String("SubscriptionName"),
			ThresholdExpression: pulumi.String("{ \"And\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }"),
			MonitorArnList:      pulumi.StringArray{},
			Subscribers: ce.AnomalySubscriptionSubscriberArray{
				&ce.AnomalySubscriptionSubscriberArgs{
					Address: pulumi.String("abc@def.com"),
					Type:    ce.AnomalySubscriptionSubscriberTypeEmail,
				},
			},
			Frequency: ce.AnomalySubscriptionFrequencyDaily,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";

const anomalySubscription = new aws_native.ce.AnomalySubscription("anomalySubscription", {
    subscriptionName: "SubscriptionName",
    thresholdExpression: "{ \"And\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }",
    monitorArnList: [],
    subscribers: [{
        address: "abc@def.com",
        type: aws_native.ce.AnomalySubscriptionSubscriberType.Email,
    }],
    frequency: aws_native.ce.AnomalySubscriptionFrequency.Daily,
});
Copy
import pulumi
import pulumi_aws_native as aws_native

anomaly_subscription = aws_native.ce.AnomalySubscription("anomalySubscription",
    subscription_name="SubscriptionName",
    threshold_expression="{ \"And\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }",
    monitor_arn_list=[],
    subscribers=[{
        "address": "abc@def.com",
        "type": aws_native.ce.AnomalySubscriptionSubscriberType.EMAIL,
    }],
    frequency=aws_native.ce.AnomalySubscriptionFrequency.DAILY)
Copy

Coming soon!

Example

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;

return await Deployment.RunAsync(() => 
{
    var anomalySubscription = new AwsNative.Ce.AnomalySubscription("anomalySubscription", new()
    {
        SubscriptionName = "SubscriptionName",
        ThresholdExpression = "{ \"And\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }",
        Frequency = AwsNative.Ce.AnomalySubscriptionFrequency.Daily,
        MonitorArnList = new[] {},
        Subscribers = new[]
        {
            new AwsNative.Ce.Inputs.AnomalySubscriptionSubscriberArgs
            {
                Type = AwsNative.Ce.AnomalySubscriptionSubscriberType.Email,
                Address = "abc@def.com",
            },
        },
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ce"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ce.NewAnomalySubscription(ctx, "anomalySubscription", &ce.AnomalySubscriptionArgs{
			SubscriptionName:    pulumi.String("SubscriptionName"),
			ThresholdExpression: pulumi.String("{ \"And\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }"),
			Frequency:           ce.AnomalySubscriptionFrequencyDaily,
			MonitorArnList:      pulumi.StringArray{},
			Subscribers: ce.AnomalySubscriptionSubscriberArray{
				&ce.AnomalySubscriptionSubscriberArgs{
					Type:    ce.AnomalySubscriptionSubscriberTypeEmail,
					Address: pulumi.String("abc@def.com"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";

const anomalySubscription = new aws_native.ce.AnomalySubscription("anomalySubscription", {
    subscriptionName: "SubscriptionName",
    thresholdExpression: "{ \"And\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }",
    frequency: aws_native.ce.AnomalySubscriptionFrequency.Daily,
    monitorArnList: [],
    subscribers: [{
        type: aws_native.ce.AnomalySubscriptionSubscriberType.Email,
        address: "abc@def.com",
    }],
});
Copy
import pulumi
import pulumi_aws_native as aws_native

anomaly_subscription = aws_native.ce.AnomalySubscription("anomalySubscription",
    subscription_name="SubscriptionName",
    threshold_expression="{ \"And\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }",
    frequency=aws_native.ce.AnomalySubscriptionFrequency.DAILY,
    monitor_arn_list=[],
    subscribers=[{
        "type": aws_native.ce.AnomalySubscriptionSubscriberType.EMAIL,
        "address": "abc@def.com",
    }])
Copy

Coming soon!

Example

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;

return await Deployment.RunAsync(() => 
{
    var anomalySubscription = new AwsNative.Ce.AnomalySubscription("anomalySubscription", new()
    {
        SubscriptionName = "SubscriptionName",
        ThresholdExpression = "{ \"Or\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }",
        MonitorArnList = new[] {},
        Subscribers = new[]
        {
            new AwsNative.Ce.Inputs.AnomalySubscriptionSubscriberArgs
            {
                Address = "abc@def.com",
                Type = AwsNative.Ce.AnomalySubscriptionSubscriberType.Email,
            },
        },
        Frequency = AwsNative.Ce.AnomalySubscriptionFrequency.Daily,
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ce"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ce.NewAnomalySubscription(ctx, "anomalySubscription", &ce.AnomalySubscriptionArgs{
			SubscriptionName:    pulumi.String("SubscriptionName"),
			ThresholdExpression: pulumi.String("{ \"Or\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }"),
			MonitorArnList:      pulumi.StringArray{},
			Subscribers: ce.AnomalySubscriptionSubscriberArray{
				&ce.AnomalySubscriptionSubscriberArgs{
					Address: pulumi.String("abc@def.com"),
					Type:    ce.AnomalySubscriptionSubscriberTypeEmail,
				},
			},
			Frequency: ce.AnomalySubscriptionFrequencyDaily,
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";

const anomalySubscription = new aws_native.ce.AnomalySubscription("anomalySubscription", {
    subscriptionName: "SubscriptionName",
    thresholdExpression: "{ \"Or\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }",
    monitorArnList: [],
    subscribers: [{
        address: "abc@def.com",
        type: aws_native.ce.AnomalySubscriptionSubscriberType.Email,
    }],
    frequency: aws_native.ce.AnomalySubscriptionFrequency.Daily,
});
Copy
import pulumi
import pulumi_aws_native as aws_native

anomaly_subscription = aws_native.ce.AnomalySubscription("anomalySubscription",
    subscription_name="SubscriptionName",
    threshold_expression="{ \"Or\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }",
    monitor_arn_list=[],
    subscribers=[{
        "address": "abc@def.com",
        "type": aws_native.ce.AnomalySubscriptionSubscriberType.EMAIL,
    }],
    frequency=aws_native.ce.AnomalySubscriptionFrequency.DAILY)
Copy

Coming soon!

Example

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AwsNative = Pulumi.AwsNative;

return await Deployment.RunAsync(() => 
{
    var anomalySubscription = new AwsNative.Ce.AnomalySubscription("anomalySubscription", new()
    {
        SubscriptionName = "SubscriptionName",
        ThresholdExpression = "{ \"Or\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }",
        Frequency = AwsNative.Ce.AnomalySubscriptionFrequency.Daily,
        MonitorArnList = new[] {},
        Subscribers = new[]
        {
            new AwsNative.Ce.Inputs.AnomalySubscriptionSubscriberArgs
            {
                Type = AwsNative.Ce.AnomalySubscriptionSubscriberType.Email,
                Address = "abc@def.com",
            },
        },
    });

});
Copy
package main

import (
	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ce"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := ce.NewAnomalySubscription(ctx, "anomalySubscription", &ce.AnomalySubscriptionArgs{
			SubscriptionName:    pulumi.String("SubscriptionName"),
			ThresholdExpression: pulumi.String("{ \"Or\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }"),
			Frequency:           ce.AnomalySubscriptionFrequencyDaily,
			MonitorArnList:      pulumi.StringArray{},
			Subscribers: ce.AnomalySubscriptionSubscriberArray{
				&ce.AnomalySubscriptionSubscriberArgs{
					Type:    ce.AnomalySubscriptionSubscriberTypeEmail,
					Address: pulumi.String("abc@def.com"),
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy

Coming soon!

import * as pulumi from "@pulumi/pulumi";
import * as aws_native from "@pulumi/aws-native";

const anomalySubscription = new aws_native.ce.AnomalySubscription("anomalySubscription", {
    subscriptionName: "SubscriptionName",
    thresholdExpression: "{ \"Or\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }",
    frequency: aws_native.ce.AnomalySubscriptionFrequency.Daily,
    monitorArnList: [],
    subscribers: [{
        type: aws_native.ce.AnomalySubscriptionSubscriberType.Email,
        address: "abc@def.com",
    }],
});
Copy
import pulumi
import pulumi_aws_native as aws_native

anomaly_subscription = aws_native.ce.AnomalySubscription("anomalySubscription",
    subscription_name="SubscriptionName",
    threshold_expression="{ \"Or\": [ { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_PERCENTAGE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"100\" ] } }, { \"Dimensions\": { \"Key\": \"ANOMALY_TOTAL_IMPACT_ABSOLUTE\", \"MatchOptions\": [ \"GREATER_THAN_OR_EQUAL\" ], \"Values\": [ \"200\" ] } } ] }",
    frequency=aws_native.ce.AnomalySubscriptionFrequency.DAILY,
    monitor_arn_list=[],
    subscribers=[{
        "type": aws_native.ce.AnomalySubscriptionSubscriberType.EMAIL,
        "address": "abc@def.com",
    }])
Copy

Coming soon!

Create AnomalySubscription Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new AnomalySubscription(name: string, args: AnomalySubscriptionArgs, opts?: CustomResourceOptions);
@overload
def AnomalySubscription(resource_name: str,
                        args: AnomalySubscriptionArgs,
                        opts: Optional[ResourceOptions] = None)

@overload
def AnomalySubscription(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        frequency: Optional[AnomalySubscriptionFrequency] = None,
                        monitor_arn_list: Optional[Sequence[str]] = None,
                        subscribers: Optional[Sequence[AnomalySubscriptionSubscriberArgs]] = None,
                        resource_tags: Optional[Sequence[AnomalySubscriptionResourceTagArgs]] = None,
                        subscription_name: Optional[str] = None,
                        threshold: Optional[float] = None,
                        threshold_expression: Optional[str] = None)
func NewAnomalySubscription(ctx *Context, name string, args AnomalySubscriptionArgs, opts ...ResourceOption) (*AnomalySubscription, error)
public AnomalySubscription(string name, AnomalySubscriptionArgs args, CustomResourceOptions? opts = null)
public AnomalySubscription(String name, AnomalySubscriptionArgs args)
public AnomalySubscription(String name, AnomalySubscriptionArgs args, CustomResourceOptions options)
type: aws-native:ce:AnomalySubscription
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. AnomalySubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. AnomalySubscriptionArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. AnomalySubscriptionArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. AnomalySubscriptionArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. AnomalySubscriptionArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

AnomalySubscription Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The AnomalySubscription resource accepts the following input properties:

Frequency This property is required. Pulumi.AwsNative.Ce.AnomalySubscriptionFrequency
The frequency at which anomaly reports are sent over email.
MonitorArnList This property is required. List<string>
A list of cost anomaly monitors.
Subscribers This property is required. List<Pulumi.AwsNative.Ce.Inputs.AnomalySubscriptionSubscriber>
A list of subscriber
ResourceTags List<Pulumi.AwsNative.Ce.Inputs.AnomalySubscriptionResourceTag>
Tags to assign to subscription.
SubscriptionName string
The name of the subscription.
Threshold double
The dollar value that triggers a notification if the threshold is exceeded.
ThresholdExpression string
An Expression object in JSON String format used to specify the anomalies that you want to generate alerts for.
Frequency This property is required. AnomalySubscriptionFrequency
The frequency at which anomaly reports are sent over email.
MonitorArnList This property is required. []string
A list of cost anomaly monitors.
Subscribers This property is required. []AnomalySubscriptionSubscriberArgs
A list of subscriber
ResourceTags []AnomalySubscriptionResourceTagArgs
Tags to assign to subscription.
SubscriptionName string
The name of the subscription.
Threshold float64
The dollar value that triggers a notification if the threshold is exceeded.
ThresholdExpression string
An Expression object in JSON String format used to specify the anomalies that you want to generate alerts for.
frequency This property is required. AnomalySubscriptionFrequency
The frequency at which anomaly reports are sent over email.
monitorArnList This property is required. List<String>
A list of cost anomaly monitors.
subscribers This property is required. List<AnomalySubscriptionSubscriber>
A list of subscriber
resourceTags List<AnomalySubscriptionResourTag>
Tags to assign to subscription.
subscriptionName String
The name of the subscription.
threshold Double
The dollar value that triggers a notification if the threshold is exceeded.
thresholdExpression String
An Expression object in JSON String format used to specify the anomalies that you want to generate alerts for.
frequency This property is required. AnomalySubscriptionFrequency
The frequency at which anomaly reports are sent over email.
monitorArnList This property is required. string[]
A list of cost anomaly monitors.
subscribers This property is required. AnomalySubscriptionSubscriber[]
A list of subscriber
resourceTags AnomalySubscriptionResourceTag[]
Tags to assign to subscription.
subscriptionName string
The name of the subscription.
threshold number
The dollar value that triggers a notification if the threshold is exceeded.
thresholdExpression string
An Expression object in JSON String format used to specify the anomalies that you want to generate alerts for.
frequency This property is required. AnomalySubscriptionFrequency
The frequency at which anomaly reports are sent over email.
monitor_arn_list This property is required. Sequence[str]
A list of cost anomaly monitors.
subscribers This property is required. Sequence[AnomalySubscriptionSubscriberArgs]
A list of subscriber
resource_tags Sequence[AnomalySubscriptionResourceTagArgs]
Tags to assign to subscription.
subscription_name str
The name of the subscription.
threshold float
The dollar value that triggers a notification if the threshold is exceeded.
threshold_expression str
An Expression object in JSON String format used to specify the anomalies that you want to generate alerts for.
frequency This property is required. "DAILY" | "IMMEDIATE" | "WEEKLY"
The frequency at which anomaly reports are sent over email.
monitorArnList This property is required. List<String>
A list of cost anomaly monitors.
subscribers This property is required. List<Property Map>
A list of subscriber
resourceTags List<Property Map>
Tags to assign to subscription.
subscriptionName String
The name of the subscription.
threshold Number
The dollar value that triggers a notification if the threshold is exceeded.
thresholdExpression String
An Expression object in JSON String format used to specify the anomalies that you want to generate alerts for.

Outputs

All input properties are implicitly available as output properties. Additionally, the AnomalySubscription resource produces the following output properties:

AccountId string
The accountId
Id string
The provider-assigned unique ID for this managed resource.
SubscriptionArn string
The AnomalySubscription Amazon Resource Name (ARN).
AccountId string
The accountId
Id string
The provider-assigned unique ID for this managed resource.
SubscriptionArn string
The AnomalySubscription Amazon Resource Name (ARN).
accountId String
The accountId
id String
The provider-assigned unique ID for this managed resource.
subscriptionArn String
The AnomalySubscription Amazon Resource Name (ARN).
accountId string
The accountId
id string
The provider-assigned unique ID for this managed resource.
subscriptionArn string
The AnomalySubscription Amazon Resource Name (ARN).
account_id str
The accountId
id str
The provider-assigned unique ID for this managed resource.
subscription_arn str
The AnomalySubscription Amazon Resource Name (ARN).
accountId String
The accountId
id String
The provider-assigned unique ID for this managed resource.
subscriptionArn String
The AnomalySubscription Amazon Resource Name (ARN).

Supporting Types

AnomalySubscriptionFrequency
, AnomalySubscriptionFrequencyArgs

Daily
DAILY
Immediate
IMMEDIATE
Weekly
WEEKLY
AnomalySubscriptionFrequencyDaily
DAILY
AnomalySubscriptionFrequencyImmediate
IMMEDIATE
AnomalySubscriptionFrequencyWeekly
WEEKLY
Daily
DAILY
Immediate
IMMEDIATE
Weekly
WEEKLY
Daily
DAILY
Immediate
IMMEDIATE
Weekly
WEEKLY
DAILY
DAILY
IMMEDIATE
IMMEDIATE
WEEKLY
WEEKLY
"DAILY"
DAILY
"IMMEDIATE"
IMMEDIATE
"WEEKLY"
WEEKLY

AnomalySubscriptionResourceTag
, AnomalySubscriptionResourceTagArgs

Key This property is required. string
The key name for the tag.
Value This property is required. string
The value for the tag.
Key This property is required. string
The key name for the tag.
Value This property is required. string
The value for the tag.
key This property is required. String
The key name for the tag.
value This property is required. String
The value for the tag.
key This property is required. string
The key name for the tag.
value This property is required. string
The value for the tag.
key This property is required. str
The key name for the tag.
value This property is required. str
The value for the tag.
key This property is required. String
The key name for the tag.
value This property is required. String
The value for the tag.

AnomalySubscriptionSubscriber
, AnomalySubscriptionSubscriberArgs

Address This property is required. string
The email address or SNS Topic Amazon Resource Name (ARN), depending on the Type .
Type This property is required. Pulumi.AwsNative.Ce.AnomalySubscriptionSubscriberType
The notification delivery channel.
Status Pulumi.AwsNative.Ce.AnomalySubscriptionSubscriberStatus
Indicates if the subscriber accepts the notifications.
Address This property is required. string
The email address or SNS Topic Amazon Resource Name (ARN), depending on the Type .
Type This property is required. AnomalySubscriptionSubscriberType
The notification delivery channel.
Status AnomalySubscriptionSubscriberStatus
Indicates if the subscriber accepts the notifications.
address This property is required. String
The email address or SNS Topic Amazon Resource Name (ARN), depending on the Type .
type This property is required. AnomalySubscriptionSubscriberType
The notification delivery channel.
status AnomalySubscriptionSubscriberStatus
Indicates if the subscriber accepts the notifications.
address This property is required. string
The email address or SNS Topic Amazon Resource Name (ARN), depending on the Type .
type This property is required. AnomalySubscriptionSubscriberType
The notification delivery channel.
status AnomalySubscriptionSubscriberStatus
Indicates if the subscriber accepts the notifications.
address This property is required. str
The email address or SNS Topic Amazon Resource Name (ARN), depending on the Type .
type This property is required. AnomalySubscriptionSubscriberType
The notification delivery channel.
status AnomalySubscriptionSubscriberStatus
Indicates if the subscriber accepts the notifications.
address This property is required. String
The email address or SNS Topic Amazon Resource Name (ARN), depending on the Type .
type This property is required. "EMAIL" | "SNS"
The notification delivery channel.
status "CONFIRMED" | "DECLINED"
Indicates if the subscriber accepts the notifications.

AnomalySubscriptionSubscriberStatus
, AnomalySubscriptionSubscriberStatusArgs

Confirmed
CONFIRMED
Declined
DECLINED
AnomalySubscriptionSubscriberStatusConfirmed
CONFIRMED
AnomalySubscriptionSubscriberStatusDeclined
DECLINED
Confirmed
CONFIRMED
Declined
DECLINED
Confirmed
CONFIRMED
Declined
DECLINED
CONFIRMED
CONFIRMED
DECLINED
DECLINED
"CONFIRMED"
CONFIRMED
"DECLINED"
DECLINED

AnomalySubscriptionSubscriberType
, AnomalySubscriptionSubscriberTypeArgs

Email
EMAIL
Sns
SNS
AnomalySubscriptionSubscriberTypeEmail
EMAIL
AnomalySubscriptionSubscriberTypeSns
SNS
Email
EMAIL
Sns
SNS
Email
EMAIL
Sns
SNS
EMAIL
EMAIL
SNS
SNS
"EMAIL"
EMAIL
"SNS"
SNS

Package Details

Repository
AWS Native pulumi/pulumi-aws-native
License
Apache-2.0

We recommend new projects start with resources from the AWS provider.

AWS Cloud Control v1.27.0 published on Monday, Apr 14, 2025 by Pulumi