共用方式為


az notification-hub authorization-rule

Note

此參考是 Azure CLI 的 通知中樞 擴充功能的一部分(2.67.0 版或更高版本)。 擴充功能會在您第一次執行 az notification-hub authorization-rule 命令時自動安裝。 深入了解擴充功能。

管理通知中樞授權規則的命令。

命令

名稱 Description 類型 狀態
az notification-hub authorization-rule create

建立通知中樞的授權規則。

Extension Experimental
az notification-hub authorization-rule delete

刪除 notificationHub 授權規則。

Extension Experimental
az notification-hub authorization-rule list

列出通知中樞的授權規則。

Extension Experimental
az notification-hub authorization-rule list-keys

列出通知中樞的主要和次要連接字串。

Extension Experimental
az notification-hub authorization-rule regenerate-keys

將主要/次要金鑰重新產生至通知中樞授權規則。

Extension Experimental
az notification-hub authorization-rule show

依名稱顯示通知中樞的授權規則。

Extension Experimental

az notification-hub authorization-rule create

實驗

此命令是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

建立通知中樞的授權規則。

az notification-hub authorization-rule create --name
                                              --namespace-name
                                              --notification-hub-name
                                              --resource-group
                                              [--rights]

範例

建立授權規則

az notification-hub authorization-rule create --resource-group MyResourceGroup --namespace-name my-namespace --notification-hub-name my-hub --name DefaultListenSharedAccessSignature --rights Listen Send

必要參數

--name -n

授權規則名稱。

--namespace-name

命名空間名稱。

--notification-hub-name

通知中樞名稱。

--resource-group -g

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

選擇性參數

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

--rights

與規則相關聯的許可權。 支援速記語法、json-file 和 yaml-file。 請嘗試 “??” 以顯示更多。

屬性
參數群組: Properties 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

az notification-hub authorization-rule delete

實驗

此命令是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

刪除 notificationHub 授權規則。

az notification-hub authorization-rule delete [--ids]
                                              [--name]
                                              [--namespace-name]
                                              [--notification-hub-name]
                                              [--resource-group]
                                              [--subscription]
                                              [--yes]

範例

刪除 notificationHub 授權規則

az notification-hub authorization-rule delete --resource-group MyResourceGroup --namespace-name my-namespace --notification-hub-name my-hub --name DefaultListenSharedAccessSignature

選擇性參數

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

--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

授權規則名稱。

屬性
參數群組: Resource Id Arguments
--namespace-name

命名空間名稱。

屬性
參數群組: Resource Id Arguments
--notification-hub-name

通知中樞名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--subscription

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

屬性
參數群組: Resource Id Arguments
--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/

--verbose

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

屬性
預設值: False

az notification-hub authorization-rule list

實驗

此命令是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出通知中樞的授權規則。

az notification-hub authorization-rule list --namespace-name
                                            --notification-hub-name
                                            --resource-group
                                            [--max-items]
                                            [--next-token]

範例

列出通知中樞的授權規則。

az notification-hub authorization-rule list --resource-group MyResourceGroup --namespace-name my-namespace --notification-hub-name my-hub

必要參數

--namespace-name

命名空間名稱。

--notification-hub-name

通知中樞名稱。

--resource-group -g

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

選擇性參數

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

--max-items

命令輸出中要傳回的項目總數。 如果可用的專案總數超過指定的值,則會在命令的輸出中提供令牌。 若要繼續分頁,請在後續命令的 --next-token 自變數中提供令牌值。

屬性
參數群組: Pagination Arguments
--next-token

標記,指定要開始分頁的位置。 這是先前截斷回應中的令牌值。

屬性
參數群組: Pagination 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

az notification-hub authorization-rule list-keys

實驗

此命令是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

列出通知中樞的主要和次要連接字串。

az notification-hub authorization-rule list-keys [--ids]
                                                 [--name]
                                                 [--namespace-name]
                                                 [--notification-hub-name]
                                                 [--resource-group]
                                                 [--subscription]

範例

列出授權規則的連接字串

az notification-hub authorization-rule list-keys --resource-group MyResourceGroup --namespace-name my-namespace --notification-hub-name my-hub --name "sdk-AuthRules-5800"

選擇性參數

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

--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

指定 authorizationRule 之 NotificationHub 的連接字串。

屬性
參數群組: Resource Id Arguments
--namespace-name

命名空間名稱。

屬性
參數群組: Resource Id Arguments
--notification-hub-name

通知中樞名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--subscription

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

屬性
參數群組: Resource Id Arguments
全域參數
--debug

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

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

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

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

輸出格式。

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

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

--verbose

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

屬性
預設值: False

az notification-hub authorization-rule regenerate-keys

實驗

此命令是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

將主要/次要金鑰重新產生至通知中樞授權規則。

az notification-hub authorization-rule regenerate-keys --policy-key {Primary Key, Secondary Key}
                                                       [--ids]
                                                       [--name]
                                                       [--namespace-name]
                                                       [--notification-hub-name]
                                                       [--resource-group]
                                                       [--subscription]

範例

重新產生通知中樞授權規則

az notification-hub authorization-rule regenerate-keys --resource-group MyResourceGroup --namespace-name my-namespace --notification-hub-name my-hub --name DefaultListenSharedAccessSignature --policy-key "Secondary Key"

必要參數

--policy-key

必須針對命名空間/通知中樞授權規則重新產生之金鑰的名稱。 此值可以是主要金鑰/次要金鑰。

屬性
參數群組: Parameters Arguments
接受的值: Primary Key, Secondary Key

選擇性參數

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

--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

指定 authorizationRule 之 NotificationHub 的連接字串。

屬性
參數群組: Resource Id Arguments
--namespace-name

命名空間名稱。

屬性
參數群組: Resource Id Arguments
--notification-hub-name

通知中樞名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--subscription

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

屬性
參數群組: Resource Id Arguments
全域參數
--debug

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

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

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

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

輸出格式。

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

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

--verbose

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

屬性
預設值: False

az notification-hub authorization-rule show

實驗

此命令是實驗性且正在開發中。 參考和支援層級: https://aka.ms/CLI_refstatus

依名稱顯示通知中樞的授權規則。

az notification-hub authorization-rule show [--ids]
                                            [--name]
                                            [--namespace-name]
                                            [--notification-hub-name]
                                            [--resource-group]
                                            [--subscription]

範例

顯示授權規則資訊

az notification-hub authorization-rule show --resource-group MyResourceGroup --namespace-name my-namespace --notification-hub-name my-hub --name DefaultListenSharedAccessSignature

選擇性參數

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

--ids

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

屬性
參數群組: Resource Id Arguments
--name -n

授權規則名稱。

屬性
參數群組: Resource Id Arguments
--namespace-name

命名空間名稱。

屬性
參數群組: Resource Id Arguments
--notification-hub-name

通知中樞名稱。

屬性
參數群組: Resource Id Arguments
--resource-group -g

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

屬性
參數群組: Resource Id Arguments
--subscription

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

屬性
參數群組: Resource Id Arguments
全域參數
--debug

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

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

顯示此說明訊息並結束。

--only-show-errors

只顯示錯誤,隱藏警告。

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

輸出格式。

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

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

--verbose

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

屬性
預設值: False