tokens
Creates, updates, deletes, gets or lists a tokens resource.
Overview
| Name | tokens |
| Type | Resource |
| Id | azure.container_registry.tokens |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the private link resource. |
creationDate | string (date-time) | The creation date of scope map. |
credentials | object | The credentials that can be used for authenticating the token. |
provisioningState | string | Provisioning state of the resource. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled) |
scopeMapId | string | The resource ID of the scope map to which the token will be associated with. |
status | string | The status of the token example enabled or disabled. Known values are: "enabled" and "disabled". (enabled, disabled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the private link resource. |
creationDate | string (date-time) | The creation date of scope map. |
credentials | object | The credentials that can be used for authenticating the token. |
provisioningState | string | Provisioning state of the resource. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled) |
scopeMapId | string | The resource ID of the scope map to which the token will be associated with. |
status | string | The status of the token example enabled or disabled. Known values are: "enabled" and "disabled". (enabled, disabled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, registry_name, token_name, subscription_id | Gets the properties of the specified token. | |
list | select | resource_group_name, registry_name, subscription_id | Lists all the tokens for the specified container registry. | |
create | insert | resource_group_name, registry_name, token_name, subscription_id | Creates a token for a container registry with the specified parameters. | |
update | update | resource_group_name, registry_name, token_name, subscription_id | Updates a token with the specified parameters. | |
delete | delete | resource_group_name, registry_name, token_name, subscription_id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
registry_name | string | The name of the container registry. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
token_name | string | The name of the token. Required. |
SELECT examples
- get
- list
Gets the properties of the specified token.
SELECT
id,
name,
creationDate,
credentials,
provisioningState,
scopeMapId,
status,
systemData,
type
FROM azure.container_registry.tokens
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND registry_name = '{{ registry_name }}' -- required
AND token_name = '{{ token_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all the tokens for the specified container registry.
SELECT
id,
name,
creationDate,
credentials,
provisioningState,
scopeMapId,
status,
systemData,
type
FROM azure.container_registry.tokens
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND registry_name = '{{ registry_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
INSERT examples
- create
- Manifest
Creates a token for a container registry with the specified parameters.
INSERT INTO azure.container_registry.tokens (
properties,
resource_group_name,
registry_name,
token_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ resource_group_name }}',
'{{ registry_name }}',
'{{ token_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: tokens
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the tokens resource.
- name: registry_name
value: "{{ registry_name }}"
description: Required parameter for the tokens resource.
- name: token_name
value: "{{ token_name }}"
description: Required parameter for the tokens resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the tokens resource.
- name: properties
description: |
The properties of the token.
value:
creationDate: "{{ creationDate }}"
provisioningState: "{{ provisioningState }}"
scopeMapId: "{{ scopeMapId }}"
credentials:
certificates:
- name: "{{ name }}"
expiry: "{{ expiry }}"
thumbprint: "{{ thumbprint }}"
encodedPemCertificate: "{{ encodedPemCertificate }}"
passwords:
- creationTime: "{{ creationTime }}"
expiry: "{{ expiry }}"
name: "{{ name }}"
value: "{{ value }}"
status: "{{ status }}"
UPDATE examples
- update
Updates a token with the specified parameters.
UPDATE azure.container_registry.tokens
SET
properties = '{{ properties }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND registry_name = '{{ registry_name }}' --required
AND token_name = '{{ token_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;
DELETE examples
- delete
Deletes a token from a container registry.
DELETE FROM azure.container_registry.tokens
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND registry_name = '{{ registry_name }}' --required
AND token_name = '{{ token_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;