tokens
Creates, updates, deletes, gets or lists a tokens
resource.
Overview
Name | tokens |
Type | Resource |
Id | azure.container_registry.tokens |
Fields
- vw_tokens
- tokens
Name | Datatype | Description |
---|---|---|
creation_date | text | field from the properties object |
credentials | text | field from the properties object |
provisioning_state | text | field from the properties object |
registryName | text | field from the properties object |
resourceGroupName | text | field from the properties object |
scope_map_id | text | field from the properties object |
status | text | field from the properties object |
subscriptionId | text | field from the properties object |
tokenName | text | field from the properties object |
Name | Datatype | Description |
---|---|---|
properties | object | The properties of a token. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | registryName, resourceGroupName, subscriptionId, tokenName | Gets the properties of the specified token. |
list | SELECT | registryName, resourceGroupName, subscriptionId | Lists all the tokens for the specified container registry. |
create | INSERT | registryName, resourceGroupName, subscriptionId, tokenName | Creates a token for a container registry with the specified parameters. |
delete | DELETE | registryName, resourceGroupName, subscriptionId, tokenName | Deletes a token from a container registry. |
update | UPDATE | registryName, resourceGroupName, subscriptionId, tokenName | Updates a token with the specified parameters. |
SELECT
examples
Lists all the tokens for the specified container registry.
- vw_tokens
- tokens
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 }}';
SELECT
properties
FROM azure.container_registry.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.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.container_registry.tokens (
registryName,
resourceGroupName,
subscriptionId,
tokenName,
properties
)
SELECT
'{{ registryName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ tokenName }}',
'{{ properties }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: creationDate
value: string
- name: provisioningState
value: string
- name: scopeMapId
value: string
- name: credentials
value:
- name: certificates
value:
- - name: name
value: string
- name: expiry
value: string
- name: thumbprint
value: string
- name: encodedPemCertificate
value: string
- name: passwords
value:
- - name: creationTime
value: string
- name: expiry
value: string
- name: name
value: string
- name: value
value: string
- name: status
value: string
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 }}';