Skip to main content

costs_files

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

Overview

Namecosts_files
TypeResource
Iddatadog.cloud_costs.costs_files

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringID of the Custom Costs metadata.
attributesobjectSchema of a cost file's metadata.
typestringType of the Custom Costs file metadata.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_custom_costs_fileselectfile_idFetch the specified Custom Costs file.
list_custom_costs_filesselectpage[number], page[size], filter[status], filter[name], filter[provider], sortList the Custom Costs files.
delete_custom_costs_filedeletefile_idDelete the specified Custom Costs file.
upload_custom_costs_fileexecUpload 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.

NameDatatypeDescription
file_idstringFile 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.
filter[name]stringFilter files by name with case-insensitive substring matching.
filter[provider]arrayFilter by provider.
filter[status]stringFilter by file status
page[number]integer (int64)Page number for pagination
page[size]integer (int64)Page size for pagination
sortstringSort key with optional descending prefix

SELECT examples

Fetch the specified Custom Costs file.

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

DELETE examples

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 a Custom Costs file.

EXEC datadog.cloud_costs.costs_files.upload_custom_costs_file
;