Skip to main content

runs

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

Overview

Nameruns
TypeResource
Idazure.container_registry_tasks.runs

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 run.
createTimestring (date-time)The time the run was scheduled.
customRegistriesarrayThe list of custom registries that were logged in during this run.
finishTimestring (date-time)The time the run finished.
imageUpdateTriggerobjectThe image update trigger that caused the run. This is applicable if the task has base image trigger configured.
isArchiveEnabledbooleanThe value that indicates whether archiving is enabled or not.
lastUpdatedTimestring (date-time)The last updated time for the run.
logArtifactobjectProperties for a registry image.
outputImagesarrayThe list of all images that were generated from the run. This is applicable if the run generates base image dependencies.
platformobjectThe platform properties against which the run will happen.
provisioningStatestringThe provisioning state of a run. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled)
runErrorMessagestringThe error message received from backend systems after the run is scheduled.
runIdstringThe unique identifier for the run.
runTypestringThe type of run. Known values are: "QuickBuild", "QuickRun", "AutoBuild", and "AutoRun". (QuickBuild, QuickRun, AutoBuild, AutoRun)
sourceRegistryAuthstringThe scope of the credentials that were used to login to the source registry during this run.
sourceTriggerobjectThe source trigger that caused the run.
startTimestring (date-time)The time the run started.
statusstringThe current status of the run. Known values are: "Queued", "Started", "Running", "Succeeded", "Failed", "Canceled", "Error", and "Timeout". (Queued, Started, Running, Succeeded, Failed, Canceled, Error, Timeout)
systemDataobjectAzure Resource Manager metadata containing createdBy and modifiedBy information.
taskstringThe task against which run was scheduled.
timerTriggerobjectThe timer trigger that caused the run.
typestringThe type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts".
updateTriggerTokenstringThe update trigger token passed for the Run.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectresource_group_name, registry_name, run_id, subscription_idGets the detailed information for a given run.
listselectresource_group_name, registry_name, subscription_id$filter, $topGets all the runs for a registry.
updateupdateresource_group_name, registry_name, run_id, subscription_idPatch the run properties.
get_log_sas_urlexecresource_group_name, registry_name, run_id, subscription_idGets a link to download the run logs.
cancelexecresource_group_name, registry_name, run_id, subscription_idCancel an existing run.

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.
run_idstringThe run ID. Required.
subscription_idstring
$filterstringThe runs filter to apply on the operation. Arithmetic operators are not supported. The allowed string function is 'contains'. All logical operators except 'Not', 'Has', 'All' are allowed. Default value is None.
$topinteger$top is supported for get list of runs, which limits the maximum number of runs to return. Default value is None.

SELECT examples

Gets the detailed information for a given run.

SELECT
id,
name,
agentConfiguration,
agentPoolName,
createTime,
customRegistries,
finishTime,
imageUpdateTrigger,
isArchiveEnabled,
lastUpdatedTime,
logArtifact,
outputImages,
platform,
provisioningState,
runErrorMessage,
runId,
runType,
sourceRegistryAuth,
sourceTrigger,
startTime,
status,
systemData,
task,
timerTrigger,
type,
updateTriggerToken
FROM azure.container_registry_tasks.runs
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND registry_name = '{{ registry_name }}' -- required
AND run_id = '{{ run_id }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;

UPDATE examples

Patch the run properties.

UPDATE azure.container_registry_tasks.runs
SET
isArchiveEnabled = {{ isArchiveEnabled }}
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND registry_name = '{{ registry_name }}' --required
AND run_id = '{{ run_id }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
properties,
systemData,
type;

Lifecycle Methods

Gets a link to download the run logs.

EXEC azure.container_registry_tasks.runs.get_log_sas_url 
@resource_group_name='{{ resource_group_name }}' --required,
@registry_name='{{ registry_name }}' --required,
@run_id='{{ run_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;