Skip to main content

gcp_accounts

Creates, updates, deletes, gets or lists a gcp_accounts resource.

Overview

Namegcp_accounts
TypeResource
Iddatadog.integrations.gcp_accounts

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringYour service account's unique ID. (example: d291291f-12c2-22g4-j290-123456678897)
attributesobjectAttributes associated with your service account.
metaobjectAdditional information related to your service account.
typestringThe type of account. (gcp_service_account) (default: gcp_service_account, example: gcp_service_account)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_gcpstsaccountsselectList all GCP STS-enabled service accounts configured in your Datadog account.
create_gcpstsaccountinsertCreate a new entry within Datadog for your STS enabled service account.
update_gcpstsaccountupdateaccount_idUpdate an STS enabled service account.
delete_gcpstsaccountdeleteaccount_idDelete 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.

NameDatatypeDescription
account_idstringYour GCP STS enabled service account's unique 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 all GCP STS-enabled service accounts configured in your Datadog account.

SELECT
id,
attributes,
meta,
type
FROM datadog.integrations.gcp_accounts
;

INSERT examples

Create a new entry within Datadog for your STS enabled service account.

INSERT INTO datadog.integrations.gcp_accounts (
data
)
SELECT
'{{ data }}'
RETURNING
data
;

UPDATE examples

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 an STS enabled GCP account from within Datadog.

DELETE FROM datadog.integrations.gcp_accounts
WHERE account_id = '{{ account_id }}' --required
;