2025/12/08 - AWS Cost Explorer Service - 1 new1 updated api methods
Changes Add support for Cost Category resource associations including filtering by resource type on ListCostCategoryDefinitions and new ListCostCategoryResourceAssociations API.
Returns resource associations of all cost categories defined in the account. You have the option to use CostCategoryArn to get the association for a specific cost category. ListCostCategoryResourceAssociations supports pagination. The request can have a MaxResults range up to 100.
See also: AWS API Documentation
Request Syntax
client.list_cost_category_resource_associations(
CostCategoryArn='string',
NextToken='string',
MaxResults=123
)
string
The unique identifier for your cost category.
string
The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
integer
The number of entries a paginated response contains.
dict
Response Syntax
{
'CostCategoryResourceAssociations': [
{
'ResourceArn': 'string',
'CostCategoryName': 'string',
'CostCategoryArn': 'string'
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
CostCategoryResourceAssociations (list) --
A reference to a cost category association that contains information on an associated resource.
(dict) --
A reference to a cost category association that contains information on an associated resource.
ResourceArn (string) --
The unique identifier for an associated resource.
CostCategoryName (string) --
The unique name of the cost category.
CostCategoryArn (string) --
The unique identifier for your cost category.
NextToken (string) --
The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
{'SupportedResourceTypes': ['string']}
Response {'CostCategoryReferences': {'SupportedResourceTypes': ['string']}}
Returns the name, Amazon Resource Name (ARN), NumberOfRules and effective dates of all cost categories defined in the account. You have the option to use EffectiveOn and SupportedResourceTypes to return a list of cost categories that were active on a specific date. If there is no EffectiveOn specified, you’ll see cost categories that are effective on the current date. If cost category is still effective, EffectiveEnd is omitted in the response. ListCostCategoryDefinitions supports pagination. The request can have a MaxResults range up to 100.
See also: AWS API Documentation
Request Syntax
client.list_cost_category_definitions(
EffectiveOn='string',
NextToken='string',
MaxResults=123,
SupportedResourceTypes=[
'string',
]
)
string
The date when the cost category was effective.
string
The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.
integer
The number of entries a paginated response contains.
list
Filter cost category definitions that are supported by given resource types based on the latest version. If the filter is present, the result only includes Cost Categories that supports input resource type. If the filter isn't provided, no filtering is applied. The valid values are billing:rispgroupsharing.
(string) --
dict
Response Syntax
{
'CostCategoryReferences': [
{
'CostCategoryArn': 'string',
'Name': 'string',
'EffectiveStart': 'string',
'EffectiveEnd': 'string',
'NumberOfRules': 123,
'ProcessingStatus': [
{
'Component': 'COST_EXPLORER',
'Status': 'PROCESSING'|'APPLIED'
},
],
'Values': [
'string',
],
'DefaultValue': 'string',
'SupportedResourceTypes': [
'string',
]
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
CostCategoryReferences (list) --
A reference to a cost category that contains enough information to identify the Cost Category.
(dict) --
A reference to a cost category containing only enough information to identify the Cost Category.
You can use this information to retrieve the full cost category information using DescribeCostCategory.
CostCategoryArn (string) --
The unique identifier for your cost category.
Name (string) --
The unique name of the cost category.
EffectiveStart (string) --
The cost category's effective start date.
EffectiveEnd (string) --
The cost category's effective end date.
NumberOfRules (integer) --
The number of rules that are associated with a specific cost category.
ProcessingStatus (list) --
The list of processing statuses for Cost Management products for a specific cost category.
(dict) --
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.
Values (list) --
A list of unique cost category values in a specific cost category.
(string) --
The default value for the cost category.
DefaultValue (string) --
The default value for the cost category.
SupportedResourceTypes (list) --
The resource types supported by a specific cost category.
(string) --
NextToken (string) --
The token to retrieve the next set of results. Amazon Web Services provides the token when the response from a previous call has more results than the maximum page size.