New-AzNotificationHubKey
重新產生 NotificationHub 的授權規則金鑰。
語法
New-AzNotificationHubKey
[-ResourceGroup] <String>
[-Namespace] <String>
[-NotificationHub] <String>
[[-AuthorizationRule] <String>]
[-PolicyKey] <String>
[-Force]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
New-AzNotificationHubKey Cmdlet 會重新產生 NotificationHub 授權規則的主鍵/次要密鑰。
範例
範例 1
New-AzNotificationHubKey -ResourceGroup "ContosoNotificationsGroup" -Namespace "ContosoNamespace" -NotificationHub "ContosoInternalHub" -AuthorizationRule "DefaultListenSharedAccessSignature" -PolicyKey "PrimaryKey"
PrimaryConnectionString : Endpoint=sb://contosonamespace.servicebus.windows.net/;SharedAccessKeyName=DefaultListenShare
dAccessSignature;SharedAccessKey=V******z0=
SecondaryConnectionString : Endpoint=sb://contosonamespace.servicebus.windows.net/;SharedAccessKeyName=DefaultListenShare
dAccessSignature;SharedAccessKey=V******HV=
PrimaryKey : V******z0=
SecondaryKey : V******HV=
KeyName : DefaultListenSharedAccessSignature
參數
-AuthorizationRule
類型: | String |
Position: | 3 |
預設值: | None |
必要: | False |
接受管線輸入: | True |
接受萬用字元: | False |
-Confirm
在執行 Cmdlet 之前,提示您進行確認。
類型: | SwitchParameter |
別名: | cf |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
用於與 azure 通訊的認證、帳戶、租用戶和訂用帳戶
類型: | IAzureContextContainer |
別名: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Force
請勿要求確認。
類型: | SwitchParameter |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-Namespace
類型: | String |
Position: | 1 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-NotificationHub
類型: | String |
Position: | 2 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-PolicyKey
類型: | String |
接受的值: | PrimaryKey, SecondaryKey |
Position: | 4 |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroup
類型: | String |
Position: | 0 |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-WhatIf
顯示 Cmdlet 執行時會發生什麼事。
Cmdlet 未執行。
類型: | SwitchParameter |
別名: | wi |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
String
輸出
ResourceListKeys