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,region | Fetch the specified Custom Costs file. | |
| list_custom_costs_files | select | region | page[number],page[size],filter[status],sort | List the Custom Costs files. | 
| delete_custom_costs_file | delete | file_id,region | Delete the specified Custom Costs file. | |
| upload_custom_costs_file | exec | region | 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. | 
| region | string | (default: datadoghq.com) | 
| 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
AND region = '{{ region }}' -- required
;
List the Custom Costs files.
SELECT
id,
attributes,
type
FROM datadog.cloud_costs.costs_files
WHERE region = '{{ region }}' -- required
AND page[number] = '{{ page[number] }}'
AND page[size] = '{{ page[size] }}'
AND filter[status] = '{{ filter[status] }}'
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
AND region = '{{ region }}' --required
;
Lifecycle Methods
- upload_custom_costs_file
Upload a Custom Costs file.
EXEC datadog.cloud_costs.costs_files.upload_custom_costs_file 
@region='{{ region }}' --required
;