PUT /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.App/jobs/{jobName}/?api-version=2023-08-01-preview

Create or Update a Container Apps Job.

Servers

Path parameters

Name Type Required Description
jobName String Yes

Job Name

subscriptionId String Yes

The ID of the target subscription. The value must be an UUID.

resourceGroupName String Yes

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

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
extendedLocation Object No

The complex type of the extended location.

extendedLocation.name String No

The name of the extended location.

extendedLocation.type String No

The type of extendedLocation.

Possible values:

  • "CustomLocation"
location String No

The geo-location where the resource lives

properties Object No

Container Apps Job resource specific properties.

properties.template Object No

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

properties.template.initContainers[] Array No

List of specialized containers that run before app containers.

properties.template.initContainers[].volumeMounts[] Array No

Container volume mounts.

properties.template.initContainers[].volumeMounts[].subPath String No

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

properties.template.initContainers[].volumeMounts[].volumeName String No

This must match the Name of a Volume.

properties.template.initContainers[].volumeMounts[].mountPath String No

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

properties.template.initContainers[].name String No

Custom container name.

properties.template.initContainers[].env[] Array No

Container environment variables.

properties.template.initContainers[].env[].name String No

Environment variable name.

properties.template.initContainers[].env[].secretRef String No

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

properties.template.initContainers[].env[].value String No

Non-secret environment variable value.

properties.template.initContainers[].command[] Array No

Container start command.

properties.template.initContainers[].resources Object No

Container App container resource requirements.

properties.template.initContainers[].resources.memory String No

Required memory, e.g. "250Mb"

properties.template.initContainers[].resources.cpu Number No

Required CPU in cores, e.g. 0.5

properties.template.initContainers[].resources.ephemeralStorage String No

Ephemeral Storage, e.g. "1Gi"

properties.template.initContainers[].image String No

Container image tag.

properties.template.initContainers[].args[] Array No

Container start command arguments.

properties.template.containers[] Array No

List of container definitions for the Container App.

properties.template.containers[].probes[] Array No

List of probes for the container.

properties.template.containers[].probes[].failureThreshold Integer No

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

properties.template.containers[].probes[].httpGet Object No

HTTPGet specifies the http request to perform.

properties.template.containers[].probes[].httpGet.port Integer Yes

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.

properties.template.containers[].probes[].httpGet.httpHeaders[] Array No

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

properties.template.containers[].probes[].httpGet.httpHeaders[].name String Yes

The header field name

properties.template.containers[].probes[].httpGet.httpHeaders[].value String Yes

The header field value

properties.template.containers[].probes[].httpGet.scheme String No

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

Possible values:

  • "HTTP"
  • "HTTPS"
properties.template.containers[].probes[].httpGet.host String No

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

properties.template.containers[].probes[].httpGet.path String No

Path to access on the HTTP server.

properties.template.containers[].probes[].periodSeconds Integer No

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

properties.template.containers[].probes[].tcpSocket Object No

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

properties.template.containers[].probes[].tcpSocket.port Integer Yes

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.

properties.template.containers[].probes[].tcpSocket.host String No

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

properties.template.containers[].probes[].terminationGracePeriodSeconds Integer No

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)

properties.template.containers[].probes[].timeoutSeconds Integer No

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

properties.template.containers[].probes[].initialDelaySeconds Integer No

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

properties.template.containers[].probes[].type String No

The type of probe.

Possible values:

  • "Startup"
  • "Readiness"
  • "Liveness"
properties.template.containers[].probes[].successThreshold Integer No

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.

properties.template.containers[].volumeMounts[] Array No

Container volume mounts.

properties.template.containers[].volumeMounts[].subPath String No

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

properties.template.containers[].volumeMounts[].volumeName String No

This must match the Name of a Volume.

properties.template.containers[].volumeMounts[].mountPath String No

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

properties.template.containers[].name String No

Custom container name.

properties.template.containers[].env[] Array No

Container environment variables.

properties.template.containers[].env[].name String No

Environment variable name.

properties.template.containers[].env[].secretRef String No

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

properties.template.containers[].env[].value String No

Non-secret environment variable value.

properties.template.containers[].command[] Array No

Container start command.

properties.template.containers[].resources Object No

Container App container resource requirements.

properties.template.containers[].resources.memory String No

Required memory, e.g. "250Mb"

properties.template.containers[].resources.cpu Number No

Required CPU in cores, e.g. 0.5

properties.template.containers[].resources.ephemeralStorage String No

Ephemeral Storage, e.g. "1Gi"

properties.template.containers[].image String No

Container image tag.

properties.template.containers[].args[] Array No

Container start command arguments.

properties.template.volumes[] Array No

List of volume definitions for the Container App.

properties.template.volumes[].storageName String No

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

properties.template.volumes[].name String No

Volume name.

properties.template.volumes[].storageType String No

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

Possible values:

  • "EmptyDir"
  • "AzureFile"
  • "Secret"
properties.template.volumes[].secrets[] Array No

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

properties.template.volumes[].secrets[].secretRef String No

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

properties.template.volumes[].secrets[].path String No

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

properties.template.volumes[].mountOptions String No

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

properties.provisioningState String No

Provisioning state of the Container Apps Job.

Possible values:

  • "Succeeded"
  • "Deleting"
  • "Canceled"
  • "InProgress"
  • "Failed"
properties.workloadProfileName String No

Workload profile name for container apps to execute on.

properties.configuration Object No

Non versioned Container Apps Job configuration properties

properties.configuration.registries[] Array No

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

properties.configuration.registries[].passwordSecretRef String No

The name of the Secret that contains the registry login password

properties.configuration.registries[].username String No

Container Registry Username

properties.configuration.registries[].server String No

Container Registry Server

properties.configuration.registries[].identity String No

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'

properties.configuration.manualTriggerConfig Object No

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

properties.configuration.manualTriggerConfig.replicaCompletionCount Integer No

Minimum number of successful replica completions before overall job completion.

properties.configuration.manualTriggerConfig.parallelism Integer No

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

properties.configuration.secrets[] Array No

Collection of secrets used by a Container Apps Job

properties.configuration.secrets[].name String No

Secret Name.

properties.configuration.secrets[].keyVaultUrl String No

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

properties.configuration.secrets[].value String No

Secret Value.

properties.configuration.secrets[].identity String No

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

properties.configuration.replicaTimeout Integer Yes

Maximum number of seconds a replica is allowed to run.

properties.configuration.replicaRetryLimit Integer No

Maximum number of retries before failing the job.

properties.configuration.triggerType String Yes

Trigger type of the job

Possible values:

  • "Schedule"
  • "Manual"
  • "Event"

Default value: "Manual"

properties.configuration.scheduleTriggerConfig Object No

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

properties.configuration.scheduleTriggerConfig.replicaCompletionCount Integer No

Minimum number of successful replica completions before overall job completion.

properties.configuration.scheduleTriggerConfig.parallelism Integer No

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

properties.configuration.scheduleTriggerConfig.cronExpression String Yes

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

properties.configuration.eventTriggerConfig Object No

Trigger configuration of an event driven job.

properties.configuration.eventTriggerConfig.replicaCompletionCount Integer No

Minimum number of successful replica completions before overall job completion.

properties.configuration.eventTriggerConfig.parallelism Integer No

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

properties.configuration.eventTriggerConfig.scale Object No

Scaling configurations for event driven jobs.

properties.configuration.eventTriggerConfig.scale.rules[] Array No

Scaling rules.

properties.configuration.eventTriggerConfig.scale.rules[].auth[] Array No

Authentication secrets for the scale rule.

properties.configuration.eventTriggerConfig.scale.rules[].auth[].triggerParameter String No

Trigger Parameter that uses the secret

properties.configuration.eventTriggerConfig.scale.rules[].auth[].secretRef String No

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

properties.configuration.eventTriggerConfig.scale.rules[].name String No

Scale Rule Name

properties.configuration.eventTriggerConfig.scale.rules[].type String No

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

properties.configuration.eventTriggerConfig.scale.rules[].metadata Object No

Metadata properties to describe the scale rule.

properties.configuration.eventTriggerConfig.scale.maxExecutions Integer No

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

Default value: 100

properties.configuration.eventTriggerConfig.scale.minExecutions Integer No

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

Default value: 0

properties.configuration.eventTriggerConfig.scale.pollingInterval Integer No

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

properties.outboundIpAddresses[] Array No

Outbound IP Addresses of a container apps job.

properties.environmentId String No

Resource ID of environment.

properties.eventStreamEndpoint String No

The endpoint of the eventstream of the container apps job.

tags Object No

Resource tags.

identity Object No

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

identity.tenantId String No

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

identity.type String Yes

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

Possible values:

  • "SystemAssigned"
  • "SystemAssigned,UserAssigned"
  • "UserAssigned"
  • "None"
identity.userAssignedIdentities Object No

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.

identity.principalId String No

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

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.