Skip to main content

aws_configs

Creates, updates, deletes, gets or lists an aws_configs resource.

Overview

Nameaws_configs
TypeResource
Iddatadog.cloud_costs.aws_configs

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringThe ID of the AWS CUR config.
attributesobjectAttributes for An AWS CUR config.
typestringType of AWS CUR config. (aws_cur_config) (default: aws_cur_config, example: aws_cur_config)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_cost_awscurconfigsselectList the AWS CUR configs.
create_cost_awscurconfiginsertdataCreate a Cloud Cost Management account for an AWS CUR config.
update_cost_awscurconfigupdatecloud_account_id, dataUpdate the status (active/archived) and/or account filtering configuration of an AWS CUR config.
delete_cost_awscurconfigdeletecloud_account_idArchive a Cloud Cost Management Account.

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
cloud_account_idinteger (int64)Cloud Account 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.

SELECT examples

List the AWS CUR configs.

SELECT
id,
attributes,
type
FROM datadog.cloud_costs.aws_configs
;

INSERT examples

Create a Cloud Cost Management account for an AWS CUR config.

INSERT INTO datadog.cloud_costs.aws_configs (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;

UPDATE examples

Update the status (active/archived) and/or account filtering configuration of an AWS CUR config.

UPDATE datadog.cloud_costs.aws_configs
SET
data = '{{ data }}'
WHERE
cloud_account_id = '{{ cloud_account_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;

DELETE examples

Archive a Cloud Cost Management Account.

DELETE FROM datadog.cloud_costs.aws_configs
WHERE cloud_account_id = '{{ cloud_account_id }}' --required
;