New-AzureRmServiceBusTopicKey

Regenerates the primary or secondary connection strings for the Service Bus topic.

Syntax

New-AzureRmServiceBusTopicKey
   [-ResourceGroup] <String>
   -Namespace <String>
   -Topic <String>
   -Name <String>
   [-RegenerateKeys] <String>
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzureRmServiceBusTopicKey cmdlet generates a new primary or secondary connection string for the specified Service Bus topic and authorization rule.

Examples

Example 1

PS C:\> New-AzureRmServiceBusTopicKey -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -TopicName SB-Topic_exampl1 -AuthorizationRuleName SBTopicAuthoRule1 -RegenerateKeys PrimaryKey

Regenerates the primary connection string for the namespace.

Example 2

PS C:\> New-AzureRmServiceBusTopicKey -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -TopicName SB-Topic_exampl1 -AuthorizationRuleName SBTopicAuthoRule1 -RegenerateKeys SecondaryKey

Regenerates the secondary connection string for the namespace.

Required Parameters

-Name

Authorization Rule Name.

Type:String
Aliases:AuthorizationRuleName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Namespace

Namespace Name.

Type:String
Aliases:NamespaceName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-RegenerateKeys

Specifies whether to regenerate the primary or secondary keys.

Type:String
Parameter Sets:PrimaryKey, SecondaryKey
Position:4
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ResourceGroup

The name of the resource group.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Topic

Topic Name.

Type:String
Aliases:TopicName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

-ResourceGroup

System.String

Inputs

-NamespaceName

System.String

Inputs

-AuthorizationRuleName

System.String

Inputs

-TopicName

System.String

Inputs

-RegenerateKeys

System.String

Outputs

Microsoft.Azure.Commands.ServiceBus.Models.ListKeysAttributes

PrimaryConnectionString : Endpoint=sb://sb-example1.servicebus.windows.net/;SharedAccessKeyName=SBTopicAuthoRule1;SharedAccessKey={SharedAccessKey-value};EntityPath=SB-Topi c_exampl1 SecondaryConnectionString : Endpoint=sb://sb-example1.servicebus.windows.net/;SharedAccessKeyName=SBTopicAuthoRule1;SharedAccessKey={SharedAccessKey-value};EntityPath=SB-Topi c_exampl1 PrimaryKey : {PrimaryKey value} SecondaryKey : {SecondaryKey value} KeyName : SBTopicAuthoRule1