Skip to main content

tokens

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

Overview

Nametokens
TypeResource
Idgoogle.iam.tokens

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. The resource name of the SCIM Token. Format: locations/{location}/workforcePools/{workforce_pool}/providers/ {workforce_pool_provider}/scimTenants/{scim_tenant}/tokens/{token}
displayNamestringOptional. The user-specified display name of the scim token. Cannot exceed 32 characters.
securityTokenstringOutput only. The token string. Provide this to the IdP for authentication. Will be set only during creation.
statestringOutput only. The state of the token.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectlocationsId, workforcePoolsId, providersId, scimTenantsId, tokensIdGets an individual WorkforcePoolProviderScimToken.
listselectlocationsId, workforcePoolsId, providersId, scimTenantsIdpageSize, pageToken, showDeletedLists all non-deleted WorkforcePoolProviderScimTokenss in a WorkforcePoolProviderScimTenant. If show_deleted is set to true, then deleted SCIM tokens are also listed.
createinsertlocationsId, workforcePoolsId, providersId, scimTenantsIdworkforcePoolProviderScimTokenIdCreates a new WorkforcePoolProviderScimToken in a WorkforcePoolProviderScimTenant. You cannot reuse the name of a deleted SCIM token until 30 days after deletion.
patchupdatelocationsId, workforcePoolsId, providersId, scimTenantsId, tokensIdupdateMaskUpdates an existing WorkforcePoolProviderScimToken.
deletedeletelocationsId, workforcePoolsId, providersId, scimTenantsId, tokensIdDeletes a WorkforcePoolProviderScimToken. You can undelete a scim token for 30 days. After 30 days, deletion is permanent. You cannot update deleted scim tokens. However, you can view and list them.
undeleteexeclocationsId, workforcePoolsId, providersId, scimTenantsId, tokensIdUndeletes a WorkforcePoolProviderScimToken, as long as it was deleted fewer than 30 days ago.

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
locationsIdstring
providersIdstring
scimTenantsIdstring
tokensIdstring
workforcePoolsIdstring
pageSizeinteger (int32)
pageTokenstring
showDeletedboolean
updateMaskstring (google-fieldmask)
workforcePoolProviderScimTokenIdstring

SELECT examples

Gets an individual WorkforcePoolProviderScimToken.

SELECT
name,
displayName,
securityToken,
state
FROM google.iam.tokens
WHERE locationsId = '{{ locationsId }}' -- required
AND workforcePoolsId = '{{ workforcePoolsId }}' -- required
AND providersId = '{{ providersId }}' -- required
AND scimTenantsId = '{{ scimTenantsId }}' -- required
AND tokensId = '{{ tokensId }}' -- required;

INSERT examples

Creates a new WorkforcePoolProviderScimToken in a WorkforcePoolProviderScimTenant. You cannot reuse the name of a deleted SCIM token until 30 days after deletion.

INSERT INTO google.iam.tokens (
data__name,
data__displayName,
locationsId,
workforcePoolsId,
providersId,
scimTenantsId,
workforcePoolProviderScimTokenId
)
SELECT
'{{ name }}',
'{{ displayName }}',
'{{ locationsId }}',
'{{ workforcePoolsId }}',
'{{ providersId }}',
'{{ scimTenantsId }}',
'{{ workforcePoolProviderScimTokenId }}'
RETURNING
name,
displayName,
securityToken,
state
;

UPDATE examples

Updates an existing WorkforcePoolProviderScimToken.

UPDATE google.iam.tokens
SET
data__name = '{{ name }}',
data__displayName = '{{ displayName }}'
WHERE
locationsId = '{{ locationsId }}' --required
AND workforcePoolsId = '{{ workforcePoolsId }}' --required
AND providersId = '{{ providersId }}' --required
AND scimTenantsId = '{{ scimTenantsId }}' --required
AND tokensId = '{{ tokensId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
displayName,
securityToken,
state;

DELETE examples

Deletes a WorkforcePoolProviderScimToken. You can undelete a scim token for 30 days. After 30 days, deletion is permanent. You cannot update deleted scim tokens. However, you can view and list them.

DELETE FROM google.iam.tokens
WHERE locationsId = '{{ locationsId }}' --required
AND workforcePoolsId = '{{ workforcePoolsId }}' --required
AND providersId = '{{ providersId }}' --required
AND scimTenantsId = '{{ scimTenantsId }}' --required
AND tokensId = '{{ tokensId }}' --required;

Lifecycle Methods

Undeletes a WorkforcePoolProviderScimToken, as long as it was deleted fewer than 30 days ago.

EXEC google.iam.tokens.undelete 
@locationsId='{{ locationsId }}' --required,
@workforcePoolsId='{{ workforcePoolsId }}' --required,
@providersId='{{ providersId }}' --required,
@scimTenantsId='{{ scimTenantsId }}' --required,
@tokensId='{{ tokensId }}' --required;