Share via


az spring job

Note

This reference is part of the spring extension for the Azure CLI (version 2.56.0 or higher). The extension will automatically install the first time you run an az spring job command. Learn more about extensions.

This command group is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

This command group is implicitly deprecated because command group 'spring' is deprecated and will be removed in a future release.

(Enterprise Tier Only) Commands to manage jobs of Azure Spring Apps service.

Commands

Name Description Type Status
az spring job create

Create a new job in Azure Spring Apps service.

Extension Preview and Deprecated
az spring job delete

Delete a job in the Azure Spring Apps.

Extension Preview and Deprecated
az spring job deploy

Deploy artifact to a job and update related configurations.

Extension Preview and Deprecated
az spring job execution

(Enterprise Tier Only) Commands to manage job executions of Azure Spring Apps service.

Extension Preview and Deprecated
az spring job execution cancel

Cancel a job execution.

Extension Preview and Deprecated
az spring job execution instance

(Enterprise Tier Only) Commands to manage job execution instances of Azure Spring Apps service.

Extension Preview and Deprecated
az spring job execution instance list

List all instances of the job execution.

Extension Preview and Deprecated
az spring job execution list

List all executions of the job.

Extension Preview and Deprecated
az spring job execution show

Show status and results of an execution of the job.

Extension Preview and Deprecated
az spring job list

List all jobs in the Azure Spring Apps.

Extension Preview and Deprecated
az spring job logs

Show logs for job execution instances. Logs will be streamed when setting '-f/--follow'.

Extension Preview and Deprecated
az spring job show

Show the details of a job in the Azure Spring Apps.

Extension Preview and Deprecated
az spring job start

Start an execution of the job.

Extension Preview and Deprecated
az spring job update

Update configurations of a job.

Extension Preview and Deprecated

az spring job create

Preview Deprecated

Command group 'spring job' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

This command is implicitly deprecated because command group 'spring' is deprecated and will be removed in a future release.

Create a new job in Azure Spring Apps service.

az spring job create --name
                     --resource-group
                     --service
                     [--args]
                     [--bind-config-server --bind-cs]
                     [--bind-service-registry --bind-sr]
                     [--cpu]
                     [--envs]
                     [--memory]
                     [--parallelism]
                     [--retry-limit]
                     [--secret-envs]
                     [--timeout]

Examples

Create a job with the default configuration.

az spring job create -n job-name -s MyAzureSpringAppsInstance -g MyResourceGroup

Required Parameters

--name -n

The name of job running in the specified Azure Spring Apps instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--args

The arguments of the job execution.

--bind-config-server --bind-cs

Bind the job to the default Config Server automatically.

--bind-service-registry --bind-sr

Bind the job to the default Service Registry automatically.

--cpu

CPU resource quantity. Should be 500m or number of CPU cores.

Property Value
Default value: 1
--envs

Non-sensitive properties for environment variables. Format "key[=value]" and separated by space.

--memory

Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.

Property Value
Default value: 2Gi
--parallelism

Maximum number of replicas to run per execution.

--retry-limit

Maximum number of retries before failing the job.

--secret-envs

Sensitive properties for environment variables. Once put, it will be encrypted and not returned.Format "key[=value]" and separated by space.

--timeout

Maximum number of seconds an execution is allowed to run.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az spring job delete

Preview Deprecated

Command group 'spring job' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

This command is implicitly deprecated because command group 'spring' is deprecated and will be removed in a future release.

Delete a job in the Azure Spring Apps.

az spring job delete --name
                     --resource-group
                     --service

Examples

Delete a job

az spring job delete -n job-name -s MyAzureSpringAppsInstance -g MyResourceGroup

Required Parameters

--name -n

The name of job running in the specified Azure Spring Apps instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az spring job deploy

Preview Deprecated

Command group 'spring job' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

This command is implicitly deprecated because command group 'spring' is deprecated and will be removed in a future release.

Deploy artifact to a job and update related configurations.

az spring job deploy --name
                     --resource-group
                     --service
                     [--args]
                     [--artifact-path]
                     [--build-cpu]
                     [--build-env]
                     [--build-memory]
                     [--builder]
                     [--cpu]
                     [--disable-validation {false, true}]
                     [--envs]
                     [--memory]
                     [--no-wait]
                     [--parallelism]
                     [--retry-limit]
                     [--secret-envs]
                     [--source-path]
                     [--timeout]
                     [--version]

Examples

Deploy a pre-built jar to a job with environment variables.

az spring job deploy -n job-name -s MyAzureSpringAppsInstance -g MyResourceGroup --artifact-path app.jar --env foo=bar

Deploy a pre-built jar to a job with build env.

az spring job deploy -n job-name -s MyAzureSpringAppsInstance -g MyResourceGroup --artifact-path app.jar --build-env BP_JVM_VERSION=11.*

Required Parameters

--name -n

The name of job running in the specified Azure Spring Apps instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--args

The arguments of the job execution.

--artifact-path

Deploy the specified pre-built artifact (jar or netcore zip).

--build-cpu

CPU resource quantity. Should be 500m or number of CPU cores.

Property Value
Default value: 1
--build-env

Space-separated environment variables in 'key[=value]' format.

--build-memory

Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.

Property Value
Default value: 2Gi
--builder

(Enterprise Tier Only) Build service builder used to build the executable.

Property Value
Default value: default
--cpu

CPU resource quantity. Should be 500m or number of CPU cores.

--disable-validation

If true, disable jar validation.

Property Value
Accepted values: false, true
--envs

Non-sensitive properties for environment variables. Format "key[=value]" and separated by space.

--memory

Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.

--no-wait

Do not wait for the long-running operation to finish.

Property Value
Default value: False
--parallelism

Maximum number of replicas to run per execution.

--retry-limit

Maximum number of retries before failing the job.

--secret-envs

Sensitive properties for environment variables. Once put, it will be encrypted and not returned.Format "key[=value]" and separated by space.

--source-path

Deploy the specified source folder. The folder will be packed into tar, uploaded, and built using kpack. Default to the current folder if no value provided.

Property Value
Parameter group: Source Code deploy Arguments
--timeout

Maximum number of seconds an execution is allowed to run. You can use -1 to reset timeout.

--version

Deployment version, keep unchanged if not set.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az spring job list

Preview Deprecated

Command group 'spring job' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

This command is implicitly deprecated because command group 'spring' is deprecated and will be removed in a future release.

List all jobs in the Azure Spring Apps.

az spring job list --resource-group
                   --service

Examples

List jobs

az spring job list -s MyAzureSpringAppsInstance -g MyResourceGroup

Required Parameters

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az spring job logs

Preview Deprecated

Command group 'spring job' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

This command is implicitly deprecated because command group 'spring' is deprecated and will be removed in a future release.

Show logs for job execution instances. Logs will be streamed when setting '-f/--follow'.

az spring job logs --execution
                   --name
                   --resource-group
                   --service
                   [--all-instances]
                   [--follow]
                   [--instance]
                   [--limit]
                   [--lines]
                   [--max-log-requests]
                   [--since]

Examples

Show logs for all instances of a job execution.

az spring job logs --name job-name --execution job-execution-nam --all-instances -s MyService -g MyResourceGroup

Show logs for a specific instance of a job execution.

az spring job logs --name job-name --execution job-execution-nam --instance job-execution-instance -s MyService -g MyResourceGroup

Stream and watch logs for all instances of a job execution.

az spring job logs --name job-name --execution job-execution-nam --all-instances --follow -s MyService -g MyResourceGroup

Stream and watch logs for a specific instance of a job execution.

az spring job logs --name job-name --execution job-execution-nam --instance MyJobExecutionInstance --follow -s MyService -g MyResourceGroup

Required Parameters

--execution

The name of the job execution.

--name -n

The name of the job running in the specified Azure Spring Apps instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--all-instances

The flag to indicate get logs for all instances of the job execution.

--follow -f

The flag to indicate logs should be streamed.

--instance -i

Name of an existing instance of the job execution. Find instance names from command az spring job execution instance list.

--limit

Maximum kibibyte of logs to return. Ceiling number is 2048.

Property Value
Default value: 2048
--lines

Number of lines to show. Maximum is 10000.

Property Value
Default value: 100
--max-log-requests

Specify maximum number of concurrent logs to follow when get logs by all-instances.

Property Value
Default value: 5
--since

Only return logs newer than a relative duration like 5s, 2m, or 1h. Maximum is 1h.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az spring job show

Preview Deprecated

Command group 'spring job' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

This command is implicitly deprecated because command group 'spring' is deprecated and will be removed in a future release.

Show the details of a job in the Azure Spring Apps.

az spring job show --name
                   --resource-group
                   --service

Required Parameters

--name -n

The name of job running in the specified Azure Spring Apps instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az spring job start

Preview Deprecated

Command group 'spring job' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

This command is implicitly deprecated because command group 'spring' is deprecated and will be removed in a future release.

Start an execution of the job.

az spring job start --name
                    --resource-group
                    --service
                    [--args]
                    [--cpu]
                    [--envs]
                    [--memory]
                    [--secret-envs]
                    [--wait-until-finished {false, true}]

Examples

Start an execution of the job

az spring job start -n job-name -s MyAzureSpringAppsInstance -g MyResourceGroup

Required Parameters

--name -n

The name of job running in the specified Azure Spring Apps instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--args

The arguments of the job execution.

--cpu

CPU resource quantity. Should be 500m or number of CPU cores.

--envs

Non-sensitive properties for environment variables. Format "key[=value]" and separated by space.

--memory

Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.

--secret-envs

Sensitive properties for environment variables. Once put, it will be encrypted and not returned.Format "key[=value]" and separated by space.

--wait-until-finished

If true, wait until the job execution is finished.

Property Value
Default value: False
Accepted values: false, true
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False

az spring job update

Preview Deprecated

Command group 'spring job' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus

This command is implicitly deprecated because command group 'spring' is deprecated and will be removed in a future release.

Update configurations of a job.

az spring job update --name
                     --resource-group
                     --service
                     [--args]
                     [--cpu]
                     [--envs]
                     [--memory]
                     [--parallelism]
                     [--retry-limit]
                     [--secret-envs]
                     [--timeout]

Examples

Add plain text environment variables for the job.

az spring job update -n job-name -s MyAzureSpringAppsInstance -g MyResourceGroup --envs foo=bar

Remove all plain text environment variables and keep all existed secrets for the job.

az spring job update -n job-name -s MyAzureSpringAppsInstance -g MyResourceGroup --envs

Remove all secrets and keep all the plain text environment variables for the job.

az spring job update -n job-name -s MyAzureSpringAppsInstance -g MyResourceGroup --secret-envs

Required Parameters

--name -n

The name of job running in the specified Azure Spring Apps instance.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service -s

The name of Azure Spring Apps instance, you can configure the default service using az configure --defaults spring=<name>.

Optional Parameters

The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.

--args

The arguments of the job execution.

--cpu

CPU resource quantity. Should be 500m or number of CPU cores.

--envs

Non-sensitive properties for environment variables. Format "key[=value]" and separated by space.

--memory

Memory resource quantity. Should be 512Mi or #Gi, e.g., 1Gi, 3Gi.

--parallelism

Maximum number of replicas to run per execution.

--retry-limit

Maximum number of retries before failing the job.

--secret-envs

Sensitive properties for environment variables. Once put, it will be encrypted and not returned.Format "key[=value]" and separated by space.

--timeout

Maximum number of seconds an execution is allowed to run. You can use -1 to reset timeout.

Global Parameters
--debug

Increase logging verbosity to show all debug logs.

Property Value
Default value: False
--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

Property Value
Default value: False
--output -o

Output format.

Property Value
Default value: json
Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.

Property Value
Default value: False