costs_files
Creates, updates, deletes, gets or lists a costs_files resource.
Overview
| Name | costs_files |
| Type | Resource |
| Id | datadog.cloud_costs.costs_files |
Fields
The following fields are returned by SELECT queries:
- get_custom_costs_file
- list_custom_costs_files
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the Custom Costs metadata. |
attributes | object | Schema of a cost file's metadata. |
type | string | Type of the Custom Costs file metadata. |
| Name | Datatype | Description |
|---|---|---|
id | string | ID of the Custom Costs metadata. |
attributes | object | Schema of a Custom Costs metadata. |
type | string | Type of the Custom Costs file metadata. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_custom_costs_file | select | file_id | Fetch the specified Custom Costs file. | |
list_custom_costs_files | select | page[number], page[size], filter[status], filter[name], filter[provider], sort | List the Custom Costs files. | |
delete_custom_costs_file | delete | file_id | Delete the specified Custom Costs file. | |
upload_custom_costs_file | exec | Upload a Custom Costs file. |
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 |
|---|---|---|
file_id | string | File 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. |
filter[name] | string | Filter files by name with case-insensitive substring matching. |
filter[provider] | array | Filter by provider. |
filter[status] | string | Filter by file status |
page[number] | integer (int64) | Page number for pagination |
page[size] | integer (int64) | Page size for pagination |
sort | string | Sort key with optional descending prefix |
SELECT examples
- get_custom_costs_file
- list_custom_costs_files
Fetch the specified Custom Costs file.
SELECT
id,
attributes,
type
FROM datadog.cloud_costs.costs_files
WHERE file_id = '{{ file_id }}' -- required
;
List the Custom Costs files.
SELECT
id,
attributes,
type
FROM datadog.cloud_costs.costs_files
WHERE page[number] = '{{ page[number] }}'
AND page[size] = '{{ page[size] }}'
AND filter[status] = '{{ filter[status] }}'
AND filter[name] = '{{ filter[name] }}'
AND filter[provider] = '{{ filter[provider] }}'
AND sort = '{{ sort }}'
;
DELETE examples
- delete_custom_costs_file
Delete the specified Custom Costs file.
DELETE FROM datadog.cloud_costs.costs_files
WHERE file_id = '{{ file_id }}' --required
;
Lifecycle Methods
EXEC variables use wire (API) names.
- upload_custom_costs_file
Upload a Custom Costs file.
EXEC datadog.cloud_costs.costs_files.upload_custom_costs_file
;