Returns the 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 is active on a specific date. If there is no EffectiveOn
specified, you’ll see a Cost Category that is effective on the current date. If Cost Category is still effective, EffectiveEnd
is omitted in the response.
See also: AWS API Documentation
See ‘aws help’ for descriptions of global parameters.
describe-cost-category-definition
--cost-category-arn <value>
[--effective-on <value>]
[--cli-input-json | --cli-input-yaml]
[--generate-cli-skeleton <value>]
--cost-category-arn
(string)
The unique identifier for your Cost Category.
--effective-on
(string)
The date when the Cost Category was effective.
--cli-input-json
| --cli-input-yaml
(string)
Reads arguments from the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton
. If other arguments are provided on the command line, those values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally. This may not be specified along with --cli-input-yaml
.
--generate-cli-skeleton
(string)
Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input
, prints a sample input JSON that can be used as an argument for --cli-input-json
. Similarly, if provided yaml-input
it will print a sample input YAML that can be used with --cli-input-yaml
. If provided with the value output
, it validates the command inputs and returns a sample output JSON for that command.
See ‘aws help’ for descriptions of global parameters.
CostCategory -> (structure)
The structure of Cost Categories. This includes detailed metadata and the set of rules for the
CostCategory
object.CostCategoryArn -> (string)
The unique identifier for your Cost Category.
EffectiveStart -> (string)
The Cost Category’s effective start date.
EffectiveEnd -> (string)
The Cost Category’s effective end date.
Name -> (string)
The unique name of the Cost Category.
RuleVersion -> (string)
The rule schema version in this particular Cost Category.
Rules -> (list)
Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
(structure)
Rules are processed in order. If there are multiple rules that match the line item, then the first rule to match is used to determine that Cost Category value.
Value -> (string)
The value a line item will be categorized as, if it matches the rule.
Rule -> (structure)
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
, andLINKED_ACCOUNT_NAME
.Root level
OR
is not 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 AWS Billing and Cost Management User Guide .Or -> (list)
Return results that match either
Dimension
object.(structure)
Use
Expression
to filter by cost or by usage. There are two patterns:
Simple dimension values - You can set the dimension name and values for the filters that you plan to use. For example, you can filter for
REGION==us-east-1 OR REGION==us-west-1
. ForGetRightsizingRecommendation
, the Region is a full name (for example,REGION==US East (N. Virginia)
. TheExpression
example looks like:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } }
The list of dimension values are OR’d together to retrieve cost or usage data. You can createExpression
andDimensionValues
objects using eitherwith*
methods orset*
methods in multiple lines.Compound dimension values with logical operations - You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. This allows you to filter on more advanced options. For example, you can filter on((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. TheExpression
for that looks like this:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Note
Because each
Expression
can have only one operator, the service returns an error if more than one is specified. The following example shows anExpression
object that creates an error.
{ "And": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
Note
For the
GetRightsizingRecommendation
action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren’t supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
.For the
GetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR are not supported. Dimensions are limited toLINKED_ACCOUNT
.Or -> (list)
Return results that match either
Dimension
object.( … recursive … )
And -> (list)
Return results that match both
Dimension
objects.( … recursive … )
( … recursive … )Dimensions -> (structure)
The specific
Dimension
to use forExpression
.Key -> (string)
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)
The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.(string)
MatchOptions -> (list)
The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.(string)
Tags -> (structure)
The specific
Tag
to use forExpression
.Key -> (string)
The key for the tag.
Values -> (list)
The specific value of the tag.
(string)
MatchOptions -> (list)
The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.(string)
CostCategories -> (structure)
The filter based on
CostCategory
values.Key -> (string)
The unique name of the Cost Category.
Values -> (list)
The specific value of the Cost Category.
(string)
MatchOptions -> (list)
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
isEQUALS
andCASE_SENSITIVE
.(string)
And -> (list)
Return results that match both
Dimension
objects.(structure)
Use
Expression
to filter by cost or by usage. There are two patterns:
Simple dimension values - You can set the dimension name and values for the filters that you plan to use. For example, you can filter for
REGION==us-east-1 OR REGION==us-west-1
. ForGetRightsizingRecommendation
, the Region is a full name (for example,REGION==US East (N. Virginia)
. TheExpression
example looks like:{ "Dimensions": { "Key": "REGION", "Values": [ "us-east-1", “us-west-1” ] } }
The list of dimension values are OR’d together to retrieve cost or usage data. You can createExpression
andDimensionValues
objects using eitherwith*
methods orset*
methods in multiple lines.Compound dimension values with logical operations - You can use multiple
Expression
types and the logical operatorsAND/OR/NOT
to create a list of one or moreExpression
objects. This allows you to filter on more advanced options. For example, you can filter on((REGION == us-east-1 OR REGION == us-west-1) OR (TAG.Type == Type1)) AND (USAGE_TYPE != DataTransfer)
. TheExpression
for that looks like this:{ "And": [ {"Or": [ {"Dimensions": { "Key": "REGION", "Values": [ "us-east-1", "us-west-1" ] }}, {"Tags": { "Key": "TagName", "Values": ["Value1"] } } ]}, {"Not": {"Dimensions": { "Key": "USAGE_TYPE", "Values": ["DataTransfer"] }}} ] }
Note
Because each
Expression
can have only one operator, the service returns an error if more than one is specified. The following example shows anExpression
object that creates an error.
{ "And": [ ... ], "DimensionValues": { "Dimension": "USAGE_TYPE", "Values": [ "DataTransfer" ] } }
Note
For the
GetRightsizingRecommendation
action, a combination of OR and NOT is not supported. OR is not supported between different dimensions, or dimensions and tags. NOT operators aren’t supported. Dimensions are also limited toLINKED_ACCOUNT
,REGION
, orRIGHTSIZING_TYPE
.For the
GetReservationPurchaseRecommendation
action, only NOT is supported. AND and OR are not supported. Dimensions are limited toLINKED_ACCOUNT
.Or -> (list)
Return results that match either
Dimension
object.( … recursive … )
And -> (list)
Return results that match both
Dimension
objects.( … recursive … )
( … recursive … )Dimensions -> (structure)
The specific
Dimension
to use forExpression
.Key -> (string)
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)
The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.(string)
MatchOptions -> (list)
The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.(string)
Tags -> (structure)
The specific
Tag
to use forExpression
.Key -> (string)
The key for the tag.
Values -> (list)
The specific value of the tag.
(string)
MatchOptions -> (list)
The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.(string)
CostCategories -> (structure)
The filter based on
CostCategory
values.Key -> (string)
The unique name of the Cost Category.
Values -> (list)
The specific value of the Cost Category.
(string)
MatchOptions -> (list)
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
isEQUALS
andCASE_SENSITIVE
.(string)
Not -> (structure)
Return results that don’t match a
Dimension
object.Or -> (list)
Return results that match either
Dimension
object.( … recursive … )
And -> (list)
Return results that match both
Dimension
objects.( … recursive … )
( … recursive … )Dimensions -> (structure)
The specific
Dimension
to use forExpression
.Key -> (string)
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)
The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.(string)
MatchOptions -> (list)
The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.(string)
Tags -> (structure)
The specific
Tag
to use forExpression
.Key -> (string)
The key for the tag.
Values -> (list)
The specific value of the tag.
(string)
MatchOptions -> (list)
The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.(string)
CostCategories -> (structure)
The filter based on
CostCategory
values.Key -> (string)
The unique name of the Cost Category.
Values -> (list)
The specific value of the Cost Category.
(string)
MatchOptions -> (list)
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
isEQUALS
andCASE_SENSITIVE
.(string)
Dimensions -> (structure)
The specific
Dimension
to use forExpression
.Key -> (string)
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)
The metadata values that you can use to filter and group your results. You can use
GetDimensionValues
to find specific values.(string)
MatchOptions -> (list)
The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.(string)
Tags -> (structure)
The specific
Tag
to use forExpression
.Key -> (string)
The key for the tag.
Values -> (list)
The specific value of the tag.
(string)
MatchOptions -> (list)
The match options that you can use to filter your results.
MatchOptions
is only applicable for actions related to Cost Category. The default values forMatchOptions
areEQUALS
andCASE_SENSITIVE
.(string)
CostCategories -> (structure)
The filter based on
CostCategory
values.Key -> (string)
The unique name of the Cost Category.
Values -> (list)
The specific value of the Cost Category.
(string)
MatchOptions -> (list)
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
isEQUALS
andCASE_SENSITIVE
.(string)
ProcessingStatus -> (list)
The list of processing statuses for Cost Management products for a specific cost category.
(structure)
The list of processing statuses for Cost Management products for a specific cost category.
Component -> (string)
The Cost Management product name of the applied status.
Status -> (string)
The process status for a specific cost category.