Skip to main content

workload_identity_pools

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

Overview

Nameworkload_identity_pools
TypeResource
Idgoogle.iam.workload_identity_pools

Fields

NameDatatypeDescription
namestringOutput only. The resource name of the pool.
descriptionstringA description of the pool. Cannot exceed 256 characters.
disabledbooleanWhether the pool is disabled. You cannot use a disabled pool to exchange tokens, or use existing tokens to access resources. If the pool is re-enabled, existing tokens grant access again.
displayNamestringA display name for the pool. Cannot exceed 32 characters.
expireTimestringOutput only. Time after which the workload identity pool will be permanently purged and cannot be recovered.
statestringOutput only. The state of the pool.

Methods

NameAccessible byRequired ParamsDescription
getSELECTlocationsId, projectsId, workloadIdentityPoolsIdGets an individual WorkloadIdentityPool.
listSELECTlocationsId, projectsIdLists all non-deleted WorkloadIdentityPools in a project. If show_deleted is set to true, then deleted pools are also listed.
createINSERTlocationsId, projectsIdCreates a new WorkloadIdentityPool. You cannot reuse the name of a deleted pool until 30 days after deletion.
deleteDELETElocationsId, projectsId, workloadIdentityPoolsIdDeletes a WorkloadIdentityPool. You cannot use a deleted pool to exchange external credentials for Google Cloud credentials. However, deletion does not revoke credentials that have already been issued. Credentials issued for a deleted pool do not grant access to resources. If the pool is undeleted, and the credentials are not expired, they grant access again. You can undelete a pool for 30 days. After 30 days, deletion is permanent. You cannot update deleted pools. However, you can view and list them.
patchUPDATElocationsId, projectsId, workloadIdentityPoolsIdUpdates an existing WorkloadIdentityPool.
undeleteEXEClocationsId, projectsId, workloadIdentityPoolsIdUndeletes a WorkloadIdentityPool, as long as it was deleted fewer than 30 days ago.

SELECT examples

Lists all non-deleted WorkloadIdentityPools in a project. If show_deleted is set to true, then deleted pools are also listed.

SELECT
name,
description,
disabled,
displayName,
expireTime,
state
FROM google.iam.workload_identity_pools
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new workload_identity_pools resource.

/*+ create */
INSERT INTO google.iam.workload_identity_pools (
locationsId,
projectsId,
displayName,
description,
disabled
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ displayName }}',
'{{ description }}',
{{ disabled }}
;

UPDATE example

Updates a workload_identity_pools resource.

/*+ update */
UPDATE google.iam.workload_identity_pools
SET
displayName = '{{ displayName }}',
description = '{{ description }}',
disabled = true|false
WHERE
locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND workloadIdentityPoolsId = '{{ workloadIdentityPoolsId }}';

DELETE example

Deletes the specified workload_identity_pools resource.

/*+ delete */
DELETE FROM google.iam.workload_identity_pools
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}'
AND workloadIdentityPoolsId = '{{ workloadIdentityPoolsId }}';