Skip to main content

historical_cost_by_org

Creates, updates, deletes, gets or lists a historical_cost_by_org resource.

Overview

Namehistorical_cost_by_org
TypeResource
Iddatadog.organization.historical_cost_by_org

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringUnique ID of the response.
attributesobjectCost attributes data.
typestringType of cost data. (default: cost_by_org, example: cost_by_org)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_historical_cost_by_orgselectstart_month, regionview, end_month, include_connected_accountsGet historical cost across multi-org and single root-org accounts.
Cost data for a given month becomes available no later than the 16th of the following month.

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.

NameDatatypeDescription
regionstring(default: datadoghq.com)
start_monthstring (date-time)Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month.
end_monthstring (date-time)Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost ending this month.
include_connected_accountsbooleanBoolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to false.
viewstringString to specify whether cost is broken down at a parent-org level or at the sub-org level. Available views are summary and sub-org. Defaults to summary.

SELECT examples

Get historical cost across multi-org and single root-org accounts.
Cost data for a given month becomes available no later than the 16th of the following month.

This endpoint is only accessible for parent-level organizations.

SELECT
id,
attributes,
type
FROM datadog.organization.historical_cost_by_org
WHERE start_month = '{{ start_month }}' -- required
AND region = '{{ region }}' -- required
AND view = '{{ view }}'
AND end_month = '{{ end_month }}'
AND include_connected_accounts = '{{ include_connected_accounts }}'
;