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

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi

aws-native.ce.AnomalySubscription

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 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,
        });
    
    });
    
    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
    	})
    }
    

    Coming soon!

    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=[aws_native.ce.AnomalySubscriptionSubscriberArgs(
            address="abc@def.com",
            type=aws_native.ce.AnomalySubscriptionSubscriberType.EMAIL,
        )],
        frequency=aws_native.ce.AnomalySubscriptionFrequency.DAILY)
    
    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,
    });
    

    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",
                },
            },
        });
    
    });
    
    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
    	})
    }
    

    Coming soon!

    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=[aws_native.ce.AnomalySubscriptionSubscriberArgs(
            type=aws_native.ce.AnomalySubscriptionSubscriberType.EMAIL,
            address="abc@def.com",
        )])
    
    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",
        }],
    });
    

    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,
        });
    
    });
    
    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
    	})
    }
    

    Coming soon!

    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=[aws_native.ce.AnomalySubscriptionSubscriberArgs(
            address="abc@def.com",
            type=aws_native.ce.AnomalySubscriptionSubscriberType.EMAIL,
        )],
        frequency=aws_native.ce.AnomalySubscriptionFrequency.DAILY)
    
    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,
    });
    

    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",
                },
            },
        });
    
    });
    
    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
    	})
    }
    

    Coming soon!

    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=[aws_native.ce.AnomalySubscriptionSubscriberArgs(
            type=aws_native.ce.AnomalySubscriptionSubscriberType.EMAIL,
            address="abc@def.com",
        )])
    
    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",
        }],
    });
    

    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,
        });
    
    });
    
    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
    	})
    }
    

    Coming soon!

    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=[aws_native.ce.AnomalySubscriptionSubscriberArgs(
            address="abc@def.com",
            type=aws_native.ce.AnomalySubscriptionSubscriberType.EMAIL,
        )],
        frequency=aws_native.ce.AnomalySubscriptionFrequency.DAILY)
    
    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,
    });
    

    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",
                },
            },
        });
    
    });
    
    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
    	})
    }
    

    Coming soon!

    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=[aws_native.ce.AnomalySubscriptionSubscriberArgs(
            type=aws_native.ce.AnomalySubscriptionSubscriberType.EMAIL,
            address="abc@def.com",
        )])
    
    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",
        }],
    });
    

    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 string
    The unique name of the resource.
    args AnomalySubscriptionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args 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 string
    The unique name of the resource.
    args AnomalySubscriptionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AnomalySubscriptionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AnomalySubscriptionArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    const anomalySubscriptionResource = new aws_native.ce.AnomalySubscription("anomalySubscriptionResource", {
        frequency: aws_native.ce.AnomalySubscriptionFrequency.Daily,
        monitorArnList: ["string"],
        subscribers: [{
            address: "string",
            type: aws_native.ce.AnomalySubscriptionSubscriberType.Email,
            status: aws_native.ce.AnomalySubscriptionSubscriberStatus.Confirmed,
        }],
        resourceTags: [{
            key: "string",
            value: "string",
        }],
        subscriptionName: "string",
        threshold: 0,
        thresholdExpression: "string",
    });
    
    Coming soon!
    

    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

    The AnomalySubscription resource accepts the following input properties:

    Frequency Pulumi.AwsNative.Ce.AnomalySubscriptionFrequency
    The frequency at which anomaly reports are sent over email.
    MonitorArnList List<string>
    A list of cost anomaly monitors.
    Subscribers 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 AnomalySubscriptionFrequency
    The frequency at which anomaly reports are sent over email.
    MonitorArnList []string
    A list of cost anomaly monitors.
    Subscribers []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 AnomalySubscriptionFrequency
    The frequency at which anomaly reports are sent over email.
    monitorArnList List<String>
    A list of cost anomaly monitors.
    subscribers 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 AnomalySubscriptionFrequency
    The frequency at which anomaly reports are sent over email.
    monitorArnList string[]
    A list of cost anomaly monitors.
    subscribers 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 AnomalySubscriptionFrequency
    The frequency at which anomaly reports are sent over email.
    monitor_arn_list Sequence[str]
    A list of cost anomaly monitors.
    subscribers 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 "DAILY" | "IMMEDIATE" | "WEEKLY"
    The frequency at which anomaly reports are sent over email.
    monitorArnList List<String>
    A list of cost anomaly monitors.
    subscribers 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
    AccountId string
    The accountId
    Id string
    The provider-assigned unique ID for this managed resource.
    SubscriptionArn string
    accountId String
    The accountId
    id String
    The provider-assigned unique ID for this managed resource.
    subscriptionArn String
    accountId string
    The accountId
    id string
    The provider-assigned unique ID for this managed resource.
    subscriptionArn string
    account_id str
    The accountId
    id str
    The provider-assigned unique ID for this managed resource.
    subscription_arn str
    accountId String
    The accountId
    id String
    The provider-assigned unique ID for this managed resource.
    subscriptionArn String

    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 string
    The key name for the tag.
    Value string
    The value for the tag.
    Key string
    The key name for the tag.
    Value string
    The value for the tag.
    key String
    The key name for the tag.
    value String
    The value for the tag.
    key string
    The key name for the tag.
    value string
    The value for the tag.
    key str
    The key name for the tag.
    value str
    The value for the tag.
    key String
    The key name for the tag.
    value String
    The value for the tag.

    AnomalySubscriptionSubscriber, AnomalySubscriptionSubscriberArgs

    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
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi