gcp_accounts
Creates, updates, deletes, gets or lists a gcp_accounts resource.
Overview
| Name | gcp_accounts |
| Type | Resource |
| Id | datadog.integrations.gcp_accounts |
Fields
The following fields are returned by SELECT queries:
- list_gcpstsaccounts
| Name | Datatype | Description |
|---|---|---|
id | string | Your service account's unique ID. (example: d291291f-12c2-22g4-j290-123456678897) |
attributes | object | Attributes associated with your service account. |
meta | object | Additional information related to your service account. |
type | string | The type of account. (gcp_service_account) (default: gcp_service_account, example: gcp_service_account) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_gcpstsaccounts | select | List all GCP STS-enabled service accounts configured in your Datadog account. | ||
create_gcpstsaccount | insert | Create a new entry within Datadog for your STS enabled service account. | ||
update_gcpstsaccount | update | account_id | Update an STS enabled service account. | |
delete_gcpstsaccount | delete | account_id | Delete an STS enabled GCP account from within Datadog. |
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 |
|---|---|---|
account_id | string | Your GCP STS enabled service account's unique 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. |
SELECT examples
- list_gcpstsaccounts
List all GCP STS-enabled service accounts configured in your Datadog account.
SELECT
id,
attributes,
meta,
type
FROM datadog.integrations.gcp_accounts
;
INSERT examples
- create_gcpstsaccount
- Manifest
Create a new entry within Datadog for your STS enabled service account.
INSERT INTO datadog.integrations.gcp_accounts (
data
)
SELECT
'{{ data }}'
RETURNING
data
;
# Description fields are for documentation purposes
- name: gcp_accounts
props:
- name: data
description: |
Additional metadata on your generated service account.
value:
attributes:
account_tags:
- "{{ account_tags }}"
automute: {{ automute }}
client_email: "{{ client_email }}"
cloud_run_revision_filters:
- "{{ cloud_run_revision_filters }}"
host_filters:
- "{{ host_filters }}"
is_cspm_enabled: {{ is_cspm_enabled }}
is_global_location_enabled: {{ is_global_location_enabled }}
is_per_project_quota_enabled: {{ is_per_project_quota_enabled }}
is_resource_change_collection_enabled: {{ is_resource_change_collection_enabled }}
is_security_command_center_enabled: {{ is_security_command_center_enabled }}
metric_namespace_configs:
- disabled: {{ disabled }}
filters: "{{ filters }}"
id: "{{ id }}"
monitored_resource_configs:
- filters: "{{ filters }}"
type: "{{ type }}"
region_filter_configs:
- "{{ region_filter_configs }}"
resource_collection_enabled: {{ resource_collection_enabled }}
type: "{{ type }}"
UPDATE examples
- update_gcpstsaccount
Update an STS enabled service account.
UPDATE datadog.integrations.gcp_accounts
SET
data = '{{ data }}'
WHERE
account_id = '{{ account_id }}' --required
RETURNING
data;
DELETE examples
- delete_gcpstsaccount
Delete an STS enabled GCP account from within Datadog.
DELETE FROM datadog.integrations.gcp_accounts
WHERE account_id = '{{ account_id }}' --required
;