az spring app

Note

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

Commands to manage apps in Azure Spring Apps.

Commands

az spring app append-loaded-public-certificate

Append a new loaded public certificate to an app in the Azure Spring Apps.

az spring app append-persistent-storage

Append a new persistent storage to an app in the Azure Spring Apps.

az spring app binding

Commands to manage bindings with Azure Data Services, you need to manually restart app to make settings take effect.

az spring app binding cosmos

Commands to manage Azure Cosmos DB bindings.

az spring app binding cosmos add

Bind an Azure Cosmos DB with the app.

az spring app binding cosmos update

Update an Azure Cosmos DB service binding of the app.

az spring app binding list

List all service bindings in an app.

az spring app binding mysql

Commands to manage Azure Database for MySQL bindings.

az spring app binding mysql add

Bind an Azure Database for MySQL with the app.

az spring app binding mysql update

Update an Azure Database for MySQL service binding of the app.

az spring app binding redis

Commands to manage Azure Cache for Redis bindings.

az spring app binding redis add

Bind an Azure Cache for Redis with the app.

az spring app binding redis update

Update an Azure Cache for Redis service binding of the app.

az spring app binding remove

Remove a service binding of the app.

az spring app binding show

Show the details of a service binding.

az spring app connect

Connect to the interactive shell of an app instance for troubleshooting'.

az spring app create

Create a new app with a default deployment in the Azure Spring Apps.

az spring app custom-domain

Commands to manage custom domains.

az spring app custom-domain bind

Bind a custom domain with the app.

az spring app custom-domain list

List all custom domains of the app.

az spring app custom-domain show

Show details of a custom domain.

az spring app custom-domain unbind

Unbind a custom-domain of the app.

az spring app custom-domain update

Update a custom domain of the app.

az spring app delete

Delete an app in the Azure Spring Apps.

az spring app deploy

Deploy source code or pre-built binary to an app and update related configurations.

az spring app deployment

Commands to manage life cycle of deployments of an app in Azure Spring Apps. More operations on deployments can be done on app level with parameter --deployment. e.g. az spring app deploy --deployment .

az spring app deployment create

Create a staging deployment for the app. To deploy code or update setting to an existing deployment, use az spring app deploy/update --deployment <staging deployment>.

az spring app deployment delete

Delete a deployment of the app.

az spring app deployment generate-heap-dump

Generate a heap dump of your target app instance to given file path.

az spring app deployment generate-thread-dump

Generate a thread dump of your target app instance to given file path.

az spring app deployment list

List all deployments in an app.

az spring app deployment show

Show details of a deployment.

az spring app deployment start-jfr

Start a JFR on your target app instance to given file path.

az spring app disable-remote-debugging

Disable remote debugging for a deployment.

az spring app enable-remote-debugging

Enable remote debugging for a deployment.

az spring app get-remote-debugging-config

Get the remote debugging configuration of a deployment.

az spring app identity

Manage an app's managed identities.

az spring app identity assign

Enable system-assigned managed identity or assign user-assigned managed identities to an app.

az spring app identity force-set

Force set managed identities on an app.

az spring app identity remove

Remove managed identity from an app.

az spring app identity show

Display app's managed identity info.

az spring app list

List all apps in the Azure Spring Apps.

az spring app log

Commands to tail app instances logs with multiple options. If the app has only one instance, the instance name is optional.

az spring app log tail

Show logs of an app instance, logs will be streamed when setting '-f/--follow'.

az spring app logs

Show logs of an app instance, logs will be streamed when setting '-f/--follow'.

az spring app restart

Restart instances of the app, default to production deployment.

az spring app scale

Manually scale an app or its deployments.

az spring app set-deployment

Set production deployment of an app.

az spring app show

Show the details of an app in the Azure Spring Apps.

az spring app show-deploy-log

Show build log of the last deploy, only apply to source code deploy, default to production deployment.

az spring app start

Start instances of the app, default to production deployment.

az spring app stop

Stop instances of the app, default to production deployment.

az spring app unset-deployment

Unset production deployment of an app.

az spring app update

Update configurations of an app.

az spring app append-loaded-public-certificate

Append a new loaded public certificate to an app in the Azure Spring Apps.

az spring app append-loaded-public-certificate --certificate-name
                                               --load-trust-store {false, true}
                                               --name
                                               --resource-group
                                               --service

Examples

Append a new loaded public certificate to an app.

az spring app append-loaded-public-certificate --name MyApp --service MyCluster --resource-group MyResourceGroup --certificate-name MyCertName --load-trust-store true

Required Parameters

--certificate-name

Name of the certificate to be appended.

--load-trust-store

If true, the certificate would be loaded into trust store for Java applications.

accepted values: false, true
--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

az spring app append-persistent-storage

Append a new persistent storage to an app in the Azure Spring Apps.

az spring app append-persistent-storage --mount-path
                                        --name
                                        --persistent-storage-type
                                        --resource-group
                                        --service
                                        --share-name
                                        --storage-name
                                        [--mount-options]
                                        [--read-only {false, true}]

Examples

Append a new persistent storage to an app.

az spring app append-persistent-storage --persistent-storage-type AzureFileVolume --share-name MyShareName --mount-path /MyMountPath --storage-name MyStorageName -n MyApp -g MyResourceGroup -s MyService

Required Parameters

--mount-path

The path for the persistent storage volume to be mounted.

--name -n

Name of app.

--persistent-storage-type -t

Type of the persistent storage volumed.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

--share-name

The name of the pre-created file share. ShareName should be provided only if the type of the persistent storage volume is AzureFileVolume.

--storage-name

Name of the storage resource you created in Azure Spring Apps.

Optional Parameters

--mount-options

[optional] The mount options for the persistent storage volume.

--read-only

[optional] If true, the persistent storage volume will be read only.

accepted values: false, true

az spring app connect

Connect to the interactive shell of an app instance for troubleshooting'.

az spring app connect --name
                      --resource-group
                      --service
                      [--deployment]
                      [--instance]
                      [--shell-cmd]

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

--instance -i

Name of an existing instance of the deployment.

--shell-cmd

The shell command to run when connect to the app instance.

default value: /bin/sh

az spring app create

Create a new app with a default deployment in the Azure Spring Apps.

az spring app create --name
                     --resource-group
                     --service
                     [--assign-endpoint {false, true}]
                     [--assign-identity {false, true}]
                     [--assign-public-endpoint {false, true}]
                     [--backend-protocol {Default, GRPC}]
                     [--cpu]
                     [--disable-probe {false, true}]
                     [--enable-liveness-probe {false, true}]
                     [--enable-persistent-storage {false, true}]
                     [--enable-readiness-probe {false, true}]
                     [--enable-startup-probe {false, true}]
                     [--env]
                     [--grace-period]
                     [--ingress-read-timeout]
                     [--ingress-send-timeout]
                     [--instance-count]
                     [--jvm-options]
                     [--liveness-probe-config]
                     [--loaded-public-certificate-file]
                     [--memory]
                     [--persistent-storage]
                     [--readiness-probe-config]
                     [--runtime-version {Java_11, Java_17, Java_8, NetCore_31}]
                     [--session-affinity {Cookie, None}]
                     [--session-max-age]
                     [--startup-probe-config]
                     [--system-assigned {false, true}]
                     [--user-assigned]

Examples

Create an app with the default configuration.

az spring app create -n MyApp -s MyCluster -g MyResourceGroup

Create an public accessible app with 3 instances and 2 cpu cores and 3 GB of memory per instance.

az spring app create -n MyApp -s MyCluster -g MyResourceGroup --assign-endpoint true --cpu 2 --memory 3 --instance-count 3

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--assign-endpoint

If true, assign endpoint URL for direct access.

accepted values: false, true
--assign-identity

Enable system-assigned managed identity.

accepted values: false, true
--assign-public-endpoint

If true, assign endpoint URL which could be accessed out of virtual network for vnet injection instance app.

accepted values: false, true
--backend-protocol

Ingress backend protocol of app.

accepted values: Default, GRPC
--cpu

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

default value: 1
--disable-probe

If true, disable the liveness and readiness probe.

accepted values: false, true
--enable-liveness-probe

If false, will disable the liveness probe of the app instance.

accepted values: false, true
--enable-persistent-storage --enable-ps

If true, mount a 50G (Standard Pricing tier) or 1G (Basic Pricing tier) disk with default path.

accepted values: false, true
--enable-readiness-probe

If false, will disable the readiness probe of the app instance.

accepted values: false, true
--enable-startup-probe

If false, will disable the startup probe of the app instance.

accepted values: false, true
--env

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

--grace-period --termination-grace-period-seconds

Optional duration in seconds the app instance needs to terminate gracefully.

--ingress-read-timeout

Ingress read timeout value in seconds. Default 300, minimum is 1, maximum is 1800.

--ingress-send-timeout

Ingress send timeout value in seconds. Default 60, minimum is 1, maximum is 1800.

--instance-count

Number of instance.

default value: 1
--jvm-options

A string containing jvm options, use '=' instead of ' ' for this argument to avoid bash parse error, eg: --jvm-options='-Xms1024m -Xmx2048m'.

--liveness-probe-config

A json file path indicates the liveness probe config.

--loaded-public-certificate-file -f

A json file path indicates the certificates which would be loaded to app.

--memory

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

default value: 1Gi
--persistent-storage

A json file path for the persistent storages to be mounted to the app.

--readiness-probe-config

A json file path indicates the readiness probe config.

--runtime-version

Runtime version of used language.

accepted values: Java_11, Java_17, Java_8, NetCore_31
--session-affinity

Ingress session afiinity of app.

accepted values: Cookie, None
--session-max-age

Time until the cookie expires. Minimum is 1 second, maximum is 7 days. If set to 0, the expiration period is equal to the browser session period.

--startup-probe-config

A json file path indicates the startup probe config.

--system-assigned

Enable system-assigned managed identity.

accepted values: false, true
--user-assigned

Space-separated user-assigned managed identity resource IDs to assgin to an app.

az spring app delete

Delete an app in the Azure Spring Apps.

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

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

az spring app deploy

Deploy source code or pre-built binary to an app and update related configurations.

az spring app deploy --name
                     --resource-group
                     --service
                     [--artifact-path]
                     [--build-cpu]
                     [--build-env]
                     [--build-memory]
                     [--builder]
                     [--config-file-patterns]
                     [--container-args]
                     [--container-command]
                     [--container-image]
                     [--container-registry]
                     [--deployment]
                     [--disable-probe {false, true}]
                     [--disable-validation {false, true}]
                     [--enable-liveness-probe {false, true}]
                     [--enable-readiness-probe {false, true}]
                     [--enable-startup-probe {false, true}]
                     [--env]
                     [--grace-period]
                     [--jvm-options]
                     [--language-framework]
                     [--liveness-probe-config]
                     [--main-entry]
                     [--no-wait]
                     [--readiness-probe-config]
                     [--registry-password]
                     [--registry-username]
                     [--runtime-version {Java_11, Java_17, Java_8, NetCore_31}]
                     [--source-path]
                     [--startup-probe-config]
                     [--target-module]
                     [--version]

Examples

Deploy source code to an app. This will pack current directory, build binary with Pivotal Build Service and then deploy to the app.

az spring app deploy -n MyApp -s MyCluster -g MyResourceGroup --source-path

Deploy a pre-built jar to an app with jvm options and environment variables.

az spring app deploy -n MyApp -s MyCluster -g MyResourceGroup --artifact-path app.jar --jvm-options="-XX:+UseG1GC -XX:+UseStringDeduplication" --env foo=bar

Deploy source code to a specific deployment of an app.

az spring app deploy -n MyApp -s MyCluster -g MyResourceGroup -d green-deployment --source-path

Deploy a container image on Docker Hub to an app.

az spring app deploy -n MyApp -s MyCluster -g MyResourceGroup --container-image contoso/your-app:v1

Deploy a container image on a private registry to an app.

az spring app deploy -n MyApp -s MyCluster -g MyResourceGroup --container-image contoso/your-app:v1 --container-registry myacr.azurecr.io --registry-username <username> --registry-password <password>

Deploy with Application Configuration Service config file patterns to an app.

az spring app deploy -n MyApp -s MyCluster -g MyResourceGroup --config-file-patterns MyPatterns --artifact-path app.jar

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--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.

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.

default value: 2Gi
--builder

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

default value: default
--config-file-patterns

(Enterprise Tier Only) Config file patterns separated with ',' to decide which patterns of Application Configuration Service will be used. Use '""' to clear existing configurations.

--container-args

The arguments of the container image.

--container-command

The command of the container image.

--container-image

The container image tag.

--container-registry

The registry of the container image.

default value: docker.io
--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

--disable-probe

If true, disable the liveness and readiness probe.

accepted values: false, true
--disable-validation

If true, disable jar validation.

accepted values: false, true
--enable-liveness-probe

If false, will disable the liveness probe of the app instance.

accepted values: false, true
--enable-readiness-probe

If false, will disable the readiness probe of the app instance.

accepted values: false, true
--enable-startup-probe

If false, will disable the startup probe of the app instance.

accepted values: false, true
--env

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

--grace-period --termination-grace-period-seconds

Optional duration in seconds the app instance needs to terminate gracefully.

--jvm-options

A string containing jvm options, use '=' instead of ' ' for this argument to avoid bash parse error, eg: --jvm-options='-Xms1024m -Xmx2048m'.

--language-framework

Language framework of the container image uploaded. Supported values: "springboot", "".

--liveness-probe-config

A json file path indicates the liveness probe config.

--main-entry -m

A string containing the path to the .NET executable relative to zip root.

--no-wait

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

--readiness-probe-config

A json file path indicates the readiness probe config.

--registry-password

The password of the container registry.

--registry-username

The username of the container registry.

--runtime-version

Runtime version of used language.

accepted values: Java_11, Java_17, Java_8, NetCore_31
--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.

--startup-probe-config

A json file path indicates the startup probe config.

--target-module

Child module to be deployed, required for multiple jar packages built from source code.

--version

Deployment version, keep unchanged if not set.

az spring app disable-remote-debugging

Disable remote debugging for a deployment.

az spring app disable-remote-debugging --name
                                       --resource-group
                                       --service
                                       [--deployment]
                                       [--no-wait]

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

--no-wait

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

az spring app enable-remote-debugging

Enable remote debugging for a deployment.

az spring app enable-remote-debugging --name
                                      --resource-group
                                      --service
                                      [--deployment]
                                      [--no-wait]
                                      [--port]

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

--no-wait

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

--port -p

Remote debugging port, the value should be from 1024 to 65536, default value is 5005.

default value: 5005

az spring app get-remote-debugging-config

Get the remote debugging configuration of a deployment.

az spring app get-remote-debugging-config --name
                                          --resource-group
                                          --service
                                          [--deployment]

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

az spring app list

List all apps in the Azure Spring Apps.

az spring app list --resource-group
                   --service

Examples

Query status of persistent storage of all apps

az spring app list -s MyCluster -g MyResourceGroup -o json --query '[].{Name:name, PersistentStorage:properties.persistentDisk}'

Required Parameters

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

az spring app logs

Show logs of an app instance, logs will be streamed when setting '-f/--follow'.

az spring app logs --name
                   --resource-group
                   --service
                   [--deployment]
                   [--follow]
                   [--format-json]
                   [--instance]
                   [--limit]
                   [--lines]
                   [--since]

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

--follow -f

Specify if the logs should be streamed.

--format-json

Format JSON logs if structured log is enabled.

--instance -i

Name of an existing instance of the deployment.

--limit

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

default value: 2048
--lines

Number of lines to show. Maximum is 10000.

default value: 50
--since

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

az spring app restart

Restart instances of the app, default to production deployment.

az spring app restart --name
                      --resource-group
                      --service
                      [--deployment]
                      [--no-wait]

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

--no-wait

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

az spring app scale

Manually scale an app or its deployments.

az spring app scale --name
                    --resource-group
                    --service
                    [--cpu]
                    [--deployment]
                    [--instance-count]
                    [--memory]
                    [--no-wait]

Examples

Scale up an app to 4 cpu cores and 8 Gb of memory per instance.

az spring app scale -n MyApp -s MyCluster -g MyResourceGroup --cpu 3 --memory 8

Scale out a deployment of the app to 5 instances.

az spring app scale -n MyApp -s MyCluster -g MyResourceGroup -d green-deployment --instance-count 5

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--cpu

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

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

--instance-count

Number of instance.

--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.

az spring app set-deployment

Set production deployment of an app.

az spring app set-deployment --deployment
                             --name
                             --resource-group
                             --service
                             [--no-wait]

Examples

Swap a staging deployment of an app to production.

az spring app set-deployment -d green-deployment -n MyApp -s MyCluster -g MyResourceGroup

Required Parameters

--deployment -d

Name of an existing deployment of the app.

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--no-wait

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

az spring app show

Show the details of an app in the Azure Spring Apps.

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

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

az spring app show-deploy-log

Show build log of the last deploy, only apply to source code deploy, default to production deployment.

az spring app show-deploy-log --name
                              --resource-group
                              --service
                              [--deployment]

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

az spring app start

Start instances of the app, default to production deployment.

az spring app start --name
                    --resource-group
                    --service
                    [--deployment]
                    [--no-wait]

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

--no-wait

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

az spring app stop

Stop instances of the app, default to production deployment.

az spring app stop --name
                   --resource-group
                   --service
                   [--deployment]
                   [--no-wait]

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

--no-wait

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

az spring app unset-deployment

Unset production deployment of an app.

az spring app unset-deployment --name
                               --resource-group
                               --service
                               [--no-wait]

Examples

Swap the production deployment of an app to staging if the app has the production deployment.

az spring app unset-deployment -n MyApp -s MyCluster -g MyResourceGroup

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--no-wait

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

az spring app update

Update configurations of an app.

az spring app update --name
                     --resource-group
                     --service
                     [--assign-endpoint {false, true}]
                     [--assign-public-endpoint {false, true}]
                     [--backend-protocol {Default, GRPC}]
                     [--config-file-patterns]
                     [--deployment]
                     [--disable-probe {false, true}]
                     [--enable-ingress-to-app-tls {false, true}]
                     [--enable-liveness-probe {false, true}]
                     [--enable-persistent-storage {false, true}]
                     [--enable-readiness-probe {false, true}]
                     [--enable-startup-probe {false, true}]
                     [--env]
                     [--grace-period]
                     [--https-only {false, true}]
                     [--ingress-read-timeout]
                     [--ingress-send-timeout]
                     [--jvm-options]
                     [--liveness-probe-config]
                     [--loaded-public-certificate-file]
                     [--main-entry]
                     [--no-wait]
                     [--persistent-storage]
                     [--readiness-probe-config]
                     [--runtime-version {Java_11, Java_17, Java_8, NetCore_31}]
                     [--session-affinity {Cookie, None}]
                     [--session-max-age]
                     [--startup-probe-config]

Examples

Add an environment variable for the app.

az spring app update -n MyApp -s MyCluster -g MyResourceGroup --env foo=bar

Required Parameters

--name -n

Name of app.

--resource-group -g

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

--service -s

Name of Azure Spring Apps, you can configure the default service using az configure --defaults spring=.

Optional Parameters

--assign-endpoint

If true, assign endpoint URL for direct access.

accepted values: false, true
--assign-public-endpoint

If true, assign endpoint URL which could be accessed out of virtual network for vnet injection instance app.

accepted values: false, true
--backend-protocol

Ingress backend protocol of app.

accepted values: Default, GRPC
--config-file-patterns

(Enterprise Tier Only) Config file patterns separated with ',' to decide which patterns of Application Configuration Service will be used. Use '""' to clear existing configurations.

--deployment -d

Name of an existing deployment of the app. Default to the production deployment if not specified.

--disable-probe

If true, disable the liveness and readiness probe.

accepted values: false, true
--enable-ingress-to-app-tls

If true, enable ingress to app tls.

accepted values: false, true
--enable-liveness-probe

If false, will disable the liveness probe of the app instance.

accepted values: false, true
--enable-persistent-storage --enable-ps

If true, mount a 50G (Standard Pricing tier) or 1G (Basic Pricing tier) disk with default path.

accepted values: false, true
--enable-readiness-probe

If false, will disable the readiness probe of the app instance.

accepted values: false, true
--enable-startup-probe

If false, will disable the startup probe of the app instance.

accepted values: false, true
--env

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

--grace-period --termination-grace-period-seconds

Optional duration in seconds the app instance needs to terminate gracefully.

--https-only

If true, access app via https.

accepted values: false, true
--ingress-read-timeout

Ingress read timeout value in seconds. Default 300, minimum is 1, maximum is 1800.

--ingress-send-timeout

Ingress send timeout value in seconds. Default 60, minimum is 1, maximum is 1800.

--jvm-options

A string containing jvm options, use '=' instead of ' ' for this argument to avoid bash parse error, eg: --jvm-options='-Xms1024m -Xmx2048m'.

--liveness-probe-config

A json file path indicates the liveness probe config.

--loaded-public-certificate-file -f

A json file path indicates the certificates which would be loaded to app.

--main-entry -m

The path to the .NET executable relative to zip root.

--no-wait

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

--persistent-storage

A json file path for the persistent storages to be mounted to the app.

--readiness-probe-config

A json file path indicates the readiness probe config.

--runtime-version

Runtime version of used language.

accepted values: Java_11, Java_17, Java_8, NetCore_31
--session-affinity

Ingress session afiinity of app.

accepted values: Cookie, None
--session-max-age

Time until the cookie expires. Minimum is 1 second, maximum is 7 days. If set to 0, the expiration period is equal to the browser session period.

--startup-probe-config

A json file path indicates the startup probe config.