Share via


az spring application-configuration-service git repo

注意

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

在 Azure Spring Apps 中管理應用程式組態服務 Git 存放庫的命令。

命令

名稱 Description 類型 狀態
az spring application-configuration-service git repo add

將 Git 屬性新增至應用程式組態服務設定。

副檔名 GA
az spring application-configuration-service git repo list

列出應用程式組態服務的所有 Git 設定。

副檔名 GA
az spring application-configuration-service git repo remove

從應用程式組態服務設定中刪除現有的 Git 屬性。

副檔名 GA
az spring application-configuration-service git repo update

在應用程式組態服務設定中更新現有的 Git 屬性。

副檔名 GA

az spring application-configuration-service git repo add

將 Git 屬性新增至應用程式組態服務設定。

az spring application-configuration-service git repo add --label
                                                         --name
                                                         --patterns
                                                         --resource-group
                                                         --service
                                                         --uri
                                                         [--ca-cert-name]
                                                         [--host-key]
                                                         [--host-key-algorithm]
                                                         [--host-key-check]
                                                         [--password]
                                                         [--private-key]
                                                         [--search-paths]
                                                         [--username]

範例

新增 Git 屬性。

az spring application-configuration-service git repo add -s MyService -g MyResourceGroup --name MyName --patterns MyPattern --uri https://MyURI --label master

必要參數

--label

在 Git 存放庫中搜尋所需的分支名稱。

--name -n

需要唯一的名稱,才能標記 git 組態的每個專案。

--patterns

用來在 Git 存放庫中搜尋的必要模式。 針對每個模式,請使用 {application} 或 {application}/{profile} 等格式,而不是 {application}-{profile}.yml,並以逗號分隔。

--resource-group -g

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

--service -s

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

--uri

必要的 Git URI。

選擇性參數

--ca-cert-name

CA 憑證名稱。

--host-key

已新增組態的主機金鑰。

--host-key-algorithm

已新增組態的主機密鑰演演算法。

--host-key-check

嚴格主機金鑰檢查用於 SSH 驗證的已新增組態。 如果為 false,請忽略主機金鑰的錯誤。

--password

已新增組態的密碼。

--private-key

已新增的組態Private_key。

--search-paths

Search_paths新增的組態,請使用 作為多個路徑的分隔符。

--username

已新增組態的用戶名稱。

全域參數
--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 application-configuration-service git repo list

列出應用程式組態服務的所有 Git 設定。

az spring application-configuration-service git repo list --resource-group
                                                          --service

必要參數

--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 application-configuration-service git repo remove

從應用程式組態服務設定中刪除現有的 Git 屬性。

az spring application-configuration-service git repo remove --name
                                                            --resource-group
                                                            --service

範例

刪除 Git 屬性。

az spring application-configuration-service git repo remove -s MyService -g MyResourceGroup --name MyName

必要參數

--name -n

需要唯一的名稱,才能標記 git 組態的每個專案。

--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 application-configuration-service git repo update

在應用程式組態服務設定中更新現有的 Git 屬性。

az spring application-configuration-service git repo update --name
                                                            --resource-group
                                                            --service
                                                            [--ca-cert-name]
                                                            [--host-key]
                                                            [--host-key-algorithm]
                                                            [--host-key-check]
                                                            [--label]
                                                            [--password]
                                                            [--patterns]
                                                            [--private-key]
                                                            [--search-paths]
                                                            [--uri]
                                                            [--username]

範例

更新 Git 屬性。

az spring application-configuration-service git repo update -s MyService -g MyResourceGroup --name MyName --patterns MyPattern

必要參數

--name -n

需要唯一的名稱,才能標記 git 組態的每個專案。

--resource-group -g

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

--service -s

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

選擇性參數

--ca-cert-name

CA 憑證名稱。

--host-key

已新增組態的主機金鑰。

--host-key-algorithm

已新增組態的主機密鑰演演算法。

--host-key-check

嚴格主機金鑰檢查用於 SSH 驗證的已新增組態。 如果為 false,請忽略主機金鑰的錯誤。

--label

在 Git 存放庫中搜尋所需的分支名稱。

--password

已新增組態的密碼。

--patterns

用來在 Git 存放庫中搜尋的必要模式。 針對每個模式,請使用 {application} 或 {application}/{profile} 等格式,而不是 {application}-{profile}.yml,並以逗號分隔。

--private-key

已新增的組態Private_key。

--search-paths

Search_paths新增的組態,請使用 作為多個路徑的分隔符。

--uri

必要的 Git URI。

--username

已新增組態的用戶名稱。

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