Skip to main content

tokens

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

Overview

Nametokens
TypeResource
Idazure.container_registry.tokens

Fields

NameDatatypeDescription
creation_datetextfield from the properties object
credentialstextfield from the properties object
provisioning_statetextfield from the properties object
registryNametextfield from the properties object
resourceGroupNametextfield from the properties object
scope_map_idtextfield from the properties object
statustextfield from the properties object
subscriptionIdtextfield from the properties object
tokenNametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTregistryName, resourceGroupName, subscriptionId, tokenNameGets the properties of the specified token.
listSELECTregistryName, resourceGroupName, subscriptionIdLists all the tokens for the specified container registry.
createINSERTregistryName, resourceGroupName, subscriptionId, tokenNameCreates a token for a container registry with the specified parameters.
deleteDELETEregistryName, resourceGroupName, subscriptionId, tokenNameDeletes a token from a container registry.
updateUPDATEregistryName, resourceGroupName, subscriptionId, tokenNameUpdates a token with the specified parameters.

SELECT examples

Lists all the tokens for the specified container registry.

SELECT
creation_date,
credentials,
provisioning_state,
registryName,
resourceGroupName,
scope_map_id,
status,
subscriptionId,
tokenName
FROM azure.container_registry.vw_tokens
WHERE registryName = '{{ registryName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

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

/*+ create */
INSERT INTO azure.container_registry.tokens (
registryName,
resourceGroupName,
subscriptionId,
tokenName,
properties
)
SELECT
'{{ registryName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ tokenName }}',
'{{ properties }}'
;

UPDATE example

Updates a tokens resource.

/*+ update */
UPDATE azure.container_registry.tokens
SET
properties = '{{ properties }}'
WHERE
registryName = '{{ registryName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tokenName = '{{ tokenName }}';

DELETE example

Deletes the specified tokens resource.

/*+ delete */
DELETE FROM azure.container_registry.tokens
WHERE registryName = '{{ registryName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND tokenName = '{{ tokenName }}';