Bearbeiten

Freigeben über


Get-AzServiceBusKey

Gets the SASKey of a ServiceBus namespace, queue or topic.

Syntax

Get-AzServiceBusKey
   -Name <String>
   -NamespaceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [<CommonParameters>]
Get-AzServiceBusKey
   -Name <String>
   -NamespaceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   -AliasName <String>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [<CommonParameters>]
Get-AzServiceBusKey
   -Name <String>
   -NamespaceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   -TopicName <String>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [<CommonParameters>]
Get-AzServiceBusKey
   -Name <String>
   -NamespaceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   -QueueName <String>
   [-DefaultProfile <PSObject>]
   [-AsJob]
   [-NoWait]
   [<CommonParameters>]

Description

Gets the SASKey of a ServiceBus namespace, queue or topic.

Examples

Example 1: Get keys of a ServiceBus Namespace authorization rule

Get-AzServiceBusKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -Name RootManageSharedAccessKey

AliasPrimaryConnectionString   :
AliasSecondaryConnectionString :
KeyName                        : RootManageSharedAccessKey
PrimaryConnectionString        : 000000000000
PrimaryKey                     : 000000000000
SecondaryConnectionString      : {ConnectionString}
SecondaryKey                   : {ConnectionString}

Gets keys of authorization rule RootManageSharedAccessKey of ServiceBus namespace myNamespace.

Example 2: Get keys of a Queue authorization rule

Get-AzServiceBusKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -QueueName queue1 -Name RootManageSharedAccessKey

AliasPrimaryConnectionString   :
AliasSecondaryConnectionString :
KeyName                        : RootManageSharedAccessKey
PrimaryConnectionString        : 000000000000
PrimaryKey                     : 000000000000
SecondaryConnectionString      : {ConnectionString}
SecondaryKey                   : {ConnectionString}

Gets keys of authorization rule RootManageSharedAccessKey of ServiceBus queue queue1 from namespace myNamespace.

Example 3: Get keys of a Topic authorization rule

Get-AzServiceBusKey -ResourceGroupName myResourceGroup -NamespaceName myNamespace -TopicName topic1 -Name RootManageSharedAccessKey

AliasPrimaryConnectionString   :
AliasSecondaryConnectionString :
KeyName                        : RootManageSharedAccessKey
PrimaryConnectionString        : 000000000000
PrimaryKey                     : 000000000000
SecondaryConnectionString      : {ConnectionString}
SecondaryKey                   : {ConnectionString}

Gets keys of authorization rule RootManageSharedAccessKey of ServiceBus topic topic1 from namespace myNamespace.

Parameters

-AliasName

The name of the Service Disaster Recovery Config.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-AsJob

Run the command as a job

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

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

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The name of the Authorization Rule

Type:String
Aliases:AuthorizationRuleName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NamespaceName

The name of ServiceBus namespace

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-NoWait

Run the command asynchronously

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-QueueName

The name of the ServiceBus queue.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

The ID of the target subscription.

Type:String[]
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TopicName

The name of the ServiceBus topic.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

Outputs

IAccessKeys