共用方式為


az acr cache

在 Azure Container Registries 中管理快取規則。

命令

名稱 Description 類型 狀態
az acr cache create

建立快取規則。

Core GA
az acr cache delete

刪除快取規則。

Core GA
az acr cache list

列出 Azure Container Registry 中的快取規則。

Core GA
az acr cache show

顯示快取規則。

Core GA
az acr cache update

更新快取規則上的認證集。

Core GA

az acr cache create

建立快取規則。

az acr cache create --name
                    --registry
                    --source-repo
                    --target-repo
                    [--cred-set]
                    [--resource-group]

範例

建立不含認證集的快取規則。

az acr cache create -r myregistry -n MyRule -s docker.io/library/ubuntu -t ubuntu

使用認證集建立快取規則。

az acr cache create -r myregistry -n MyRule -s docker.io/library/ubuntu -t ubuntu -c MyCredSet

必要參數

--name -n

快取規則的名稱。

--registry -r

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

--source-repo -s

完整的來源存放庫路徑,例如 『docker.io/library/ubuntu』。

--target-repo -t

目標存放庫命名空間,例如 『ubuntu』。

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--cred-set -c

認證集的名稱。

--resource-group -g

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az acr cache delete

刪除快取規則。

az acr cache delete --name
                    --registry
                    [--resource-group]
                    [--yes]

範例

刪除快取規則。

az acr cache delete -r myregistry -n MyRule

必要參數

--name -n

快取規則的名稱。

--registry -r

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

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--resource-group -g

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

--yes -y

請勿提示確認。

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

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az acr cache list

列出 Azure Container Registry 中的快取規則。

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

範例

列出 Azure Container Registry 中的快取規則。

az acr cache list -r myregistry

必要參數

--registry -r

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

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--resource-group -g

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az acr cache show

顯示快取規則。

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

範例

顯示快取規則。

az acr cache show -r myregistry -n MyRule

必要參數

--name -n

快取規則的名稱。

--registry -r

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

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--resource-group -g

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

全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False

az acr cache update

更新快取規則上的認證集。

az acr cache update --name
                    --registry
                    [--add]
                    [--cred-set]
                    [--force-string]
                    [--remove]
                    [--remove-cred-set]
                    [--resource-group]
                    [--set]

範例

將認證集變更或新增至現有的快取規則。

az acr cache update -r myregistry -n MyRule -c NewCredSet

從現有的快取規則中移除認證集。

az acr cache update -r myregistry -n MyRule --remove-cred-set

必要參數

--name -n

快取規則的名稱。

--registry -r

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

選擇性參數

下列參數是選擇性參數,但視內容而定,命令可能需要一或多個參數才能成功執行。

--add

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

屬性
參數群組: Generic Update Arguments
預設值: []
--cred-set -c

認證集的名稱。

--force-string

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

屬性
參數群組: Generic Update Arguments
預設值: False
--remove

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

屬性
參數群組: Generic Update Arguments
預設值: []
--remove-cred-set

選擇性布爾值,指出是否要從快取規則中移除認證集。 False 預設為 False。

屬性
預設值: False
--resource-group -g

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

--set

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

屬性
參數群組: Generic Update Arguments
預設值: []
全域參數
--debug

提高日誌詳細程度以顯示所有調試日誌。

屬性
預設值: False
--help -h

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

屬性
預設值: False
--output -o

輸出格式。

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

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

--subscription

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

--verbose

增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。

屬性
預設值: False