共用方式為


New-AzNotificationHubsNamespaceKey

重新產生命名空間的授權規則金鑰。

語法

New-AzNotificationHubsNamespaceKey
   [-ResourceGroup] <String>
   [-Namespace] <String>
   [[-AuthorizationRule] <String>]
   [-PolicyKey] <String>
   [-Force]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

New-AzNotificationHubsNamespaceKey Cmdlet 會重新產生命名空間授權規則的主鍵/次要密鑰。

範例

範例 1

New-AzNotificationHubsNamespaceKey -ResourceGroup "ContosoNotificationsGroup" -Namespace "ContosoNamespace" -AuthorizationRule "RootManageSharedAccessKey" -PolicyKey "PrimaryKey"

PrimaryConnectionString   : Endpoint=sb://contosonamespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAc
                            cessKey;SharedAccessKey=V******z0=
SecondaryConnectionString : Endpoint=sb://contosonamespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAc
                            cessKey;SharedAccessKey=V******HV=
PrimaryKey                : V******z0=
SecondaryKey              : V******HV=
KeyName                   : RootManageSharedAccessKey

參數

-AuthorizationRule

類型:String
Position:2
預設值: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

-PolicyKey

類型:String
接受的值:PrimaryKey, SecondaryKey
Position:3
預設值:None
必要:True
接受管線輸入:False
接受萬用字元:False

-ResourceGroup

類型:String
Position:0
預設值:None
必要:True
接受管線輸入:True
接受萬用字元:False

-WhatIf

顯示 Cmdlet 執行時會發生什麼事。 Cmdlet 未執行。

類型:SwitchParameter
別名:wi
Position:Named
預設值:None
必要:False
接受管線輸入:False
接受萬用字元:False

輸入

輸出