Skip to content

Commit 809cc7d

Browse files
author
Maddie Clayton
authored
Merge pull request Azure#8415 from oflipman/UpdateKusto
Updated Kusto
2 parents 89f37a8 + 508bde3 commit 809cc7d

34 files changed

+5887
-8551
lines changed

src/Kusto/Kusto.Test/ScenarioTests/Common.ps1

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,33 @@ Gets a name of the resource group testing.
3333
function Get-RG-Name
3434
{
3535
return getAssetname
36-
#return "KustoPSClientTest"
36+
}
37+
38+
<#
39+
.SYNOPSIS
40+
Gets an instance number of a machines in a cluster.
41+
#>
42+
function Get-Cluster-Default-Capacity
43+
{
44+
return 2
45+
}
46+
47+
<#
48+
.SYNOPSIS
49+
Gets an instance number of a machines in a cluster.
50+
#>
51+
function Get-Cluster-Capacity
52+
{
53+
return 5
54+
}
55+
56+
<#
57+
.SYNOPSIS
58+
Gets an instance number of a machines in a cluster.
59+
#>
60+
function Get-Cluster-Updated-Capacity
61+
{
62+
return 10
3763
}
3864

3965
<#

src/Kusto/Kusto.Test/ScenarioTests/KustoClusterTests.ps1

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,19 @@ function Test-KustoClusterLifecycle
1414
$updatedSku = Get-Updated-Sku
1515
$resourceType = Get-Cluster-Resource-Type
1616
$expectedException = Get-Cluster-Not-Exist-Message -ResourceGroupName $resourceGroupName -ClusterName $clusterName
17+
$capacity = Get-Cluster-Default-Capacity
1718

1819
New-AzResourceGroup -Name $resourceGroupName -Location $RGlocation
1920

20-
$clusterCreated = New-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName -Location $location -Sku $sku
21-
Validate_Cluster $clusterCreated $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $sku;
21+
$clusterCreated = New-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName -Location $location -Sku $sku
22+
Validate_Cluster $clusterCreated $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $sku $capacity
2223

2324
[array]$clusterGet = Get-AzKustoCluster -ResourceGroupName $resourceGroupName
2425
$clusterGetItem = $clusterGet[0]
25-
Validate_Cluster $clusterGetItem $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $sku;
26+
Validate_Cluster $clusterGetItem $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $sku $capacity
2627

2728
$updatedCluster = Update-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName -SkuName $updatedSku -Tier "standard"
28-
Validate_Cluster $updatedCluster $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $updatedSku;
29+
Validate_Cluster $updatedCluster $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $updatedSku $capacity
2930

3031
Remove-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName
3132
Ensure_Cluster_Not_Exist $resourceGroupName $clusterName $expectedException
@@ -107,7 +108,6 @@ function Test-KustoClusterName
107108
}
108109

109110
function Test-KustoClusterUpdate{
110-
111111
try
112112
{
113113
$RGlocation = Get-RG-Location
@@ -117,21 +117,25 @@ function Test-KustoClusterUpdate{
117117
$sku = Get-Sku
118118
$updatedSku = Get-Updated-Sku
119119
$resourceType = Get-Cluster-Resource-Type
120+
$capacity = Get-Cluster-Capacity
121+
$updatedCapacity = Get-Cluster-Updated-Capacity
122+
123+
New-AzureRmResourceGroup -Name $resourceGroupName -Location $RGlocation
124+
$clusterCreated = New-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName -Location $location -Sku $sku -Capacity $capacity
125+
Validate_Cluster $clusterCreated $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $sku $capacity
120126

121-
New-AzResourceGroup -Name $resourceGroupName -Location $RGlocation
122-
$clusterCreated = New-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName -Location $location -Sku $sku
123127

124128
#Test update with parameters
125129
$updatedClusterWithParameters = Update-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName -SkuName $updatedSku -Tier "standard"
126-
Validate_Cluster $updatedClusterWithParameters $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $updatedSku;
130+
Validate_Cluster $updatedClusterWithParameters $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $updatedSku $capacity
127131

128132
#Test update with ResourceId
129-
$updatedWithResourceId = Update-AzKustoCluster -ResourceId $updatedClusterWithParameters.Id -SkuName $sku -Tier "standard"
130-
Validate_Cluster $updatedWithResourceId $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $sku ;
133+
$updatedWithResourceId = Update-AzKustoCluster -ResourceId $updatedClusterWithParameters.Id -SkuName $sku -Tier "standard" -Capacity $updatedCapacity
134+
Validate_Cluster $updatedWithResourceId $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $sku $updatedCapacity
131135

132136
#Test update with InputObject
133-
$updatedClusterWithInputObject = Update-AzKustoCluster -InputObject $updatedWithResourceId -SkuName $updatedSku -Tier "standard"
134-
Validate_Cluster $updatedClusterWithInputObject $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $updatedSku;
137+
$updatedClusterWithInputObject = Update-AzKustoCluster -InputObject $updatedWithResourceId -SkuName $updatedSku -Tier "standard" -Capacity $capacity
138+
Validate_Cluster $updatedClusterWithInputObject $clusterName $resourceGroupName $location "Running" "Succeeded" $resourceType $updatedSku $capacity
135139
}
136140
finally
137141
{
@@ -150,36 +154,37 @@ function Test-KustoClusterSuspendResume{
150154
$resourceGroupName = Get-RG-Name
151155
$clusterName = Get-Cluster-Name
152156
$sku = Get-Sku
157+
$capacity = Get-Cluster-Default-Capacity
153158

154159
New-AzResourceGroup -Name $resourceGroupName -Location $RGlocation
155160
$clusterCreated = New-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName -Location $location -Sku $sku
156161

157162
#Suspend and resume cluster using parameters
158163
Suspend-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName
159164
$suspendedClusterWithParameters = Get-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName
160-
Validate_Cluster $suspendedClusterWithParameters $clusterName $resourceGroupName $suspendedClusterWithParameters.Location "Stopped" "Succeeded" $suspendedClusterWithParameters.Type $suspendedClusterWithParameters.Sku;
165+
Validate_Cluster $suspendedClusterWithParameters $clusterName $resourceGroupName $suspendedClusterWithParameters.Location "Stopped" "Succeeded" $suspendedClusterWithParameters.Type $suspendedClusterWithParameters.Sku $suspendedClusterWithParameters.Capacity
161166

162167
Resume-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName
163168
$runningClusterWithParameters = Get-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName
164-
Validate_Cluster $runningClusterWithParameters $clusterName $resourceGroupName $runningClusterWithParameters.Location "Running" "Succeeded" $runningClusterWithParameters.Type $runningClusterWithParameters.Sku;
169+
Validate_Cluster $runningClusterWithParameters $clusterName $resourceGroupName $runningClusterWithParameters.Location "Running" "Succeeded" $runningClusterWithParameters.Type $runningClusterWithParameters.Sku $runningClusterWithParameters.Capacity
165170

166171
#Suspend and resume cluster using ResourceId
167172
Suspend-AzKustoCluster -ResourceId $runningClusterWithParameters.Id
168173
$suspendedClusterWithResourceId = Get-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName
169-
Validate_Cluster $suspendedClusterWithResourceId $clusterName $resourceGroupName $suspendedClusterWithResourceId.Location "Stopped" "Succeeded" $suspendedClusterWithResourceId.Type $suspendedClusterWithResourceId.Sku;
174+
Validate_Cluster $suspendedClusterWithResourceId $clusterName $resourceGroupName $suspendedClusterWithResourceId.Location "Stopped" "Succeeded" $suspendedClusterWithResourceId.Type $suspendedClusterWithResourceId.Sku $suspendedClusterWithResourceId.Capacity
170175

171176
Resume-AzKustoCluster -ResourceId $suspendedClusterWithResourceId.Id
172177
$runningClusterWithResourceId = Get-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName
173-
Validate_Cluster $runningClusterWithResourceId $clusterName $resourceGroupName $runningClusterWithResourceId.Location "Running" "Succeeded" $suspendedClusterWithResourceId.Type $runningClusterWithResourceId.Sku;
178+
Validate_Cluster $runningClusterWithResourceId $clusterName $resourceGroupName $runningClusterWithResourceId.Location "Running" "Succeeded" $suspendedClusterWithResourceId.Type $runningClusterWithResourceId.Sku $runningClusterWithResourceId.Capacity
174179

175180
#Suspend and resume cluster using InputObject
176181
Suspend-AzKustoCluster -InputObject $runningClusterWithResourceId
177182
$suspendedClusterWithInputObject = Get-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName
178-
Validate_Cluster $suspendedClusterWithInputObject $clusterName $resourceGroupName $suspendedClusterWithInputObject.Location "Stopped" "Succeeded" $suspendedClusterWithInputObject.Type $suspendedClusterWithInputObject.Sku;
183+
Validate_Cluster $suspendedClusterWithInputObject $clusterName $resourceGroupName $suspendedClusterWithInputObject.Location "Stopped" "Succeeded" $suspendedClusterWithInputObject.Type $suspendedClusterWithInputObject.Sku $suspendedClusterWithInputObject.Capacity
179184

180185
Resume-AzKustoCluster -InputObject $runningClusterWithResourceId
181186
$runningClusterWithInputObject = Get-AzKustoCluster -ResourceGroupName $resourceGroupName -Name $clusterName
182-
Validate_Cluster $runningClusterWithInputObject $clusterName $resourceGroupName $runningClusterWithInputObject.Location "Running" "Succeeded" $runningClusterWithInputObject.Type $runningClusterWithInputObject.Sku;
187+
Validate_Cluster $runningClusterWithInputObject $clusterName $resourceGroupName $runningClusterWithInputObject.Location "Running" "Succeeded" $runningClusterWithInputObject.Type $runningClusterWithInputObject.Sku $runningClusterWithInputObject.Capacity
183188
}
184189
finally
185190
{
@@ -197,21 +202,23 @@ function Validate_Cluster{
197202
[string]$State,
198203
[string]$ProvisioningState,
199204
[string]$ResourceType,
200-
[string]$Sku)
205+
[string]$Sku,
206+
[int]$Capacity)
201207
Assert-AreEqual $ClusterName $Cluster.Name
202208
Assert-AreEqual $ResourceGroup $Cluster.ResourceGroup
203209
Assert-AreEqual $Location $Cluster.Location
204210
Assert-AreEqual $State $Cluster.State
205211
Assert-AreEqual $ProvisioningState $Cluster.ProvisioningState
206212
Assert-AreEqual $ResourceType $Cluster.Type
207213
Assert-AreEqual $Sku $Cluster.Sku
214+
Assert-AreEqual $Capacity $Cluster.Capacity
208215
}
209216

210217
function Ensure_Cluster_Not_Exist {
211218
Param ([String]$ResourceGroupName,
212219
[String]$ClusterName,
213220
[string]$ExpectedErrorMessage)
214-
$expectedException = $false;
221+
$expectedException = $false
215222
try
216223
{
217224
$databaseGetItemDeleted = Get-AzKustoCluster -ResourceGroupName $ResourceGroupName -Name $ClusterName
@@ -220,11 +227,11 @@ function Ensure_Cluster_Not_Exist {
220227
{
221228
if ($_ -Match $ExpectedErrorMessage)
222229
{
223-
$expectedException = $true;
230+
$expectedException = $true
224231
}
225232
}
226233
if (-not $expectedException)
227234
{
228-
throw "Expected exception from calling Get-AzKustoCluster was not caught: '$expectedErrorMessage'.";
235+
throw "Expected exception from calling Get-AzKustoCluster was not caught: '$expectedErrorMessage'."
229236
}
230237
}

src/Kusto/Kusto.Test/ScenarioTests/KustoTestsBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public void RunPsTestWorkflow(
8686
"ScenarioTests\\Common.ps1",
8787
"ScenarioTests\\" + callingClassName + ".ps1",
8888
_helper.RMProfileModule,
89-
_helper.GetRMModulePath(@"AzureRM.Kusto.psd1"),
89+
_helper.GetRMModulePath(@"Az.Kusto.psd1"),
9090
"AzureRM.Resources.ps1");
9191
try
9292
{

src/Kusto/Kusto.Test/SessionRecords/Microsoft.Azure.Commands.Kusto.Test.ScenarioTests.KustoClusterTests/TestKustoClusterLifecycle.json

Lines changed: 571 additions & 760 deletions
Large diffs are not rendered by default.

src/Kusto/Kusto.Test/SessionRecords/Microsoft.Azure.Commands.Kusto.Test.ScenarioTests.KustoClusterTests/TestKustoClusterName.json

Lines changed: 413 additions & 851 deletions
Large diffs are not rendered by default.

src/Kusto/Kusto.Test/SessionRecords/Microsoft.Azure.Commands.Kusto.Test.ScenarioTests.KustoClusterTests/TestKustoClusterRemove.json

Lines changed: 1052 additions & 1115 deletions
Large diffs are not rendered by default.

src/Kusto/Kusto.Test/SessionRecords/Microsoft.Azure.Commands.Kusto.Test.ScenarioTests.KustoClusterTests/TestKustoClusterSuspendResume.json

Lines changed: 1509 additions & 2580 deletions
Large diffs are not rendered by default.

src/Kusto/Kusto.Test/SessionRecords/Microsoft.Azure.Commands.Kusto.Test.ScenarioTests.KustoClusterTests/TestKustoClusterUpdate.json

Lines changed: 958 additions & 1084 deletions
Large diffs are not rendered by default.

src/Kusto/Kusto.Test/SessionRecords/Microsoft.Azure.Commands.Kusto.Test.ScenarioTests.KustoDatabaseTests/TestKustoDatabaseAddRemoveGet.json

Lines changed: 605 additions & 1106 deletions
Large diffs are not rendered by default.

src/Kusto/Kusto.Test/SessionRecords/Microsoft.Azure.Commands.Kusto.Test.ScenarioTests.KustoDatabaseTests/TestKustoDatabaseLifecycle.json

Lines changed: 594 additions & 969 deletions
Large diffs are not rendered by default.

src/Kusto/Kusto/ChangeLog.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Capacity is a new and optional parameter for Create and Update Cluster.
22+
* ETag of Database is depricated.
23+
* Cluster has new Properties: Uri, DataIngestionUri and Capacity.
2124

2225
## Version 0.1.0
2326
* Initial version of the Kusto PowerShell interface

src/Kusto/Kusto/Commands/GetAzureRmKustoDatabase.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
namespace Microsoft.Azure.Commands.Kusto.Commands
2020
{
21-
2221
[Cmdlet(VerbsCommon.Get, ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "KustoDatabase",
2322
DefaultParameterSetName = ParameterSet),
2423
OutputType(typeof(PSKustoDatabase))]

src/Kusto/Kusto/Commands/NewAzureRmKustoCluster.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@ public class NewKustoCluster : KustoCmdletBase
5353
[PSArgumentCompleter("KC8", "KC16", "KS8", "KS16", "L8", "L16", "D14_v2", "D13_v2")]
5454
public string Sku { get; set; }
5555

56+
[Parameter(
57+
Mandatory = false,
58+
HelpMessage = "The instance number of the VM.")]
59+
[ValidateNotNullOrEmpty]
60+
public int? Capacity { get; set; }
61+
5662
[Parameter(
5763
Mandatory = false,
5864
HelpMessage = "Name of the Tier used to create the cluster")]
@@ -95,7 +101,7 @@ public override void ExecuteCmdlet()
95101
}
96102
}
97103

98-
var createdCluster = KustoClient.CreateOrUpdateCluster(ResourceGroupName, Name, Location, Sku, Tag, null);
104+
var createdCluster = KustoClient.CreateOrUpdateCluster(ResourceGroupName, Name, Location, Sku, Capacity, Tag, null);
99105
WriteObject(createdCluster);
100106
}
101107
}

src/Kusto/Kusto/Commands/NewAzureRmKustoDatabase.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14-
using System.Collections;
1514
using System.Management.Automation;
1615
using Microsoft.Azure.Commands.Kusto.Models;
1716
using Microsoft.Azure.Commands.Kusto.Properties;
@@ -79,7 +78,7 @@ public class NewAzureRmKustoDatabase : KustoCmdletBase
7978
HelpMessage = "Kusto cluster object.")]
8079
[ValidateNotNullOrEmpty]
8180
public PSKustoCluster InputObject { get; set; }
82-
81+
8382
public override void ExecuteCmdlet()
8483
{
8584
string resourceGroupName = ResourceGroupName;

src/Kusto/Kusto/Commands/RemoveAzureRmKustoCluster.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
using System;
1616
using System.Management.Automation;
17-
using System.Security.Permissions;
1817
using Microsoft.Azure.Commands.Kusto.Models;
1918
using Microsoft.Azure.Commands.Kusto.Properties;
2019
using Microsoft.Azure.Commands.Kusto.Utilities;

src/Kusto/Kusto/Commands/RemoveAzureRmKustoDatabase.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
using System;
1515
using System.Management.Automation;
16-
using System.Security.Permissions;
1716
using Microsoft.Azure.Commands.Kusto.Models;
1817
using Microsoft.Azure.Commands.Kusto.Properties;
1918
using Microsoft.Azure.Commands.Kusto.Utilities;

src/Kusto/Kusto/Commands/ResumeAzureRmKustoCluster.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
using System;
1515
using System.Management.Automation;
16-
using System.Security.Permissions;
1716
using Microsoft.Azure.Commands.Kusto.Models;
1817
using Microsoft.Azure.Commands.Kusto.Properties;
1918
using Microsoft.Azure.Commands.Kusto.Utilities;

src/Kusto/Kusto/Commands/SuspendAzureRmKustoCluster.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
using System;
1515
using System.Management.Automation;
16-
using System.Security.Permissions;
1716
using Microsoft.Azure.Commands.Kusto.Models;
1817
using Microsoft.Azure.Commands.Kusto.Properties;
1918
using Microsoft.Azure.Commands.Kusto.Utilities;

src/Kusto/Kusto/Commands/TestAzureRmKustoClusterName.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414

1515
using System.Management.Automation;
1616
using Microsoft.Azure.Commands.Kusto.Models;
17-
using Microsoft.Azure.Commands.Kusto.Utilities;
18-
using Microsoft.Rest.Azure;
19-
using Microsoft.Azure.Commands.Kusto.Properties;
20-
using Microsoft.Azure.Management.Kusto.Models;
2117

2218
namespace Microsoft.Azure.Commands.Kusto
2319
{

src/Kusto/Kusto/Commands/UpdateAzureRmKustoCluster.cs

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@
1111
// See the License for the specific language governing permissions and
1212
// limitations under the License.
1313

14-
using System;
1514
using System.Management.Automation;
16-
using System.Security.Permissions;
1715
using Microsoft.Azure.Commands.Kusto.Models;
1816
using Microsoft.Azure.Commands.Kusto.Properties;
1917
using Microsoft.Azure.Commands.Kusto.Utilities;
@@ -22,7 +20,6 @@
2220

2321
namespace Microsoft.Azure.Commands.Kusto.Commands
2422
{
25-
2623
[Cmdlet("Update", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "KustoCluster", DefaultParameterSetName = CmdletParametersSet, SupportsShouldProcess = true),
2724
OutputType(typeof(PSKustoCluster))]
2825
public class UpdateAzureRmKustoCluster : KustoCmdletBase
@@ -55,12 +52,17 @@ public class UpdateAzureRmKustoCluster : KustoCmdletBase
5552
[PSArgumentCompleter("KC8", "KC16", "KS8", "KS16", "L8", "L16", "D14_v2", "D13_v2")]
5653
public string SkuName { get; set; }
5754

55+
[Parameter(
56+
Mandatory = false,
57+
HelpMessage = "The instance number of the VM.")]
58+
public int? Capacity { get; set; }
59+
5860
[Parameter(
5961
Mandatory = false,
6062
HelpMessage = "Name of the Tier used to create the cluster")]
6163
[PSArgumentCompleter("Standard")]
6264
public string Tier { get; set; }
63-
65+
6466
[Parameter(
6567
ParameterSetName = ResourceIdParameterSet,
6668
Mandatory = true,
@@ -82,10 +84,11 @@ public class UpdateAzureRmKustoCluster : KustoCmdletBase
8284
public override void ExecuteCmdlet()
8385
{
8486
string clusterName = Name;
87+
int? capacity = null;
8588
string resourceGroupName = ResourceGroupName;
8689
string location = null;
8790
string skuName = null;
88-
91+
8992
if (!string.IsNullOrEmpty(ResourceId))
9093
{
9194
KustoUtils.GetResourceGroupNameAndClusterNameFromClusterId(ResourceId, out resourceGroupName, out clusterName);
@@ -106,7 +109,8 @@ public override void ExecuteCmdlet()
106109
}
107110

108111
location = cluster.Location;
109-
skuName = string.IsNullOrEmpty(SkuName) ? cluster.Sku: SkuName;
112+
skuName = string.IsNullOrEmpty(SkuName) ? cluster.Sku : SkuName;
113+
capacity = Capacity ?? cluster.Capacity;
110114
}
111115
catch (CloudException ex)
112116
{
@@ -118,16 +122,17 @@ public override void ExecuteCmdlet()
118122
else if (ex.Body != null && !string.IsNullOrEmpty(ex.Body.Code) &&
119123
ex.Body.Code == "ResourceGroupNotFound" || ex.Message.Contains("ResourceGroupNotFound"))
120124
{
121-
// resource group not found, let create throw error don't throw from here
125+
throw new CloudException(string.Format(Resources.ResourceGroupNotExist, resourceGroupName));
122126
}
127+
123128
else
124129
{
125130
// all other exceptions should be thrown
126131
throw;
127132
}
128133
}
129134

130-
var updatedCluster = KustoClient.CreateOrUpdateCluster(resourceGroupName, clusterName, location, skuName);
135+
var updatedCluster = KustoClient.CreateOrUpdateCluster(resourceGroupName, clusterName, location, skuName, capacity);
131136
WriteObject(updatedCluster);
132137
}
133138
}

0 commit comments

Comments
 (0)