Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eventhub: Fix for issue #9658 #9731

Merged
merged 3 commits into from
Jul 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/EventHub/EventHub/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Additional information about change #1
-->
## Upcoming Release
* Fix for issue #9658 : Typo VirtualNteworkRule parameter in Set-AzEventHubNetworkRuleSet

## Version 1.3.0
* Added new cmmdlet added for generating SAS token : New-AzEventHubAuthorizationRuleSASToken
Expand Down
1 change: 1 addition & 0 deletions src/EventHub/EventHub/Cmdlets/AzureEventHubsCmdletBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ public abstract class AzureEventHubsCmdletBase : AzureRMCmdlet
protected const string AliasAuthorizationRuleName = "AuthorizationRuleName";
protected const string AliasAuthRuleObj = "AuthRuleObj";
protected const string AliasResourceId = "ResourceId";
protected const string AliasVirtualNetworkRule = "VirtualNteworkRule";

protected struct SKU
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public class SetAzureEventHubNetworkrule : AzureEventHubsCmdletBase

[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/EventHub/EventHub/help/Set-AzEventHubNetworkRuleSet.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-AzEventHubNetworkRuleSet [-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.EventHub.Models.PSNWRuleSetIpRulesAttributes] @{IpMask = "4.4.4.4";Action = "Allow"},[Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetIpRulesAttributes] @{IpMask = "3.3.3.3";Action = "Allow"})
PS C:\> $VirtualNetworkRules = @([Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetVirtualNetworkRulesAttributes]@{Subnet=@{Id="/subscriptions/subscriptionId/resourcegroups/ResourceGroup/providers/Microsoft.Network/virtualNetworks/sbehvnettest1/subnets/default"};IgnoreMissingVnetServiceEndpoint=$True})
PS C:\> Set-AzEventHubNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace EventHub-Namespace1-1375 -IPRule $IpRules -VirtualNteworkRule $VirtualNetworkRules -DefaultAction "Allow" -Debug
PS C:\> Set-AzEventHubNetworkRuleSet -ResourceGroupName v-ajnavtest -Namespace EventHub-Namespace1-1375 -IPRule $IpRules -VirtualNetworkRule $VirtualNetworkRules -DefaultAction "Allow" -Debug

```

Expand All @@ -52,7 +52,7 @@ Type : Microsoft.EventHub/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 @@ -190,13 +190,13 @@ Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -VirtualNteworkRule
### -VirtualNetworkRule
List of VirtualNetworkRules

```yaml
Type: Microsoft.Azure.Commands.EventHub.Models.PSNWRuleSetVirtualNetworkRulesAttributes[]
Parameter Sets: NetworkRuleSetPropertiesSet
Aliases:
Aliases: VirtualNteworkRule

Required: True
Position: 3
Expand Down