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. (default: gcp_service_account, example: gcp_service_account)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_gcpstsaccountsselectregionList all GCP STS-enabled service accounts configured in your Datadog account.
create_gcpstsaccountinsertregionCreate a new entry within Datadog for your STS enabled service account.
update_gcpstsaccountupdateaccount_id, regionUpdate an STS enabled service account.
delete_gcpstsaccountdeleteaccount_id, regionDelete 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.
regionstring(default: datadoghq.com)

SELECT examples

List all GCP STS-enabled service accounts configured in your Datadog account.

SELECT
id,
attributes,
meta,
type
FROM datadog.integrations.gcp_accounts
WHERE region = '{{ region }}' -- required
;

INSERT examples

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

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

UPDATE examples

Update an STS enabled service account.

UPDATE datadog.integrations.gcp_accounts
SET
data__data = '{{ data }}'
WHERE
account_id = '{{ account_id }}' --required
AND region = '{{ region }}' --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
AND region = '{{ region }}' --required
;