Skip to content

aws.ce.describe_cost_category_definition

Example SQL Queries

SELECT * FROM
aws.ce.describe_cost_category_definition
WHERE
"cost_category_arn" = 'VALUE';

Description

Returns the name, Amazon Resource Name (ARN), rules, definition, and effective dates of a Cost Category that's defined in the account.

You have the option to use EffectiveOn to return a Cost Category that's active on a specific date. If there's no EffectiveOn specified, you see a Cost Category that's effective on the current date. If Cost Category is still effective, EffectiveEnd is omitted in the response.

Table Definition

Column NameColumn Data Type
cost_category_arn Required Input Column

The unique identifier for your Cost Category.

VARCHAR
effective_on Input Column

The date when the Cost Category was effective.

VARCHAR
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

cost_category

The structure of Cost Categories. This includes detailed metadata and the set of rules for the CostCategory object.

STRUCT(
"cost_category_arn" VARCHAR,
"effective_start" VARCHAR,
"effective_end" VARCHAR,
"name" VARCHAR,
"rule_version" VARCHAR,
"rules" STRUCT(
"value" VARCHAR,
"rule" STRUCT(
"dimensions" STRUCT(
"key" VARCHAR,
"values" VARCHAR[],
"match_options" VARCHAR[]
),
"tags" STRUCT(
"key" VARCHAR,
"values" VARCHAR[],
"match_options" VARCHAR[]
),
"cost_categories" STRUCT(
"key" VARCHAR,
"values" VARCHAR[],
"match_options" VARCHAR[]
)
),
"inherited_value" STRUCT(
"dimension_name" VARCHAR,
"dimension_key" VARCHAR
),
"type" VARCHAR
)[],
"split_charge_rules" STRUCT(
"source" VARCHAR,
"targets" VARCHAR[],
"method" VARCHAR,
"parameters" STRUCT(
"type" VARCHAR,
"values" VARCHAR[]
)[]
)[],
"processing_status" STRUCT(
"component" VARCHAR,
"status" VARCHAR
)[],
"default_value" VARCHAR
)
Show child fields
cost_category.cost_category_arn

The unique identifier for your Cost Category.

cost_category.default_value

The default value for the cost category.

cost_category.effective_end

The effective end date of your Cost Category.

cost_category.effective_start

The effective start date of your Cost Category.

cost_category.name

The unique name of the Cost Category.

cost_category.processing_status[]
Show child fields
cost_category.processing_status[].component

The Cost Management product name of the applied status.

cost_category.processing_status[].status

The process status for a specific cost category.

cost_category.rule_version

The rule schema version in this particular Cost Category.

cost_category.rules[]
Show child fields
cost_category.rules[].inherited_value

The value the line item is categorized as if the line item contains the matched dimension.

Show child fields
cost_category.rules[].inherited_value.dimension_key

The key to extract cost category values.

cost_category.rules[].inherited_value.dimension_name

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.

cost_category.rules[].rule

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, LINKED_ACCOUNT_NAME, REGION, and USAGE_TYPE.

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.

Show child fields
cost_category.rules[].rule.cost_categories

The filter that's based on CostCategory values.

Show child fields
cost_category.rules[].rule.cost_categories.key

The unique name of the Cost Category.

cost_category.rules[].rule.cost_categories.match_options[]
cost_category.rules[].rule.cost_categories.values[]
cost_category.rules[].rule.dimensions

The specific Dimension to use for Expression.

Show child fields
cost_category.rules[].rule.dimensions.key

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.

Not all dimensions are supported in each API. Refer to the documentation for each specific API to see what is supported.

LINK_ACCOUNT_NAME and SERVICE_CODE can only be used in CostCategoryRule.

ANOMALY_TOTAL_IMPACT_ABSOLUTE and ANOMALY_TOTAL_IMPACT_PERCENTAGE can only be used in AnomalySubscriptions.

cost_category.rules[].rule.dimensions.match_options[]
cost_category.rules[].rule.dimensions.values[]
cost_category.rules[].rule.tags

The specific Tag to use for Expression.

Show child fields
cost_category.rules[].rule.tags.key

The key for the tag.

cost_category.rules[].rule.tags.match_options[]
cost_category.rules[].rule.tags.values[]
cost_category.rules[].type

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.rules[].value

The default value for the cost category.

cost_category.split_charge_rules[]
Show child fields
cost_category.split_charge_rules[].method

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.

cost_category.split_charge_rules[].parameters[]
Show child fields
cost_category.split_charge_rules[].parameters[].type

The parameter type.

cost_category.split_charge_rules[].parameters[].values[]
cost_category.split_charge_rules[].source

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.

cost_category.split_charge_rules[].targets[]