diff --git a/src/ServiceBus/ServiceBus/ChangeLog.md b/src/ServiceBus/ServiceBus/ChangeLog.md index ead2064d00b7..b34e64995c9f 100644 --- a/src/ServiceBus/ServiceBus/ChangeLog.md +++ b/src/ServiceBus/ServiceBus/ChangeLog.md @@ -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 diff --git a/src/ServiceBus/ServiceBus/Cmdlets/AzureServiceBusCmdletBase.cs b/src/ServiceBus/ServiceBus/Cmdlets/AzureServiceBusCmdletBase.cs index e443a8c01032..95a304fb74eb 100644 --- a/src/ServiceBus/ServiceBus/Cmdlets/AzureServiceBusCmdletBase.cs +++ b/src/ServiceBus/ServiceBus/Cmdlets/AzureServiceBusCmdletBase.cs @@ -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"; diff --git a/src/ServiceBus/ServiceBus/Cmdlets/NetworkRuleSet/SetAzureServiceBusNetworkrule.cs b/src/ServiceBus/ServiceBus/Cmdlets/NetworkRuleSet/SetAzureServiceBusNetworkrule.cs index f6bee7cb02ef..e2ec67fc8448 100644 --- a/src/ServiceBus/ServiceBus/Cmdlets/NetworkRuleSet/SetAzureServiceBusNetworkrule.cs +++ b/src/ServiceBus/ServiceBus/Cmdlets/NetworkRuleSet/SetAzureServiceBusNetworkrule.cs @@ -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] @@ -76,7 +77,7 @@ public override void ExecuteCmdlet() { DefaultAction = DefaultAction, IpRules = IPRule.OfType().ToList(), - VirtualNetworkRules = VirtualNteworkRule.OfType().ToList() + VirtualNetworkRules = VirtualNetworkRule.OfType().ToList() }; WriteObject(Client.CreateOrUpdateNetworkRuleSet(ResourceGroupName, Name, networkRuleSetAttributes)); diff --git a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md index 0a70df5c0109..69acca7e5b11 100644 --- a/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md +++ b/src/ServiceBus/ServiceBus/help/Set-AzServiceBusNetworkRuleSet.md @@ -15,7 +15,7 @@ Update the NetwrokruleSet of the given Namepsace in the current Azure subscripti ### NetworkRuleSetPropertiesSet (Default) ``` Set-AzServiceBusNetworkRuleSet [-ResourceGroupName] [-Name] [-DefaultAction ] - [-IPRule] [-VirtualNteworkRule] + [-IPRule] [-VirtualNetworkRule] [-DefaultProfile ] [-WhatIf] [-Confirm] [] ``` @@ -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 ``` @@ -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 @@ -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