New-​Azure​Rm​Service​Bus​Queue​Key

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

Syntax

New-AzureRmServiceBusQueueKey
   [-ResourceGroup] <String>
   [-NamespaceName] <String>
   [-QueueName] <String>
   [-AuthorizationRuleName] <String>
   [-RegenerateKeys] <String>
   [-Confirm]
   [-WhatIf]
   [<CommonParameters>]

Description

The New-AzureRmServiceBusQueueKey cmdlet regenerates the primary or secondary connection strings for the specified Service Bus queue and authorization rule.

Examples

Example 1

PS C:\> New-AzureRmServiceBusQueueKey -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -QueueName SB-Queue_exampl1 -AuthorizationRuleName SBAuthoRule1 -RegenerateKeys PrimaryKey

Regenerates the primary connection string for the namespace.

Example 2

PS C:\> New-AzureRmServiceBusQueueKey -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -QueueName SB-Queue_exampl1 -AuthorizationRuleName SBAuthoRule1 -RegenerateKeys SecondaryKey

Regenerates the secondary connection string for the namespace.

Required Parameters

-AuthorizationRuleName

The authorization rule name.

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

The Service Bus namespace name.

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

The Service Bus queue name.

Type:String
Position:2
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

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

-ResourceGroup

System.String

Inputs

-NamespaceName

System.String

Inputs

-AuthorizationRuleName

System.String

Inputs

-QueueName

System.String

Inputs

-RegenerateKeys

System.String

Outputs

Microsoft.Azure.Management.ServiceBus.Models.ResourceListKeys

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