共用方式為


az spring app

備註

此參考是 Azure CLI 的 spring 延伸模組的一部分(2.56.0 版或更高版本)。 擴充功能會在您第一次執行 az spring app 命令時自動安裝。 深入瞭解擴充功能

此命令群組已隱含取代,因為命令群組 'spring' 已被取代,並將在未來版本中移除。

在 Azure Spring Apps 中管理應用程式的命令。

命令

名稱 Description 類型 狀態
az spring app append-loaded-public-certificate

將新載入的公用憑證附加至 Azure Spring Apps 中的應用程式。

擴充套件 Deprecated
az spring app append-persistent-storage

將新的永續性記憶體附加至 Azure Spring Apps 中的應用程式。

擴充套件 Deprecated
az spring app connect

線上到應用程式實例的互動式殼層以進行疑難解答』。

擴充套件 Deprecated
az spring app create

在 Azure Spring Apps 實例中建立具有預設部署的新應用程式。

擴充套件 Deprecated
az spring app custom-domain

管理自訂網域的命令。

擴充套件 Deprecated
az spring app custom-domain bind

使用應用程式系結自定義網域。

擴充套件 Deprecated
az spring app custom-domain list

列出應用程式的所有自定義網域。

擴充套件 Deprecated
az spring app custom-domain show

顯示自訂網域的詳細數據。

擴充套件 Deprecated
az spring app custom-domain unbind

解除系結應用程式的自定義網域。

擴充套件 Deprecated
az spring app custom-domain update

更新應用程式的自定義網域。

擴充套件 Deprecated
az spring app delete

刪除 Azure Spring Apps 中的應用程式。

擴充套件 Deprecated
az spring app deploy

將原始碼或預先建置的二進位檔部署到應用程式,並更新相關的組態。

擴充套件 Deprecated
az spring app deployment

在 Azure Spring Apps 中管理應用程式部署生命週期的命令。 您可以使用 參數 --deployment,在應用層級上執行更多部署作業。 例如,az spring app deploy --deployment <staging deployment>

擴充套件 Deprecated
az spring app deployment create

建立應用程式的預備部署。 若要將程式代碼或更新設定部署至現有的部署,請使用 az spring app deploy/update --deployment <staging deployment>

擴充套件 Deprecated
az spring app deployment delete

刪除應用程式的部署。

擴充套件 Deprecated
az spring app deployment generate-heap-dump

產生目標應用程式實例的堆積傾印至指定的檔案路徑。

擴充套件 Deprecated
az spring app deployment generate-thread-dump

產生目標應用程式實例的線程傾印至指定的檔案路徑。

擴充套件 Deprecated
az spring app deployment list

列出應用程式中的所有部署。

擴充套件 Deprecated
az spring app deployment show

顯示部署的詳細數據。

擴充套件 Deprecated
az spring app deployment start-jfr

在您的目標應用程式實例上啟動 JFR,以指定檔案路徑。

擴充套件 Deprecated
az spring app disable-remote-debugging

停用部署的遠端偵錯。

擴充套件 Deprecated
az spring app enable-remote-debugging

啟用部署的遠端偵錯。

擴充套件 Deprecated
az spring app get-remote-debugging-config

取得部署的遠端偵錯組態。

擴充套件 Deprecated
az spring app identity

管理應用程式的受控識別。

擴充套件 Deprecated
az spring app identity assign

啟用系統指派的受控識別,或將使用者指派的受控識別指派給應用程式。

擴充套件 Deprecated
az spring app identity force-set

強制在應用程式上設定受控識別。

擴充套件 Deprecated
az spring app identity remove

從應用程式移除受控識別。

擴充套件 Deprecated
az spring app identity show

顯示應用程式的受控識別資訊。

擴充套件 Deprecated
az spring app list

列出 Azure Spring Apps 中的所有應用程式。

擴充套件 Deprecated
az spring app logs

顯示應用程式實例的記錄,記錄會在設定 『-f/--follow』 時串流處理。

擴充套件 Deprecated
az spring app restart

重新啟動應用程式的實例,預設為生產部署。

擴充套件 Deprecated
az spring app scale

手動調整應用程式或其部署。

擴充套件 Deprecated
az spring app set-deployment

設定應用程式的生產部署。

擴充套件 Deprecated
az spring app show

在 Azure Spring Apps 中顯示應用程式的詳細數據。

擴充套件 Deprecated
az spring app show-deploy-log

顯示上次部署的組建記錄,僅適用於原始程式碼部署,預設為生產部署。

擴充套件 Deprecated
az spring app start

啟動應用程式的實例,預設為生產部署。

擴充套件 Deprecated
az spring app stop

停止應用程式的實例,預設為生產部署。

擴充套件 Deprecated
az spring app unset-deployment

取消設定應用程式的生產部署。

擴充套件 Deprecated
az spring app update

更新應用程式的組態。

擴充套件 Deprecated

az spring app append-loaded-public-certificate

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

將新載入的公用憑證附加至 Azure Spring Apps 中的應用程式。

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

範例

將新載入的公用憑證附加至應用程式。

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

必要參數

--certificate-name

要附加之憑證的名稱。

--load-trust-store

如果為 true,則會將憑證載入 Java 應用程式的信任存放區。

屬性
預設值: False
接受的值: false, true
--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app append-persistent-storage

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

將新的永續性記憶體附加至 Azure Spring Apps 中的應用程式。

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

範例

將新的永續性記憶體附加至應用程式。

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

必要參數

--mount-path

要掛接之永續性記憶體磁碟區的路徑。

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--persistent-storage-type -t

永續性記憶體磁碟區的類型。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

--storage-name

您在 Azure Spring Apps 中建立的記憶體資源名稱。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--enable-sub-path

[選擇性]如果為 true,則會在每個應用程式實例具有相同路徑的個別子目錄中掛接。

屬性
預設值: False
接受的值: false, true
--mount-options

[選擇性]永續性記憶體磁碟區的掛接選項。

--read-only

[選擇性]如果為 true,則永續性記憶體磁碟區將會是唯讀的。

屬性
預設值: False
接受的值: false, true
--share-name

預先建立的檔案共享名稱。 只有當永續性記憶體磁碟區的類型是 AzureFileVolume 時,才應該提供 ShareName。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app connect

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

線上到應用程式實例的互動式殼層以進行疑難解答』。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--deployment -d

應用程式現有部署的名稱。 如果未指定,則預設為生產部署。

--instance -i

現有部署實例的名稱。

--shell-cmd

連接到應用程式實例時要執行的殼層命令。

屬性
預設值: /bin/sh
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app create

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

在 Azure Spring Apps 實例中建立具有預設部署的新應用程式。

az spring app create --name
                     --resource-group
                     --service
                     [--assign-endpoint {false, true}]
                     [--assign-public-endpoint {false, true}]
                     [--backend-protocol {Default, GRPC}]
                     [--bind-acs --bind-application-configuration-service]
                     [--bind-config-server --bind-cs]
                     [--bind-service-registry --bind-sr]
                     [--client-auth-certs]
                     [--cpu]
                     [--deployment-name]
                     [--disable-probe {false, true}]
                     [--disable-tea --disable-test-endpoint-auth {false, true}]
                     [--enable-liveness-probe {false, true}]
                     [--enable-persistent-storage --enable-ps {false, true}]
                     [--enable-readiness-probe {false, true}]
                     [--enable-startup-probe {false, true}]
                     [--env]
                     [--grace-period --termination-grace-period-seconds]
                     [--ingress-read-timeout]
                     [--ingress-send-timeout]
                     [--instance-count]
                     [--jvm-options]
                     [--liveness-probe-config]
                     [--loaded-public-certificate-file]
                     [--max-replicas]
                     [--memory]
                     [--min-replicas]
                     [--persistent-storage]
                     [--readiness-probe-config]
                     [--runtime-version {Java_11, Java_17, Java_21, Java_8, NetCore_31}]
                     [--scale-rule-auth --sra]
                     [--scale-rule-http-concurrency --scale-rule-tcp-concurrency --srhc --srtc]
                     [--scale-rule-metadata --srm]
                     [--scale-rule-name --srn]
                     [--scale-rule-type --srt]
                     [--secrets]
                     [--session-affinity {Cookie, None}]
                     [--session-max-age]
                     [--startup-probe-config]
                     [--system-assigned {false, true}]
                     [--user-assigned]
                     [--workload-profile]

範例

使用預設組態建立應用程式。

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

建立具有 3 個實例和 2 個 CPU 核心和每個實例 3 GB 記憶體的公用可存取應用程式。

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

建立預設服務登錄、應用程式組態服務和 Spring Cloud 設定伺服器的應用程式系結。

az spring app create -n MyApp -s MyCluster -g MyResourceGroup --bind-service-registry --bind-application-configuration-service --bind-config-server

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--assign-endpoint

如果為 true,請指派端點 URL 以進行直接存取。

屬性
預設值: False
接受的值: false, true
--assign-public-endpoint

如果為 true,請指派可從虛擬網路存取 vnet 插入實例應用程式的端點 URL。

屬性
接受的值: false, true
--backend-protocol

應用程式的輸入後端通訊協定。 預設值代表 HTTP/HTTPS/WebSocket。

屬性
接受的值: Default, GRPC
--bind-acs --bind-application-configuration-service

自動將應用程式系結至預設的應用程式組態服務。

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

自動將應用程式系結至預設組態伺服器。

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

自動將應用程式系結至預設的服務登錄。

--client-auth-certs

以空格分隔的字串,包含客戶端驗證憑證的資源標識碼。 例如:--client_auth_certs='id0 id1'。 使用 '' 清除現有的憑證。

--cpu

CPU 資源數量。 應該是 250m、500m、750m、1250m 或 CPU 核心數目。

--deployment-name

預設部署的名稱。

屬性
預設值: default
--disable-probe

如果為 true,請停用活躍度和整備探查。

屬性
接受的值: false, true
--disable-tea --disable-test-endpoint-auth

如果為 true,請停用應用程式的測試端點驗證。

屬性
預設值: False
接受的值: false, true
--enable-liveness-probe
預覽

如果為 false,將會停用應用程式實例的活躍度探查。

屬性
參數群組: App Customization Arguments
接受的值: false, true
--enable-persistent-storage --enable-ps

如果為 true,請使用預設路徑掛接 50G(標準定價層)或 1G(基本定價層)磁碟。

屬性
接受的值: false, true
--enable-readiness-probe
預覽

如果為 false,將會停用應用程式實例的整備探查。

屬性
參數群組: App Customization Arguments
接受的值: false, true
--enable-startup-probe
預覽

如果為 false,將會停用應用程式實例的啟動探查。

屬性
參數群組: App Customization Arguments
接受的值: false, true
--env

以 'key[=value]' 格式分隔的空間分隔環境變數。

--grace-period --termination-grace-period-seconds
預覽

應用程式實例必須正常終止的選擇性持續時間,以秒為單位。

屬性
參數群組: App Customization Arguments
--ingress-read-timeout

輸入讀取逾時值以秒為單位。 預設值 300,最小值為 1,最大值為 1800。

--ingress-send-timeout

輸入傳送逾時值以秒為單位。 預設值 60,最小值為 1,最大值為 1800。

--instance-count

實例數目。

屬性
預設值: 1
--jvm-options

包含 jvm 選項的字串,請針對此自變數使用 '=' 而不是 ' ',以避免 bash 剖析錯誤,例如:--jvm-options='-Xms1024m -Xmx2048m'。

--liveness-probe-config
預覽

json 檔案路徑表示即時探查組態。

屬性
參數群組: App Customization Arguments
--loaded-public-certificate-file -f

json 檔案路徑會指出要載入至應用程式的憑證。

--max-replicas

複本數目上限。

屬性
參數群組: StandardGen2 Arguments
預設值: 10
--memory

記憶體資源數量。 應該是 512Mi、1536Mi、2560Mi、3584Mi 或 #Gi,例如 1Gi、3Gi。

--min-replicas

複本數目下限。

屬性
參數群組: StandardGen2 Arguments
預設值: 1
--persistent-storage

要掛接至應用程式的永續性記憶體 JSON 檔案路徑。

--readiness-probe-config
預覽

json 檔案路徑表示整備探查組態。

屬性
參數群組: App Customization Arguments
--runtime-version

已使用語言的運行時間版本。

屬性
接受的值: Java_11, Java_17, Java_21, Java_8, NetCore_31
--scale-rule-auth --sra

調整規則驗證參數。 格式化 <triggerParameter>=<secretRef>,並以空格分隔。

屬性
參數群組: StandardGen2 Arguments
--scale-rule-http-concurrency --scale-rule-tcp-concurrency --srhc --srtc

相應放大之前的並行要求數目上限。僅支援 HTTP 和 tcp 調整規則。

屬性
參數群組: StandardGen2 Arguments
--scale-rule-metadata --srm

調整規則元數據。 格式化 “key[=value]” ,並以空格分隔。

屬性
參數群組: StandardGen2 Arguments
--scale-rule-name --srn

調整規則的名稱。

屬性
參數群組: StandardGen2 Arguments
--scale-rule-type --srt

縮放規則的類型。 默認值:HTTP。

屬性
參數群組: StandardGen2 Arguments
--secrets

應用程式的秘密清單。 格式化 “key[=value]” ,並以空格分隔。

屬性
參數群組: StandardGen2 Arguments
--session-affinity

應用程式的輸入會話親和性。

屬性
接受的值: Cookie, None
--session-max-age

Cookie 到期的時間。 最小值為 1 秒,最大值為 7 天。 如果設定為 0,到期期間會等於瀏覽器會話期間。

--startup-probe-config
預覽

json 檔案路徑表示啟動探查組態。

屬性
參數群組: App Customization Arguments
--system-assigned

啟用系統指派的受控識別。

屬性
接受的值: false, true
--user-assigned
預覽

將空間分隔的使用者指派受控識別資源識別碼,以 assgin 到應用程式。

--workload-profile

受控環境中所使用的工作負載配置檔。 預設為 「取用」。

屬性
參數群組: StandardGen2 Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app delete

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

刪除 Azure Spring Apps 中的應用程式。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app deploy

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

將原始碼或預先建置的二進位檔部署到應用程式,並更新相關的組態。

az spring app deploy --name
                     --resource-group
                     --service
                     [--apms]
                     [--artifact-path]
                     [--build-certificates]
                     [--build-cpu]
                     [--build-env]
                     [--build-memory]
                     [--builder]
                     [--config-file-patterns]
                     [--container-args]
                     [--container-command]
                     [--container-image]
                     [--container-registry]
                     [--custom-actuator-path]
                     [--custom-actuator-port]
                     [--deployment]
                     [--disable-app-log]
                     [--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 --termination-grace-period-seconds]
                     [--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_21, Java_8, NetCore_31}]
                     [--server-version]
                     [--source-path]
                     [--startup-probe-config]
                     [--target-module]
                     [--version]

範例

將原始碼部署至應用程式。 這會封裝目前目錄、使用 Pivotal Build Service 建置二進位檔,然後部署到應用程式。

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

使用 jvm 選項和環境變數將預先建置的 jar 部署至應用程式。

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

將預先建置的戰爭部署到具有伺服器版本、jvm 選項和環境變數的應用程式(僅限標準和基本層)。

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

將原始程式碼部署至應用程式的特定部署。

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

將 Docker Hub 上的容器映射部署至應用程式。

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

將私人登錄上的容器映像部署至應用程式。

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>

使用應用程式組態服務組態檔模式部署至應用程式。

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

將預先建置的 jar 部署到具有組建 env 的應用程式(僅適用於企業層)。

az spring app deploy -n MyApp -s MyCluster -g MyResourceGroup --artifact-path app.jar --build-env BP_JVM_VERSION=11.*

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--apms

(僅限企業層)以空格分隔的 APM 名稱。

--artifact-path

部署指定的預先建置成品(jar、war 或 netcore zip,war 為公開預覽版)。

--build-certificates

(僅限企業層)以空格分隔的憑證名稱,憑證會在建置期間使用。

--build-cpu

CPU 資源數量。 應該是 500m 或 CPU 核心數目。

屬性
預設值: 1
--build-env

以 'key[=value]' 格式分隔的空間分隔環境變數。

--build-memory

記憶體資源數量。 應該是 512Mi 或 #Gi,例如 1Gi、3Gi。

屬性
預設值: 2Gi
--builder

(僅限企業層)建置用來建置可執行檔的服務產生器。

屬性
預設值: default
--config-file-patterns

(僅限企業層)以 '' 分隔的組態檔模式,以決定將使用應用程式組態服務的模式。 使用 『“'' 清除現有的組態。

--container-args

容器映像的自變數。

屬性
參數群組: Custom Container Arguments
--container-command

容器映像的命令。

屬性
參數群組: Custom Container Arguments
--container-image

容器映像標記。

屬性
參數群組: Custom Container Arguments
--container-registry

容器映像的登錄。

屬性
參數群組: Custom Container Arguments
預設值: docker.io
--custom-actuator-path

(僅限企業層)應用程式的自定義執行器路徑。 預設為 「/執行器」。。

--custom-actuator-port

(僅限企業層)應用程式的自定義執行器埠。 預設為8080。

--deployment -d

應用程式現有部署的名稱。 如果未指定,則預設為生產部署。

--disable-app-log

部署應用程式時,請勿列印應用程式記錄。

屬性
預設值: False
--disable-probe

如果為 true,請停用活躍度和整備探查。

屬性
接受的值: false, true
--disable-validation

如果為 true,請停用 jar 驗證。

屬性
接受的值: false, true
--enable-liveness-probe
預覽

如果為 false,將會停用應用程式實例的活躍度探查。

屬性
參數群組: App Customization Arguments
接受的值: false, true
--enable-readiness-probe
預覽

如果為 false,將會停用應用程式實例的整備探查。

屬性
參數群組: App Customization Arguments
接受的值: false, true
--enable-startup-probe
預覽

如果為 false,將會停用應用程式實例的啟動探查。

屬性
參數群組: App Customization Arguments
接受的值: false, true
--env

以 'key[=value]' 格式分隔的空間分隔環境變數。

--grace-period --termination-grace-period-seconds
預覽

應用程式實例必須正常終止的選擇性持續時間,以秒為單位。

屬性
參數群組: App Customization Arguments
--jvm-options

包含 jvm 選項的字串,請針對此自變數使用 '=' 而不是 ' ',以避免 bash 剖析錯誤,例如:--jvm-options='-Xms1024m -Xmx2048m'。

--language-framework

上傳之容器映像的語言架構。 支援的值:「springboot」 。”

屬性
參數群組: Custom Container Arguments
--liveness-probe-config
預覽

json 檔案路徑表示即時探查組態。

屬性
參數群組: App Customization Arguments
--main-entry -m

字串,包含相對於 zip 根目錄的 .NET 可執行文件路徑。

--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
--readiness-probe-config
預覽

json 檔案路徑表示整備探查組態。

屬性
參數群組: App Customization Arguments
--registry-password

容器登錄的密碼。

屬性
參數群組: Custom Container Arguments
--registry-username

容器登錄的使用者名稱。

屬性
參數群組: Custom Container Arguments
--runtime-version

已使用語言的運行時間版本。

屬性
接受的值: Java_11, Java_17, Java_21, Java_8, NetCore_31
--server-version

(僅限標準和基本層)Tomcat 伺服器版本。 執行 az spring list-support-server-versions -o table列出所有支援的伺服器版本。 這項功能處於公開預覽狀態。

--source-path

部署指定的源數據夾。 資料夾會封裝成 tar、上傳,並使用 kpack 建置。 如果未提供任何值,則預設為目前資料夾。

屬性
參數群組: Source Code deploy Arguments
--startup-probe-config
預覽

json 檔案路徑表示啟動探查組態。

屬性
參數群組: App Customization Arguments
--target-module

要部署的子模組,需要從原始程式碼建置的多個 jar 套件。

屬性
參數群組: Source Code deploy Arguments
--version

部署版本,如果未設定,請維持不變。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app disable-remote-debugging

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

停用部署的遠端偵錯。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--deployment -d

應用程式現有部署的名稱。 如果未指定,則預設為生產部署。

--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app enable-remote-debugging

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

啟用部署的遠端偵錯。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--deployment -d

應用程式現有部署的名稱。 如果未指定,則預設為生產部署。

--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
--port -p

遠端偵錯埠,此值應從 1024 到 65536,預設值為 5005。

屬性
預設值: 5005
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app get-remote-debugging-config

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

取得部署的遠端偵錯組態。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--deployment -d

應用程式現有部署的名稱。 如果未指定,則預設為生產部署。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app list

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

列出 Azure Spring Apps 中的所有應用程式。

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

範例

所有應用程式的永續性記憶體查詢狀態

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

必要參數

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app logs

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

顯示應用程式實例的記錄,記錄會在設定 『-f/--follow』 時串流處理。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--deployment -d

應用程式現有部署的名稱。 如果未指定,則預設為生產部署。

--follow -f

指定是否應該串流記錄。

屬性
預設值: False
--format-json

如果已啟用結構化記錄檔,請格式化 JSON 記錄。

--instance -i

現有部署實例的名稱。

--limit

要傳回的記錄數上限。 上限號碼為 2048。

屬性
預設值: 2048
--lines

要顯示的行數。 最大值為 10000。

屬性
預設值: 50
--since

只傳回比相對持續時間還新的記錄,例如 5s、2m 或 1h。 最大值為1小時。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app restart

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

重新啟動應用程式的實例,預設為生產部署。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--deployment -d

應用程式現有部署的名稱。 如果未指定,則預設為生產部署。

--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app scale

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

手動調整應用程式或其部署。

az spring app scale --name
                    --resource-group
                    --service
                    [--cpu]
                    [--deployment]
                    [--instance-count]
                    [--max-replicas]
                    [--memory]
                    [--min-replicas]
                    [--no-wait]
                    [--scale-rule-auth --sra]
                    [--scale-rule-http-concurrency --scale-rule-tcp-concurrency --srhc --srtc]
                    [--scale-rule-metadata --srm]
                    [--scale-rule-name --srn]
                    [--scale-rule-type --srt]

範例

將應用程式相應增加至每個實例 4 個 CPU 核心和 8 Gb 的記憶體。

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

將應用程式的部署相應放大至 5 個實例。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--cpu

CPU 資源數量。 應該是 250m、500m、750m、1250m 或 CPU 核心數目。

--deployment -d

應用程式現有部署的名稱。 如果未指定,則預設為生產部署。

--instance-count

實例數目。

--max-replicas

複本數目上限。

屬性
參數群組: StandardGen2 Arguments
預設值: 10
--memory

記憶體資源數量。 應該是 512Mi、1536Mi、2560Mi、3584Mi 或 #Gi,例如 1Gi、3Gi。

--min-replicas

複本數目下限。

屬性
參數群組: StandardGen2 Arguments
預設值: 1
--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
--scale-rule-auth --sra

調整規則驗證參數。 格式化 <triggerParameter>=<secretRef>,並以空格分隔。

屬性
參數群組: StandardGen2 Arguments
--scale-rule-http-concurrency --scale-rule-tcp-concurrency --srhc --srtc

相應放大之前的並行要求數目上限。僅支援 HTTP 和 tcp 調整規則。

屬性
參數群組: StandardGen2 Arguments
--scale-rule-metadata --srm

調整規則元數據。 格式化 “key[=value]” ,並以空格分隔。

屬性
參數群組: StandardGen2 Arguments
--scale-rule-name --srn

調整規則的名稱。

屬性
參數群組: StandardGen2 Arguments
--scale-rule-type --srt

縮放規則的類型。 默認值:HTTP。

屬性
參數群組: StandardGen2 Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app set-deployment

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

設定應用程式的生產部署。

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

範例

將應用程式的預備部署交換至生產環境。

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

必要參數

--deployment -d

應用程式現有部署的名稱。

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app show

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

在 Azure Spring Apps 中顯示應用程式的詳細數據。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app show-deploy-log

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

顯示上次部署的組建記錄,僅適用於原始程式碼部署,預設為生產部署。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--deployment -d

應用程式現有部署的名稱。 如果未指定,則預設為生產部署。

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app start

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

啟動應用程式的實例,預設為生產部署。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--deployment -d

應用程式現有部署的名稱。 如果未指定,則預設為生產部署。

--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app stop

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

停止應用程式的實例,預設為生產部署。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--deployment -d

應用程式現有部署的名稱。 如果未指定,則預設為生產部署。

--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app unset-deployment

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

取消設定應用程式的生產部署。

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

範例

如果應用程式具有生產環境部署,將應用程式的生產部署交換至預備環境。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az spring app update

已被取代

此指令已隱含取代,因為指令群組 'spring' 已被取代,且將在未來版本中移除。

更新應用程式的組態。

az spring app update --name
                     --resource-group
                     --service
                     [--assign-endpoint {false, true}]
                     [--assign-public-endpoint {false, true}]
                     [--backend-protocol {Default, GRPC}]
                     [--client-auth-certs]
                     [--config-file-patterns]
                     [--custom-actuator-path]
                     [--custom-actuator-port]
                     [--deployment]
                     [--disable-probe {false, true}]
                     [--disable-tea --disable-test-endpoint-auth {false, true}]
                     [--enable-ingress-to-app-tls {false, true}]
                     [--enable-liveness-probe {false, true}]
                     [--enable-persistent-storage --enable-ps {false, true}]
                     [--enable-readiness-probe {false, true}]
                     [--enable-startup-probe {false, true}]
                     [--env]
                     [--grace-period --termination-grace-period-seconds]
                     [--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_21, Java_8, NetCore_31}]
                     [--secrets]
                     [--session-affinity {Cookie, None}]
                     [--session-max-age]
                     [--startup-probe-config]
                     [--workload-profile]

範例

新增應用程式的環境變數。

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

必要參數

--name -n

在指定的 Azure Spring Apps 實例中執行的應用程式名稱。

--resource-group -g

資源組名。 您可以使用 az configure --defaults group=<name>來設定預設群組。

--service -s

Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>來設定預設服務。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--assign-endpoint

如果為 true,請指派端點 URL 以進行直接存取。

屬性
接受的值: false, true
--assign-public-endpoint

如果為 true,請指派可從虛擬網路存取 vnet 插入實例應用程式的端點 URL。

屬性
接受的值: false, true
--backend-protocol

應用程式的輸入後端通訊協定。 預設值代表 HTTP/HTTPS/WebSocket。

屬性
接受的值: Default, GRPC
--client-auth-certs

以空格分隔的字串,包含客戶端驗證憑證的資源標識碼。 例如:--client_auth_certs='id0 id1'。 使用 '' 清除現有的憑證。

--config-file-patterns

(僅限企業層)以 '' 分隔的組態檔模式,以決定將使用應用程式組態服務的模式。 使用 『“'' 清除現有的組態。

--custom-actuator-path

(僅限企業層)應用程式的自定義執行器路徑。 預設為 「/執行器」。。

--custom-actuator-port

(僅限企業層)應用程式的自定義執行器埠。 預設為8080。

--deployment -d

應用程式現有部署的名稱。 如果未指定,則預設為生產部署。

--disable-probe

如果為 true,請停用活躍度和整備探查。

屬性
接受的值: false, true
--disable-tea --disable-test-endpoint-auth

如果為 true,請停用應用程式的測試端點驗證。

屬性
接受的值: false, true
--enable-ingress-to-app-tls

如果為 true,請啟用應用程式 tls 的輸入。

屬性
接受的值: false, true
--enable-liveness-probe
預覽

如果為 false,將會停用應用程式實例的活躍度探查。

屬性
參數群組: App Customization Arguments
接受的值: false, true
--enable-persistent-storage --enable-ps

如果為 true,請使用預設路徑掛接 50G(標準定價層)或 1G(基本定價層)磁碟。

屬性
接受的值: false, true
--enable-readiness-probe
預覽

如果為 false,將會停用應用程式實例的整備探查。

屬性
參數群組: App Customization Arguments
接受的值: false, true
--enable-startup-probe
預覽

如果為 false,將會停用應用程式實例的啟動探查。

屬性
參數群組: App Customization Arguments
接受的值: false, true
--env

以 'key[=value]' 格式分隔的空間分隔環境變數。

--grace-period --termination-grace-period-seconds
預覽

應用程式實例必須正常終止的選擇性持續時間,以秒為單位。

屬性
參數群組: App Customization Arguments
--https-only

如果為 true,請透過 HTTPs 存取應用程式。

屬性
接受的值: false, true
--ingress-read-timeout

輸入讀取逾時值以秒為單位。 預設值 300,最小值為 1,最大值為 1800。

--ingress-send-timeout

輸入傳送逾時值以秒為單位。 預設值 60,最小值為 1,最大值為 1800。

--jvm-options

包含 jvm 選項的字串,請針對此自變數使用 '=' 而不是 ' ',以避免 bash 剖析錯誤,例如:--jvm-options='-Xms1024m -Xmx2048m'。

--liveness-probe-config
預覽

json 檔案路徑表示即時探查組態。

屬性
參數群組: App Customization Arguments
--loaded-public-certificate-file -f

json 檔案路徑會指出要載入至應用程式的憑證。

--main-entry -m

相對於 zip 根目錄的 .NET 可執行文件路徑。

--no-wait

請勿等候長時間執行的作業完成。

屬性
預設值: False
--persistent-storage

要掛接至應用程式的永續性記憶體 JSON 檔案路徑。

--readiness-probe-config
預覽

json 檔案路徑表示整備探查組態。

屬性
參數群組: App Customization Arguments
--runtime-version

已使用語言的運行時間版本。

屬性
接受的值: Java_11, Java_17, Java_21, Java_8, NetCore_31
--secrets

應用程式的秘密清單。 格式化 “key[=value]” ,並以空格分隔。

屬性
參數群組: StandardGen2 Arguments
--session-affinity

應用程式的輸入會話親和性。

屬性
接受的值: Cookie, None
--session-max-age

Cookie 到期的時間。 最小值為 1 秒,最大值為 7 天。 如果設定為 0,到期期間會等於瀏覽器會話期間。

--startup-probe-config
預覽

json 檔案路徑表示啟動探查組態。

屬性
參數群組: App Customization Arguments
--workload-profile

受控環境中所使用的工作負載配置檔。 預設為 「取用」。

屬性
參數群組: StandardGen2 Arguments
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

屬性
預設值: json
接受的值: json, jsonc, none, table, tsv, yaml, yamlc
--query

JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/

--subscription

訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID來設定預設訂用帳戶。

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False