Share via


az spring config-server

注意

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

(支援標準層和基本層)在 Azure Spring Apps 中管理組態伺服器的命令。

命令

名稱 Description 類型 狀態
az spring config-server bind

(僅限企業層)將應用程式系結至 Config Server。

副檔名 預覽​​
az spring config-server clear

清除 Config Server 中的所有設定。

副檔名 GA
az spring config-server create

(僅限企業層)建立組態伺服器。

副檔名 預覽​​
az spring config-server delete

(僅限企業層)刪除組態伺服器。

副檔名 預覽​​
az spring config-server disable

(僅限標準使用量層)停用組態伺服器。

副檔名 GA
az spring config-server enable

(僅限標準使用量層)啟用組態伺服器。

副檔名 GA
az spring config-server git

在 Azure Spring Apps 中管理 Config Server git 屬性的命令。

副檔名 GA
az spring config-server git repo

在 Azure Spring Apps 中管理 Config Server Git 存放庫的命令。

副檔名 GA
az spring config-server git repo add

新增 Config Server Git 屬性的新存放庫。

副檔名 GA
az spring config-server git repo list

列出 Config Server 之 git 屬性的所有存放庫。

副檔名 GA
az spring config-server git repo remove

拿掉 Config Server 之 git 屬性的現有存放庫。

副檔名 GA
az spring config-server git repo update

覆寫 Config Server 之 git 屬性的現有存放庫,將會完全覆寫舊的存放庫。

副檔名 GA
az spring config-server git set

設定 Config Server 的 git 屬性,將會完全覆寫舊的。

副檔名 GA
az spring config-server set

從 yaml 檔案設定組態伺服器。

副檔名 GA
az spring config-server show

顯示組態伺服器。

副檔名 GA
az spring config-server unbind

(僅限企業層)從 Config Server 解除系結應用程式。

副檔名 預覽​​

az spring config-server bind

預覽

此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

(僅限企業層)將應用程式系結至 Config Server。

az spring config-server bind --resource-group
                             --service
                             [--app]
                             [--job]

範例

將應用程式系結至服務實例 MyService 中的預設組態伺服器。

az spring config-server bind --app MyApp -s MyService -g MyResourceGroup

將作業系結至服務實例 MyService 中的預設組態伺服器。

az spring config-server bind --job job-name -s MyService -g MyResourceGroup

必要參數

--resource-group -g

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

--service -s

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

選擇性參數

--app

應用程式的名稱。

--job

在指定的 Azure Spring Apps 實例中執行的工作名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az spring config-server clear

清除 Config Server 中的所有設定。

az spring config-server clear --resource-group
                              --service
                              [--yes]

範例

將服務實例 MyService 中預設組態伺服器的設定更新為空白。

az spring config-server clear -s MyService -g MyResourceGroup

必要參數

--resource-group -g

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

--service -s

Azure Spring Apps 實例的名稱。

選擇性參數

--yes -y

不提示確認。

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

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az spring config-server create

預覽

此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

(僅限企業層)建立組態伺服器。

az spring config-server create --resource-group
                               --service

範例

在服務實例 MyService 中建立不含存放庫設定的組態伺服器。

az spring config-server create -s MyService -g MyResourceGroup

必要參數

--resource-group -g

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

--service -s

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

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az spring config-server delete

預覽

此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

(僅限企業層)刪除組態伺服器。

az spring config-server delete --resource-group
                               --service
                               [--yes]

範例

刪除服務實例 MyService 中的預設組態伺服器。

az spring config-server delete -s MyService -g MyResourceGroup

必要參數

--resource-group -g

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

--service -s

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

選擇性參數

--yes -y

不提示確認。

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

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az spring config-server disable

(僅限標準使用量層)停用組態伺服器。

az spring config-server disable --resource-group
                                --service

必要參數

--resource-group -g

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

--service -s

Azure Spring Apps 實例的名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az spring config-server enable

(僅限標準使用量層)啟用組態伺服器。

az spring config-server enable --resource-group
                               --service

必要參數

--resource-group -g

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

--service -s

Azure Spring Apps 實例的名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az spring config-server set

從 yaml 檔案設定組態伺服器。

az spring config-server set --config-file
                            --resource-group
                            --service
                            [--no-wait]

範例

從 yaml 檔案載入,並在服務實例 MyService 中設定預設組態伺服器。

az spring config-server set -s MyService -g MyResourceGroup --config-file MyConfigFile.yaml

必要參數

--config-file

Spring Cloud 組態伺服器的 yaml 檔案路徑。

--resource-group -g

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

--service -s

Azure Spring Apps 實例的名稱。

選擇性參數

--no-wait

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

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

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az spring config-server show

顯示組態伺服器。

az spring config-server show --resource-group
                             --service

範例

在服務實例 MyService 中顯示預設組態伺服器的元數據。

az spring config-server show -s MyService -g MyResourceGroup

必要參數

--resource-group -g

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

--service -s

Azure Spring Apps 實例的名稱。

全域參數
--debug

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。

az spring config-server unbind

預覽

此命令處於預覽狀態,且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

(僅限企業層)從 Config Server 解除系結應用程式。

az spring config-server unbind --resource-group
                               --service
                               [--app]
                               [--job]
                               [--yes]

範例

將應用程式從服務實例 MyService 中的預設組態伺服器解除系結。

az spring config-server unbind --app MyApp -s MyService -g MyResourceGroup

從服務實例 MyService 中的預設組態伺服器解除系結作業。

az spring config-server unbind --job job-name -s MyService -g MyResourceGroup

必要參數

--resource-group -g

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

--service -s

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

選擇性參數

--app

應用程式的名稱。

--job

在指定的 Azure Spring Apps 實例中執行的工作名稱。

--yes -y

不提示確認。

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

增加記錄詳細資訊,以顯示所有偵錯記錄。

--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄詳細資訊。 使用 --debug 來取得完整偵錯記錄。