az acr webhook

管理 Azure 容器登錄的 Webhook。

命令

名稱 Description 類型 狀態
az acr webhook create

建立 Azure Container Registry 的 Webhook。

核心 GA
az acr webhook delete

從 Azure Container Registry 刪除 Webhook。

核心 GA
az acr webhook get-config

取得 Webhook 的服務 URI 和自定義標頭。

核心 GA
az acr webhook list

列出 Azure Container Registry 的所有 Webhook。

核心 GA
az acr webhook list-events

列出 Webhook 的最新事件。

核心 GA
az acr webhook ping

觸發 Webhook 的 Ping 事件。

核心 GA
az acr webhook show

取得 Webhook 的詳細數據。

核心 GA
az acr webhook update

更新 Webhook。

核心 GA

az acr webhook create

建立 Azure Container Registry 的 Webhook。

az acr webhook create --actions {chart_delete, chart_push, delete, push, quarantine}
                      --name
                      --registry
                      --uri
                      [--headers]
                      [--location]
                      [--resource-group]
                      [--scope]
                      [--status {disabled, enabled}]
                      [--tags]

範例

建立 Azure Container Registry 的 Webhook,以將 Docker 推送和刪除事件傳遞至服務 URI。

az acr webhook create -n mywebhook -r myregistry --uri http://myservice.com --actions push delete

建立 Azure Container Registry 的 Webhook,以使用基本身份驗證標頭將 Docker 推送事件傳遞至服務 URI。

az acr webhook create -n mywebhook -r myregistry --uri http://myservice.com --actions push --headers "Authorization=Basic 000000"

建立 Azure Container Registry 的 Webhook,以將 Helm 圖表推送和刪除事件傳遞給服務 URI。

az acr webhook create -n mywebhook -r myregistry --uri http://myservice.com --actions chart_push chart_delete

必要參數

--actions

觸發 Webhook 張貼通知的動作以空格分隔的清單。

接受的值: chart_delete, chart_push, delete, push, quarantine
--name -n

Webhook 的名稱。

--registry -r

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

--uri

Webhook 用來張貼通知的服務 URI。

選擇性參數

--headers

將新增至 Webhook 通知的 'key[=value]' 格式以空格分隔的自定義標頭。 使用 「清除現有的標頭」。

--location -l

位置。​​ 來自的值: az account list-locations。 您可以使用 az configure --defaults location=<location> 設定預設位置。

--resource-group -g

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

--scope

可以觸發事件的存放庫範圍。 例如,『foo:*』 表示存放庫 『foo』 下所有標記的事件。 'foo:bar' 只表示 'foo:bar' 的事件。 'foo' 相當於 'foo:latest'。 空白表示所有存放庫的事件。

--status

指出是否啟用 Webhook。

接受的值: disabled, enabled
預設值: enabled
--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

全域參數
--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 acr webhook delete

從 Azure Container Registry 刪除 Webhook。

az acr webhook delete --name
                      --registry
                      [--resource-group]

範例

從 Azure Container Registry 刪除 Webhook。

az acr webhook delete -n mywebhook -r myregistry

必要參數

--name -n

Webhook 的名稱。

--registry -r

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--resource-group -g

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

全域參數
--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 acr webhook get-config

取得 Webhook 的服務 URI 和自定義標頭。

az acr webhook get-config --name
                          --registry
                          [--resource-group]

範例

取得 Webhook 的組態資訊。

az acr webhook get-config -n mywebhook -r myregistry

必要參數

--name -n

Webhook 的名稱。

--registry -r

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--resource-group -g

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

全域參數
--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 acr webhook list

列出 Azure Container Registry 的所有 Webhook。

az acr webhook list --registry
                    [--resource-group]

範例

列出 Webhook,並在數據表中顯示結果。

az acr webhook list -r myregistry -o table

必要參數

--registry -r

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--resource-group -g

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

全域參數
--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 acr webhook list-events

列出 Webhook 的最新事件。

az acr webhook list-events --name
                           --registry
                           [--resource-group]

範例

列出 Webhook 的最新事件。

az acr webhook list-events -n mywebhook -r myregistry

必要參數

--name -n

Webhook 的名稱。

--registry -r

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--resource-group -g

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

全域參數
--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 acr webhook ping

觸發 Webhook 的 Ping 事件。

az acr webhook ping --name
                    --registry
                    [--resource-group]

範例

觸發 Webhook 的 Ping 事件。

az acr webhook ping -n mywebhook -r myregistry

必要參數

--name -n

Webhook 的名稱。

--registry -r

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--resource-group -g

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

全域參數
--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 acr webhook show

取得 Webhook 的詳細數據。

az acr webhook show --name
                    --registry
                    [--resource-group]

範例

取得 Webhook 的詳細數據。

az acr webhook show -n mywebhook -r myregistry

必要參數

--name -n

Webhook 的名稱。

--registry -r

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--resource-group -g

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

全域參數
--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 acr webhook update

更新 Webhook。

az acr webhook update --name
                      --registry
                      [--actions {chart_delete, chart_push, delete, push, quarantine}]
                      [--add]
                      [--force-string]
                      [--headers]
                      [--remove]
                      [--resource-group]
                      [--scope]
                      [--set]
                      [--status {disabled, enabled}]
                      [--tags]
                      [--uri]

範例

更新 Webhook 的標頭。

az acr webhook update -n mywebhook -r myregistry --headers "Authorization=Basic 000000"

更新 Webhook 的服務 URI 和動作。

az acr webhook update -n mywebhook -r myregistry --uri http://myservice.com --actions push delete

停用 Webhook。

az acr webhook update -n mywebhook -r myregistry --status disabled

必要參數

--name -n

Webhook 的名稱。

--registry -r

容器登錄的名稱。 它應該以小寫指定。 您可以使用 來設定預設登錄名稱 az configure --defaults acr=<registry name>

選擇性參數

--actions

觸發 Webhook 張貼通知的動作以空格分隔的清單。

接受的值: chart_delete, chart_push, delete, push, quarantine
--add

藉由指定路徑和索引鍵值組,將物件加入物件清單。 範例:--add property.listProperty <key=value, string or JSON string>

預設值: []
--force-string

使用 'set' 或 'add' 時,請保留字串常值,而不是嘗試轉換成 JSON。

預設值: False
--headers

將新增至 Webhook 通知的 'key[=value]' 格式以空格分隔的自定義標頭。 使用 「清除現有的標頭」。

--remove

從清單中移除屬性或專案。 範例: --remove property.list <indexToRemove>--remove propertyToRemove

預設值: []
--resource-group -g

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

--scope

可以觸發事件的存放庫範圍。 例如,『foo:*』 表示存放庫 『foo』 下所有標記的事件。 'foo:bar' 只表示 'foo:bar' 的事件。 'foo' 相當於 'foo:latest'。 空白表示所有存放庫的事件。

--set

指定要設定的屬性路徑和值,以更新物件。 範例:--set property1.property2=<value>

預設值: []
--status

指出是否啟用 Webhook。

接受的值: disabled, enabled
--tags

以空格分隔的標記:key[=value] [key[=value] ...]。使用 「清除現有的標記」。

--uri

Webhook 用來張貼通知的服務 URI。

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