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 |
---|---|---|---|---|
job
|
path | True |
string |
Job Name Regex pattern: |
resource
|
path | True |
string |
The name of the resource group. The name is case insensitive. |
subscription
|
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 |
OK. |
|
Other Status Codes |
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
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 |
Container |
Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. |
Container |
Container App container resource requirements. |
created |
The type of identity that created the resource. |
Default |
App Service error response. |
Details |
Details or the error |
Environment |
Container App container environment variable. |
Error |
Error model. |
Event |
Trigger configuration of an event driven job. |
Http |
HTTPGet specifies the http request to perform. |
Http |
Custom headers to set in the request. HTTP allows repeated headers. |
Init |
Container App init container definition |
Job |
Container App Job |
Job |
Non versioned Container Apps Job configuration properties |
Job |
Provisioning state of the Container Apps Job. |
Job |
Scaling configurations for event driven jobs. |
Job |
Scaling rule. |
Job |
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 |
Managed |
Managed service identity (system assigned and/or user assigned identities) |
Managed |
Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). |
Manual |
Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default |
Registry |
Container App Private Registry |
Scale |
Auth Secrets for Scale Rule |
Schedule |
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. |
Secret |
Secret to be added to volume. |
Storage |
Storage type for the volume. If not provided, use EmptyDir. |
system |
Metadata pertaining to creation and last modification of the resource. |
Tcp |
TCPSocket specifies an action involving a TCP port. TCP hooks not yet supported. |
Trigger |
Trigger type of the job |
Type |
The type of probe. |
User |
User assigned identity properties |
Volume |
Volume definitions for the Container App. |
Volume |
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 |
Container environment variables. |
|
image |
string |
Container image tag. |
name |
string |
Custom container name. |
probes |
List of probes for the container. |
|
resources |
Container resource requirements. |
|
volumeMounts |
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 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 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 |
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 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 |
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 |
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 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 |
Container environment variables. |
|
image |
string |
Container image tag. |
name |
string |
Custom container name. |
resources |
Container resource requirements. |
|
volumeMounts |
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 |
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 |
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 |
Provisioning state of the Container Apps Job. |
|
properties.template |
Container Apps job definition. |
|
properties.workloadProfileName |
string |
Workload profile name to pin for container apps job execution. |
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 |
Trigger configuration of an event driven job. |
||
manualTriggerConfig |
Manual trigger configuration for a single execution job. Properties replicaCompletionCount and parallelism would be set to 1 by default |
||
registries |
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 |
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 | 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 |
Scaling rules. |
JobScaleRule
Scaling rule.
Name | Type | Description |
---|---|---|
auth |
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 |
List of container definitions for the Container App. |
|
initContainers |
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 |
Type of managed service identity (where both SystemAssigned and UserAssigned types are allowed). |
|
userAssignedIdentities |
<string,
User |
User-Assigned Identities |
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 |
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 |
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 |
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 |
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. |