Runs - Update

Patch the run properties.

PATCH https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/runs/{runId}?api-version=2019-04-01

URI Parameters

Name In Required Type Description
registryName
path True

string

minLength: 5
maxLength: 50
pattern: ^[a-zA-Z0-9]*$

The name of the container registry.

resourceGroupName
path True

string

minLength: 1

The name of the resource group to which the container registry belongs.

runId
path True

string

The run ID.

subscriptionId
path True

string

The Microsoft Azure subscription ID.

api-version
query True

string

The client API version.

Request Body

Name Type Description
isArchiveEnabled

boolean

The value that indicates whether archiving is enabled or not.

Responses

Name Type Description
200 OK

Run

The request was successful; the request was well-formed and received properly.

201 Created

Run

The request was successfully accepted; the operation will complete asynchronously. The provisioning state of the resource should indicate the current state of the resource.

Other Status Codes

Error response describing why the operation failed. If the registry/build doesn't exist, 404 (Not found) is returned. If any of the input parameters is wrong, 400(Bad Request) is returned.

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

Runs_Update

Sample request

PATCH https://management.azure.com/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/runs/0accec26-d6de-4757-8e74-d080f38eaaab?api-version=2019-04-01

{
  "isArchiveEnabled": true
}

Sample response

{
  "properties": {
    "provisioningState": "Succeeded",
    "runId": "0accec26-d6de-4757-8e74-d080f38eaaab",
    "status": "Succeeded",
    "lastUpdatedTime": "2018-01-25T05:13:51.617Z",
    "runType": "AutoBuild",
    "createTime": "2018-01-25T05:13:51.618Z",
    "startTime": "2018-01-25T05:50:51.618Z",
    "finishTime": "2018-01-25T06:13:51.618Z",
    "outputImages": [
      {
        "registry": "myregistry.azurecr.io",
        "repository": "myimage",
        "tag": "latest",
        "digest": "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0"
      }
    ],
    "task": "myTask",
    "imageUpdateTrigger": {
      "id": "c0c43143-da5d-41ef-b9e1-e7d749272e88",
      "timestamp": "2018-01-25T05:13:51.618Z",
      "images": [
        {
          "registry": "registry.hub.docker.com",
          "repository": "mybaseimage",
          "tag": "latest",
          "digest": "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0"
        }
      ]
    },
    "isArchiveEnabled": true,
    "platform": {
      "os": "Linux",
      "architecture": "amd64"
    },
    "agentConfiguration": {
      "cpu": 2
    }
  },
  "id": "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/runs/0accec26-d6de-4757-8e74-d080f38eaaab",
  "name": "0accec26-d6de-4757-8e74-d080f38eaaab",
  "type": "Microsoft.ContainerRegistry/registries/runs"
}
{
  "properties": {
    "provisioningState": "Updating",
    "runId": "0accec26-d6de-4757-8e74-d080f38eaaab",
    "status": "Succeeded",
    "lastUpdatedTime": "2018-01-25T05:13:51.617Z",
    "runType": "AutoBuild",
    "createTime": "2018-01-25T05:13:51.618Z",
    "startTime": "2018-01-25T05:50:51.618Z",
    "finishTime": "2018-01-25T06:13:51.618Z",
    "outputImages": [
      {
        "registry": "myregistry.azurecr.io",
        "repository": "myimage",
        "tag": "latest",
        "digest": "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0"
      }
    ],
    "task": "myTask",
    "imageUpdateTrigger": {
      "id": "c0c43143-da5d-41ef-b9e1-e7d749272e88",
      "timestamp": "2018-01-25T05:13:51.618Z",
      "images": [
        {
          "registry": "registry.hub.docker.com",
          "repository": "mybaseimage",
          "tag": "latest",
          "digest": "sha256:cbbf2f9a99b47fc460d422812b6a5adff7dfee951d8fa2e4a98caa0"
        }
      ]
    },
    "isArchiveEnabled": true,
    "platform": {
      "os": "Linux",
      "architecture": "amd64"
    },
    "agentConfiguration": {
      "cpu": 2
    }
  },
  "id": "/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/runs/0accec26-d6de-4757-8e74-d080f38eaaab",
  "name": "0accec26-d6de-4757-8e74-d080f38eaaab",
  "type": "Microsoft.ContainerRegistry/registries/runs"
}

Definitions

Name Description
AgentProperties

The properties that determine the run agent configuration.

Architecture

The OS architecture.

ImageDescriptor

Properties for a registry image.

ImageUpdateTrigger

The image update trigger that caused a build.

OS

The operating system type required for the run.

PlatformProperties

The platform properties against which the run has to happen.

ProvisioningState

The provisioning state of a run.

Run

Run resource properties

RunStatus

The current status of the run.

RunType

The type of run.

RunUpdateParameters

The set of run properties that can be updated.

SourceTriggerDescriptor

The source trigger that caused a run.

TimerTriggerDescriptor
Variant

Variant of the CPU.

AgentProperties

The properties that determine the run agent configuration.

Name Type Description
cpu

integer (int32)

The CPU configuration in terms of number of cores required for the run.

Architecture

The OS architecture.

Value Description
amd64
x86
arm

ImageDescriptor

Properties for a registry image.

Name Type Description
digest

string

The sha256-based digest of the image manifest.

registry

string

The registry login server.

repository

string

The repository name.

tag

string

The tag name.

ImageUpdateTrigger

The image update trigger that caused a build.

Name Type Description
id

string

The unique ID of the trigger.

images

ImageDescriptor[]

The list of image updates that caused the build.

timestamp

string (date-time)

The timestamp when the image update happened.

OS

The operating system type required for the run.

Value Description
Windows
Linux

PlatformProperties

The platform properties against which the run has to happen.

Name Type Description
architecture

Architecture

The OS architecture.

os

OS

The operating system type required for the run.

variant

Variant

Variant of the CPU.

ProvisioningState

The provisioning state of a run.

Value Description
Creating
Updating
Deleting
Succeeded
Failed
Canceled

Run

Run resource properties

Name Type Default value Description
id

string

The resource ID.

name

string

The name of the resource.

properties.agentConfiguration

AgentProperties

The machine configuration of the run agent.

properties.createTime

string (date-time)

The time the run was scheduled.

properties.customRegistries

string[]

The list of custom registries that were logged in during this run.

properties.finishTime

string (date-time)

The time the run finished.

properties.imageUpdateTrigger

ImageUpdateTrigger

The image update trigger that caused the run. This is applicable if the task has base image trigger configured.

properties.isArchiveEnabled

boolean

False

The value that indicates whether archiving is enabled or not.

properties.lastUpdatedTime

string (date-time)

The last updated time for the run.

properties.outputImages

ImageDescriptor[]

The list of all images that were generated from the run. This is applicable if the run generates base image dependencies.

properties.platform

PlatformProperties

The platform properties against which the run will happen.

properties.provisioningState

ProvisioningState

The provisioning state of a run.

properties.runErrorMessage

string

The error message received from backend systems after the run is scheduled.

properties.runId

string

The unique identifier for the run.

properties.runType

RunType

The type of run.

properties.sourceRegistryAuth

string

The scope of the credentials that were used to login to the source registry during this run.

properties.sourceTrigger

SourceTriggerDescriptor

The source trigger that caused the run.

properties.startTime

string (date-time)

The time the run started.

properties.status

RunStatus

The current status of the run.

properties.task

string

The task against which run was scheduled.

properties.timerTrigger

TimerTriggerDescriptor

The timer trigger that caused the run.

type

string

The type of the resource.

RunStatus

The current status of the run.

Value Description
Queued
Started
Running
Succeeded
Failed
Canceled
Error
Timeout

RunType

The type of run.

Value Description
QuickBuild
QuickRun
AutoBuild
AutoRun

RunUpdateParameters

The set of run properties that can be updated.

Name Type Description
isArchiveEnabled

boolean

The value that indicates whether archiving is enabled or not.

SourceTriggerDescriptor

The source trigger that caused a run.

Name Type Description
branchName

string

The branch name in the repository.

commitId

string

The unique ID that identifies a commit.

eventType

string

The event type of the trigger.

id

string

The unique ID of the trigger.

providerType

string

The source control provider type.

pullRequestId

string

The unique ID that identifies pull request.

repositoryUrl

string

The repository URL.

TimerTriggerDescriptor

Name Type Description
scheduleOccurrence

string

The occurrence that triggered the run.

timerTriggerName

string

The timer trigger name that caused the run.

Variant

Variant of the CPU.

Value Description
v6
v7
v8