2026/01/22 - AWS Budgets - 1 updated api methods
Changes Add Budget FilterExpression and Metrics fields to DescribeBudgetPerformanceHistory to support more granular filtering options.
{'BudgetPerformanceHistory': {'FilterExpression': {'And': [()],
'CostCategories': {'Key': 'string',
'MatchOptions': ['EQUALS '
'| '
'ABSENT '
'| '
'STARTS_WITH '
'| '
'ENDS_WITH '
'| '
'CONTAINS '
'| '
'GREATER_THAN_OR_EQUAL '
'| '
'CASE_SENSITIVE '
'| '
'CASE_INSENSITIVE'],
'Values': ['string']},
'Dimensions': {'Key': 'AZ | '
'INSTANCE_TYPE '
'| '
'LINKED_ACCOUNT '
'| '
'LINKED_ACCOUNT_NAME '
'| '
'OPERATION '
'| '
'PURCHASE_TYPE '
'| '
'REGION '
'| '
'SERVICE '
'| '
'SERVICE_CODE '
'| '
'USAGE_TYPE '
'| '
'USAGE_TYPE_GROUP '
'| '
'RECORD_TYPE '
'| '
'OPERATING_SYSTEM '
'| '
'TENANCY '
'| '
'SCOPE '
'| '
'PLATFORM '
'| '
'SUBSCRIPTION_ID '
'| '
'LEGAL_ENTITY_NAME '
'| '
'INVOICING_ENTITY '
'| '
'DEPLOYMENT_OPTION '
'| '
'DATABASE_ENGINE '
'| '
'CACHE_ENGINE '
'| '
'INSTANCE_TYPE_FAMILY '
'| '
'BILLING_ENTITY '
'| '
'RESERVATION_ID '
'| '
'RESOURCE_ID '
'| '
'RIGHTSIZING_TYPE '
'| '
'SAVINGS_PLANS_TYPE '
'| '
'SAVINGS_PLAN_ARN '
'| '
'PAYMENT_OPTION '
'| '
'RESERVATION_MODIFIED '
'| '
'TAG_KEY '
'| '
'COST_CATEGORY_NAME',
'MatchOptions': ['EQUALS '
'| '
'ABSENT '
'| '
'STARTS_WITH '
'| '
'ENDS_WITH '
'| '
'CONTAINS '
'| '
'GREATER_THAN_OR_EQUAL '
'| '
'CASE_SENSITIVE '
'| '
'CASE_INSENSITIVE'],
'Values': ['string']},
'Not': (),
'Or': [()],
'Tags': {'Key': 'string',
'MatchOptions': ['EQUALS '
'| '
'ABSENT '
'| '
'STARTS_WITH '
'| '
'ENDS_WITH '
'| '
'CONTAINS '
'| '
'GREATER_THAN_OR_EQUAL '
'| '
'CASE_SENSITIVE '
'| '
'CASE_INSENSITIVE'],
'Values': ['string']}},
'Metrics': ['BlendedCost | UnblendedCost | '
'AmortizedCost | NetUnblendedCost | '
'NetAmortizedCost | UsageQuantity | '
'NormalizedUsageAmount | Hours']}}
Describes the history for DAILY, MONTHLY, and QUARTERLY budgets. Budget history isn't available for ANNUAL budgets.
See also: AWS API Documentation
Request Syntax
client.describe_budget_performance_history(
AccountId='string',
BudgetName='string',
TimePeriod={
'Start': datetime(2015, 1, 1),
'End': datetime(2015, 1, 1)
},
MaxResults=123,
NextToken='string'
)
string
[REQUIRED]
The account ID of the user. It's a 12-digit number.
string
[REQUIRED]
A string that represents the budget name. The ":" and "" characters, and the "/action/" substring, aren't allowed.
dict
Retrieves how often the budget went into an ALARM state for the specified time period.
Start (datetime) --
The start date for a budget. If you created your budget and didn't specify a start date, Amazon Web Services defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, ANNUALLY, or CUSTOM). For example, if you created your budget on January 24, 2018, chose DAILY, and didn't set a start date, Amazon Web Services set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, Amazon Web Services set your start date to 01/01/18 00:00 UTC. The defaults are the same for the Billing and Cost Management console and the API.
You can change your start date with the UpdateBudget operation.
End (datetime) --
The end date for a budget. If you didn't specify an end date, Amazon Web Services set your end date to 06/15/87 00:00 UTC. The defaults are the same for the Billing and Cost Management console and the API.
After the end date, Amazon Web Services deletes the budget and all the associated notifications and subscribers. You can change your end date with the UpdateBudget operation.
integer
An integer that represents how many entries a paginated response contains. The maximum is 100.
string
A generic string.
dict
Response Syntax
{
'BudgetPerformanceHistory': {
'BudgetName': 'string',
'BudgetType': 'USAGE'|'COST'|'RI_UTILIZATION'|'RI_COVERAGE'|'SAVINGS_PLANS_UTILIZATION'|'SAVINGS_PLANS_COVERAGE',
'CostFilters': {
'string': [
'string',
]
},
'CostTypes': {
'IncludeTax': True|False,
'IncludeSubscription': True|False,
'UseBlended': True|False,
'IncludeRefund': True|False,
'IncludeCredit': True|False,
'IncludeUpfront': True|False,
'IncludeRecurring': True|False,
'IncludeOtherSubscription': True|False,
'IncludeSupport': True|False,
'IncludeDiscount': True|False,
'UseAmortized': True|False
},
'TimeUnit': 'DAILY'|'MONTHLY'|'QUARTERLY'|'ANNUALLY'|'CUSTOM',
'BillingViewArn': 'string',
'BudgetedAndActualAmountsList': [
{
'BudgetedAmount': {
'Amount': 'string',
'Unit': 'string'
},
'ActualAmount': {
'Amount': 'string',
'Unit': 'string'
},
'TimePeriod': {
'Start': datetime(2015, 1, 1),
'End': datetime(2015, 1, 1)
}
},
],
'FilterExpression': {
'Or': [
{'... recursive ...'},
],
'And': [
{'... recursive ...'},
],
'Not': {'... recursive ...'},
'Dimensions': {
'Key': 'AZ'|'INSTANCE_TYPE'|'LINKED_ACCOUNT'|'LINKED_ACCOUNT_NAME'|'OPERATION'|'PURCHASE_TYPE'|'REGION'|'SERVICE'|'SERVICE_CODE'|'USAGE_TYPE'|'USAGE_TYPE_GROUP'|'RECORD_TYPE'|'OPERATING_SYSTEM'|'TENANCY'|'SCOPE'|'PLATFORM'|'SUBSCRIPTION_ID'|'LEGAL_ENTITY_NAME'|'INVOICING_ENTITY'|'DEPLOYMENT_OPTION'|'DATABASE_ENGINE'|'CACHE_ENGINE'|'INSTANCE_TYPE_FAMILY'|'BILLING_ENTITY'|'RESERVATION_ID'|'RESOURCE_ID'|'RIGHTSIZING_TYPE'|'SAVINGS_PLANS_TYPE'|'SAVINGS_PLAN_ARN'|'PAYMENT_OPTION'|'RESERVATION_MODIFIED'|'TAG_KEY'|'COST_CATEGORY_NAME',
'Values': [
'string',
],
'MatchOptions': [
'EQUALS'|'ABSENT'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'GREATER_THAN_OR_EQUAL'|'CASE_SENSITIVE'|'CASE_INSENSITIVE',
]
},
'Tags': {
'Key': 'string',
'Values': [
'string',
],
'MatchOptions': [
'EQUALS'|'ABSENT'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'GREATER_THAN_OR_EQUAL'|'CASE_SENSITIVE'|'CASE_INSENSITIVE',
]
},
'CostCategories': {
'Key': 'string',
'Values': [
'string',
],
'MatchOptions': [
'EQUALS'|'ABSENT'|'STARTS_WITH'|'ENDS_WITH'|'CONTAINS'|'GREATER_THAN_OR_EQUAL'|'CASE_SENSITIVE'|'CASE_INSENSITIVE',
]
}
},
'Metrics': [
'BlendedCost'|'UnblendedCost'|'AmortizedCost'|'NetUnblendedCost'|'NetAmortizedCost'|'UsageQuantity'|'NormalizedUsageAmount'|'Hours',
]
},
'NextToken': 'string'
}
Response Structure
(dict) --
BudgetPerformanceHistory (dict) --
The history of how often the budget has gone into an ALARM state.
For DAILY budgets, the history saves the state of the budget for the last 60 days. For MONTHLY budgets, the history saves the state of the budget for the current month plus the last 12 months. For QUARTERLY budgets, the history saves the state of the budget for the last four quarters.
BudgetName (string) --
A string that represents the budget name. The ":" and "" characters, and the "/action/" substring, aren't allowed.
BudgetType (string) --
The type of a budget. It must be one of the following types:
COST, USAGE, RI_UTILIZATION, RI_COVERAGE, SAVINGS_PLANS_UTILIZATION, or SAVINGS_PLANS_COVERAGE.
CostFilters (dict) --
The history of the cost filters for a budget during the specified time period.
(string) --
A generic string.
(list) --
(string) --
CostTypes (dict) --
The history of the cost types for a budget during the specified time period.
IncludeTax (boolean) --
Specifies whether a budget includes taxes.
The default value is true.
IncludeSubscription (boolean) --
Specifies whether a budget includes subscriptions.
The default value is true.
UseBlended (boolean) --
Specifies whether a budget uses a blended rate.
The default value is false.
IncludeRefund (boolean) --
Specifies whether a budget includes refunds.
The default value is true.
IncludeCredit (boolean) --
Specifies whether a budget includes credits.
The default value is true.
IncludeUpfront (boolean) --
Specifies whether a budget includes upfront RI costs.
The default value is true.
IncludeRecurring (boolean) --
Specifies whether a budget includes recurring fees such as monthly RI fees.
The default value is true.
IncludeOtherSubscription (boolean) --
Specifies whether a budget includes non-RI subscription costs.
The default value is true.
IncludeSupport (boolean) --
Specifies whether a budget includes support subscription fees.
The default value is true.
IncludeDiscount (boolean) --
Specifies whether a budget includes discounts.
The default value is true.
UseAmortized (boolean) --
Specifies whether a budget uses the amortized rate.
The default value is false.
TimeUnit (string) --
The time unit of the budget, such as MONTHLY or QUARTERLY.
BillingViewArn (string) --
The Amazon Resource Name (ARN) that uniquely identifies a specific billing view. The ARN is used to specify which particular billing view you want to interact with or retrieve information from when making API calls related to Amazon Web Services Billing and Cost Management features. The BillingViewArn can be retrieved by calling the ListBillingViews API.
BudgetedAndActualAmountsList (list) --
A list of amounts of cost or usage that you created budgets for, which are compared to your actual costs or usage.
(dict) --
The amount of cost or usage that you created the budget for, compared to your actual costs or usage.
BudgetedAmount (dict) --
The amount of cost or usage that you created the budget for.
Amount (string) --
The cost or usage amount that's associated with a budget forecast, actual spend, or budget threshold.
Unit (string) --
The unit of measurement that's used for the budget forecast, actual spend, or budget threshold.
ActualAmount (dict) --
Your actual costs or usage for a budget period.
Amount (string) --
The cost or usage amount that's associated with a budget forecast, actual spend, or budget threshold.
Unit (string) --
The unit of measurement that's used for the budget forecast, actual spend, or budget threshold.
TimePeriod (dict) --
The time period that's covered by this budget comparison.
Start (datetime) --
The start date for a budget. If you created your budget and didn't specify a start date, Amazon Web Services defaults to the start of your chosen time period (DAILY, MONTHLY, QUARTERLY, ANNUALLY, or CUSTOM). For example, if you created your budget on January 24, 2018, chose DAILY, and didn't set a start date, Amazon Web Services set your start date to 01/24/18 00:00 UTC. If you chose MONTHLY, Amazon Web Services set your start date to 01/01/18 00:00 UTC. The defaults are the same for the Billing and Cost Management console and the API.
You can change your start date with the UpdateBudget operation.
End (datetime) --
The end date for a budget. If you didn't specify an end date, Amazon Web Services set your end date to 06/15/87 00:00 UTC. The defaults are the same for the Billing and Cost Management console and the API.
After the end date, Amazon Web Services deletes the budget and all the associated notifications and subscribers. You can change your end date with the UpdateBudget operation.
FilterExpression (dict) --
The filtering dimensions for the budget and their corresponding values.
Or (list) --
Return results that match either Dimension object.
(dict) --
Use Expression to filter in various Budgets APIs.
And (list) --
Return results that match both Dimension objects.
(dict) --
Use Expression to filter in various Budgets APIs.
Not (dict) --
Return results that don't match a Dimension object.
Dimensions (dict) --
The specific Dimension to use for Expression.
Key (string) --
The name of the dimension that you want to filter on.
Values (list) --
The metadata values you can specify to filter upon, so that the results all match at least one of the specified values.
(string) --
MatchOptions (list) --
The match options that you can use to filter your results. You can specify only one of these values in the array.
(string) --
Tags (dict) --
The specific Tag to use for Expression.
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.
(string) --
CostCategories (dict) --
The filter that's based on CostCategoryValues.
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.
(string) --
Metrics (list) --
The definition for how the budget data is aggregated.
(string) --
NextToken (string) --
A generic string.