describe-cost-category-definition | Returns the full definition of a cost category using the DescribeCostCategoryDefinition API.
Cost categories group AWS costs using rule-based expressions that match line items by
dimensions (SERVICE, LINKED_ACCOUNT, USAGE_TYPE), resource tags, or other cost category
values. Each matched line item is assigned a category value such as "Production" or
"Development". Rules can be REGULAR (explicit match) or INHERITED_VALUE (dynamic value
from a tag key or account name). A DefaultValue catches costs that do not match any rule.
The tool returns a CostCategory object containing:
- Name (1-50 chars, unique per account, case-sensitive), CostCategoryArn
- RuleVersion (always "CostCategoryExpression.v1")
- Rules array with Value, Rule expression (Dimensions/Tags/CostCategories with And/Or/Not), and Type
- DefaultValue, SplitChargeRules (PROPORTIONAL, FIXED, or EVEN allocation methods)
- EffectiveStart/EffectiveEnd (null if still active)
- ProcessingStatus: APPLIED (rules reflected in data) or PROCESSING (backfill in progress)
Linked accounts can describe cost categories from their management account.
Required parameters:
- cost_category_arn: ARN of the cost category (arn:aws:ce::<account_id>:costcategory/<uuid>).
Use list-cost-category-definitions to discover ARNs.
Optional parameters:
- effective_on: ISO 8601 datetime (e.g., 2024-01-01T00:00:00Z) to retrieve the version
active at that time. Defaults to the current version.
Example 1 - Get current definition:
{"cost_category_arn": "arn:aws:ce::123456789012:costcategory/abcd-1234"}
Example 2 - Get historical version:
{"cost_category_arn": "arn:aws:ce::123456789012:costcategory/abcd-1234", "effective_on": "2024-06-01T00:00:00Z"} |
list-cost-category-definitions | Lists all cost category definitions in the account using the ListCostCategoryDefinitions API.
Returns lightweight references for each cost category, not full rule definitions. Use
describe-cost-category-definition with the returned ARN to get the complete rule set.
The tool returns CostCategoryReference objects containing:
- CostCategoryArn, Name (unique, case-sensitive), NumberOfRules
- EffectiveStart, EffectiveEnd (null if current)
- DefaultValue, Values (all category values defined in the rules)
- ProcessingStatus: APPLIED or PROCESSING
- SupportedResourceTypes
You can filter and paginate with:
- effective_on: ISO 8601 datetime to return only categories active at that time.
Defaults to current date.
- supported_resource_types: JSON array to filter by resource type support.
Valid values: "billing:rispgroupsharing", "billing:billingview"
Example: '["billing:billingview"]'
Returns only categories supporting all specified types.
- max_results: Results per page (1-100, default 20)
- max_pages: Max pages to auto-paginate through
Limits: 50 cost categories per management account, 500 rules per category (API),
100 rules per category (console), 10 split charge rules per category.
Example 1 - List all current categories: {}
Example 2 - List categories active on a date: {"effective_on": "2024-06-01T00:00:00Z"}
Example 3 - Filter by billing view support: {"supported_resource_types": "["billing:billingview"]"} |