AWS::CE::CostCategory
The AWS::CE::CostCategory
resource creates groupings of cost that you can use
across products in the AWS Billing and Cost Management console, such as Cost Explorer and AWS Budgets. For more information, see Managing Your Costs with
Cost Categories in the
AWS Billing and Cost Management User
Guide.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::CE::CostCategory", "Properties" : { "DefaultValue" :
String
, "Name" :String
, "Rules" :String
, "RuleVersion" :String
, "SplitChargeRules" :String
} }
YAML
Type: AWS::CE::CostCategory Properties: DefaultValue:
String
Name:String
Rules:String
RuleVersion:String
SplitChargeRules:String
Properties
DefaultValue
-
The default value for the cost category.
Required: No
Type: String
Minimum:
1
Maximum:
50
Update requires: No interruption
Name
-
The unique name of the Cost Category.
Required: Yes
Type: String
Minimum:
1
Maximum:
50
Update requires: Replacement
Rules
-
The array of CostCategoryRule in JSON array format.
Note
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.
Required: Yes
Type: String
Minimum:
1
Maximum:
500
Update requires: No interruption
RuleVersion
-
The rule schema version in this particular Cost Category.
Required: Yes
Type: String
Allowed values:
CostCategoryExpression.v1
Update requires: No interruption
SplitChargeRules
-
The split charge rules that are used to allocate your charges between your Cost Category values.
Required: No
Type: String
Minimum:
1
Maximum:
10
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the Arn of the Cost Category that is created by the
template.
For more information about using the Ref
function, see Ref
.
Fn::GetAtt
The Fn::GetAtt
intrinsic function returns a value for a specified attribute
of this type. The following are the available attributes.
For more information about using the Fn::GetAtt
intrinsic function, see
Fn::GetAtt.
Arn
-
The unique identifier for your Cost Category.
EffectiveStart
-
The Cost Category's effective start date.
Examples
Cost Category Department with two rules
The following example creates a Cost Category "Department" with two rules.
JSON
{ "CostCategoryDepartment": { "Type": "AWS::CE::CostCategory", "Properties": { "Name": "Department", "RuleVersion": "CostCategoryExpression.v1", "Rules": "[ { \"Value\":\"Engineering\", \"Rule\": { \"Dimensions\": { \"Key\": \"LINKED_ACCOUNT\", \"Values\": [ \"111111111111\" ] } } }, { \"Value\": \"Marketing\", \"Rule\": { \"Dimensions\": { \"Key\": \"LINKED_ACCOUNT\", \"Values\": [ \"222222222222\" ] } } } ]" } } }
YAML
CostCategoryDepartment: Type: 'AWS::CE::CostCategory' Properties: Name: Department RuleVersion: CostCategoryExpression.v1 Rules: ' [ { "Value":"Engineering", "Rule": { "Dimensions": { "Key": "LINKED_ACCOUNT", "Values": [ "111111111111" ] } } }, { "Value":"Marketing", "Rule": { "Dimensions": { "Key": "LINKED_ACCOUNT", "Values": [ "222222222222" ] } } ]'
See also
-
CostCategory in the AWS Billing and Cost Management API Reference.