Share via


az spring-cloud gateway route-config

注意

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

命令群組 'spring-cloud gateway' 處於預覽狀態,目前正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

此命令群組已隱含取代,因為命令群組 'spring-cloud gateway' 已被取代,未來版本將會移除。 請改用 'spring gateway'。

在 Azure Spring Cloud 中管理閘道路由設定的命令。

命令

名稱 Description 類型 狀態
az spring-cloud gateway route-config create

使用 Json 陣列格式的路由規則建立閘道路由設定。

擴充 預覽和已淘汰
az spring-cloud gateway route-config list

列出所有現有的閘道路由設定。

擴充 預覽和已淘汰
az spring-cloud gateway route-config remove

刪除現有的閘道路由設定。

擴充 預覽和已淘汰
az spring-cloud gateway route-config show

取得現有的閘道路由設定。

擴充 預覽和已淘汰
az spring-cloud gateway route-config update

使用 Json 陣列格式的路由規則更新現有的閘道路由設定。

擴充 預覽和已淘汰

az spring-cloud gateway route-config create

預覽 已被取代

命令群組 'spring-cloud gateway' 處於預覽狀態,目前正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

此命令已隱含取代,因為命令群組 'spring-cloud gateway route-config' 已被取代,且將在未來的版本中移除。 請改用 'spring gateway route-config'。

使用 Json 陣列格式的路由規則建立閘道路由設定。

az spring-cloud gateway route-config create --name
                                            --resource-group
                                            --service
                                            [--app-name]
                                            [--routes-file]
                                            [--routes-json]

範例

在 Azure Spring Cloud 中建立以應用程式為目標的閘道路由設定。

az spring-cloud gateway route-config create -s MyService -g MyResourceGroup --name MyName --app-name MyApp --routes-file MyJson.json

必要參數

--name -n

路由設定的名稱。

--resource-group -g

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

--service -s

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

選擇性參數

--app-name

要設定路由的 Azure Spring Cloud 應用程式名稱。

--routes-file

API 路由 JSON 陣列的檔案路徑。

--routes-json

API 路由的 JSON 陣列。

全域參數
--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-cloud gateway route-config list

預覽 已被取代

命令群組 'spring-cloud gateway' 處於預覽狀態,目前正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

此命令已隱含取代,因為命令群組 'spring-cloud gateway route-config' 已被取代,且將在未來的版本中移除。 請改用 'spring gateway route-config'。

列出所有現有的閘道路由設定。

az spring-cloud gateway route-config list --resource-group
                                          --service

範例

列出所有現有的閘道路由設定。

az spring-cloud gateway route-config list -s MyService -g MyResourceGroup

必要參數

--resource-group -g

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

--service -s

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

全域參數
--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-cloud gateway route-config remove

預覽 已被取代

命令群組 'spring-cloud gateway' 處於預覽狀態,目前正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

此命令已隱含取代,因為命令群組 'spring-cloud gateway route-config' 已被取代,且將在未來的版本中移除。 請改用 'spring gateway route-config'。

刪除現有的閘道路由設定。

az spring-cloud gateway route-config remove --name
                                            --resource-group
                                            --service

範例

刪除現有的閘道路由設定。

az spring-cloud gateway route-config remove -s MyService -g MyResourceGroup --name MyName

必要參數

--name -n

路由設定的名稱。

--resource-group -g

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

--service -s

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

全域參數
--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-cloud gateway route-config show

預覽 已被取代

命令群組 'spring-cloud gateway' 處於預覽狀態,目前正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

此命令已隱含取代,因為命令群組 'spring-cloud gateway route-config' 已被取代,且將在未來的版本中移除。 請改用 'spring gateway route-config'。

取得現有的閘道路由設定。

az spring-cloud gateway route-config show --name
                                          --resource-group
                                          --service

範例

取得現有的閘道路由設定。

az spring-cloud gateway route-config show -s MyService -g MyResourceGroup --name MyName

必要參數

--name -n

路由設定的名稱。

--resource-group -g

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

--service -s

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

全域參數
--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-cloud gateway route-config update

預覽 已被取代

命令群組 'spring-cloud gateway' 處於預覽狀態,目前正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

此命令已隱含取代,因為命令群組 'spring-cloud gateway route-config' 已被取代,且將在未來的版本中移除。 請改用 'spring gateway route-config'。

使用 Json 陣列格式的路由規則更新現有的閘道路由設定。

az spring-cloud gateway route-config update --name
                                            --resource-group
                                            --service
                                            [--app-name]
                                            [--routes-file]
                                            [--routes-json]

範例

更新以 Azure Spring Cloud 中應用程式為目標的現有閘道路由設定。

az spring-cloud gateway route-config update -s MyService -g MyResourceGroup --name MyName --app-name MyApp --routes-file MyJson.json

必要參數

--name -n

路由設定的名稱。

--resource-group -g

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

--service -s

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

選擇性參數

--app-name

要設定路由的 Azure Spring Cloud 應用程式名稱。

--routes-file

API 路由 JSON 陣列的檔案路徑。

--routes-json

API 路由的 JSON 陣列。

全域參數
--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 來取得完整偵錯記錄。