az acr network-rule
管理 Azure Container Registries 的網路規則。
命令
名稱 | Description | 類型 | 狀態 |
---|---|---|---|
az acr network-rule add |
新增網路規則。 |
Core | GA |
az acr network-rule list |
列出網路規則。 |
Core | GA |
az acr network-rule remove |
移除網路規則。 |
Core | GA |
az acr network-rule add
新增網路規則。
az acr network-rule add --name
[--ip-address]
[--resource-group]
範例
新增規則以允許存取特定IP位址範圍。
az acr network-rule add -n myregistry --ip-address 23.45.1.0/24
必要參數
容器登錄的名稱。 它應該以小寫指定。 您可以使用 az configure --defaults acr=<registry name>
來設定預設登錄名稱。
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
IPv4 位址或 CIDR 範圍。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |
az acr network-rule list
列出網路規則。
az acr network-rule list --name
[--resource-group]
範例
列出登錄的網路規則。
az acr network-rule list -n myregistry
必要參數
容器登錄的名稱。 它應該以小寫指定。 您可以使用 az configure --defaults acr=<registry name>
來設定預設登錄名稱。
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |
az acr network-rule remove
移除網路規則。
az acr network-rule remove --name
[--ip-address]
[--resource-group]
範例
拿掉允許存取特定IP位址範圍的規則。
az acr network-rule remove -n myregistry --ip-address 23.45.1.0/24
必要參數
容器登錄的名稱。 它應該以小寫指定。 您可以使用 az configure --defaults acr=<registry name>
來設定預設登錄名稱。
選擇性參數
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
IPv4 位址或 CIDR 範圍。
資源組名。 您可以使用 az configure --defaults group=<name>
來設定預設群組。
全域參數
提高日誌詳細程度以顯示所有調試日誌。
屬性 | 值 |
---|---|
預設值: | False |
顯示此說明訊息並結束。
只顯示錯誤,隱藏警告。
屬性 | 值 |
---|---|
預設值: | False |
Output format.
屬性 | 值 |
---|---|
預設值: | json |
接受的值: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath 查詢字串。 如需詳細資訊和範例,請參閱 http://jmespath.org/。
訂用帳戶的名稱或標識碼。 您可以使用 az account set -s NAME_OR_ID
來設定預設訂用帳戶。
增加記錄的詳細程度。 針對完整偵錯記錄使用 --debug。
屬性 | 值 |
---|---|
預設值: | False |