Skip to main content

tokens

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

Overview

Nametokens
TypeResource
Idazure.container_registry.tokens

Fields

The following fields are returned by SELECT queries:

The request was successful; the request was well-formed and received properly.

NameDatatypeDescription
idstringThe resource ID.
namestringThe name of the resource.
propertiesobjectThe properties of the token.
systemDataobjectMetadata pertaining to creation and last modification of the resource.
typestringThe type of the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectsubscriptionId, resourceGroupName, registryName, tokenNameGets the properties of the specified token.
listselectsubscriptionId, resourceGroupName, registryNameLists all the tokens for the specified container registry.
createinsertsubscriptionId, resourceGroupName, registryName, tokenNameCreates a token for a container registry with the specified parameters.
updateupdatesubscriptionId, resourceGroupName, registryName, tokenNameUpdates a token with the specified parameters.
deletedeletesubscriptionId, resourceGroupName, registryName, tokenNameDeletes a token from a container registry.

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
registryNamestringThe name of the container registry.
resourceGroupNamestringThe name of the resource group. The name is case insensitive.
subscriptionIdstring (uuid)The ID of the target subscription. The value must be an UUID.
tokenNamestringThe name of the token.

SELECT examples

Gets the properties of the specified token.

SELECT
id,
name,
properties,
systemData,
type
FROM azure.container_registry.tokens
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND resourceGroupName = '{{ resourceGroupName }}' -- required
AND registryName = '{{ registryName }}' -- required
AND tokenName = '{{ tokenName }}' -- required
;

INSERT examples

Creates a token for a container registry with the specified parameters.

INSERT INTO azure.container_registry.tokens (
data__properties,
subscriptionId,
resourceGroupName,
registryName,
tokenName
)
SELECT
'{{ properties }}',
'{{ subscriptionId }}',
'{{ resourceGroupName }}',
'{{ registryName }}',
'{{ tokenName }}'
RETURNING
id,
name,
properties,
systemData,
type
;

UPDATE examples

Updates a token with the specified parameters.

UPDATE azure.container_registry.tokens
SET
data__properties = '{{ properties }}'
WHERE
subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND registryName = '{{ registryName }}' --required
AND tokenName = '{{ tokenName }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

DELETE examples

Deletes a token from a container registry.

DELETE FROM azure.container_registry.tokens
WHERE subscriptionId = '{{ subscriptionId }}' --required
AND resourceGroupName = '{{ resourceGroupName }}' --required
AND registryName = '{{ registryName }}' --required
AND tokenName = '{{ tokenName }}' --required
;