Anomaly Monitor Args
    data class AnomalyMonitorArgs(val monitorDimension: Output<String>? = null, val monitorSpecification: Output<String>? = null, val monitorType: Output<String>? = null, val name: Output<String>? = null, val tags: Output<Map<String, String>>? = null) : ConvertibleToJava<AnomalyMonitorArgs> 
Provides a CE Anomaly Monitor.
Example Usage
There are two main types of a Cost Anomaly Monitor: DIMENSIONAL and CUSTOM.
Dimensional Example
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const serviceMonitor = new aws.costexplorer.AnomalyMonitor("service_monitor", {
    name: "AWSServiceMonitor",
    monitorType: "DIMENSIONAL",
    monitorDimension: "SERVICE",
});Content copied to clipboard
import pulumi
import pulumi_aws as aws
service_monitor = aws.costexplorer.AnomalyMonitor("service_monitor",
    name="AWSServiceMonitor",
    monitor_type="DIMENSIONAL",
    monitor_dimension="SERVICE")Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
    var serviceMonitor = new Aws.CostExplorer.AnomalyMonitor("service_monitor", new()
    {
        Name = "AWSServiceMonitor",
        MonitorType = "DIMENSIONAL",
        MonitorDimension = "SERVICE",
    });
});Content copied to clipboard
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/costexplorer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := costexplorer.NewAnomalyMonitor(ctx, "service_monitor", &costexplorer.AnomalyMonitorArgs{
			Name:             pulumi.String("AWSServiceMonitor"),
			MonitorType:      pulumi.String("DIMENSIONAL"),
			MonitorDimension: pulumi.String("SERVICE"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.costexplorer.AnomalyMonitor;
import com.pulumi.aws.costexplorer.AnomalyMonitorArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var serviceMonitor = new AnomalyMonitor("serviceMonitor", AnomalyMonitorArgs.builder()
            .name("AWSServiceMonitor")
            .monitorType("DIMENSIONAL")
            .monitorDimension("SERVICE")
            .build());
    }
}Content copied to clipboard
resources:
  serviceMonitor:
    type: aws:costexplorer:AnomalyMonitor
    name: service_monitor
    properties:
      name: AWSServiceMonitor
      monitorType: DIMENSIONAL
      monitorDimension: SERVICEContent copied to clipboard
Custom Example
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.costexplorer.AnomalyMonitor("test", {
    name: "AWSCustomAnomalyMonitor",
    monitorType: "CUSTOM",
    monitorSpecification: JSON.stringify({
        And: undefined,
        CostCategories: undefined,
        Dimensions: undefined,
        Not: undefined,
        Or: undefined,
        Tags: {
            Key: "CostCenter",
            MatchOptions: undefined,
            Values: ["10000"],
        },
    }),
});Content copied to clipboard
import pulumi
import json
import pulumi_aws as aws
test = aws.costexplorer.AnomalyMonitor("test",
    name="AWSCustomAnomalyMonitor",
    monitor_type="CUSTOM",
    monitor_specification=json.dumps({
        "And": None,
        "CostCategories": None,
        "Dimensions": None,
        "Not": None,
        "Or": None,
        "Tags": {
            "Key": "CostCenter",
            "MatchOptions": None,
            "Values": ["10000"],
        },
    }))Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
    var test = new Aws.CostExplorer.AnomalyMonitor("test", new()
    {
        Name = "AWSCustomAnomalyMonitor",
        MonitorType = "CUSTOM",
        MonitorSpecification = JsonSerializer.Serialize(new Dictionary<string, object?>
        {
            ["And"] = null,
            ["CostCategories"] = null,
            ["Dimensions"] = null,
            ["Not"] = null,
            ["Or"] = null,
            ["Tags"] = new Dictionary<string, object?>
            {
                ["Key"] = "CostCenter",
                ["MatchOptions"] = null,
                ["Values"] = new[]
                {
                    "10000",
                },
            },
        }),
    });
});Content copied to clipboard
package main
import (
	"encoding/json"
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/costexplorer"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		tmpJSON0, err := json.Marshal(map[string]interface{}{
			"And":            nil,
			"CostCategories": nil,
			"Dimensions":     nil,
			"Not":            nil,
			"Or":             nil,
			"Tags": map[string]interface{}{
				"Key":          "CostCenter",
				"MatchOptions": nil,
				"Values": []string{
					"10000",
				},
			},
		})
		if err != nil {
			return err
		}
		json0 := string(tmpJSON0)
		_, err = costexplorer.NewAnomalyMonitor(ctx, "test", &costexplorer.AnomalyMonitorArgs{
			Name:                 pulumi.String("AWSCustomAnomalyMonitor"),
			MonitorType:          pulumi.String("CUSTOM"),
			MonitorSpecification: pulumi.String(json0),
		})
		if err != nil {
			return err
		}
		return nil
	})
}Content copied to clipboard
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.costexplorer.AnomalyMonitor;
import com.pulumi.aws.costexplorer.AnomalyMonitorArgs;
import static com.pulumi.codegen.internal.Serialization.*;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        var test = new AnomalyMonitor("test", AnomalyMonitorArgs.builder()
            .name("AWSCustomAnomalyMonitor")
            .monitorType("CUSTOM")
            .monitorSpecification(serializeJson(
                jsonObject(
                    jsonProperty("And", null),
                    jsonProperty("CostCategories", null),
                    jsonProperty("Dimensions", null),
                    jsonProperty("Not", null),
                    jsonProperty("Or", null),
                    jsonProperty("Tags", jsonObject(
                        jsonProperty("Key", "CostCenter"),
                        jsonProperty("MatchOptions", null),
                        jsonProperty("Values", jsonArray("10000"))
                    ))
                )))
            .build());
    }
}Content copied to clipboard
resources:
  test:
    type: aws:costexplorer:AnomalyMonitor
    properties:
      name: AWSCustomAnomalyMonitor
      monitorType: CUSTOM
      monitorSpecification:
        fn::toJSON:
          And: null
          CostCategories: null
          Dimensions: null
          Not: null
          Or: null
          Tags:
            Key: CostCenter
            MatchOptions: null
            Values:
              - '10000'Content copied to clipboard
Import
Using pulumi import, import aws_ce_anomaly_monitor using the id. For example:
$ pulumi import aws:costexplorer/anomalyMonitor:AnomalyMonitor example costAnomalyMonitorARNContent copied to clipboard
Constructors
Functions
Properties
Link copied to clipboard
                Link copied to clipboard
                A valid JSON representation for the Expression object.