Set-AzRelayAuthorizationRule
Creates or updates an authorization rule for a namespace.
Syntax
Set-AzRelayAuthorizationRule
-Name <String>
-Namespace <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
[-Rights <AccessRights[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzRelayAuthorizationRule
-Name <String>
-Namespace <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-HybridConnection <String>
-InputObject <IAuthorizationRule>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzRelayAuthorizationRule
-Name <String>
-Namespace <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-HybridConnection <String>
[-Rights <AccessRights[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzRelayAuthorizationRule
-Name <String>
-Namespace <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-WcfRelay <String>
-InputObject <IAuthorizationRule>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzRelayAuthorizationRule
-Name <String>
-Namespace <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-WcfRelay <String>
[-Rights <AccessRights[]>]
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzRelayAuthorizationRule
-Name <String>
-Namespace <String>
-ResourceGroupName <String>
[-SubscriptionId <String>]
-InputObject <IAuthorizationRule>
[-DefaultProfile <PSObject>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Creates or updates an authorization rule for a namespace.
Examples
Example 1: Adds Listen from the access rights of the authorization rule for the Relay namespace
Set-AzRelayAuthorizationRule -ResourceGroupName Relay-ServiceBus-EastUS -Namespace namespace-pwsh01 -Name authRule-01 -Rights 'Listen' | Format-List
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/Relay-ServiceBus-EastUS/providers/Microsoft.Relay/namespaces/namespace-pwsh01/authorizationRu
les/authRule-01
Location : eastus
Name : authRule-01
ResourceGroupName : Relay-ServiceBus-EastUS
Rights : {Listen}
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Relay/Namespaces/AuthorizationRules
This cmdlet adds Listen from the access rights of the authorization rule for the Relay namespace.
Example 2: Adds Send from the access rights of the authorization rule for the Relay namespace with InputeObject parameter
$authRule = Get-AzRelayAuthorizationRule -ResourceGroupName Relay-ServiceBus-EastUS -Namespace namespace-pwsh01 -Name authRule-01
$authRule.Rights += 'Send'
Set-AzRelayAuthorizationRule -ResourceGroupName Relay-ServiceBus-EastUS -Namespace namespace-pwsh01 -Name authRule-01 -InputObject $authRule | Format-List
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/Relay-ServiceBus-EastUS/providers/Microsoft.Relay/namespaces/namespace-pwsh01/authorizationRu
les/authRule-01
Location : eastus
Name : authRule-01
ResourceGroupName : Relay-ServiceBus-EastUS
Rights : {Listen, Send}
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Relay/Namespaces/AuthorizationRules
This cmdlet adds Send from the access rights of the authorization rule for the Relay namespace with InputeObject parameter.
Example 3: Set or update Listen from the access rights of the authorization rule for the Hybrid Connection
Set-AzRelayAuthorizationRule -ResourceGroupName Relay-ServiceBus-EastUS -Namespace namespace-pwsh01 -HybridConnection connection-01 -Name authRule-02 -Rights 'Listen' | Format-List
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/Relay-ServiceBus-EastUS/providers/Microsoft.Relay/namespaces/namespace-pwsh01/hybridConnectio
ns/connection-01/authorizationRules/authRule-02
Location :
Name : authRule-02
ResourceGroupName : Relay-ServiceBus-EastUS
Rights : {Listen}
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Relay/namespaces/hybridconnections/authorizationrules
This cmdlet set or update Listen from the access rights of the authorization rule for the Hybrid Connection.
Example 4: Adds Send from the access rights of the authorization rule for the Hybrid Connection with InputeObject parameter
$authRule = Get-AzRelayAuthorizationRule -ResourceGroupName lucas-relay-rg -Namespace namespace-pwsh01 -HybridConnection connection-01 -Name authRule-01
$authRule.Rights += 'Send'
Set-AzRelayAuthorizationRule -ResourceGroupName lucas-relay-rg -Namespace namespace-pwsh01 -HybridConnection connection-01 -Name authRule-01 -InputObject $authRule | Format-List
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-relay-rg/providers/Microsoft.Relay/namespaces/namespace
-pwsh01/hybridConnections/connection-01/authorizationRules/authRule-01
Location :
Name : authRule-01
ResourceGroupName : lucas-relay-rg
Rights : {Listen, Send}
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Relay/namespaces/hybridconnections/authorizationrules
This cmdlet adds Send from the access rights of the authorization rule for the Hybrid Connection with InputeObject parameter.
Example 5: Adds Send from the access rights of the authorization rule for the Wcf Relay
Set-AzRelayAuthorizationRule -ResourceGroupName Relay-ServiceBus-EastUS -Namespace namespace-pwsh01 -WcfRelay wcfrelay-01 -Name authRule-03 -Rights 'Listen' | Format-List
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/Relay-ServiceBus-EastUS/providers/Microsoft.Relay/namespaces/namespace-pwsh01/wcfRelays/wcfre
lay-01/authorizationRules/authRule-03
Location :
Name : authRule-03
ResourceGroupName : Relay-ServiceBus-EastUS
Rights : {Listen}
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Relay/namespaces/wcfrelays/authorizationrules
This cmdlet adds Send from the access rights of the authorization rule for the Wcf Relay.
Example 6: Adds Send from the access rights of the authorization rule for the Wcf Relay with InputeObject parameter
$authRule = Get-AzRelayAuthorizationRule -ResourceGroupName lucas-relay-rg -Namespace namespace-pwsh01 -WcfRelay wcf-01 -Name authRule-01
$authRule.Rights += 'Send'
Set-AzRelayAuthorizationRule -ResourceGroupName lucas-relay-rg -Namespace namespace-pwsh01 -WcfRelay wcf-01 -Name authRule-01 -InputObject $authRule | Format-List
Id : /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f/resourceGroups/lucas-relay-rg/providers/Microsoft.Relay/namespaces/namespace-pwsh01/wcfRela
ys/wcf-01/authorizationRules/authRule-01
Location :
Name : authRule-01
ResourceGroupName : lucas-relay-rg
Rights : {Listen, Send}
SystemDataCreatedAt :
SystemDataCreatedBy :
SystemDataCreatedByType :
SystemDataLastModifiedAt :
SystemDataLastModifiedBy :
SystemDataLastModifiedByType :
Type : Microsoft.Relay/namespaces/wcfrelays/authorizationrules
This cmdlet adds Send from the access rights of the authorization rule for the Wcf Relay with InputeObject parameter.
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 |
-InputObject
Single item in a List or Get AuthorizationRule operation To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IAuthorizationRule |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
The authorization rule name.
Type: | String |
Aliases: | AuthorizationRuleName |
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 |
-Rights
The rights associated with the rule.
Type: | AccessRights[] |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Inputs
Outputs
Azure PowerShell