Cost Category
    Provides a CE Cost Category.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const test = new aws.costexplorer.CostCategory("test", {
    name: "NAME",
    ruleVersion: "CostCategoryExpression.v1",
    rules: [
        {
            value: "production",
            rule: {
                dimension: {
                    key: "LINKED_ACCOUNT_NAME",
                    values: ["-prod"],
                    matchOptions: ["ENDS_WITH"],
                },
            },
        },
        {
            value: "staging",
            rule: {
                dimension: {
                    key: "LINKED_ACCOUNT_NAME",
                    values: ["-stg"],
                    matchOptions: ["ENDS_WITH"],
                },
            },
        },
        {
            value: "testing",
            rule: {
                dimension: {
                    key: "LINKED_ACCOUNT_NAME",
                    values: ["-dev"],
                    matchOptions: ["ENDS_WITH"],
                },
            },
        },
    ],
});Content copied to clipboard
import pulumi
import pulumi_aws as aws
test = aws.costexplorer.CostCategory("test",
    name="NAME",
    rule_version="CostCategoryExpression.v1",
    rules=[
        aws.costexplorer.CostCategoryRuleArgs(
            value="production",
            rule=aws.costexplorer.CostCategoryRuleRuleArgs(
                dimension=aws.costexplorer.CostCategoryRuleRuleDimensionArgs(
                    key="LINKED_ACCOUNT_NAME",
                    values=["-prod"],
                    match_options=["ENDS_WITH"],
                ),
            ),
        ),
        aws.costexplorer.CostCategoryRuleArgs(
            value="staging",
            rule=aws.costexplorer.CostCategoryRuleRuleArgs(
                dimension=aws.costexplorer.CostCategoryRuleRuleDimensionArgs(
                    key="LINKED_ACCOUNT_NAME",
                    values=["-stg"],
                    match_options=["ENDS_WITH"],
                ),
            ),
        ),
        aws.costexplorer.CostCategoryRuleArgs(
            value="testing",
            rule=aws.costexplorer.CostCategoryRuleRuleArgs(
                dimension=aws.costexplorer.CostCategoryRuleRuleDimensionArgs(
                    key="LINKED_ACCOUNT_NAME",
                    values=["-dev"],
                    match_options=["ENDS_WITH"],
                ),
            ),
        ),
    ])Content copied to clipboard
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
    var test = new Aws.CostExplorer.CostCategory("test", new()
    {
        Name = "NAME",
        RuleVersion = "CostCategoryExpression.v1",
        Rules = new[]
        {
            new Aws.CostExplorer.Inputs.CostCategoryRuleArgs
            {
                Value = "production",
                Rule = new Aws.CostExplorer.Inputs.CostCategoryRuleRuleArgs
                {
                    Dimension = new Aws.CostExplorer.Inputs.CostCategoryRuleRuleDimensionArgs
                    {
                        Key = "LINKED_ACCOUNT_NAME",
                        Values = new[]
                        {
                            "-prod",
                        },
                        MatchOptions = new[]
                        {
                            "ENDS_WITH",
                        },
                    },
                },
            },
            new Aws.CostExplorer.Inputs.CostCategoryRuleArgs
            {
                Value = "staging",
                Rule = new Aws.CostExplorer.Inputs.CostCategoryRuleRuleArgs
                {
                    Dimension = new Aws.CostExplorer.Inputs.CostCategoryRuleRuleDimensionArgs
                    {
                        Key = "LINKED_ACCOUNT_NAME",
                        Values = new[]
                        {
                            "-stg",
                        },
                        MatchOptions = new[]
                        {
                            "ENDS_WITH",
                        },
                    },
                },
            },
            new Aws.CostExplorer.Inputs.CostCategoryRuleArgs
            {
                Value = "testing",
                Rule = new Aws.CostExplorer.Inputs.CostCategoryRuleRuleArgs
                {
                    Dimension = new Aws.CostExplorer.Inputs.CostCategoryRuleRuleDimensionArgs
                    {
                        Key = "LINKED_ACCOUNT_NAME",
                        Values = new[]
                        {
                            "-dev",
                        },
                        MatchOptions = new[]
                        {
                            "ENDS_WITH",
                        },
                    },
                },
            },
        },
    });
});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.NewCostCategory(ctx, "test", &costexplorer.CostCategoryArgs{
			Name:        pulumi.String("NAME"),
			RuleVersion: pulumi.String("CostCategoryExpression.v1"),
			Rules: costexplorer.CostCategoryRuleArray{
				&costexplorer.CostCategoryRuleArgs{
					Value: pulumi.String("production"),
					Rule: &costexplorer.CostCategoryRuleRuleArgs{
						Dimension: &costexplorer.CostCategoryRuleRuleDimensionArgs{
							Key: pulumi.String("LINKED_ACCOUNT_NAME"),
							Values: pulumi.StringArray{
								pulumi.String("-prod"),
							},
							MatchOptions: pulumi.StringArray{
								pulumi.String("ENDS_WITH"),
							},
						},
					},
				},
				&costexplorer.CostCategoryRuleArgs{
					Value: pulumi.String("staging"),
					Rule: &costexplorer.CostCategoryRuleRuleArgs{
						Dimension: &costexplorer.CostCategoryRuleRuleDimensionArgs{
							Key: pulumi.String("LINKED_ACCOUNT_NAME"),
							Values: pulumi.StringArray{
								pulumi.String("-stg"),
							},
							MatchOptions: pulumi.StringArray{
								pulumi.String("ENDS_WITH"),
							},
						},
					},
				},
				&costexplorer.CostCategoryRuleArgs{
					Value: pulumi.String("testing"),
					Rule: &costexplorer.CostCategoryRuleRuleArgs{
						Dimension: &costexplorer.CostCategoryRuleRuleDimensionArgs{
							Key: pulumi.String("LINKED_ACCOUNT_NAME"),
							Values: pulumi.StringArray{
								pulumi.String("-dev"),
							},
							MatchOptions: pulumi.StringArray{
								pulumi.String("ENDS_WITH"),
							},
						},
					},
				},
			},
		})
		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.CostCategory;
import com.pulumi.aws.costexplorer.CostCategoryArgs;
import com.pulumi.aws.costexplorer.inputs.CostCategoryRuleArgs;
import com.pulumi.aws.costexplorer.inputs.CostCategoryRuleRuleArgs;
import com.pulumi.aws.costexplorer.inputs.CostCategoryRuleRuleDimensionArgs;
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 CostCategory("test", CostCategoryArgs.builder()
            .name("NAME")
            .ruleVersion("CostCategoryExpression.v1")
            .rules(
                CostCategoryRuleArgs.builder()
                    .value("production")
                    .rule(CostCategoryRuleRuleArgs.builder()
                        .dimension(CostCategoryRuleRuleDimensionArgs.builder()
                            .key("LINKED_ACCOUNT_NAME")
                            .values("-prod")
                            .matchOptions("ENDS_WITH")
                            .build())
                        .build())
                    .build(),
                CostCategoryRuleArgs.builder()
                    .value("staging")
                    .rule(CostCategoryRuleRuleArgs.builder()
                        .dimension(CostCategoryRuleRuleDimensionArgs.builder()
                            .key("LINKED_ACCOUNT_NAME")
                            .values("-stg")
                            .matchOptions("ENDS_WITH")
                            .build())
                        .build())
                    .build(),
                CostCategoryRuleArgs.builder()
                    .value("testing")
                    .rule(CostCategoryRuleRuleArgs.builder()
                        .dimension(CostCategoryRuleRuleDimensionArgs.builder()
                            .key("LINKED_ACCOUNT_NAME")
                            .values("-dev")
                            .matchOptions("ENDS_WITH")
                            .build())
                        .build())
                    .build())
            .build());
    }
}Content copied to clipboard
resources:
  test:
    type: aws:costexplorer:CostCategory
    properties:
      name: NAME
      ruleVersion: CostCategoryExpression.v1
      rules:
        - value: production
          rule:
            dimension:
              key: LINKED_ACCOUNT_NAME
              values:
                - -prod
              matchOptions:
                - ENDS_WITH
        - value: staging
          rule:
            dimension:
              key: LINKED_ACCOUNT_NAME
              values:
                - -stg
              matchOptions:
                - ENDS_WITH
        - value: testing
          rule:
            dimension:
              key: LINKED_ACCOUNT_NAME
              values:
                - -dev
              matchOptions:
                - ENDS_WITHContent copied to clipboard
Import
Using pulumi import, import aws_ce_cost_category using the id. For example:
$ pulumi import aws:costexplorer/costCategory:CostCategory example costCategoryARNContent copied to clipboard
Properties
Link copied to clipboard
                Link copied to clipboard
                Link copied to clipboard
                The Cost Category's effective start date. It can only be a billing start date (first day of the month). If the date isn't provided, it's the first day of the current month. Dates can't be before the previous twelve months, or in the future. For example 2022-11-01T00:00:00Z. The following arguments are optional:
Link copied to clipboard