runs
Creates, updates, deletes, gets or lists a runs resource.
Overview
| Name | runs |
| Type | Resource |
| Id | azure.container_registry_tasks.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. |
agentConfiguration | object | The machine configuration of the run agent. |
agentPoolName | string | The dedicated agent pool for the run. |
createTime | string (date-time) | The time the run was scheduled. |
customRegistries | array | The list of custom registries that were logged in during this run. |
finishTime | string (date-time) | The time the run finished. |
imageUpdateTrigger | object | The image update trigger that caused the run. This is applicable if the task has base image trigger configured. |
isArchiveEnabled | boolean | The value that indicates whether archiving is enabled or not. |
lastUpdatedTime | string (date-time) | The last updated time for the run. |
logArtifact | object | Properties for a registry image. |
outputImages | array | The list of all images that were generated from the run. This is applicable if the run generates base image dependencies. |
platform | object | The platform properties against which the run will happen. |
provisioningState | string | The provisioning state of a run. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled) |
runErrorMessage | string | The error message received from backend systems after the run is scheduled. |
runId | string | The unique identifier for the run. |
runType | string | The type of run. Known values are: "QuickBuild", "QuickRun", "AutoBuild", and "AutoRun". (QuickBuild, QuickRun, AutoBuild, AutoRun) |
sourceRegistryAuth | string | The scope of the credentials that were used to login to the source registry during this run. |
sourceTrigger | object | The source trigger that caused the run. |
startTime | string (date-time) | The time the run started. |
status | string | The 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) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
task | string | The task against which run was scheduled. |
timerTrigger | object | The timer trigger that caused the run. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
updateTriggerToken | string | The update trigger token passed for the Run. |
| 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 run. |
createTime | string (date-time) | The time the run was scheduled. |
customRegistries | array | The list of custom registries that were logged in during this run. |
finishTime | string (date-time) | The time the run finished. |
imageUpdateTrigger | object | The image update trigger that caused the run. This is applicable if the task has base image trigger configured. |
isArchiveEnabled | boolean | The value that indicates whether archiving is enabled or not. |
lastUpdatedTime | string (date-time) | The last updated time for the run. |
logArtifact | object | Properties for a registry image. |
outputImages | array | The list of all images that were generated from the run. This is applicable if the run generates base image dependencies. |
platform | object | The platform properties against which the run will happen. |
provisioningState | string | The provisioning state of a run. Known values are: "Creating", "Updating", "Deleting", "Succeeded", "Failed", and "Canceled". (Creating, Updating, Deleting, Succeeded, Failed, Canceled) |
runErrorMessage | string | The error message received from backend systems after the run is scheduled. |
runId | string | The unique identifier for the run. |
runType | string | The type of run. Known values are: "QuickBuild", "QuickRun", "AutoBuild", and "AutoRun". (QuickBuild, QuickRun, AutoBuild, AutoRun) |
sourceRegistryAuth | string | The scope of the credentials that were used to login to the source registry during this run. |
sourceTrigger | object | The source trigger that caused the run. |
startTime | string (date-time) | The time the run started. |
status | string | The 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) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
task | string | The task against which run was scheduled. |
timerTrigger | object | The timer trigger that caused the run. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
updateTriggerToken | string | The update trigger token passed for the Run. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, registry_name, run_id, subscription_id | Gets the detailed information for a given run. | |
list | select | resource_group_name, registry_name, subscription_id | $filter, $top | Gets all the runs for a registry. |
update | update | resource_group_name, registry_name, run_id, subscription_id | Patch the run properties. | |
get_log_sas_url | exec | resource_group_name, registry_name, run_id, subscription_id | Gets a link to download the run logs. | |
cancel | exec | resource_group_name, registry_name, run_id, subscription_id | Cancel 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.
| 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. |
run_id | string | The run ID. Required. |
subscription_id | string | |
$filter | string | The 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. |
$top | integer | $top is supported for get list of runs, which limits the maximum number of runs to return. Default value is None. |
SELECT examples
- get
- list
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
;
Gets all the runs for a registry.
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 subscription_id = '{{ subscription_id }}' -- required
AND $filter = '{{ $filter }}'
AND $top = '{{ $top }}'
;
UPDATE examples
- update
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
- get_log_sas_url
- cancel
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
;
Cancel an existing run.
EXEC azure.container_registry_tasks.runs.cancel
@resource_group_name='{{ resource_group_name }}' --required,
@registry_name='{{ registry_name }}' --required,
@run_id='{{ run_id }}' --required,
@subscription_id='{{ subscription_id }}' --required
;