Skip to main content

budget_custom_forecasts

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

Overview

Namebudget_custom_forecasts
TypeResource
Iddatadog.cloud_costs.budget_custom_forecasts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the custom forecast. (example: 11111111-1111-1111-1111-111111111111)
attributesobjectAttributes of a custom forecast.
typestringThe 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:

NameAccessible byRequired ParamsOptional ParamsDescription
get_custom_forecastselectbudget_idGet the custom forecast for a budget.
upsert_custom_forecastreplacedataCreate 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_forecastdeletebudget_idDelete 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.

NameDatatypeDescription
budget_idstringBudget id.
sitestringThe 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 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

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 the custom forecast for a budget.

DELETE FROM datadog.cloud_costs.budget_custom_forecasts
WHERE budget_id = '{{ budget_id }}' --required
;