Get-AzureRmServiceBusQueueKey

Gets the primary and secondary connection strings for the given Service Bus queue.

Syntax

Get-AzureRmServiceBusQueueKey
   [-ResourceGroup] <String>
   -Namespace <String>
   -Queue <String>
   -Name <String>
   [-DefaultProfile <IAzureContextContainer>]
   [<CommonParameters>]

Description

The Get-AzureRmServiceBusQueueKey cmdlet returns the primary and secondary connection strings for the given Service Bus queue.

Examples

Example 1

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

Returns the primary and secondary connection strings for the specified Service Bus queue.

Required Parameters

-Name

ServiceBus Queue AuthorizationRule Name.

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

ServiceBus Namespace Name.

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

ServiceBus Queue Name.

Type:String
Aliases:QueueName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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

-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

Inputs

-ResourceGroup

System.String

Inputs

-NamespaceName

System.String

Inputs

-QueueName

System.String

Inputs

-AuthorizationRuleName

System.String

Outputs

Microsoft.Azure.Commands.ServiceBus.Models.ListKeysAttributes

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