estimated_cost_by_org
Creates, updates, deletes, gets or lists an estimated_cost_by_org resource.
Overview
| Name | estimated_cost_by_org |
| Type | Resource |
| Id | datadog.organization.estimated_cost_by_org |
Fields
The following fields are returned by SELECT queries:
- get_estimated_cost_by_org
| Name | Datatype | Description |
|---|---|---|
id | string | Unique ID of the response. |
attributes | object | Cost attributes data. |
type | string | Type of cost data. (cost_by_org) (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_estimated_cost_by_org | select | view, start_month, end_month, start_date, end_date, cost_aggregation, include_connected_accounts | Get estimated cost across multi-org and single root-org accounts.<br />Estimated cost data is only available for the current month and previous month<br />and is delayed by up to 72 hours from when it was incurred.<br />To access historical costs prior to this, use the /historical_cost endpoint.<br /><br />This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/). |
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 |
|---|---|---|
site | string | The Datadog site (region) for your organization, for example datadoghq.com, us3.datadoghq.com, us5.datadoghq.com, ap1.datadoghq.com, ap2.datadoghq.com, datadoghq.eu, ddog-gov.com. Resolved from the DD_SITE environment variable when set. Optional: defaults to datadoghq.com, or the value of the DD_SITE environment variable when set; a WHERE value overrides both. |
cost_aggregation | string | Controls how costs are aggregated when using start_date. The cumulative option returns month-to-date running totals. |
end_date | string (date-time) | Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for cost ending this day. |
end_month | string (date-time) | Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost ending this month. |
include_connected_accounts | boolean | Boolean to specify whether to include accounts connected to the current account as partner customers in the Datadog partner network program. Defaults to false. |
start_date | string (date-time) | Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for cost beginning this day. Either start_month or start_date should be specified, but not both. (start_date cannot go beyond two months in the past). Provide an end_date to view day-over-day cumulative cost. |
start_month | string (date-time) | Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for cost beginning this month. Either start_month or start_date should be specified, but not both. (start_month cannot go beyond two months in the past). Provide an end_month to view month-over-month cost. |
view | string | String 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_estimated_cost_by_org
Get estimated cost across multi-org and single root-org accounts.<br />Estimated cost data is only available for the current month and previous month<br />and is delayed by up to 72 hours from when it was incurred.<br />To access historical costs prior to this, use the /historical_cost endpoint.<br /><br />This endpoint is only accessible for [parent-level organizations](https://docs.datadoghq.com/account_management/multi_organization/).
SELECT
id,
attributes,
type
FROM datadog.organization.estimated_cost_by_org
WHERE view = '{{ view }}'
AND start_month = '{{ start_month }}'
AND end_month = '{{ end_month }}'
AND start_date = '{{ start_date }}'
AND end_date = '{{ end_date }}'
AND cost_aggregation = '{{ cost_aggregation }}'
AND include_connected_accounts = '{{ include_connected_accounts }}'
;