Cost Category
Provides a CE Cost Category.
Example Usage
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()
.rules(
CostCategoryRuleArgs.builder()
.rule(CostCategoryRuleRuleArgs.builder()
.dimension(CostCategoryRuleRuleDimensionArgs.builder()
.key("LINKED_ACCOUNT_NAME")
.matchOptions("ENDS_WITH")
.values("-prod")
.build())
.build())
.value("production")
.build(),
CostCategoryRuleArgs.builder()
.rule(CostCategoryRuleRuleArgs.builder()
.dimension(CostCategoryRuleRuleDimensionArgs.builder()
.key("LINKED_ACCOUNT_NAME")
.matchOptions("ENDS_WITH")
.values("-stg")
.build())
.build())
.value("staging")
.build(),
CostCategoryRuleArgs.builder()
.rule(CostCategoryRuleRuleArgs.builder()
.dimension(CostCategoryRuleRuleDimensionArgs.builder()
.key("LINKED_ACCOUNT_NAME")
.matchOptions("ENDS_WITH")
.values("-dev")
.build())
.build())
.value("testing")
.build())
.ruleVersion("CostCategoryExpression.v1")
.build());
}
}
Content copied to clipboard
Import
Using pulumi import
, import aws_ce_cost_category
using the id. For example:
$ pulumi import aws:costexplorer/costCategory:CostCategory example costCategoryARN
Content 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