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
aws_ce_cost_category
can be imported using the id, e.g.
$ pulumi import aws:costexplorer/costCategory:CostCategory example costCategoryARN
Content copied to clipboard