budget_custom_forecasts
Creates, updates, deletes, gets or lists a budget_custom_forecasts resource.
Overview
| Name | budget_custom_forecasts |
| Type | Resource |
| Id | datadog.cloud_costs.budget_custom_forecasts |
Fields
The following fields are returned by SELECT queries:
- get_custom_forecast
| Name | Datatype | Description |
|---|---|---|
id | string | The unique identifier of the custom forecast. (example: 11111111-1111-1111-1111-111111111111) |
attributes | object | Attributes of a custom forecast. |
type | string | The type of the custom forecast resource. Must be custom_forecast. (custom_forecast) (default: custom_forecast, example: custom_forecast) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_custom_forecast | select | budget_id | Get the custom forecast for a budget. | |
upsert_custom_forecast | replace | data | Create or replace the custom forecast for an existing budget.<br />Pass an empty entries list to delete the custom forecast for the budget. | |
delete_custom_forecast | delete | budget_id | Delete the custom forecast for a budget. |
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 |
|---|---|---|
budget_id | string | Budget id. |
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. |
SELECT examples
- get_custom_forecast
Get the custom forecast for a budget.
SELECT
id,
attributes,
type
FROM datadog.cloud_costs.budget_custom_forecasts
WHERE budget_id = '{{ budget_id }}' -- required
;
REPLACE examples
- upsert_custom_forecast
Create or replace the custom forecast for an existing budget.<br />Pass an empty entries list to delete the custom forecast for the budget.
REPLACE datadog.cloud_costs.budget_custom_forecasts
SET
data = '{{ data }}'
WHERE
data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_custom_forecast
Delete the custom forecast for a budget.
DELETE FROM datadog.cloud_costs.budget_custom_forecasts
WHERE budget_id = '{{ budget_id }}' --required
;