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 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. (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 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. (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 , region | Get an AWS Account Integration Config by config ID. | |
list_awsaccounts | select | region | aws_account_id | Get a list of AWS Account Integration Configs. |
create_awsaccount | insert | region , data__data | Create a new AWS Account Integration Config. | |
update_awsaccount | update | aws_account_config_id , region , data__data | Update an AWS Account Integration Config by config ID. | |
delete_awsaccount | delete | aws_account_config_id , region | Delete an AWS Account Integration Config by config ID. | |
create_new_awsexternal_id | exec | region | Generate a new external ID for AWS role-based authentication. |
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 endpoint and query by AWS Account ID. |
region | string | (default: datadoghq.com) |
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
AND region = '{{ region }}' -- required
;
Get a list of AWS Account Integration Configs.
SELECT
id,
attributes,
type
FROM datadog.integrations.aws_accounts
WHERE region = '{{ region }}' -- required
AND 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__data,
region
)
SELECT
'{{ data }}' /* required */,
'{{ region }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: aws_accounts
props:
- name: region
value: string
description: Required parameter for the aws_accounts resource.
- name: data
value: object
description: |
AWS Account Create Request data.
UPDATE
examples
- update_awsaccount
Update an AWS Account Integration Config by config ID.
UPDATE datadog.integrations.aws_accounts
SET
data__data = '{{ data }}'
WHERE
aws_account_config_id = '{{ aws_account_config_id }}' --required
AND region = '{{ region }}' --required
AND data__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
AND region = '{{ region }}' --required
;
Lifecycle Methods
- create_new_awsexternal_id
Generate a new external ID for AWS role-based authentication.
EXEC datadog.integrations.aws_accounts.create_new_awsexternal_id
@region='{{ region }}' --required
;