Package com.pulumi.aws.costexplorer
Class CostCategory
- java.lang.Object
-
- com.pulumi.resources.Resource
-
- com.pulumi.resources.CustomResource
-
- com.pulumi.aws.costexplorer.CostCategory
-
public class CostCategory extends com.pulumi.resources.CustomResourceProvides a CE Cost Category. ## Example Usage
## Import ### Identity Schema #### Required - `arn` (String) ARN of the Cost Explorer cost category. Using `pulumi import`, import `aws.costexplorer.CostCategory` using the ID. For example: ```sh $ pulumi import aws:costexplorer/costCategory:CostCategory example costCategoryARN ```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.ArrayList; import java.util.Arrays; 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") .values("-prod") .matchOptions("ENDS_WITH") .build()) .build()) .value("production") .build(), CostCategoryRuleArgs.builder() .rule(CostCategoryRuleRuleArgs.builder() .dimension(CostCategoryRuleRuleDimensionArgs.builder() .key("LINKED_ACCOUNT_NAME") .values("-stg") .matchOptions("ENDS_WITH") .build()) .build()) .value("staging") .build(), CostCategoryRuleArgs.builder() .rule(CostCategoryRuleRuleArgs.builder() .dimension(CostCategoryRuleRuleDimensionArgs.builder() .key("LINKED_ACCOUNT_NAME") .values("-dev") .matchOptions("ENDS_WITH") .build()) .build()) .value("testing") .build()) .name("NAME") .ruleVersion("CostCategoryExpression.v1") .build()); } }
-
-
Constructor Summary
Constructors Constructor Description CostCategory(java.lang.String name)CostCategory(java.lang.String name, CostCategoryArgs args)CostCategory(java.lang.String name, CostCategoryArgs args, com.pulumi.resources.CustomResourceOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.pulumi.core.Output<java.lang.String>arn()com.pulumi.core.Output<java.util.Optional<java.lang.String>>defaultValue()com.pulumi.core.Output<java.lang.String>effectiveEnd()com.pulumi.core.Output<java.lang.String>effectiveStart()static CostCategoryget(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, CostCategoryState state, com.pulumi.resources.CustomResourceOptions options)Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.com.pulumi.core.Output<java.lang.String>name()com.pulumi.core.Output<java.util.List<CostCategoryRule>>rules()com.pulumi.core.Output<java.lang.String>ruleVersion()com.pulumi.core.Output<java.util.Optional<java.util.List<CostCategorySplitChargeRule>>>splitChargeRules()com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>>tags()com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>>tagsAll()
-
-
-
Constructor Detail
-
CostCategory
public CostCategory(java.lang.String name)
- Parameters:
name- The _unique_ name of the resulting resource.
-
CostCategory
public CostCategory(java.lang.String name, CostCategoryArgs args)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.
-
CostCategory
public CostCategory(java.lang.String name, CostCategoryArgs args, @Nullable com.pulumi.resources.CustomResourceOptions options)- Parameters:
name- The _unique_ name of the resulting resource.args- The arguments to use to populate this resource's properties.options- A bag of options that control this resource's behavior.
-
-
Method Detail
-
arn
public com.pulumi.core.Output<java.lang.String> arn()
- Returns:
- ARN of the cost category.
-
defaultValue
public com.pulumi.core.Output<java.util.Optional<java.lang.String>> defaultValue()
- Returns:
- Default value for the cost category.
-
effectiveEnd
public com.pulumi.core.Output<java.lang.String> effectiveEnd()
- Returns:
- Effective end data of your Cost Category.
-
effectiveStart
public com.pulumi.core.Output<java.lang.String> effectiveStart()
- Returns:
- 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`.
-
name
public com.pulumi.core.Output<java.lang.String> name()
- Returns:
- Unique name for the Cost Category.
-
ruleVersion
public com.pulumi.core.Output<java.lang.String> ruleVersion()
- Returns:
- Rule schema version in this particular Cost Category. The following arguments are optional:
-
rules
public com.pulumi.core.Output<java.util.List<CostCategoryRule>> rules()
- Returns:
- Configuration block for the Cost Category rules used to categorize costs. See below.
-
splitChargeRules
public com.pulumi.core.Output<java.util.Optional<java.util.List<CostCategorySplitChargeRule>>> splitChargeRules()
- Returns:
- Configuration block for the split charge rules used to allocate your charges between your Cost Category values. See below.
-
tags
public com.pulumi.core.Output<java.util.Optional<java.util.Map<java.lang.String,java.lang.String>>> tags()
- Returns:
- Key-value mapping of resource tags. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level.
-
tagsAll
public com.pulumi.core.Output<java.util.Map<java.lang.String,java.lang.String>> tagsAll()
- Returns:
- A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block.
-
get
public static CostCategory get(java.lang.String name, com.pulumi.core.Output<java.lang.String> id, @Nullable CostCategoryState state, @Nullable com.pulumi.resources.CustomResourceOptions options)
Get an existing Host resource's state with the given name, ID, and optional extra properties used to qualify the lookup.- Parameters:
name- The _unique_ name of the resulting resource.id- The _unique_ provider ID of the resource to lookup.state-options- Optional settings to control the behavior of the CustomResource.
-
-