Skip to content

Commit

Permalink
Merge pull request #9732 from v-Ajnava/masterlocalSB
Browse files Browse the repository at this point in the history
ServiceBus: Fix for issue #9658
  • Loading branch information
cormacpayne authored Jul 29, 2019
2 parents 587ccba + 17594ce commit 2a0aa69
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/ServiceBus/ServiceBus/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@
- Additional information about change #1
-->
## Upcoming Release
* Fix for issue #9658 : Typo VirtualNetworkRule parameter in Set-AzServiceBusNetworkRuleSet

## Version 1.3.0
* Added new cmmdlet added for generating SAS token : New-AzServiceBusAuthorizationRuleSASToken
* added verification and error message for authorizationrules rights if only 'Manage' is assigned
* Added verification and error message for authorizationrules rights if only 'Manage' is assigned

## Version 1.2.1
* Fix for issue #4938 - New-AzureRmServiceBusQueue returns BadRequest when setting MaxSizeInMegabytes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ public abstract class AzureServiceBusCmdletBase : AzureRMCmdlet
protected const string AliasSubscriptionName = "SubscriptionName";
protected const string AliasSubscriptionObj = "SubscriptionObj";
protected const string AliasResourceId = "ResourceId";
protected const string AliasVirtualNetworkRule = "VirtualNteworkRule";

protected const string ServicebusSubscriptionVerb = "AzureRmServiceBusSubscription";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public class SetAzureServiceBusNetworkrule : AzureServiceBusCmdletBase

[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetPropertiesParameterSet, Position = 3, HelpMessage = "List of VirtualNetworkRules")]
[ValidateNotNullOrEmpty]
public PSNWRuleSetVirtualNetworkRulesAttributes[] VirtualNteworkRule { get; set; }
[Alias(AliasVirtualNetworkRule)]
public PSNWRuleSetVirtualNetworkRulesAttributes[] VirtualNetworkRule { get; set; }

[Parameter(Mandatory = true, ParameterSetName = NetwrokruleSetInputObjectParameterSet, ValueFromPipeline = true, Position = 2, HelpMessage = "NetworkruleSet Configuration Object")]
[ValidateNotNullOrEmpty]
Expand All @@ -76,7 +77,7 @@ public override void ExecuteCmdlet()
{
DefaultAction = DefaultAction,
IpRules = IPRule.OfType<PSNWRuleSetIpRulesAttributes>().ToList(),
VirtualNetworkRules = VirtualNteworkRule.OfType<PSNWRuleSetVirtualNetworkRulesAttributes>().ToList()
VirtualNetworkRules = VirtualNetworkRule.OfType<PSNWRuleSetVirtualNetworkRulesAttributes>().ToList()
};

WriteObject(Client.CreateOrUpdateNetworkRuleSet(ResourceGroupName, Name, networkRuleSetAttributes));
Expand Down
10 changes: 5 additions & 5 deletions src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Update the NetwrokruleSet of the given Namepsace in the current Azure subscripti
### NetworkRuleSetPropertiesSet (Default)
```
Set-AzServiceBusNetworkRuleSet [-ResourceGroupName] <String> [-Name] <String> [-DefaultAction <String>]
[-IPRule] <PSNWRuleSetIpRulesAttributes[]> [-VirtualNteworkRule] <PSNWRuleSetVirtualNetworkRulesAttributes[]>
[-IPRule] <PSNWRuleSetIpRulesAttributes[]> [-VirtualNetworkRule] <PSNWRuleSetVirtualNetworkRulesAttributes[]>
[-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

Expand All @@ -41,7 +41,7 @@ Update the NetwrokruleSet of the given Namepsace in the current Azure subscripti
```powershell
PS C:\> $IpRules = @([Microsoft.Azure.Commands.ServiceBus.Models.PSNWRuleSetIpRulesAttributes] @{IpMask = "4.4.4.4";Action = "Allow"},[Microsoft.Azure.Commands.ServiceBus.Models.PSNWRuleSetIpRulesAttributes] @{IpMask = "3.3.3.3";Action = "Allow"})
PS C:\> $VirtualNetworkRules = @([Microsoft.Azure.Commands.ServiceBus.Models.PSNWRuleSetVirtualNetworkRulesAttributes]@{Subnet=@{Id="/subscriptions/subscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default"};IgnoreMissingVnetServiceEndpoint=$True})
PS C:\> Set-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-1375 -IPRule $IpRules -VirtualNteworkRule $VirtualNetworkRules -DefaultAction "Allow" -Debug
PS C:\> Set-AzServiceBusNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace ServiceBus-Namespace1-1375 -IPRule $IpRules -VirtualNetworkRule $VirtualNetworkRules -DefaultAction "Allow" -Debug
```

Expand All @@ -52,7 +52,7 @@ Type : Microsoft.ServiceBus/Namespaces/NetworkRuleSet
IpRules : {4.4.4.4, Allow, 3.3.3.3, Allow}
VirtualNetworkRules : {/subscriptions/subscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default, True}

Update the NetworkRuleSet using -IPRule and -VirtualNteworkRule parameters
Update the NetworkRuleSet using -IPRule and -VirtualNetworkRule parameters

### Example 2
```powershell
Expand Down Expand Up @@ -191,13 +191,13 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```
### -VirtualNteworkRule
### -VirtualNetworkRule
List of VirtualNetworkRules
```yaml
Type: Microsoft.Azure.Commands.ServiceBus.Models.PSNWRuleSetVirtualNetworkRulesAttributes[]
Parameter Sets: NetworkRuleSetPropertiesSet
Aliases:
Aliases: VirtualNteworkRule

Required: True
Position: 3
Expand Down

0 comments on commit 2a0aa69

Please sign in to comment.