aws.costexplorer.cost_category
**Autogenerated function**
Deletes a cost category.
Args:
name(Text): An Idem name of the resource.
resource_id(Text, Optional): Cost Category ARN to identify the resource. Idem automatically considers this resource being absent if this field is not specified.
Returns:
Dict[str, Any]
Examples:
.. code-block:: sls
resource_is_absent:
aws.costexplorer.cost_category.absent:
- name: value
- resource_id: value
**Autogenerated function**
Describe the resource in a way that can be recreated/managed with the corresponding "present" function
Returns a list of aws cost categories.
Returns:
Dict[str, Any]
Examples:
.. code-block:: bash
$ idem describe aws.costexplorer.cost_category
**Autogenerated function**
Creates a new Cost Category with the requested name and rules.
Args:
name(Text): The unique name of the Cost Category.
rules(List[Dict[str, Any]]): The Cost Category rules used to categorize costs. For more information, see CostCategoryRule.
* Value (str, optional): The default value for the cost category.
* Rule (Dict[str, Any], optional): An Expression object used to categorize costs. This supports dimensions, tags, and nested
expressions. Currently the only dimensions supported are LINKED_ACCOUNT, SERVICE_CODE,
RECORD_TYPE, and LINKED_ACCOUNT_NAME. Root level OR isn't supported. We recommend that you
create a separate rule instead. RECORD_TYPE is a dimension used for Cost Explorer APIs, and is
also supported for Cost Category expressions. This dimension uses different terms, depending on
whether you're using the console or API/JSON editor. For a detailed comparison, see Term
Comparisons in the Billing and Cost Management User Guide.
* Or (List[Dict[str, Any]], optional): Return results that match either Dimension object.
* Or (List[Any], optional): Return results that match either Dimension object.
* And (List[Any], optional): Return results that match both Dimension objects.
* Not (Any, optional): Return results that don't match a Dimension object.
* Dimensions (Dict[str, Any], optional): The specific Dimension to use for Expression.
* Key (str, optional): The names of the metadata types that you can use to filter and group your results. For example,
AZ returns a list of Availability Zones.
* Values (List[str], optional): The metadata values that you can use to filter and group your results. You can use
GetDimensionValues to find specific values.
* MatchOptions (List[str], optional): The match options that you can use to filter your results. MatchOptions is only applicable for
actions related to Cost Category. The default values for MatchOptions are EQUALS and
CASE_SENSITIVE.
* Tags (Dict[str, Any], optional): The specific Tag to use for Expression.
* Key (str, optional): The key for the tag.
* Values (List[str], optional): The specific value of the tag.
* MatchOptions (List[str], optional): The match options that you can use to filter your results. MatchOptions is only applicable for
actions related to Cost Category. The default values for MatchOptions are EQUALS and
CASE_SENSITIVE.
* CostCategories (Dict[str, Any], optional): The filter that's based on CostCategory values.
* Key (str, optional): The unique name of the Cost Category.
* Values (List[str], optional): The specific value of the Cost Category.
* MatchOptions (List[str], optional): The match options that you can use to filter your results. MatchOptions is only applicable for
actions related to cost category. The default values for MatchOptions is EQUALS and
CASE_SENSITIVE.
* And (List[Any], optional): Return results that match both Dimension objects.
* Not (Any, optional): Return results that don't match a Dimension object.
* Dimensions (Any, optional): The specific Dimension to use for Expression.
* Tags (Any, optional): The specific Tag to use for Expression.
* CostCategories (Any, optional): The filter that's based on CostCategory values.
* InheritedValue (Dict[str, Any], optional): The value the line item is categorized as if the line item contains the matched dimension.
* DimensionName (str, optional): The name of the dimension that's used to group costs. If you specify LINKED_ACCOUNT_NAME, the
cost category value is based on account name. If you specify TAG, the cost category value is
based on the value of the specified tag key.
* DimensionKey (str, optional): The key to extract cost category values.
* Type (str, optional): You can define the CostCategoryRule rule type as either REGULAR or INHERITED_VALUE. The
INHERITED_VALUE rule type adds the flexibility to define a rule that dynamically inherits the
cost category value. This value is from the dimension value that's defined by
CostCategoryInheritedValueDimension. For example, suppose that you want to costs to be
dynamically grouped based on the value of a specific tag key. First, choose an inherited value
rule type, and then choose the tag dimension and specify the tag key to use.
cost_category_name(Text): Name of Cost Category.
rule_version(Text): The rule schema version in this particular Cost Category.
resource_id(Text, Optional): Cost Category ARN to identify the resource.
split_charge_rules(List[Dict[str, Any]], optional): The split charge rules used to allocate your charges between your Cost Category values. Defaults to None.
* Source (str): The Cost Category value that you want to split. That value can't be used as a source or a target
in other split charge rules. To indicate uncategorized costs, you can use an empty string as the
source.
* Targets (List[str]): The Cost Category values that you want to split costs across. These values can't be used as a
source in other split charge rules.
* Method (str): The method that's used to define how to split your source costs across your targets.
Proportional - Allocates charges across your targets based on the proportional weighted cost of
each target. Fixed - Allocates charges across your targets based on your defined allocation
percentage. >Even - Allocates costs evenly across all targets.
* Parameters (List[Dict[str, Any]], optional): The parameters for a split charge method. This is only required for the FIXED method.
* Type (str): The parameter type.
* Values (List[str]): The parameter values.
default_value(Text, Optional): The default value for the cost category.
tags (Dict[str, Any]]): Each tag consists of a key and a value, and each key must be unique for the resource.
Request Syntax:
[monitor-resource-id]:
aws.costexplorer.cost_category.present:
- resource_id: 'string'
- tags: 'dict'
- cost_category_name: 'string'
- effective_start: 'string'
- rules:
- Rule:
Dimensions:
Key: 'string'
MatchOptions:
- EQUALS
Values:
- 'string'
Type: 'string'
Value: 'string'
- split_charge_rules:
- Method: 'string'
Parameters:
- Type: 'string'
Values:
- 'string'
- 'string'
Source: 'string'
Targets:
- 'string'
- processing_status:
- Component: 'string'
Status: 'string'
- default_value: 'string'
Returns:
Dict[str, str]
Examples:
.. code-block:: sls
arn:aws:ce::1234567891012:costcategory/4e9662f0-5533-4fdf-8224-9bb9f82d0a39:
aws.costexplorer.cost_category.present:
- resource_id: arn:aws:ce::1234567891012:costcategory/4e9662f0-5533-4fdf-8224-9bb9f82d0a39
- tags:
name: test_category
- cost_category_name: test_category
- effective_start: '2022-06-01T00:00:00Z'
- rule_version: CostCategoryExpression.v1
- rules:
- Rule:
Dimensions:
Key: LINKED_ACCOUNT
MatchOptions:
- EQUALS
Values:
- '107488843946'
Type: REGULAR
Value: Alpha
- Rule:
Dimensions:
Key: LINKED_ACCOUNT
MatchOptions:
- EQUALS
Values:
- 011922870716
Type: REGULAR
Value: Beta
- Rule:
Dimensions:
Key: LINKED_ACCOUNT
MatchOptions:
- EQUALS
Values:
- '332986752459'
Type: REGULAR
Value: Gamma
- split_charge_rules:
- Method: FIXED
Parameters:
- Type: ALLOCATION_PERCENTAGES
Values:
- '40'
- '60'
Source: Alpha
Targets:
- Beta
- Gamma
- processing_status:
- Component: COST_EXPLORER
Status: PROCESSING
- default_value: Other
Full plugin documentation is available on the Idem documentation site - aws.costexplorer.cost_category .