Get Ecs Cluster Aggregated Detailed Costs
Provides Ecs cluster resource usage and costs over a time interval which can be grouped and/or filtered by AWS tags,
for example - application name (webapp, backend), environment (production, staging), version etc.
The response will contain a breakdown of the cluster resource costs($) in terms of compute (CPU, memory), storage (block, file, rootVolume).
The response will group the cluster usage costs based on the preselected default of Ecs Group Type which is composed of Service, Headroom, Custom Object,
Idle and Standalone, or user selected AWS tags.
Within the default grouping, costs are broken down for the Service group, and for tag grouping the costs will be broken up by tag value.
Time Rounding Down: The CostAnalysis API applies rounding down to the hours provided during the call.
For example, the value 1707004799099 (In GMT) representing Saturday, February 3, 2024, 23:59:59.099 is rounded down to Saturday, February 3, 2024, 23:00:00.000, resulting in the omission of one hour of cost.
Parameters
Request body
Example request
{
"groupBy": "env",
"filter": {
"conditions": {
"anyMatch": [
{
"allMatch": [
{
"key": "env",
"operator": "equals",
"value": "dev"
},
{
"key": "app",
"operator": "exists"
}
]
},
{
"allMatch": [
{
"key": "team",
"operator": "exists"
}
]
}
]
}
}
}