Tasks - Get Details

Returns a task with extended information that includes all secrets.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ContainerRegistry/registries/{registryName}/tasks/{taskName}/listDetails?api-version=2019-04-01

URI Parameters

Name In Required Type Description
registryName
path True

string

The name of the container registry.

Regex pattern: ^[a-zA-Z0-9]*$

resourceGroupName
path True

string

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

subscriptionId
path True

string

The Microsoft Azure subscription ID.

taskName
path True

string

The name of the container registry task.

Regex pattern: ^[a-zA-Z0-9-_]*$

api-version
query True

string

The client API version.

Responses

Name Type Description
200 OK

Task

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

Other Status Codes

Error response describing why the operation failed. If the registry doesn't exist, 404 (Not found) 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

Tasks_GetDetails

Sample request

POST https://management.azure.com/subscriptions/4385cf00-2d3a-425a-832f-f4285b1c9dce/resourceGroups/myResourceGroup/providers/Microsoft.ContainerRegistry/registries/myRegistry/tasks/myTask/listDetails?api-version=2019-04-01

Sample response

{
  "properties": {
    "status": "Enabled",
    "platform": {
      "os": "Linux",
      "architecture": "amd64"
    },
    "agentConfiguration": {
      "cpu": 2
    },
    "step": {
      "type": "Docker",
      "imageNames": [
        "azurerest:testtag"
      ],
      "dockerFilePath": "src/DockerFile",
      "contextPath": "src",
      "isPushEnabled": true,
      "noCache": false,
      "arguments": [
        {
          "name": "mytestargument",
          "value": "mytestvalue",
          "isSecret": false
        },
        {
          "name": "mysecrettestargument",
          "value": "mysecrettestvalue",
          "isSecret": true
        }
      ]
    },
    "trigger": {
      "timerTriggers": [
        {
          "name": "myTimerTrigger",
          "status": "Enabled",
          "schedule": "30 9 * * 1-5"
        }
      ],
      "sourceTriggers": [
        {
          "name": "mySourceTrigger",
          "status": "Enabled",
          "sourceRepository": {
            "sourceControlType": "Github",
            "repositoryUrl": "https://github.com/Azure/azure-rest-api-specs",
            "branch": "master",
            "sourceControlAuthProperties": {
              "tokenType": "PAT",
              "token": "xxxxx"
            }
          },
          "sourceTriggerEvents": [
            "commit"
          ]
        }
      ],
      "baseImageTrigger": {
        "name": "myBaseImageTrigger",
        "status": "Enabled",
        "baseImageTriggerType": "Runtime"
      }
    },
    "credentials": {
      "customRegistries": {
        "myregistry.azure-test.io": {
          "userName": {
            "type": "Opaque",
            "value": "username"
          },
          "password": {
            "type": "Vaultsecret",
            "value": "https://myacbvault.vault.azure.net/secrets/username"
          },
          "identity": "[system]"
        }
      },
      "sourceRegistry": null
    }
  },
  "location": "eastus",
  "identity": {
    "principalId": "fa153151-b9fd-46f4-9088-5e6600f2689v",
    "tenantId": "f686d426-8d16-42db-81b7-abu4gm510ccd",
    "type": "SystemAssigned"
  },
  "tags": {
    "testkey": "value"
  }
}

Definitions

Name Description
AgentProperties

The properties that determine the run agent configuration.

Architecture

The OS architecture.

Argument

The properties of a run argument.

AuthInfo

The authorization properties for accessing the source code repository.

BaseImageDependency

Properties that describe a base image dependency.

BaseImageDependencyType

The type of the base image dependency.

BaseImageTrigger

The trigger based on base image dependency.

BaseImageTriggerType

The type of the auto trigger for base image dependency updates.

Credentials

The parameters that describes a set of credentials that will be used when a run is invoked.

CustomRegistryCredentials

Describes the credentials that will be used to access a custom registry during a run.

DockerBuildStep

The Docker build step.

EncodedTaskStep

The properties of a encoded task step.

FileTaskStep

The properties of a task step.

IdentityProperties

Managed identity for the resource.

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.

ResourceIdentityType

The identity type.

SecretObject

Describes the properties of a secret object value.

SecretObjectType

The type of the secret object which determines how the value of the secret object has to be interpreted.

SetValue

The properties of a overridable value that can be passed to a task template.

SourceControlType

The type of source control service.

SourceProperties

The properties of the source code repository.

SourceRegistryCredentials

Describes the credential parameters for accessing the source registry.

SourceRegistryLoginMode

The authentication mode which determines the source registry login scope. The credentials for the source registry will be generated using the given scope. These credentials will be used to login to the source registry during the run.

SourceTrigger

The properties of a source based trigger.

SourceTriggerEvent

The source event corresponding to the trigger.

Task

The task that has the ARM resource and task properties. The task will have all information to schedule a run against it.

TaskStatus

The current status of task.

TimerTrigger

The properties of a timer trigger.

TokenType

The type of Auth token.

TriggerProperties

The properties of a trigger.

TriggerStatus

The current status of trigger.

UserIdentityProperties
Variant

Variant of the CPU.

AgentProperties

The properties that determine the run agent configuration.

Name Type Description
cpu

integer

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

Architecture

The OS architecture.

Name Type Description
amd64

string

arm

string

x86

string

Argument

The properties of a run argument.

Name Type Default value Description
isSecret

boolean

False

Flag to indicate whether the argument represents a secret and want to be removed from build logs.

name

string

The name of the argument.

value

string

The value of the argument.

AuthInfo

The authorization properties for accessing the source code repository.

Name Type Description
expiresIn

integer

Time in seconds that the token remains valid

refreshToken

string

The refresh token used to refresh the access token.

scope

string

The scope of the access token.

token

string

The access token used to access the source control provider.

tokenType

TokenType

The type of Auth token.

BaseImageDependency

Properties that describe a base image dependency.

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.

type

BaseImageDependencyType

The type of the base image dependency.

BaseImageDependencyType

The type of the base image dependency.

Name Type Description
BuildTime

string

RunTime

string

BaseImageTrigger

The trigger based on base image dependency.

Name Type Default value Description
baseImageTriggerType

BaseImageTriggerType

The type of the auto trigger for base image dependency updates.

name

string

The name of the trigger.

status

TriggerStatus

Enabled

The current status of trigger.

BaseImageTriggerType

The type of the auto trigger for base image dependency updates.

Name Type Description
All

string

Runtime

string

Credentials

The parameters that describes a set of credentials that will be used when a run is invoked.

Name Type Description
customRegistries

<string,  CustomRegistryCredentials>

Describes the credential parameters for accessing other custom registries. The key for the dictionary item will be the registry login server (myregistry.azurecr.io) and the value of the item will be the registry credentials for accessing the registry.

sourceRegistry

SourceRegistryCredentials

Describes the credential parameters for accessing the source registry.

CustomRegistryCredentials

Describes the credentials that will be used to access a custom registry during a run.

Name Type Description
identity

string

Indicates the managed identity assigned to the custom credential. If a user-assigned identity this value is the Client ID. If a system-assigned identity, the value will be system. In the case of a system-assigned identity, the Client ID will be determined by the runner. This identity may be used to authenticate to key vault to retrieve credentials or it may be the only source of authentication used for accessing the registry.

password

SecretObject

The password for logging into the custom registry. The password is a secret object that allows multiple ways of providing the value for it.

userName

SecretObject

The username for logging into the custom registry.

DockerBuildStep

The Docker build step.

Name Type Default value Description
arguments

Argument[]

The collection of override arguments to be used when executing this build step.

baseImageDependencies

BaseImageDependency[]

List of base image dependencies for a step.

contextAccessToken

string

The token (git PAT or SAS token of storage account blob) associated with the context for a step.

contextPath

string

The URL(absolute or relative) of the source context for the task step.

dockerFilePath

string

The Docker file path relative to the source context.

imageNames

string[]

The fully qualified image names including the repository and tag.

isPushEnabled

boolean

True

The value of this property indicates whether the image built should be pushed to the registry or not.

noCache

boolean

False

The value of this property indicates whether the image cache is enabled or not.

target

string

The name of the target build stage for the docker build.

type string:

Docker

The type of the step.

EncodedTaskStep

The properties of a encoded task step.

Name Type Description
baseImageDependencies

BaseImageDependency[]

List of base image dependencies for a step.

contextAccessToken

string

The token (git PAT or SAS token of storage account blob) associated with the context for a step.

contextPath

string

The URL(absolute or relative) of the source context for the task step.

encodedTaskContent

string

Base64 encoded value of the template/definition file content.

encodedValuesContent

string

Base64 encoded value of the parameters/values file content.

type string:

EncodedTask

The type of the step.

values

SetValue[]

The collection of overridable values that can be passed when running a task.

FileTaskStep

The properties of a task step.

Name Type Description
baseImageDependencies

BaseImageDependency[]

List of base image dependencies for a step.

contextAccessToken

string

The token (git PAT or SAS token of storage account blob) associated with the context for a step.

contextPath

string

The URL(absolute or relative) of the source context for the task step.

taskFilePath

string

The task template/definition file path relative to the source context.

type string:

FileTask

The type of the step.

values

SetValue[]

The collection of overridable values that can be passed when running a task.

valuesFilePath

string

The task values/parameters file path relative to the source context.

IdentityProperties

Managed identity for the resource.

Name Type Description
principalId

string

The principal ID of resource identity.

tenantId

string

The tenant ID of resource.

type

ResourceIdentityType

The identity type.

userAssignedIdentities

<string,  UserIdentityProperties>

The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/ providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.

OS

The operating system type required for the run.

Name Type Description
Linux

string

Windows

string

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.

Name Type Description
Canceled

string

Creating

string

Deleting

string

Failed

string

Succeeded

string

Updating

string

ResourceIdentityType

The identity type.

Name Type Description
None

string

SystemAssigned

string

SystemAssigned, UserAssigned

string

UserAssigned

string

SecretObject

Describes the properties of a secret object value.

Name Type Description
type

SecretObjectType

The type of the secret object which determines how the value of the secret object has to be interpreted.

value

string

The value of the secret. The format of this value will be determined based on the type of the secret object. If the type is Opaque, the value will be used as is without any modification.

SecretObjectType

The type of the secret object which determines how the value of the secret object has to be interpreted.

Name Type Description
Opaque

string

Vaultsecret

string

SetValue

The properties of a overridable value that can be passed to a task template.

Name Type Default value Description
isSecret

boolean

False

Flag to indicate whether the value represents a secret or not.

name

string

The name of the overridable value.

value

string

The overridable value.

SourceControlType

The type of source control service.

Name Type Description
Github

string

VisualStudioTeamService

string

SourceProperties

The properties of the source code repository.

Name Type Description
branch

string

The branch name of the source code.

repositoryUrl

string

The full URL to the source code repository

sourceControlAuthProperties

AuthInfo

The authorization properties for accessing the source code repository and to set up webhooks for notifications.

sourceControlType

SourceControlType

The type of source control service.

SourceRegistryCredentials

Describes the credential parameters for accessing the source registry.

Name Type Description
loginMode

SourceRegistryLoginMode

The authentication mode which determines the source registry login scope. The credentials for the source registry will be generated using the given scope. These credentials will be used to login to the source registry during the run.

SourceRegistryLoginMode

The authentication mode which determines the source registry login scope. The credentials for the source registry will be generated using the given scope. These credentials will be used to login to the source registry during the run.

Name Type Description
Default

string

None

string

SourceTrigger

The properties of a source based trigger.

Name Type Default value Description
name

string

The name of the trigger.

sourceRepository

SourceProperties

The properties that describes the source(code) for the task.

sourceTriggerEvents

SourceTriggerEvent[]

The source event corresponding to the trigger.

status

TriggerStatus

Enabled

The current status of trigger.

SourceTriggerEvent

The source event corresponding to the trigger.

Name Type Description
commit

string

pullrequest

string

Task

The task that has the ARM resource and task properties. The task will have all information to schedule a run against it.

Name Type Default value Description
id

string

The resource ID.

identity

IdentityProperties

Identity for the resource.

location

string

The location of the resource. This cannot be changed after the resource is created.

name

string

The name of the resource.

properties.agentConfiguration

AgentProperties

The machine configuration of the run agent.

properties.creationDate

string

The creation date of task.

properties.credentials

Credentials

The properties that describes a set of credentials that will be used when this run is invoked.

properties.platform

PlatformProperties

The platform properties against which the run has to happen.

properties.provisioningState

ProvisioningState

The provisioning state of the task.

properties.status

TaskStatus

The current status of task.

properties.step TaskStepProperties:

The properties of a task step.

properties.timeout

integer

3600

Run timeout in seconds.

properties.trigger

TriggerProperties

The properties that describe all triggers for the task.

tags

object

The tags of the resource.

type

string

The type of the resource.

TaskStatus

The current status of task.

Name Type Description
Disabled

string

Enabled

string

TimerTrigger

The properties of a timer trigger.

Name Type Default value Description
name

string

The name of the trigger.

schedule

string

The CRON expression for the task schedule

status

TriggerStatus

Enabled

The current status of trigger.

TokenType

The type of Auth token.

Name Type Description
OAuth

string

PAT

string

TriggerProperties

The properties of a trigger.

Name Type Description
baseImageTrigger

BaseImageTrigger

The trigger based on base image dependencies.

sourceTriggers

SourceTrigger[]

The collection of triggers based on source code repository.

timerTriggers

TimerTrigger[]

The collection of timer triggers.

TriggerStatus

The current status of trigger.

Name Type Description
Disabled

string

Enabled

string

UserIdentityProperties

Name Type Description
clientId

string

The client id of user assigned identity.

principalId

string

The principal id of user assigned identity.

Variant

Variant of the CPU.

Name Type Description
v6

string

v7

string

v8

string