az spring-cloud app

Commands to manage apps in Azure Spring Cloud.

Commands

az spring-cloud app binding

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

az spring-cloud app binding cosmos

Commands to manage Azure Cosmos DB bindings.

az spring-cloud app binding cosmos add

Bind an Azure Cosmos DB with the app.

az spring-cloud app binding cosmos update

Update an Azure Cosmos DB service binding of the app.

az spring-cloud app binding list

List all service bindings in an app.

az spring-cloud app binding mysql

Commands to manage Azure Database for MySQL bindings.

az spring-cloud app binding mysql add

Bind an Azure Database for MySQL with the app.

az spring-cloud app binding mysql update

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

az spring-cloud app binding redis

Commands to manage Azure Cache for Redis bindings.

az spring-cloud app binding redis add

Bind an Azure Cache for Redis with the app.

az spring-cloud app binding redis update

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

az spring-cloud app binding remove

Remove a service binding of the app.

az spring-cloud app binding show

Show the details of a service binding.

az spring-cloud app create

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

az spring-cloud app custom-domain

Commands to manage custom domains.

az spring-cloud app custom-domain bind

Bind a custom domain with the app.

az spring-cloud app custom-domain list

List all custom domains of the app.

az spring-cloud app custom-domain show

Show details of a custom domain.

az spring-cloud app custom-domain unbind

Unbind a custom-domain of the app.

az spring-cloud app custom-domain update

Update a custom domain of the app.

az spring-cloud app delete

Delete an app in the Azure Spring Cloud.

az spring-cloud app deploy

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

az spring-cloud app deployment

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

az spring-cloud app deployment create

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

az spring-cloud app deployment delete

Delete a deployment of the app.

az spring-cloud app deployment list

List all deployments in an app.

az spring-cloud app deployment show

Show details of a deployment.

az spring-cloud app identity

Manage an app's managed service identity.

az spring-cloud app identity assign

Enable managed service identity on an app.

az spring-cloud app identity remove

Remove managed service identity from an app.

az spring-cloud app identity show

Display app's managed identity info.

az spring-cloud app list

List all apps in the Azure Spring Cloud.

az spring-cloud 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-cloud app log tail

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

az spring-cloud app logs

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

az spring-cloud app restart

Restart instances of the app, default to production deployment.

az spring-cloud app scale

Manually scale an app or its deployments.

az spring-cloud app set-deployment

Set production deployment of an app.

az spring-cloud app show

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

az spring-cloud app show-deploy-log

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

az spring-cloud app start

Start instances of the app, default to production deployment.

az spring-cloud app stop

Stop instances of the app, default to production deployment.

az spring-cloud app update

Update configurations of an app.

az spring-cloud app create

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

az spring-cloud app create --name
                           --resource-group
                           --service
                           [--assign-identity {false, true}]
                           [--cpu]
                           [--enable-persistent-storage {false, true}]
                           [--env]
                           [--instance-count]
                           [--is-public {false, true}]
                           [--jvm-options]
                           [--memory]
                           [--runtime-version {Java_11, Java_8, NetCore_31}]

Examples

Create an app with the default configuration.

az spring-cloud 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-cloud app create -n MyApp -s MyCluster -g MyResourceGroup --is-public 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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Optional Parameters

--assign-identity

If true, assign managed service identity.

accepted values: false, true
--cpu

Number of virtual cpu cores per instance.

default value: 1
--enable-persistent-storage

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

accepted values: false, true
--env

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

--instance-count

Number of instance.

default value: 1
--is-public

If true, assign public domain.

accepted values: false, true
--jvm-options

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

--memory

Number of GB of memory per instance.

default value: 1
--runtime-version

Runtime version of used language.

accepted values: Java_11, Java_8, NetCore_31

az spring-cloud app delete

Delete an app in the Azure Spring Cloud.

az spring-cloud 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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

az spring-cloud app deploy

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

az spring-cloud app deploy --name
                           --resource-group
                           --service
                           [--artifact-path]
                           [--deployment]
                           [--env]
                           [--jvm-options]
                           [--main-entry]
                           [--no-wait]
                           [--runtime-version {Java_11, Java_8, NetCore_31}]
                           [--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-cloud app deploy -n MyApp -s MyCluster -g MyResourceGroup

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

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

Deploy source code to a specific deployment of an app.

az spring-cloud app deploy -n MyApp -s MyCluster -g MyResourceGroup -d green-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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Optional Parameters

--artifact-path --jar-path -p

If provided, deploy pre-built artifact (jar or netcore zip), otherwise deploy current folder as tar.

--deployment -d

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

--env

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

--jvm-options

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

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

--runtime-version

Runtime version of used language.

accepted values: Java_11, Java_8, NetCore_31
--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-cloud app list

List all apps in the Azure Spring Cloud.

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

Examples

Query status of persistent storage of all apps

az spring-cloud 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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

az spring-cloud app logs

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

az spring-cloud app logs --name
                         --resource-group
                         --service
                         [--follow]
                         [--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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Optional Parameters

--follow -f

Specify if the logs should be streamed.

--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-cloud app restart

Restart instances of the app, default to production deployment.

az spring-cloud 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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

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-cloud app scale

Manually scale an app or its deployments.

az spring-cloud 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-cloud app scale -n MyApp -s MyCluster -g MyResourceGroup --cpu 3 --memory 8

Scale out a deployment of the app to 5 instances.

az spring-cloud 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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Optional Parameters

--cpu

Number of virtual cpu cores per instance.

--deployment -d

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

--instance-count

Number of instance.

--memory

Number of GB of memory per instance.

--no-wait

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

az spring-cloud app set-deployment

Set production deployment of an app.

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

Examples

Swap a staging deployment of an app to production.

az spring-cloud 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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Optional Parameters

--no-wait

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

az spring-cloud app show

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

az spring-cloud 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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

az spring-cloud app show-deploy-log

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

az spring-cloud 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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Optional Parameters

--deployment -d

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

az spring-cloud app start

Start instances of the app, default to production deployment.

az spring-cloud 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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

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-cloud app stop

Stop instances of the app, default to production deployment.

az spring-cloud 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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

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-cloud app update

Update configurations of an app.

az spring-cloud app update --name
                           --resource-group
                           --service
                           [--deployment]
                           [--enable-persistent-storage {false, true}]
                           [--env]
                           [--https-only {false, true}]
                           [--is-public {false, true}]
                           [--jvm-options]
                           [--main-entry]
                           [--runtime-version {Java_11, Java_8, NetCore_31}]

Examples

Add an environment variable for the app.

az spring-cloud 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 Cloud, you can configure the default service using az configure --defaults spring-cloud=.

Optional Parameters

--deployment -d

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

--enable-persistent-storage

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

accepted values: false, true
--env

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

--https-only

If true, access app via https.

accepted values: false, true
--is-public

If true, assign endpoint.

accepted values: false, true
--jvm-options

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

--main-entry -m

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

--runtime-version

Runtime version of used language.

accepted values: Java_11, Java_8, NetCore_31