UpdateCostCategoryDefinition - AWS Billing and Cost Management

UpdateCostCategoryDefinition

Updates an existing Cost Category. Changes made to the Cost Category rules will be used to categorize the current month’s expenses and future expenses. This won’t change categorization for the previous months.

Request Syntax

{ "CostCategoryArn": "string", "DefaultValue": "string", "EffectiveStart": "string", "Rules": [ { "InheritedValue": { "DimensionKey": "string", "DimensionName": "string" }, "Rule": { "And": [ "Expression" ], "CostCategories": { "Key": "string", "MatchOptions": [ "string" ], "Values": [ "string" ] }, "Dimensions": { "Key": "string", "MatchOptions": [ "string" ], "Values": [ "string" ] }, "Not": "Expression", "Or": [ "Expression" ], "Tags": { "Key": "string", "MatchOptions": [ "string" ], "Values": [ "string" ] } }, "Type": "string", "Value": "string" } ], "RuleVersion": "string", "SplitChargeRules": [ { "Method": "string", "Parameters": [ { "Type": "string", "Values": [ "string" ] } ], "Source": "string", "Targets": [ "string" ] } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

CostCategoryArn

The unique identifier for your Cost Category.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: arn:aws[-a-z0-9]*:[a-z0-9]+:[-a-z0-9]*:[0-9]{12}:[-a-zA-Z0-9/:_]+

Required: Yes

DefaultValue

The default value for the cost category.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 50.

Pattern: ^(?! )[\p{L}\p{N}\p{Z}-_]*(?<! )$

Required: No

EffectiveStart

The Cost Category's effective start date. It can only be a billing start date (first day of the month). If the date isn't provided, it's the first day of the current month. Dates can't be before the previous twelve months, or in the future.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 25.

Pattern: ^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(([+-]\d\d:\d\d)|Z)$

Required: No

Rules

The Expression object used to categorize costs. For more information, see CostCategoryRule .

Type: Array of CostCategoryRule objects

Array Members: Minimum number of 1 item. Maximum number of 500 items.

Required: Yes

RuleVersion

The rule schema version in this particular Cost Category.

Type: String

Valid Values: CostCategoryExpression.v1

Required: Yes

SplitChargeRules

The split charge rules used to allocate your charges between your Cost Category values.

Type: Array of CostCategorySplitChargeRule objects

Array Members: Minimum number of 1 item. Maximum number of 10 items.

Required: No

Response Syntax

{ "CostCategoryArn": "string", "EffectiveStart": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

CostCategoryArn

The unique identifier for your Cost Category.

Type: String

Length Constraints: Minimum length of 20. Maximum length of 2048.

Pattern: arn:aws[-a-z0-9]*:[a-z0-9]+:[-a-z0-9]*:[0-9]{12}:[-a-zA-Z0-9/:_]+

EffectiveStart

The Cost Category's effective start date. It can only be a billing start date (first day of the month).

Type: String

Length Constraints: Minimum length of 20. Maximum length of 25.

Pattern: ^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(([+-]\d\d:\d\d)|Z)$

Errors

For information about the errors that are common to all actions, see Common Errors.

LimitExceededException

You made too many calls in a short period of time. Try again later.

HTTP Status Code: 400

ResourceNotFoundException

The specified ARN in the request doesn't exist.

HTTP Status Code: 400

ServiceQuotaExceededException

You've reached the limit on the number of resources you can create, or exceeded the size of an individual resource.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: