Jobs - Get

Get the properties of a Container Apps Job.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}?api-version=2024-03-01

URI Parameters

Name In Required Type Description
jobName
path True

string

Job Name

Regex pattern: ^[-\w\._\(\)]+$

resourceGroupName
path True

string

The name of the resource group. The name is case insensitive.

subscriptionId
path True

string

The ID of the target subscription.

api-version
query True

string

The API version to use for this operation.

Responses

Name Type Description
200 OK

Job

OK.

Other Status Codes

DefaultErrorResponse

Common error response.

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

Get Container Apps Job

Sample request

GET https://management.azure.com/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/jobs/testcontainerappsjob0?api-version=2024-03-01

Sample response

{
  "id": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/jobs/testcontainerappsjob0",
  "name": "testcontainerappsjob0",
  "type": "Microsoft.App/jobs",
  "location": "East US",
  "properties": {
    "provisioningState": "Succeeded",
    "environmentId": "/subscriptions/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/resourceGroups/rg/providers/Microsoft.App/managedEnvironments/demokube",
    "configuration": {
      "replicaTimeout": 10,
      "replicaRetryLimit": 10,
      "manualTriggerConfig": {
        "replicaCompletionCount": 1,
        "parallelism": 4
      },
      "triggerType": "Manual"
    },
    "template": {
      "containers": [
        {
          "image": "repo/testcontainerappsjob0:v4",
          "name": "testcontainerappsjob0",
          "resources": {
            "cpu": 0.5,
            "memory": "1Gi"
          }
        }
      ],
      "initContainers": [
        {
          "image": "repo/testcontainerappsjob0:v4",
          "name": "testinitcontainerAppsJob0",
          "resources": {
            "cpu": 0.5,
            "memory": "1Gi"
          }
        }
      ]
    }
  }
}

Definitions

Name Description
Container

Container App container definition

ContainerAppProbe

Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.

ContainerResources

Container App container resource requirements.

createdByType

The type of identity that created the resource.

DefaultErrorResponse

App Service error response.

Details

Details or the error

EnvironmentVar

Container App container environment variable.

Error

Error model.

EventTriggerConfig

Trigger configuration of an event driven job.

HttpGet

HTTPGet specifies the http request to perform.

HttpHeaders

Custom headers to set in the request. HTTP allows repeated headers.

InitContainer

Container App init container definition

Job

Container App Job

JobConfiguration

Non versioned Container Apps Job configuration properties

JobProvisioningState

Provisioning state of the Container Apps Job.

JobScale

Scaling configurations for event driven jobs.

JobScaleRule

Scaling rule.

JobTemplate

Container Apps Job versioned application definition. Defines the desired state of an immutable revision. Any changes to this section Will result in a new revision being created

ManagedServiceIdentity

Managed service identity (system assigned and/or user assigned identities)

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

ManualTriggerConfig

Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default

RegistryCredentials

Container App Private Registry

ScaleRuleAuth

Auth Secrets for Scale Rule

ScheduleTriggerConfig

Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default

Scheme

Scheme to use for connecting to the host. Defaults to HTTP.

Secret

Secret definition.

SecretVolumeItem

Secret to be added to volume.

StorageType

Storage type for the volume. If not provided, use EmptyDir.

systemData

Metadata pertaining to creation and last modification of the resource.

TcpSocket

TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported.

TriggerType

Trigger type of the job

Type

The type of probe.

UserAssignedIdentity

User assigned identity properties

Volume

Volume definitions for the Container App.

VolumeMount

Volume mount for the Container App.

Container

Container App container definition

Name Type Description
args

string[]

Container start command arguments.

command

string[]

Container start command.

env

EnvironmentVar[]

Container environment variables.

image

string

Container image tag.

name

string

Custom container name.

probes

ContainerAppProbe[]

List of probes for the container.

resources

ContainerResources

Container resource requirements.

volumeMounts

VolumeMount[]

Container volume mounts.

ContainerAppProbe

Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic.

Name Type Description
failureThreshold

integer

Minimum consecutive failures for the probe to be considered failed after having succeeded. Defaults to 3. Minimum value is 1. Maximum value is 10.

httpGet

HttpGet

HTTPGet specifies the http request to perform.

initialDelaySeconds

integer

Number of seconds after the container has started before liveness probes are initiated. Minimum value is 1. Maximum value is 60.

periodSeconds

integer

How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Maximum value is 240.

successThreshold

integer

Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Must be 1 for liveness and startup. Minimum value is 1. Maximum value is 10.

tcpSocket

TcpSocket

TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported.

terminationGracePeriodSeconds

integer

Optional duration in seconds the pod needs to terminate gracefully upon probe failure. The grace period is the duration in seconds after the processes running in the pod are sent a termination signal and the time when the processes are forcibly halted with a kill signal. Set this value longer than the expected cleanup time for your process. If this value is nil, the pod's terminationGracePeriodSeconds will be used. Otherwise, this value overrides the value provided by the pod spec. Value must be non-negative integer. The value zero indicates stop immediately via the kill signal (no opportunity to shut down). This is an alpha field and requires enabling ProbeTerminationGracePeriod feature gate. Maximum value is 3600 seconds (1 hour)

timeoutSeconds

integer

Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Maximum value is 240.

type

Type

The type of probe.

ContainerResources

Container App container resource requirements.

Name Type Description
cpu

number

Required CPU in cores, e.g. 0.5

ephemeralStorage

string

Ephemeral Storage, e.g. "1Gi"

memory

string

Required memory, e.g. "250Mb"

createdByType

The type of identity that created the resource.

Name Type Description
Application

string

Key

string

ManagedIdentity

string

User

string

DefaultErrorResponse

App Service error response.

Name Type Description
error

Error

Error model.

Details

Details or the error

Name Type Description
code

string

Standardized string to programmatically identify the error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

EnvironmentVar

Container App container environment variable.

Name Type Description
name

string

Environment variable name.

secretRef

string

Name of the Container App secret from which to pull the environment variable value.

value

string

Non-secret environment variable value.

Error

Error model.

Name Type Description
code

string

Standardized string to programmatically identify the error.

details

Details[]

Details or the error

innererror

string

More information to debug error.

message

string

Detailed error description and debugging information.

target

string

Detailed error description and debugging information.

EventTriggerConfig

Trigger configuration of an event driven job.

Name Type Description
parallelism

integer

Number of parallel replicas of a job that can run at a given time.

replicaCompletionCount

integer

Minimum number of successful replica completions before overall job completion.

scale

JobScale

Scaling configurations for event driven jobs.

HttpGet

HTTPGet specifies the http request to perform.

Name Type Description
host

string

Host name to connect to, defaults to the pod IP. You probably want to set "Host" in httpHeaders instead.

httpHeaders

HttpHeaders[]

Custom headers to set in the request. HTTP allows repeated headers.

path

string

Path to access on the HTTP server.

port

integer

Name or number of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.

scheme

Scheme

Scheme to use for connecting to the host. Defaults to HTTP.

HttpHeaders

Custom headers to set in the request. HTTP allows repeated headers.

Name Type Description
name

string

The header field name

value

string

The header field value

InitContainer

Container App init container definition

Name Type Description
args

string[]

Container start command arguments.

command

string[]

Container start command.

env

EnvironmentVar[]

Container environment variables.

image

string

Container image tag.

name

string

Custom container name.

resources

ContainerResources

Container resource requirements.

volumeMounts

VolumeMount[]

Container volume mounts.

Job

Container App Job

Name Type Description
id

string

Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}

identity

ManagedServiceIdentity

Managed identities needed by a container app job to interact with other Azure services to not maintain any secrets or credentials in code.

location

string

The geo-location where the resource lives

name

string

The name of the resource

properties.configuration

JobConfiguration

Container Apps Job configuration properties.

properties.environmentId

string

Resource ID of environment.

properties.eventStreamEndpoint

string

The endpoint of the eventstream of the container apps job.

properties.outboundIpAddresses

string[]

Outbound IP Addresses of a container apps job.

properties.provisioningState

JobProvisioningState

Provisioning state of the Container Apps Job.

properties.template

JobTemplate

Container Apps job definition.

properties.workloadProfileName

string

Workload profile name to pin for container apps job execution.

systemData

systemData

Azure Resource Manager metadata containing createdBy and modifiedBy information.

tags

object

Resource tags.

type

string

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

JobConfiguration

Non versioned Container Apps Job configuration properties

Name Type Default value Description
eventTriggerConfig

EventTriggerConfig

Trigger configuration of an event driven job.

manualTriggerConfig

ManualTriggerConfig

Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default

registries

RegistryCredentials[]

Collection of private container registry credentials used by a Container apps job

replicaRetryLimit

integer

Maximum number of retries before failing the job.

replicaTimeout

integer

Maximum number of seconds a replica is allowed to run.

scheduleTriggerConfig

ScheduleTriggerConfig

Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default

secrets

Secret[]

Collection of secrets used by a Container Apps Job

triggerType

TriggerType

Manual

Trigger type of the job

JobProvisioningState

Provisioning state of the Container Apps Job.

Name Type Description
Canceled

string

Deleting

string

Failed

string

InProgress

string

Succeeded

string

JobScale

Scaling configurations for event driven jobs.

Name Type Default value Description
maxExecutions

integer

100

Maximum number of job executions that are created for a trigger, default 100.

minExecutions

integer

0

Minimum number of job executions that are created for a trigger, default 0

pollingInterval

integer

Interval to check each event source in seconds. Defaults to 30s

rules

JobScaleRule[]

Scaling rules.

JobScaleRule

Scaling rule.

Name Type Description
auth

ScaleRuleAuth[]

Authentication secrets for the scale rule.

metadata

object

Metadata properties to describe the scale rule.

name

string

Scale Rule Name

type

string

Type of the scale rule eg: azure-servicebus, redis etc.

JobTemplate

Container Apps Job versioned application definition. Defines the desired state of an immutable revision. Any changes to this section Will result in a new revision being created

Name Type Description
containers

Container[]

List of container definitions for the Container App.

initContainers

InitContainer[]

List of specialized containers that run before app containers.

volumes

Volume[]

List of volume definitions for the Container App.

ManagedServiceIdentity

Managed service identity (system assigned and/or user assigned identities)

Name Type Description
principalId

string

The service principal ID of the system assigned identity. This property will only be provided for a system assigned identity.

tenantId

string

The tenant ID of the system assigned identity. This property will only be provided for a system assigned identity.

type

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

userAssignedIdentities

<string,  UserAssignedIdentity>

User-Assigned Identities
The set of user assigned identities associated with the resource. The userAssignedIdentities dictionary keys will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}. The dictionary values can be empty objects ({}) in requests.

ManagedServiceIdentityType

Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed).

Name Type Description
None

string

SystemAssigned

string

SystemAssigned,UserAssigned

string

UserAssigned

string

ManualTriggerConfig

Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default

Name Type Description
parallelism

integer

Number of parallel replicas of a job that can run at a given time.

replicaCompletionCount

integer

Minimum number of successful replica completions before overall job completion.

RegistryCredentials

Container App Private Registry

Name Type Description
identity

string

A Managed Identity to use to authenticate with Azure Container Registry. For user-assigned identities, use the full user-assigned identity Resource ID. For system-assigned identities, use 'system'

passwordSecretRef

string

The name of the Secret that contains the registry login password

server

string

Container Registry Server

username

string

Container Registry Username

ScaleRuleAuth

Auth Secrets for Scale Rule

Name Type Description
secretRef

string

Name of the secret from which to pull the auth params.

triggerParameter

string

Trigger Parameter that uses the secret

ScheduleTriggerConfig

Cron formatted repeating trigger schedule ("* * * * *") for cronjobs. Properties completions and parallelism would be set to 1 by default

Name Type Description
cronExpression

string

Cron formatted repeating schedule ("* * * * *") of a Cron Job.

parallelism

integer

Number of parallel replicas of a job that can run at a given time.

replicaCompletionCount

integer

Minimum number of successful replica completions before overall job completion.

Scheme

Scheme to use for connecting to the host. Defaults to HTTP.

Name Type Description
HTTP

string

HTTPS

string

Secret

Secret definition.

Name Type Description
identity

string

Resource ID of a managed identity to authenticate with Azure Key Vault, or System to use a system-assigned identity.

keyVaultUrl

string

Azure Key Vault URL pointing to the secret referenced by the container app.

name

string

Secret Name.

value

string

Secret Value.

SecretVolumeItem

Secret to be added to volume.

Name Type Description
path

string

Path to project secret to. If no path is provided, path defaults to name of secret listed in secretRef.

secretRef

string

Name of the Container App secret from which to pull the secret value.

StorageType

Storage type for the volume. If not provided, use EmptyDir.

Name Type Description
AzureFile

string

EmptyDir

string

Secret

string

systemData

Metadata pertaining to creation and last modification of the resource.

Name Type Description
createdAt

string

The timestamp of resource creation (UTC).

createdBy

string

The identity that created the resource.

createdByType

createdByType

The type of identity that created the resource.

lastModifiedAt

string

The timestamp of resource last modification (UTC)

lastModifiedBy

string

The identity that last modified the resource.

lastModifiedByType

createdByType

The type of identity that last modified the resource.

TcpSocket

TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported.

Name Type Description
host

string

Optional: Host name to connect to, defaults to the pod IP.

port

integer

Number or name of the port to access on the container. Number must be in the range 1 to 65535. Name must be an IANA_SVC_NAME.

TriggerType

Trigger type of the job

Name Type Description
Event

string

Manual

string

Schedule

string

Type

The type of probe.

Name Type Description
Liveness

string

Readiness

string

Startup

string

UserAssignedIdentity

User assigned identity properties

Name Type Description
clientId

string

The client ID of the assigned identity.

principalId

string

The principal ID of the assigned identity.

Volume

Volume definitions for the Container App.

Name Type Description
mountOptions

string

Mount options used while mounting the AzureFile. Must be a comma-separated string.

name

string

Volume name.

secrets

SecretVolumeItem[]

List of secrets to be added in volume. If no secrets are provided, all secrets in collection will be added to volume.

storageName

string

Name of storage resource. No need to provide for EmptyDir and Secret.

storageType

StorageType

Storage type for the volume. If not provided, use EmptyDir.

VolumeMount

Volume mount for the Container App.

Name Type Description
mountPath

string

Path within the container at which the volume should be mounted.Must not contain ':'.

subPath

string

Path within the volume from which the container's volume should be mounted. Defaults to "" (volume's root).

volumeName

string

This must match the Name of a Volume.