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_id, regionFetch the specified Custom Costs file.
list_custom_costs_filesselectregionpage[number], page[size], filter[status], sortList the Custom Costs files.
delete_custom_costs_filedeletefile_id, regionDelete the specified Custom Costs file.
upload_custom_costs_fileexecregionUpload 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.
regionstring(default: datadoghq.com)
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
AND region = '{{ region }}' -- required
;

DELETE examples

Delete the specified Custom Costs file.

DELETE FROM datadog.cloud_costs.costs_files
WHERE file_id = '{{ file_id }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Upload a Custom Costs file.

EXEC datadog.cloud_costs.costs_files.upload_custom_costs_file 
@region='{{ region }}' --required
;