aws_accounts
Creates, updates, deletes, gets or lists an aws_accounts resource.
Overview
| Name | aws_accounts |
| Type | Resource |
| Id | datadog.integrations.aws_accounts |
Fields
The following fields are returned by SELECT queries:
- get_awsaccount
- list_awsaccounts
AWS Account object
| Name | Datatype | Description |
|---|---|---|
id | string | Unique Datadog ID of the AWS Account Integration Config. To get the config ID for an account, use the [List all AWS integrations](https://docs.datadoghq.com/api/latest/aws-integration/#list-all-aws-integrations) endpoint and query by AWS Account ID. (example: 00000000-abcd-0001-0000-000000000000) |
attributes | object | AWS Account response attributes. |
type | string | AWS Account resource type. (account) (default: account, example: account) |
AWS Accounts List object
| Name | Datatype | Description |
|---|---|---|
id | string | Unique Datadog ID of the AWS Account Integration Config. To get the config ID for an account, use the [List all AWS integrations](https://docs.datadoghq.com/api/latest/aws-integration/#list-all-aws-integrations) endpoint and query by AWS Account ID. (example: 00000000-abcd-0001-0000-000000000000) |
attributes | object | AWS Account response attributes. |
type | string | AWS Account resource type. (account) (default: account, example: account) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_awsaccount | select | aws_account_config_id | Get an AWS Account Integration Config by config ID. | |
list_awsaccounts | select | aws_account_id | Get a list of AWS Account Integration Configs. | |
create_awsaccount | insert | data | Create a new AWS Account Integration Config. | |
update_awsaccount | update | aws_account_config_id, data | Update an AWS Account Integration Config by config ID. | |
delete_awsaccount | delete | aws_account_config_id | Delete an AWS Account Integration Config by config ID. | |
preview_awsmetric_name_filter | exec | aws_account_config_id, data | Preview which collected CloudWatch metrics would be filtered by the supplied metric name filters.<br />The filters are not persisted. | |
create_new_awsexternal_id | exec | Generate a new external ID for AWS role-based authentication. | ||
validate_awsccmconfig | exec | data | Validate a Cloud Cost Management config for an AWS account using Cost and Usage Report<br />(CUR) 2.0 against Datadog's ingest requirements without persisting it. |
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 |
|---|---|---|
aws_account_config_id | string | Unique Datadog ID of the AWS Account Integration Config. To get the config ID for an account, use the [List all AWS integrations](https://docs.datadoghq.com/api/latest/aws-integration/#list-all-aws-integrations) endpoint and query by AWS Account 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. |
aws_account_id | string | Optional query parameter to filter accounts by AWS Account ID. If not provided, all accounts are returned. (example: 123456789012) |
SELECT examples
- get_awsaccount
- list_awsaccounts
Get an AWS Account Integration Config by config ID.
SELECT
id,
attributes,
type
FROM datadog.integrations.aws_accounts
WHERE aws_account_config_id = '{{ aws_account_config_id }}' -- required
;
Get a list of AWS Account Integration Configs.
SELECT
id,
attributes,
type
FROM datadog.integrations.aws_accounts
WHERE aws_account_id = '{{ aws_account_id }}'
;
INSERT examples
- create_awsaccount
- Manifest
Create a new AWS Account Integration Config.
INSERT INTO datadog.integrations.aws_accounts (
data
)
SELECT
'{{ data }}' /* required */
RETURNING
data
;
# Description fields are for documentation purposes
- name: aws_accounts
props:
- name: data
description: |
AWS Account Create Request data.
value:
attributes:
account_tags:
- "{{ account_tags }}"
auth_config:
access_key_id: "{{ access_key_id }}"
secret_access_key: "{{ secret_access_key }}"
external_id: "{{ external_id }}"
role_name: "{{ role_name }}"
aws_account_id: "{{ aws_account_id }}"
aws_partition: "{{ aws_partition }}"
aws_regions:
include_all: {{ include_all }}
include_only:
- "{{ include_only }}"
logs_config:
lambda_forwarder:
lambdas:
- "{{ lambdas }}"
log_source_config:
tag_filters: "{{ tag_filters }}"
sources:
- "{{ sources }}"
metrics_config:
automute_enabled: {{ automute_enabled }}
collect_cloudwatch_alarms: {{ collect_cloudwatch_alarms }}
collect_custom_metrics: {{ collect_custom_metrics }}
enabled: {{ enabled }}
metric_name_filters:
- include_only: "{{ include_only }}"
namespace: "{{ namespace }}"
exclude_only: "{{ exclude_only }}"
namespace_filters:
exclude_only:
- "{{ exclude_only }}"
include_only:
- "{{ include_only }}"
tag_filters:
- namespace: "{{ namespace }}"
tags: "{{ tags }}"
resources_config:
cloud_security_posture_management_collection: {{ cloud_security_posture_management_collection }}
extended_collection: {{ extended_collection }}
traces_config:
xray_services:
include_all: {{ include_all }}
include_only:
- "{{ include_only }}"
type: "{{ type }}"
UPDATE examples
- update_awsaccount
Update an AWS Account Integration Config by config ID.
UPDATE datadog.integrations.aws_accounts
SET
data = '{{ data }}'
WHERE
aws_account_config_id = '{{ aws_account_config_id }}' --required
AND data = '{{ data }}' --required
RETURNING
data;
DELETE examples
- delete_awsaccount
Delete an AWS Account Integration Config by config ID.
DELETE FROM datadog.integrations.aws_accounts
WHERE aws_account_config_id = '{{ aws_account_config_id }}' --required
;
Lifecycle Methods
EXEC variables use wire (API) names.
- preview_awsmetric_name_filter
- create_new_awsexternal_id
- validate_awsccmconfig
Preview which collected CloudWatch metrics would be filtered by the supplied metric name filters.<br />The filters are not persisted.
EXEC datadog.integrations.aws_accounts.preview_awsmetric_name_filter
@aws_account_config_id='{{ aws_account_config_id }}' --required,
@@json=
'{
"data": "{{ data }}"
}'
;
Generate a new external ID for AWS role-based authentication.
EXEC datadog.integrations.aws_accounts.create_new_awsexternal_id
;
Validate a Cloud Cost Management config for an AWS account using Cost and Usage Report<br />(CUR) 2.0 against Datadog's ingest requirements without persisting it.
EXEC datadog.integrations.aws_accounts.validate_awsccmconfig
@@json=
'{
"data": "{{ data }}"
}'
;