tag_metadata
Creates, updates, deletes, gets or lists a tag_metadata resource.
Overview
| Name | tag_metadata |
| Type | Resource |
| Id | datadog.cloud_costs.tag_metadata |
Fields
The following fields are returned by SELECT queries:
- list_cost_tag_metadata
| Name | Datatype | Description |
|---|---|---|
id | string | A composite identifier of the form tag_key:metric for monthly roll-ups, or tag_key:metric:YYYY-MM-DD when filter[daily]=true. (example: env:aws.cost.net.amortized) |
attributes | object | Attributes of a Cloud Cost Management tag key metadata entry. |
type | string | Type of the Cloud Cost Management tag key metadata resource. (cost_tag_key_metadata) (default: cost_tag_key_metadata, example: cost_tag_key_metadata) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_cost_tag_metadata | select | filter[month] | filter[provider], filter[metric], filter[tag_key], filter[daily] | List Cloud Cost Management tag key metadata, including row counts, cost covered, cardinality, and a sample of top tag values per cloud account. Use filter[daily]=true to return daily rows instead of the default monthly roll-up. |
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 |
|---|---|---|
filter[month] | string | The month to scope the query to, in YYYY-MM format. (example: 2026-02) |
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. |
filter[daily] | string | When true, return one row per day with the day in the date attribute. Defaults to the monthly roll-up when omitted. |
filter[metric] | string | Filter results to a specific Cloud Cost Management metric (for example, aws.cost.net.amortized). When omitted, every available metric for the requested period is returned. |
filter[provider] | string | Filter results to a specific provider. Common cloud values are aws, azure, gcp, Oracle (OCI), and custom. SaaS billing integrations (for example, Snowflake, MongoDB, Databricks) are also accepted using their display-name string. Values are case-sensitive. |
filter[tag_key] | string | Restrict results to a single tag key. |
SELECT examples
- list_cost_tag_metadata
List Cloud Cost Management tag key metadata, including row counts, cost covered, cardinality, and a sample of top tag values per cloud account. Use filter[daily]=true to return daily rows instead of the default monthly roll-up.
SELECT
id,
attributes,
type
FROM datadog.cloud_costs.tag_metadata
WHERE filter[month] = '{{ filter[month] }}' -- required
AND filter[provider] = '{{ filter[provider] }}'
AND filter[metric] = '{{ filter[metric] }}'
AND filter[tag_key] = '{{ filter[tag_key] }}'
AND filter[daily] = '{{ filter[daily] }}'
;