Get-AzureRmServiceBusNamespaceKey

Gets the primary and secondary connection strings for the namespace.

Syntax

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

Description

The Get-AzureRmServiceBusNamespaceKey cmdlet returns the primary and secondary connection strings for the given namespace.

Examples

Example 1

PS C:\> Get-AzureRmServiceBusNamespaceKey -ResourceGroup Default-ServiceBus-WestUS -NamespaceName SB-Example1 -AuthorizationRuleName AuthoRule1

Primary and secondary connection string to the specified namespace.

Required Parameters

-Name

ServiceBus Namespace 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
-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

-AuthorizationRuleName

System.String

Outputs

Microsoft.Azure.Management.ServiceBus.Models.ResourceListKeys

PrimaryConnectionString : Endpoint=sb://sb-example1.servicebus.windows.net/;SharedAccessKeyName=AuthoRule1;SharedAccessKey={SharedAccessKey value} SecondaryConnectionString : Endpoint=sb://sb-example1.servicebus.windows.net/;SharedAccessKeyName=AuthoRule1;SharedAccessKey={SharedAccessKey value} PrimaryKey : {PrimaryKey value} SecondaryKey : {SecondaryKey value} KeyName : AuthoRule1