task_runs
Creates, updates, deletes, gets or lists a task_runs resource.
Overview
| Name | task_runs |
| Type | Resource |
| Id | azure.container_registry_tasks.task_runs |
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. |
forceUpdateTag | string | How the run should be forced to rerun even if the run request configuration has not changed. |
identity | object | Identity for the resource. |
location | string | The location of the resource. |
provisioningState | string | The provisioning state of this task run. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled) |
runRequest | object | The request (parameters) for the run. |
runResult | object | The result of this task run. |
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 resource. |
forceUpdateTag | string | How the run should be forced to rerun even if the run request configuration has not changed. |
identity | object | Identity for the resource. |
location | string | The location of the resource. |
provisioningState | string | The provisioning state of this task run. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled) |
runRequest | object | The request (parameters) for the run. |
runResult | object | The result of this task run. |
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, task_run_name, subscription_id | Gets the detailed information for a given task run. | |
list | select | resource_group_name, registry_name, subscription_id | Lists all the task runs for a specified container registry. | |
create | insert | resource_group_name, registry_name, task_run_name, subscription_id | Creates a task run for a container registry with the specified parameters. | |
update | update | resource_group_name, registry_name, task_run_name, subscription_id | Updates a task run with the specified parameters. | |
delete | delete | resource_group_name, registry_name, task_run_name, subscription_id | Deletes a specified task run resource. | |
get_details | exec | resource_group_name, registry_name, task_run_name, subscription_id | Gets the detailed information for a given task run 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_run_name | string | The name of the task run. Required. |
SELECT examples
- get
- list
Gets the detailed information for a given task run.
SELECT
id,
name,
forceUpdateTag,
identity,
location,
provisioningState,
runRequest,
runResult,
systemData,
type
FROM azure.container_registry_tasks.task_runs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND registry_name = '{{ registry_name }}' -- required
AND task_run_name = '{{ task_run_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Lists all the task runs for a specified container registry.
SELECT
id,
name,
forceUpdateTag,
identity,
location,
provisioningState,
runRequest,
runResult,
systemData,
type
FROM azure.container_registry_tasks.task_runs
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 run for a container registry with the specified parameters.
INSERT INTO azure.container_registry_tasks.task_runs (
properties,
identity,
location,
resource_group_name,
registry_name,
task_run_name,
subscription_id
)
SELECT
'{{ properties }}',
'{{ identity }}',
'{{ location }}',
'{{ resource_group_name }}',
'{{ registry_name }}',
'{{ task_run_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
identity,
location,
properties,
systemData,
type
;
# Description fields are for documentation purposes
- name: task_runs
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the task_runs resource.
- name: registry_name
value: "{{ registry_name }}"
description: Required parameter for the task_runs resource.
- name: task_run_name
value: "{{ task_run_name }}"
description: Required parameter for the task_runs resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the task_runs resource.
- name: properties
description: |
The properties associated with the task run, i.e., request and result of the run.
value:
provisioningState: "{{ provisioningState }}"
runRequest:
type: "{{ type }}"
isArchiveEnabled: {{ isArchiveEnabled }}
agentPoolName: "{{ agentPoolName }}"
logTemplate: "{{ logTemplate }}"
runResult:
id: "{{ id }}"
name: "{{ name }}"
type: "{{ type }}"
systemData:
createdBy: "{{ createdBy }}"
createdByType: "{{ createdByType }}"
createdAt: "{{ createdAt }}"
lastModifiedBy: "{{ lastModifiedBy }}"
lastModifiedByType: "{{ lastModifiedByType }}"
lastModifiedAt: "{{ lastModifiedAt }}"
properties:
runId: "{{ runId }}"
status: "{{ status }}"
lastUpdatedTime: "{{ lastUpdatedTime }}"
runType: "{{ runType }}"
agentPoolName: "{{ agentPoolName }}"
createTime: "{{ createTime }}"
startTime: "{{ startTime }}"
finishTime: "{{ finishTime }}"
outputImages:
- registry: "{{ registry }}"
repository: "{{ repository }}"
tag: "{{ tag }}"
digest: "{{ digest }}"
task: "{{ task }}"
imageUpdateTrigger:
id: "{{ id }}"
timestamp: "{{ timestamp }}"
images:
- registry: "{{ registry }}"
repository: "{{ repository }}"
tag: "{{ tag }}"
digest: "{{ digest }}"
sourceTrigger:
id: "{{ id }}"
eventType: "{{ eventType }}"
commitId: "{{ commitId }}"
pullRequestId: "{{ pullRequestId }}"
repositoryUrl: "{{ repositoryUrl }}"
branchName: "{{ branchName }}"
providerType: "{{ providerType }}"
timerTrigger:
timerTriggerName: "{{ timerTriggerName }}"
scheduleOccurrence: "{{ scheduleOccurrence }}"
platform:
os: "{{ os }}"
architecture: "{{ architecture }}"
variant: "{{ variant }}"
agentConfiguration:
cpu: {{ cpu }}
sourceRegistryAuth: "{{ sourceRegistryAuth }}"
customRegistries:
- "{{ customRegistries }}"
runErrorMessage: "{{ runErrorMessage }}"
updateTriggerToken: "{{ updateTriggerToken }}"
logArtifact:
registry: "{{ registry }}"
repository: "{{ repository }}"
tag: "{{ tag }}"
digest: "{{ digest }}"
provisioningState: "{{ provisioningState }}"
isArchiveEnabled: {{ isArchiveEnabled }}
forceUpdateTag: "{{ forceUpdateTag }}"
- name: identity
description: |
Identity for the resource.
value:
principalId: "{{ principalId }}"
tenantId: "{{ tenantId }}"
type: "{{ type }}"
userAssignedIdentities: "{{ userAssignedIdentities }}"
- name: location
value: "{{ location }}"
description: |
The location of the resource.
UPDATE examples
- update
Updates a task run with the specified parameters.
UPDATE azure.container_registry_tasks.task_runs
SET
identity = '{{ identity }}',
properties = '{{ properties }}',
location = '{{ location }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND registry_name = '{{ registry_name }}' --required
AND task_run_name = '{{ task_run_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
identity,
location,
properties,
systemData,
type;
DELETE examples
- delete
Deletes a specified task run resource.
DELETE FROM azure.container_registry_tasks.task_runs
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND registry_name = '{{ registry_name }}' --required
AND task_run_name = '{{ task_run_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- get_details
Gets the detailed information for a given task run that includes all secrets.
EXEC azure.container_registry_tasks.task_runs.get_details
@resource_group_name='{{ resource_group_name }}' --required,
@registry_name='{{ registry_name }}' --required,
@task_run_name='{{ task_run_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;