Share via


az containerapp ingress access-restriction

管理IP存取限制的命令。

命令

名稱 Description 類型 狀態
az containerapp ingress access-restriction list

列出容器應用程式的IP存取限制。

核心 GA
az containerapp ingress access-restriction remove

從容器應用程式移除IP存取限制。

核心 GA
az containerapp ingress access-restriction set

設定容器應用程式的IP存取限制。

核心 GA

az containerapp ingress access-restriction list

列出容器應用程式的IP存取限制。

az containerapp ingress access-restriction list --name
                                                --resource-group

範例

列出IP存取限制。

az containerapp ingress access-restriction list -n my-containerapp -g MyResourceGroup

必要參數

--name -n

Containerapp 的名稱。 名稱必須包含小寫英數位元或 '-'、以字母開頭、以英數位元結尾、不能有 '--' 且必須小於 32 個字元。

--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 containerapp ingress access-restriction remove

從容器應用程式移除IP存取限制。

az containerapp ingress access-restriction remove --rule-name
                                                  [--ids]
                                                  [--name]
                                                  [--resource-group]
                                                  [--subscription]

範例

拿掉IP存取限制。

az containerapp ingress access-restriction remove -n my-containerapp -g MyResourceGroup --rule-name restrictionName

必要參數

--rule-name

IP 安全性限制名稱。

選擇性參數

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

Containerapp 的名稱。 名稱必須包含小寫英數位元或 '-'、以字母開頭、以英數位元結尾、不能有 '--' 且必須小於 32 個字元。

--resource-group -g

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

--subscription

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

全域參數
--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 containerapp ingress access-restriction set

設定容器應用程式的IP存取限制。

az containerapp ingress access-restriction set --action {Allow, Deny}
                                               --ip-address
                                               --rule-name
                                               [--description]
                                               [--ids]
                                               [--name]
                                               [--resource-group]
                                               [--subscription]

範例

新增允許IP存取限制。

az containerapp ingress access-restriction set -n my-containerapp -g MyResourceGroup --rule-name restrictionName --ip-address 192.168.1.1/32 --description "Restriction description." --action Allow

必要參數

--action

IP 安全性限制是否允許或拒絕存取。 所有限制都必須使用相同的動作。 如果未設定任何限制,則允許所有流量。

接受的值: Allow, Deny
--ip-address

IPv4 CIDR 表示法中IP安全性限制的位址範圍。 (例如,'198.51.100.14/24')。

--rule-name

IP 安全性限制名稱。

選擇性參數

--description

IP 安全性限制的描述。

--ids

一或多個資源識別碼 (以空格分隔)。 它應該是包含 「資源標識碼」自變數所有資訊的完整資源識別碼。 您應該提供 --ids 或其他「資源識別碼」自變數。

--name -n

Containerapp 的名稱。 名稱必須包含小寫英數位元或 '-'、以字母開頭、以英數位元結尾、不能有 '--' 且必須小於 32 個字元。

--resource-group -g

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

--subscription

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

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