az spring
注意
此命令群組具有 Azure CLI 和至少一個擴充功能中定義的命令。 安裝每個擴充功能以受益於其擴充功能。 深入瞭解擴充功能。
管理 Azure Spring Apps 的命令。
命令
az spring create
建立 Azure Spring Apps 實例。
az spring create --name
--resource-group
[--acs-gen {Gen1, Gen2}]
[--ap-instance]
[--app-insights]
[--app-insights-key]
[--app-network-resource-group]
[--app-subnet]
[--build-pool-size {S1, S2, S3, S4, S5, S6, S7, S8, S9}]
[--disable-app-insights {false, true}]
[--disable-build-service {false, true}]
[--enable-acs]
[--enable-alv]
[--enable-api-portal]
[--enable-app-acc]
[--enable-config-server]
[--enable-dataplane-public-endpoint {false, true}]
[--enable-gateway]
[--enable-private-storage-access {false, true}]
[--enable-service-registry]
[--gateway-instance-count]
[--infra-resource-group]
[--ingress-read-timeout]
[--location]
[--managed-environment]
[--marketplace-plan-id]
[--no-wait]
[--outbound-type]
[--registry-password]
[--registry-server]
[--registry-username]
[--reserved-cidr-range]
[--sampling-rate]
[--service-runtime-network-resource-group]
[--service-runtime-subnet]
[--sku {Basic, Enterprise, Standard, StandardGen2}]
[--tags]
[--vnet]
[--zone-redundant {false, true}]
範例
在 westus 中建立新的 Azure Spring Apps。
az spring create -n MyService -g MyResourceGroup -l westus
使用連接字串(建議)或檢測密鑰,使用現有的 Application Insights 在 westus 中建立新的 Azure Spring Apps。
az spring create -n MyService -g MyResourceGroup -l westus --app-insights-key "MyConnectionString"
使用現有的 Application Insights 在 westus 中建立新的 Azure Spring Apps。
az spring create -n MyService -g MyResourceGroup -l westus --app-insights appInsightsName
使用現有的 Application Insights 在 westus 中建立新的 Azure Spring Apps,並指定取樣率。
az spring create -n MyService -g MyResourceGroup -l westus --app-insights appInsightsName --sampling-rate 10
建立已停用 Application Insights 的新 Azure Spring Apps。
az spring create -n MyService -g MyResourceGroup --disable-app-insights
透過在目前資源群組中提供 VNet 名稱,建立新的 Azure Spring Apps 並插入 VNet
az spring create -n MyService -g MyResourceGroup --vnet MyVNet --app-subnet MyAppSubnet --service-runtime-subnet MyServiceRuntimeSubnet
透過提供子網資源標識碼,使用 VNet 插入來建立新的 Azure Spring Apps
az spring create -n MyService -g MyResourceGroup --app-subnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyVnetRg/providers/Microsoft.Network/VirtualNetworks/test-vnet/subnets/app --service-runtime-subnet /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyVnetRg/providers/Microsoft.Network/VirtualNetworks/test-vnet/subnets/svc --reserved-cidr-range 10.0.0.0/16,10.1.0.0/16,10.2.0.1/16
如果 Azure 訂用帳戶永不裝載 Azure Spring Apps Enterprise 實例,請建立 Azure Spring Apps Enterprise 實例
az provider register -n Microsoft.SaaS
az term accept --publisher vmware-inc --product azure-spring-cloud-vmware-tanzu-2 --plan asa-ent-hr-mtr
az spring create -n MyService -g MyResourceGroup --sku Enterprise
建立已啟用 Tanzu 元件的 Azure Spring Apps Enterprise 實例。
az provider register -n Microsoft.SaaS
az term accept --publisher vmware-inc --product azure-spring-cloud-vmware-tanzu-2 --plan asa-ent-hr-mtr
az spring create -n MyService -g MyResourceGroup --sku Enterprise --enable-application-configuration-service --enable-config-server --enable-service-registry --enable-gateway --enable-api-portal --enable-application-live-view --enable-application-accelerator
必要參數
Azure Spring Apps 實例的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
(僅限企業層)要啟用的應用程式組態服務產生。
(僅限企業層)API 入口網站實例的數目。
相同資源群組中現有Application Insights 的名稱。 或不同資源群組中現有ApplicationInsights的資源標識碼。
現有 Application Insights 的連接字串(建議)或檢測密鑰。
將在其中建立應用程式所有網路資源的資源群組。
要在其中部署 Spring Apps 應用程式之 「vnet」 中現有子網的名稱或標識碼。 部署至虛擬網路時為必要專案。 支援較小的子網大小,請參閱:https://aka.ms/azure-spring-cloud-smaller-subnet-vnet-docs。
(僅限企業層)組建代理程式集區的大小。 如需大小資訊,請參閱 https://aka.ms/azure-spring-cloud-build-service-docs。
停用 Application Insights,如果未停用,且沒有使用 --app-insights-key 或 --app-insights 指定的現有 Application Insights,將會在相同的資源群組中建立新的 Application Insights 實例。
(僅限企業層)停用組建服務。
(僅限企業層)啟用應用程式組態服務。
(僅限企業層)啟用應用程式實時檢視。
(僅限企業層)啟用 API 入口網站。
(僅限企業層)啟用應用程式加速器。
(僅限企業層)啟用組態伺服器。
如果為 true,請為記錄串流、遠端偵錯指派公用端點,以在可從虛擬網路存取的 vnet 插入實例中連線應用程式。
(僅限企業層)啟用 Spring Cloud Gateway。
如果為 true,請在 vnet 插入實例中設定後端記憶體的專用網存取權。
(僅限企業層)啟用服務登錄。
(僅限企業層)Spring Cloud Gateway 實例的數目。
包含基礎結構資源的資源群組名稱。
輸入讀取逾時值以秒為單位。 預設值 300,最小值為 1,最大值為 1800。
位置。 來自的值:az account list-locations
。 您可以使用 az configure --defaults location=<location>
來設定預設位置。
Spring Apps 實例所建置之容器應用程式環境的資源標識碼。
(僅限企業層)指定要使用 Spring 實例購買的不同 Marketplace 方案。 執行 az spring list-marketplace-plan -o table
列出所有計劃。
請勿等候長時間執行的作業完成。
Azure Spring Apps VNet 實例的輸出類型。
(僅限企業層)建置服務中使用的容器登錄密碼。
(僅限企業層)建置服務中使用的容器登錄伺服器。
(僅限企業層)建置服務中使用的容器登錄用戶名稱。
以 CIDR 格式分隔的 IP 位址範圍逗號分隔清單。 IP 範圍會保留給裝載基礎 Azure Spring Apps 基礎結構,此基礎結構至少應為 3 /16 未使用的 IP 範圍,不得與任何子網 IP 範圍重疊。
Application Insights 的取樣率。 最小值為 0,最大值為 100。
將在其中建立 Azure Spring Apps 服務運行時間之所有網路資源的資源群組。
要在其中部署 Spring Apps 服務運行時間之 「vnet」 中現有子網的名稱或標識碼。 部署至虛擬網路時為必要專案。
SKU 的名稱。
以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。
要在其中部署 Spring Apps 實例的現有虛擬網路名稱或標識碼。
在 Azure 可用性區域中建立您的 Azure Spring Apps 服務,目前只能在數個區域中支援此功能。
全域參數
增加記錄詳細信息以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。
az spring delete
刪除 Azure Spring Apps。
az spring delete --name
--resource-group
[--no-wait]
必要參數
Azure Spring Apps 實例的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
請勿等候長時間執行的作業完成。
全域參數
增加記錄詳細信息以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。
az spring export
從 Azure Spring Apps 導出目標 Azure 資源定義的命令。
az spring export --resource-group
--service
[--output-folder]
[--target {aca, azure-container-apps}]
範例
產生對應的 bicep 檔案和自述檔,以建立 Azure Container Apps 服務。
az spring export --target aca --service MyAzureSpringAppsInstance --resource-group MyResourceGroup --output-folder output
必要參數
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>
來設定預設服務。
選擇性參數
所產生 Bicep 檔案的輸出資料夾。
要移轉至的目標 Azure 服務。
全域參數
增加記錄詳細信息以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。
az spring flush-virtualnetwork-dns-settings
此命令處於預覽狀態,且正在開發中。 參考和支持層級:https://aka.ms/CLI_refstatus
(僅限標準和企業層)排清 Azure Spring Apps 的虛擬網路 DNS 設定。
az spring flush-virtualnetwork-dns-settings --name
--resource-group
[--no-wait]
必要參數
Azure Spring Apps 實例的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
請勿等候長時間執行的作業完成。
全域參數
增加記錄詳細信息以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。
az spring list
列出指定資源群組中的所有 Azure Spring Apps,否則會列出訂用帳戶的 。
az spring list [--resource-group]
選擇性參數
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
增加記錄詳細信息以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。
az spring list-marketplace-plan
此命令處於預覽狀態,且正在開發中。 參考和支持層級:https://aka.ms/CLI_refstatus
(僅限企業層)列出要購買的 Marketplace 方案。
az spring list-marketplace-plan
範例
列出所有方案。
az spring list-marketplace-plan -o table
全域參數
增加記錄詳細信息以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。
az spring list-support-server-versions
此命令處於預覽狀態,且正在開發中。 參考和支持層級:https://aka.ms/CLI_refstatus
(僅限標準和基本層)列出支持的伺服器版本。
az spring list-support-server-versions --resource-group
--service
範例
列出支持的伺服器版本。
az spring list-support-server-versions -o table -s MyService -g MyResourceGroup
必要參數
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
Azure Spring Apps 實例的名稱,您可以使用 az configure --defaults spring=<name>
來設定預設服務。
全域參數
增加記錄詳細信息以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。
az spring show
顯示 Azure Spring Apps 的詳細數據。
az spring show --name
--resource-group
必要參數
Azure Spring Apps 實例的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
增加記錄詳細信息以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。
az spring start
啟動 Azure Spring Apps。
az spring start --name
--resource-group
[--no-wait]
必要參數
Azure Spring Apps 實例的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
請勿等候長時間執行的作業完成。
全域參數
增加記錄詳細信息以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。
az spring stop
停止 Azure Spring Apps。
az spring stop --name
--resource-group
[--no-wait]
必要參數
Azure Spring Apps 實例的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
請勿等候長時間執行的作業完成。
全域參數
增加記錄詳細信息以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。
az spring update
更新 Azure Spring Apps。
az spring update --name
--resource-group
[--build-pool-size {S1, S2, S3, S4, S5, S6, S7, S8, S9}]
[--enable-dataplane-public-endpoint {false, true}]
[--enable-planned-maintenance]
[--enable-private-storage-access {false, true}]
[--ingress-read-timeout]
[--no-wait]
[--planned-maintenance-day {Friday, Monday, Saturday, Sunday, Thursday, Tuesday, Wednesday}]
[--planned-maintenance-start-hour]
[--sku {Basic, Enterprise, Standard, StandardGen2}]
[--tags]
範例
更新定價層。
az spring update -n MyService --sku Standard -g MyResourceGroup
更新現有 Azure Spring Apps 的標籤。
az spring update -n MyService -g MyResourceGroup --tags key1=value1 key2=value2
設定計劃性維護
az spring update -n MyService -g MyResourceGroup --enable-planned-maintenance --planned-maintenance-day Friday --planned-maintenance-start-hour 10
必要參數
Azure Spring Apps 實例的名稱。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
選擇性參數
(僅限企業層)組建代理程式集區的大小。 如需大小資訊,請參閱 https://aka.ms/azure-spring-cloud-build-service-docs。
如果為 true,請為記錄串流、遠端偵錯指派公用端點,以在可從虛擬網路存取的 vnet 插入實例中連線應用程式。
如果已設定,請啟用實例的計劃性維護。
如果為 true,請在 vnet 插入實例中設定後端記憶體的專用網存取權。
輸入讀取逾時值以秒為單位。 最小值為 1,最大值為 1800。
請勿等候長時間執行的作業完成。
計劃性維護排程的一周中的一天。
計劃性維護期間 UTC 的開始時間。 必須介於 0 到 23 之間。
SKU 的名稱。
以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。
全域參數
增加記錄詳細信息以顯示所有偵錯記錄。
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
輸出格式。
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄詳細資訊。 針對完整偵錯記錄使用 --debug。