tasks
Creates, updates, deletes, gets or lists a tasks resource.
Overview
| Name | tasks |
| Type | Resource |
| Id | azure.container_registry_tasks.tasks |
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 resource. |
agentConfiguration | object | The machine configuration of the run agent. |
agentPoolName | string | The dedicated agent pool for the task. |
creationDate | string (date-time) | The creation date of task. |
credentials | object | The properties that describes a set of credentials that will be used when this run is invoked. |
identity | object | Identity for the resource. |
isSystemTask | boolean | The value of this property indicates whether the task resource is system task or not. |
location | string | The geo-location where the resource lives. Required. |
logTemplate | string | The template that describes the repository and tag information for run log artifact. |
platform | object | The platform properties against which the run has to happen. |
provisioningState | string | The provisioning state of the task. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled) |
status | string | The current status of task. Known values are: "Disabled" and "Enabled". (Disabled, Enabled) |
step | object | The properties of a task step. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeout | integer | Run timeout in seconds. |
trigger | object | The properties that describe all triggers for the task. |
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 resource. |
agentConfiguration | object | The machine configuration of the run agent. |
agentPoolName | string | The dedicated agent pool for the task. |
creationDate | string (date-time) | The creation date of task. |
credentials | object | The properties that describes a set of credentials that will be used when this run is invoked. |
identity | object | Identity for the resource. |
isSystemTask | boolean | The value of this property indicates whether the task resource is system task or not. |
location | string | The geo-location where the resource lives. Required. |
logTemplate | string | The template that describes the repository and tag information for run log artifact. |
platform | object | The platform properties against which the run has to happen. |
provisioningState | string | The provisioning state of the task. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled) |
status | string | The current status of task. Known values are: "Disabled" and "Enabled". (Disabled, Enabled) |
step | object | The properties of a task step. |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
timeout | integer | Run timeout in seconds. |
trigger | object | The properties that describe all triggers for the task. |
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, task_name, subscription_id | Get the properties of a specified task. | |
list | select | resource_group_name, registry_name, subscription_id | Lists all the tasks for a specified container registry. | |
create | insert | resource_group_name, registry_name, task_name, subscription_id, location | Creates a task for a container registry with the specified parameters. | |
update | update | resource_group_name, registry_name, task_name, subscription_id | Updates a task with the specified parameters. | |
delete | delete | resource_group_name, registry_name, task_name, subscription_id | Deletes a specified task. | |
get_details | exec | resource_group_name, registry_name, task_name, subscription_id | Returns a task with extended information that includes all secrets. |
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 Registry. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
subscription_id | string | |
task_name | string | The name of the container registry task. Required. |
SELECT examples
- get
- list
Get the properties of a specified task.
SELECT
id,
name,
agentConfiguration,
agentPoolName,
creationDate,
credentials,
identity,
isSystemTask,
location,
logTemplate,
platform,
provisioningState,
status,
step,
systemData,
tags,
timeout,
trigger,
type
FROM azure.container_registry_tasks.tasks
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND registry_name = '{{ registry_name }}' -- required
AND task_name = '{{ task_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all the tasks for a specified container registry.
SELECT
id,
name,
agentConfiguration,
agentPoolName,
creationDate,
credentials,
identity,
isSystemTask,
location,
logTemplate,
platform,
provisioningState,
status,
step,
systemData,
tags,
timeout,
trigger,
type
FROM azure.container_registry_tasks.tasks
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 task for a container registry with the specified parameters.
INSERT INTO azure.container_registry_tasks.tasks (
tags,
location,
properties,
identity,
resource_group_name,
registry_name,
task_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ identity }}',
'{{ resource_group_name }}',
'{{ registry_name }}',
'{{ task_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: tasks
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the tasks resource.
- name: registry_name
value: "{{ registry_name }}"
description: Required parameter for the tasks resource.
- name: task_name
value: "{{ task_name }}"
description: Required parameter for the tasks resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the tasks resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
The properties of a task.
value:
provisioningState: "{{ provisioningState }}"
creationDate: "{{ creationDate }}"
status: "{{ status }}"
platform:
os: "{{ os }}"
architecture: "{{ architecture }}"
variant: "{{ variant }}"
agentConfiguration:
cpu: {{ cpu }}
agentPoolName: "{{ agentPoolName }}"
timeout: {{ timeout }}
step:
type: "{{ type }}"
baseImageDependencies:
- type: "{{ type }}"
registry: "{{ registry }}"
repository: "{{ repository }}"
tag: "{{ tag }}"
digest: "{{ digest }}"
contextPath: "{{ contextPath }}"
contextAccessToken: "{{ contextAccessToken }}"
trigger:
timerTriggers:
- schedule: "{{ schedule }}"
status: "{{ status }}"
name: "{{ name }}"
sourceTriggers:
- sourceRepository:
sourceControlType: "{{ sourceControlType }}"
repositoryUrl: "{{ repositoryUrl }}"
branch: "{{ branch }}"
sourceControlAuthProperties:
tokenType: "{{ tokenType }}"
token: "{{ token }}"
refreshToken: "{{ refreshToken }}"
scope: "{{ scope }}"
expiresIn: {{ expiresIn }}
sourceTriggerEvents: "{{ sourceTriggerEvents }}"
status: "{{ status }}"
name: "{{ name }}"
baseImageTrigger:
baseImageTriggerType: "{{ baseImageTriggerType }}"
updateTriggerEndpoint: "{{ updateTriggerEndpoint }}"
updateTriggerPayloadType: "{{ updateTriggerPayloadType }}"
status: "{{ status }}"
name: "{{ name }}"
credentials:
sourceRegistry:
identity: "{{ identity }}"
loginMode: "{{ loginMode }}"
customRegistries: "{{ customRegistries }}"
logTemplate: "{{ logTemplate }}"
isSystemTask: {{ isSystemTask }}
- name: identity
description: |
Identity for the resource.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
UPDATE examples
- update
Updates a task with the specified parameters.
UPDATE azure.container_registry_tasks.tasks
SET
identity = '{{ identity }}',
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND registry_name = '{{ registry_name }}' --required
AND task_name = '{{ task_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
tags,
type;
DELETE examples
- delete
Deletes a specified task.
DELETE FROM azure.container_registry_tasks.tasks
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND registry_name = '{{ registry_name }}' --required
AND task_name = '{{ task_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- get_details
Returns a task with extended information that includes all secrets.
EXEC azure.container_registry_tasks.tasks.get_details
@resource_group_name='{{ resource_group_name }}' --required,
@registry_name='{{ registry_name }}' --required,
@task_name='{{ task_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;