Skip to content

Commit da230a8

Browse files
authored
Merge branch 'master' into patch-7
2 parents f970a2a + d588f6d commit da230a8

File tree

220 files changed

+228892
-12636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+228892
-12636
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
- [ ] The PR does not introduce [breaking changes](../documentation/breaking-changes/breaking-changes-definition.md)
1515
- [ ] If applicable, the changes made in the PR have proper test coverage
1616
- [ ] For public API changes to cmdlets:
17-
- [ ] a cmdlet design review was approved for the changes in [this repository](https://github.com/Azure/azure-powershell-cmdlet-review-pr)
17+
- [ ] a cmdlet design review was approved for the changes in [this repository](https://github.com/Azure/azure-powershell-cmdlet-review-pr) (_Microsoft internal only_)
1818
- [ ] the markdown help files have been regenerated using the commands listed [here](../documentation/development-docs/help-generation.md#updating-all-markdown-files-in-a-module)

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The following guidelines must be followed in **EVERY** pull request that is open
7171
- There are a [small number of commits](documentation/development-docs/cleaning-up-commits.md) that each have an informative message
7272
- All files shipped with a module should contain a proper Microsoft license header
7373
- For public API changes to cmdlets:
74-
- a cmdlet design review was approved for the changes in [this repository](https://github.com/Azure/azure-powershell-cmdlet-review-pr)
74+
- a cmdlet design review was approved for the changes in [this repository](https://github.com/Azure/azure-powershell-cmdlet-review-pr) (_Microsoft internal only_)
7575
- the markdown help files have been regenerated using the commands listed [here](documentation/development-docs/help-generation.md#updating-all-markdown-files-in-a-module)
7676

7777
#### Testing guidelines

src/CognitiveServices/CognitiveServices.Test/CognitiveServices.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.CognitiveServices" Version="6.0.0-preview" />
15-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.13.0-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.14.0-preview" />
1616
</ItemGroup>
1717

1818
</Project>

src/Compute/Compute.Test/Compute.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<PackageReference Include="Microsoft.Azure.Graph.RBAC" Version="3.4.0-preview" />
1515
<PackageReference Include="Microsoft.Azure.Management.Compute" Version="27.1.0" />
1616
<PackageReference Include="Microsoft.Azure.Management.KeyVault" Version="2.4.2" />
17-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.13.0-preview" />
17+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.14.0-preview" />
1818
</ItemGroup>
1919

2020
<ItemGroup>

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
-->
2121
## Upcoming Release
2222
* Fixed miscellaneous typos across module
23+
* Update example in `Invoke-AzVMRunCommand` documentation to use correct parameter name
2324
* Update `-VolumeType` description in `Set-AzVMDiskEncryptionExtension` and `Set-AzVmssDiskEncryptionExtension` reference documentation
2425

2526
## Version 2.4.1

src/Compute/Compute/help/Invoke-AzVMRunCommand.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Invoke a run command on the VM.
4040

4141
### Example 1
4242
```
43-
PS C:\> Invoke-AzVMRunCommand -ResourceGroupName 'rgname' -Name 'vmname' -CommandId 'RunPowerShellScript' -ScriptPath 'sample.ps1' -Parameter @{param1 = "var1"; param2 = "var2"}
43+
PS C:\> Invoke-AzVMRunCommand -ResourceGroupName 'rgname' -VMName 'vmname' -CommandId 'RunPowerShellScript' -ScriptPath 'sample.ps1' -Parameter @{param1 = "var1"; param2 = "var2"}
4444
```
4545

4646
Invoke a run command of RunPowerShellScript with overriding the script 'sample.ps1' and the parameters on the VM of 'vmname' in resource group 'rgname'.

src/DataFactory/DataFactoryV2.Test/DataFactoryV2.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="Microsoft.Azure.Management.DataFactory" Version="4.1.0" />
14+
<PackageReference Include="Microsoft.Azure.Management.DataFactory" Version="4.1.2" />
1515
<PackageReference Include="Microsoft.DataTransfer.Gateway.Encryption" Version="3.11.6898.1" />
1616
</ItemGroup>
1717

src/DataFactory/DataFactoryV2/Changelog.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
## Upcoming Release
2222
* Fix typo to capitalize "Windows" in 'New-AzDataFactoryEncryptValue" documentation
2323
* Fixed miscellaneous typos across module
24-
* Updated ADF .Net SDK version to 4.1.1
24+
* Updated ADF .Net SDK version to 4.1.2
2525
* Add parameter "DataProxyIntegrationRuntimeName", "DataProxyStagingLinkedServiceName" and "DataProxyStagingPath" for "Set-AzureRmDataFactoryV2IntegrationRuntime" cmd to enable set up Self-Hosted Integration Runtime as a proxy for SSIS Integration Runtime
26+
* Updated PSTriggerRun to show the triggered pipelines, message and properties, and PSActivityRun to show the activity type
2627

2728
## Version 1.1.3
2829
* Updated ADF .Net SDK version to 4.1.0

src/DataFactory/DataFactoryV2/DataFactoryV2.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</PropertyGroup>
1313

1414
<ItemGroup>
15-
<PackageReference Include="Microsoft.Azure.Management.DataFactory" Version="4.1.1" />
15+
<PackageReference Include="Microsoft.Azure.Management.DataFactory" Version="4.1.2" />
1616
<PackageReference Include="Microsoft.DataTransfer.Gateway.Encryption" Version="3.11.6898.1" />
1717
</ItemGroup>
1818

src/DataFactory/DataFactoryV2/Models/PSActivityRun.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using System;
16+
using System.Collections.Generic;
1617
using Microsoft.Azure.Management.DataFactory.Models;
1718

1819
namespace Microsoft.Azure.Commands.DataFactoryV2.Models
@@ -58,6 +59,14 @@ public string ActivityName
5859
}
5960
}
6061

62+
public string ActivityType
63+
{
64+
get
65+
{
66+
return this.activityRun.ActivityType;
67+
}
68+
}
69+
6170
public string PipelineRunId
6271
{
6372
get
@@ -137,5 +146,13 @@ public object Error
137146
return this.activityRun.Error;
138147
}
139148
}
149+
150+
public IDictionary<string, object> AdditionalProperties
151+
{
152+
get
153+
{
154+
return this.activityRun.AdditionalProperties;
155+
}
156+
}
140157
}
141158
}

src/DataFactory/DataFactoryV2/Models/PSTriggerRun.cs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using System;
16+
using System.Collections.Generic;
1617
using Microsoft.Azure.Management.DataFactory.Models;
1718

1819
namespace Microsoft.Azure.Commands.DataFactoryV2.Models
@@ -81,5 +82,37 @@ public string Status
8182
return this.triggerRun.Status;
8283
}
8384
}
85+
86+
public IDictionary<string, string> TriggeredPipelines
87+
{
88+
get
89+
{
90+
return this.triggerRun.TriggeredPipelines;
91+
}
92+
}
93+
94+
public string Message
95+
{
96+
get
97+
{
98+
return this.triggerRun.Message;
99+
}
100+
}
101+
102+
public IDictionary<string, string> Properties
103+
{
104+
get
105+
{
106+
return this.triggerRun.Properties;
107+
}
108+
}
109+
110+
public IDictionary<string, object> AdditionalProperties
111+
{
112+
get
113+
{
114+
return this.triggerRun.AdditionalProperties;
115+
}
116+
}
84117
}
85118
}

src/DataLakeStore/DataLakeStore.Test/DataLakeStore.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.DataLake.Store" Version="2.4.2-preview" />
15-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.13.0-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.14.0-preview" />
1616
</ItemGroup>
1717

1818
<ItemGroup>

src/Dns/Dns.Test/Dns.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
<ItemGroup>
1414
<PackageReference Include="Microsoft.Azure.Management.Dns" Version="3.0.1" />
15-
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.13.0-preview" />
15+
<PackageReference Include="Microsoft.Azure.Management.Network" Version="19.14.0-preview" />
1616
</ItemGroup>
1717

1818
</Project>

src/EventHub/EventHub.Test/ScenarioTests/EventHubsTests.ps1

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ function EventHubsAuthTests
120120
$namespaceName = getAssetName "Eventhub-Namespace-"
121121
$eventHubName = getAssetName "EventHub-"
122122
$authRuleName = getAssetName "Eventhub-Namespace-AuthorizationRule"
123+
$authRuleName = getAssetName "authorule-"
124+
$authRuleNameListen = getAssetName "authorule-"
125+
$authRuleNameSend = getAssetName "authorule-"
126+
$authRuleNameAll = getAssetName "authorule-"
123127

124128
# Create ResourceGroup
125129
Write-Debug " Create resource group"
@@ -164,6 +168,23 @@ function EventHubsAuthTests
164168
Assert-True { $result.Rights -Contains "Listen" }
165169
Assert-True { $result.Rights -Contains "Send" }
166170

171+
$resultListen = New-AzEventHubAuthorizationRule -ResourceGroupName $resourceGroupName -Namespace $namespaceName -EventHub $eventHubName -Name $authRuleNameListen -Rights @("Listen")
172+
Assert-AreEqual $authRuleNameListen $resultListen.Name
173+
Assert-AreEqual 1 $resultListen.Rights.Count
174+
Assert-True { $resultListen.Rights -Contains "Listen" }
175+
176+
$resultSend = New-AzEventHubAuthorizationRule -ResourceGroupName $resourceGroupName -Namespace $namespaceName -EventHub $eventHubName -Name $authRuleNameSend -Rights @("Send")
177+
Assert-AreEqual $authRuleNameSend $resultSend.Name
178+
Assert-AreEqual 1 $resultSend.Rights.Count
179+
Assert-True { $resultSend.Rights -Contains "Send" }
180+
181+
$resultall3 = New-AzEventHubAuthorizationRule -ResourceGroupName $resourceGroupName -Namespace $namespaceName -EventHub $eventHubName -Name $authRuleNameAll -Rights @("Listen","Send","Manage")
182+
Assert-AreEqual $authRuleNameAll $resultall3.Name
183+
Assert-AreEqual 3 $resultall3.Rights.Count
184+
Assert-True { $resultall3.Rights -Contains "Send" }
185+
Assert-True { $resultall3.Rights -Contains "Listen" }
186+
Assert-True { $resultall3.Rights -Contains "Manage" }
187+
167188
# Get Created Eventhub Authorization Rule
168189
Write-Debug "Get created authorizationRule"
169190
$createdAuthRule = Get-AzEventHubAuthorizationRule -ResourceGroup $resourceGroupName -Namespace $namespaceName -EventHub $eventHubName -Name $authRuleName

src/EventHub/EventHub.Test/ScenarioTests/NamespaceTests.ps1

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,11 @@ function NamespaceAuthTests
2626
$namespaceName = getAssetName "Eventhub-Namespace-"
2727
$namespaceNameKafka = getAssetName "Eh-NamespaceKafka-"
2828
$authRuleName = getAssetName "Eventhub-Namespace-AuthorizationRule"
29+
$authRuleName = getAssetName "authorule-"
30+
$authRuleNameListen = getAssetName "authorule-"
31+
$authRuleNameSend = getAssetName "authorule-"
32+
$authRuleNameAll = getAssetName "authorule-"
2933

30-
31-
$StartTime = Get-Date
32-
$EndTime = $StartTime.AddHours(2.0)
33-
New-AzEventHubAuthorizationRuleSASToken -ResourceId /subscriptions/854d368f-1828-428f-8f3c-f2affa9b2f7d/resourceGroups/v-ajnavtest/providers/Microsoft.EventHub/namespaces/Eventhub-Namespace1-1375/eventhubs/testingsastoken/authorizationRules/BaseAuthorizationRule -KeyType Primary -ExpiryTime $EndTime -StartTime $StartTime
34-
35-
3634
Write-Debug " Create resource group"
3735
Write-Debug "ResourceGroup name : $resourceGroupName"
3836
New-AzResourceGroup -Name $resourceGroupName -Location $location -Force
@@ -66,6 +64,23 @@ function NamespaceAuthTests
6664
Assert-True { $result.Rights -Contains "Listen" }
6765
Assert-True { $result.Rights -Contains "Send" }
6866

67+
$resultListen = New-AzEventHubAuthorizationRule -ResourceGroupName $resourceGroupName -Namespace $namespaceName -Name $authRuleNameListen -Rights @("Listen")
68+
Assert-AreEqual $authRuleNameListen $resultListen.Name
69+
Assert-AreEqual 1 $resultListen.Rights.Count
70+
Assert-True { $resultListen.Rights -Contains "Listen" }
71+
72+
$resultSend = New-AzEventHubAuthorizationRule -ResourceGroupName $resourceGroupName -Namespace $namespaceName -Name $authRuleNameSend -Rights @("Send")
73+
Assert-AreEqual $authRuleNameSend $resultSend.Name
74+
Assert-AreEqual 1 $resultSend.Rights.Count
75+
Assert-True { $resultSend.Rights -Contains "Send" }
76+
77+
$resultAll3 = New-AzEventHubAuthorizationRule -ResourceGroupName $resourceGroupName -Namespace $namespaceName -Name $authRuleNameAll -Rights @("Listen","Send","Manage")
78+
Assert-AreEqual $authRuleNameAll $resultAll3.Name
79+
Assert-AreEqual 3 $resultAll3.Rights.Count
80+
Assert-True { $resultAll3.Rights -Contains "Send" }
81+
Assert-True { $resultAll3.Rights -Contains "Listen" }
82+
Assert-True { $resultAll3.Rights -Contains "Manage" }
83+
6984
Write-Debug "Get created authorizationRule"
7085
$createdAuthRule = Get-AzEventHubAuthorizationRule -ResourceGroup $resourceGroupName -Namespace $namespaceName -Name $authRuleName
7186

@@ -222,6 +237,11 @@ function NamespaceTests
222237
Write-Debug "Namespace name : $namespaceName2"
223238
$result = New-AzEventHubNamespace -ResourceGroup $secondResourceGroup -Name $namespaceName2 -Location $location
224239

240+
### change the Namespace SKU to Basic
241+
Write-Debug "Namespace name : $namespaceName2"
242+
$result = Set-AzEventHubNamespace -ResourceGroup $secondResourceGroup -Name $namespaceName2 -Location $location -SkuName "Basic"
243+
Assert-AreEqual $result.Sku.Name "Basic" "Namespace SKU not changed."
244+
225245
Write-Debug "Get all the namespaces created in the resourceGroup"
226246
$allCreatedNamespace = Get-AzEventHubNamespace -ResourceGroup $secondResourceGroup
227247

src/EventHub/EventHub.Test/SessionRecords/Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.EventHubsTests/EventHubsAuthorizationRulesCRUD.json

Lines changed: 456 additions & 347 deletions
Large diffs are not rendered by default.

src/EventHub/EventHub.Test/SessionRecords/Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.NamespaceTests/NamespaceAuthorizationRulesCRUD.json

Lines changed: 651 additions & 377 deletions
Large diffs are not rendered by default.

src/EventHub/EventHub.Test/SessionRecords/Microsoft.Azure.Commands.EventHub.Test.ScenarioTests.NamespaceTests/NamespaceCRUD.json

Lines changed: 460 additions & 383 deletions
Large diffs are not rendered by default.

src/EventHub/EventHub/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
## Upcoming Release
2121
* Fixed miscellaneous typos across module
2222
* Fix for issue #9658 : Typo VirtualNteworkRule parameter in Set-AzEventHubNetworkRuleSet
23+
* Fix for issue #9558 : Set-AzEventHubNamespace is using PATCH instead of PUT
24+
* added EnableKafka parameter to Set-AzEventHubNamespace cmdlet
25+
* Fix for issue #9786 : cannot create a rule with Listen only rights
2326

2427
## Version 1.3.0
2528
* Added new cmmdlet added for generating SAS token : New-AzEventHubAuthorizationRuleSASToken

src/EventHub/EventHub/Cmdlets/AuthorizationRule/NewAzureEventhubAuthorizationRules.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public class NewAzureEventhubAuthorizationRules : AzureEventHubsCmdletBase
5050
[Alias(AliasAuthorizationRuleName)]
5151
public string Name { get; set; }
5252

53-
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Rights, e.g. \"Listen\",\"Send\",\"Manage\"")]
53+
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "Rights, e.g. \"" + Manage + "\",\"" + Send + "\",\"" + Listen + "\"")]
5454
[ValidateNotNullOrEmpty]
5555
[ValidateSet("Listen", "Send", "Manage", IgnoreCase = true)]
5656
public string[] Rights { get; set; }
@@ -60,9 +60,9 @@ public override void ExecuteCmdlet()
6060
PSSharedAccessAuthorizationRuleAttributes sasRule = new PSSharedAccessAuthorizationRuleAttributes();
6161
sasRule.Rights = new List<string>();
6262

63-
if (Array.Exists(Rights, element => element == "Manage") && !Array.Exists(Rights, element => element == "Listen") || !Array.Exists(Rights, element => element == "Send"))
63+
if (Array.Exists(Rights, element => element.Equals(Manage) && (!Array.Exists(Rights, element1 => element1.Equals(Listen)) || !Array.Exists(Rights, element1 => element1.Equals(Send)))))
6464
{
65-
Exception exManage = new Exception("Assigning 'Manage' to rights requires Listen and Send' to be included with. e.g. @(\"Manage\",\"Listen\",\"Send\")");
65+
Exception exManage = new Exception("Assigning '" + Manage + "' to rights requires '" + Listen + "' and '" + Send + "' to be included with. e.g. @(\"" + Manage + "\",\"" + Listen + "\",\"" + Send + "\")");
6666
throw exManage;
6767
}
6868

src/EventHub/EventHub/Cmdlets/AzureEventHubsCmdletBase.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ public abstract class AzureEventHubsCmdletBase : AzureRMCmdlet
106106
protected const string AliasResourceId = "ResourceId";
107107
protected const string AliasVirtualNetworkRule = "VirtualNteworkRule";
108108

109+
//Access Rights
110+
protected const string Manage = "Manage";
111+
protected const string Send = "Send";
112+
protected const string Listen = "Listen";
113+
114+
109115
protected struct SKU
110116
{
111117
internal const string Basic = "Basic";

src/EventHub/EventHub/Cmdlets/Namespace/SetAzureEventHubNamespace.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ public class SetAzureEventHubNamespace : AzureEventHubsCmdletBase
5858
[Parameter(Mandatory = false, ParameterSetName = AutoInflateParameterSet, ValueFromPipelineByPropertyName = true, Position = 4, HelpMessage = "The eventhub throughput units.")]
5959
public int? SkuCapacity { get; set; }
6060

61+
public const string ChangeDesc = "'State' Parameter is being deprecated without being replaced";
62+
[CmdletParameterBreakingChange("State", ChangeDescription = ChangeDesc)]
6163
[Parameter(Mandatory = false, ParameterSetName = NamespaceParameterSet, ValueFromPipelineByPropertyName = true, Position = 5, HelpMessage = "Disable/Enable Namespace.")]
6264
[Parameter(Mandatory = false, ParameterSetName = AutoInflateParameterSet, ValueFromPipelineByPropertyName = true, Position = 5, HelpMessage = "Disable/Enable Namespace.")]
6365
public Models.NamespaceState? State { get; set; }
@@ -79,6 +81,13 @@ public class SetAzureEventHubNamespace : AzureEventHubsCmdletBase
7981
[ValidateRange(0,20)]
8082
public int? MaximumThroughputUnits { get; set; }
8183

84+
/// <summary>
85+
/// Indicates whether Kafka is enabled.
86+
/// </summary>
87+
[Parameter(Mandatory = false, ParameterSetName = AutoInflateParameterSet, HelpMessage = "enabling or disabling Kafka for namespace")]
88+
[Parameter(Mandatory = false, ParameterSetName = NamespaceParameterSet, HelpMessage = "enabling or disabling Kafka for namespace")]
89+
public SwitchParameter EnableKafka { get; set; }
90+
8291
public override void ExecuteCmdlet()
8392
{
8493
// Update a EventHub namespace
@@ -87,11 +96,8 @@ public override void ExecuteCmdlet()
8796
if (ShouldProcess(target: Name, action: string.Format(Resources.UpdateNamespace, Name, ResourceGroupName)))
8897
{
8998
try
90-
{
91-
if (EnableAutoInflate.IsPresent)
92-
WriteObject(Client.UpdateNamespace(ResourceGroupName, Name, Location, SkuName, SkuCapacity, State, tagDictionary, true, MaximumThroughputUnits));
93-
else
94-
WriteObject(Client.UpdateNamespace(ResourceGroupName, Name, Location, SkuName, SkuCapacity, State, tagDictionary, false, MaximumThroughputUnits));
99+
{
100+
WriteObject(Client.BeginCreateNamespace(ResourceGroupName, Name, Location, SkuName, SkuCapacity, tagDictionary, EnableAutoInflate.IsPresent, MaximumThroughputUnits, EnableKafka.IsPresent));
95101
}
96102
catch (Management.EventHub.Models.ErrorResponseException ex)
97103
{

src/EventHub/EventHub/Utilities/EventHubsClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public PSNamespaceAttributes UpdateNamespace(string resourceGroupName, string na
137137
if (maximumThroughputUnits.HasValue)
138138
parameter.MaximumThroughputUnits = maximumThroughputUnits;
139139

140-
var response = Client.Namespaces.Update(resourceGroupName, namespaceName, parameter);
140+
var response = Client.Namespaces.CreateOrUpdate(resourceGroupName, namespaceName, parameter);
141141

142142
return new PSNamespaceAttributes(response);
143143
}

0 commit comments

Comments
 (0)