Get-AzRelayKey
Primary and secondary connection strings to the namespace.
Syntax
Get-AzRelayKey
-Name <String>
-Namespace <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzRelayKey
-Name <String>
-Namespace <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
-HybridConnection <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Get-AzRelayKey
-Name <String>
-Namespace <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
-WcfRelay <String>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Primary and secondary connection strings to the namespace.
Examples
Example 1: Get the primary and secondary connection strings for the given Relay namespace
Get-AzRelayKey -ResourceGroupName lucas-relay-rg -Namespace namespace-pwsh01 -Name authRule-01
KeyName : authRule-01
PrimaryConnectionString : Endpoint=sb://namespace-pwsh01.servicebus.windows.net/;SharedAccessKeyName=authRule-01;SharedAccessKey=xxxxxxxxxxxxxxxxx
PrimaryKey : xxxxxxxxxxxxxxxxx
SecondaryConnectionString : Endpoint=sb://namespace-pwsh01.servicebus.windows.net/;SharedAccessKeyName=authRule-01;SharedAccessKey=xxxxxxxxxxxxxxxxx
SecondaryKey : xxxxxxxxxxxxxxxxx
This cmdlet gets the primary and secondary connection strings for the given Relay namespace.
Example 2: Get the primary and secondary connection strings for the given Hybrid Connection
Get-AzRelayKey -ResourceGroupName lucas-relay-rg -Namespace namespace-pwsh01 -HybridConnection connection-01 -Name authRule-01
KeyName : authRule-01
PrimaryConnectionString : Endpoint=sb://namespace-pwsh01.servicebus.windows.net/;SharedAccessKeyName=authRule-01;SharedAccessKey=xxxxxxxxxxxxxxxxx
PrimaryKey : xxxxxxxxxxxxxxxxx
SecondaryConnectionString : Endpoint=sb://namespace-pwsh01.servicebus.windows.net/;SharedAccessKeyName=authRule-01;SharedAccessKey=xxxxxxxxxxxxxxxxx
SecondaryKey : xxxxxxxxxxxxxxxxx
This cmdlet gets the primary and secondary connection strings for the given Hybrid Connection.
Example 3: Get the primary and secondary connection strings for the given Wcf Relay
Get-AzRelayKey -ResourceGroupName lucas-relay-rg -Namespace namespace-pwsh01 -WcfRelay wcf-01 -Name authRule-01 | Format-List
KeyName : authRule-01
PrimaryConnectionString : Endpoint=sb://namespace-pwsh01.servicebus.windows.net/;SharedAccessKeyName=authRule-01;SharedAccessKey=xxxxxxxxxxxxxxxxx
PrimaryKey : xxxxxxxxxxxxxxxxx
SecondaryConnectionString : Endpoint=sb://namespace-pwsh01.servicebus.windows.net/;SharedAccessKeyName=authRule-01;SharedAccessKey=xxxxxxxxxxxxxxxxx
SecondaryKey : xxxxxxxxxxxxxxxxx
This cmdlet gets the primary and secondary connection strings for the given Wcf Relay.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-HybridConnection
The hybrid connection name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
The authorization rule name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Namespace
The namespace name
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Name of the Resource group within the Azure subscription.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
Subscription credentials which uniquely identify the Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
Type: | String[] |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WcfRelay
The relay name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
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: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Outputs
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for