cost_by_org
Creates, updates, deletes, gets or lists a cost_by_org resource.
Overview
| Name | cost_by_org |
| Type | Resource |
| Id | datadog.organization.cost_by_org |
Fields
The following fields are returned by SELECT queries:
- get_cost_by_org
| Name | Datatype | Description |
|---|---|---|
id | string | Unique ID of the response. |
attributes | object | Cost attributes data. |
type | string | Type of cost data. (default: cost_by_org, example: cost_by_org) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_cost_by_org | select | start_month, region | end_month | Get cost across multi-org account. Cost by org data for a given month becomes available no later than the 16th of the following month. Note: This endpoint has been deprecated. Please use the new endpoint /historical_costinstead. This endpoint is only accessible for parent-level organizations. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | (default: datadoghq.com) |
start_month | string (date-time) | Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. |
end_month | string (date-time) | Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost ending this month. |
SELECT examples
- get_cost_by_org
Get cost across multi-org account.
Cost by org data for a given month becomes available no later than the 16th of the following month.
Note: This endpoint has been deprecated. Please use the new endpoint/historical_cost
instead.
This endpoint is only accessible for parent-level organizations.
SELECT
id,
attributes,
type
FROM datadog.organization.cost_by_org
WHERE start_month = '{{ start_month }}' -- required
AND region = '{{ region }}' -- required
AND end_month = '{{ end_month }}'
;