Skip to main content

anomalies

Creates, updates, deletes, gets or lists an anomalies resource.

Overview

Nameanomalies
TypeResource
Iddatadog.cloud_costs.anomalies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe unique identifier of the anomaly. (example: b0a6aaa9-3c4c-48cb-9447-a0d1338b3e09)
attributesobjectA single detected Cloud Cost Management anomaly.
typestringType of the cost anomalies collection resource. Must be anomalies. (anomalies) (default: anomalies, example: anomalies)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_cost_anomalyselectanomaly_idGet a detected Cloud Cost Management anomaly by UUID.
list_cost_anomaliesselectstart, end, filter, min_anomalous_threshold, min_cost_threshold, dismissal_cause, order_by, order, limit, offset, provider_idsList detected Cloud Cost Management anomalies for the 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.

NameDatatypeDescription
anomaly_idstringThe UUID of the cost anomaly.
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.
dismissal_causestringFilter by resolution state. Use none for unresolved anomalies, all or * for resolved anomalies, or a comma-separated list of causes.
endinteger (int64)End time as Unix milliseconds. Defaults to the end of the latest stable seven-day window.
filterstringOptional JSON object mapping cost tag keys to allowed values, for example {"team":["payments"],"env":["prod"]}. Filters match anomaly dimensions or correlated tags.
limitinteger (int64)Maximum number of anomalies to return. Defaults to 200.
min_anomalous_thresholdstringMinimum absolute anomalous cost change to include. Numeric value; defaults to 1.
min_cost_thresholdstringMinimum absolute actual cost to include. Numeric value; defaults to 0.
offsetinteger (int64)Pagination offset. Defaults to 0.
orderstringSort direction. One of asc or desc. Defaults to desc.
order_bystringSort field. One of start_date, end_date, duration, max_cost, anomalous_cost, or dismissal_date. Defaults to anomalous_cost.
provider_idsarrayOptional repeated cloud or SaaS provider filters, such as aws, gcp, azure, Oracle, datadog, OpenAI, or Anthropic.
startinteger (int64)Start time as Unix milliseconds. Defaults to the start of the latest stable seven-day window.

SELECT examples

Get a detected Cloud Cost Management anomaly by UUID.

SELECT
id,
attributes,
type
FROM datadog.cloud_costs.anomalies
WHERE anomaly_id = '{{ anomaly_id }}' -- required
;