Skip to main content

tasks

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

Overview

Nametasks
TypeResource
Idazure.container_registry_tasks.tasks

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringFully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}.
namestringThe name of the resource.
agentConfigurationobjectThe machine configuration of the run agent.
agentPoolNamestringThe dedicated agent pool for the task.
creationDatestring (date-time)The creation date of task.
credentialsobjectThe properties that describes a set of credentials that will be used when this run is invoked.
identityobjectIdentity for the resource.
isSystemTaskbooleanThe value of this property indicates whether the task resource is system task or not.
locationstringThe geo-location where the resource lives. Required.
logTemplatestringThe template that describes the repository and tag information for run log artifact.
platformobjectThe platform properties against which the run has to happen.
provisioningStatestringThe provisioning state of the task. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled)
statusstringThe current status of task. Known values are: "Disabled" and "Enabled". (Disabled, Enabled)
stepobjectThe properties of a task step.
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
tagsobjectResource tags.
timeoutintegerRun timeout in seconds.
triggerobjectThe properties that describe all triggers for the task.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, registry_name, task_name, subscription_idGet the properties of a specified task.
listselectresource_group_name, registry_name, subscription_idLists all the tasks for a specified container registry.
createinsertresource_group_name, registry_name, task_name, subscription_id, locationCreates a task for a container registry with the specified parameters.
updateupdateresource_group_name, registry_name, task_name, subscription_idUpdates a task with the specified parameters.
deletedeleteresource_group_name, registry_name, task_name, subscription_idDeletes a specified task.
get_detailsexecresource_group_name, registry_name, task_name, subscription_idReturns 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.

NameDatatypeDescription
registry_namestringThe name of the Registry. Required.
resource_group_namestringThe name of the resource group. The name is case insensitive. Required.
subscription_idstring
task_namestringThe name of the container registry task. Required.

SELECT examples

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
;

INSERT examples

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
;

UPDATE examples

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

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

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
;