Skip to content

Commit 70f544c

Browse files
committed
rename MinimumVCoreCapacity back to MinimumCapacity
1 parent 2eab05c commit 70f544c

File tree

7 files changed

+21
-21
lines changed

7 files changed

+21
-21
lines changed

src/Sql/Sql.Test/ScenarioTests/DatabaseCrudTests.ps1

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ function Test-CreateServerlessDatabase
207207
Assert-AreEqual GP_S_Gen5_2 $db.CurrentServiceObjectiveName
208208
Assert-AreEqual 2 $db.Capacity
209209
Assert-AreEqual 360 $db.AutoPauseDelayInMinutes
210-
Assert-AreEqual 0.5 $db.MinimumVCoreCapacity
210+
Assert-AreEqual 0.5 $db.MinimumCapacity
211211
Assert-AreEqual GeneralPurpose $db.Edition
212212
}
213213
finally
@@ -573,7 +573,7 @@ function Test-UpdateServerlessDatabase()
573573
Assert-NotNull $db1.MaxSizeBytes
574574
Assert-NotNull $db1.Edition
575575
Assert-NotNull $db1.CurrentServiceObjectiveName
576-
Assert-NotNull $db1.MinimumVCoreCapacity
576+
Assert-NotNull $db1.MinimumCapacity
577577
Assert-NotNull $db1.AutoPauseDelayInMinutes
578578

579579
# Alter to dtu database
@@ -583,7 +583,7 @@ function Test-UpdateServerlessDatabase()
583583
$db1 = $job.Output
584584
Assert-AreEqual $db1.DatabaseName $db.DatabaseName
585585
Assert-AreEqual $db1.Edition Premium
586-
Assert-Null $db1.MinimumVCoreCapacity
586+
Assert-Null $db1.MinimumCapacity
587587
Assert-Null $db1.AutoPauseDelayInMinutes
588588

589589
# Alter back to Serverless
@@ -594,18 +594,18 @@ function Test-UpdateServerlessDatabase()
594594
Assert-AreEqual $db1.DatabaseName $db.DatabaseName
595595
Assert-AreEqual $db1.Edition GeneralPurpose
596596
Assert-AreEqual $db1.CurrentServiceObjectiveName GP_S_Gen5_2
597-
Assert-NotNull $db1.MinimumVCoreCapacity
597+
Assert-NotNull $db1.MinimumCapacity
598598
Assert-NotNull $db1.AutoPauseDelayInMinutes
599599

600600
# Alter mincapacity and AutoPauseDelayInMinutes
601601
$job = Set-AzSqlDatabase -ResourceGroupName $db.ResourceGroupName -ServerName $db.ServerName -DatabaseName $db.DatabaseName `
602-
-Vcore 2 -Edition GeneralPurpose -ComputeModel Serverless -ComputeGeneration Gen5 -MinimumVCoreCapacity 2 -AutoPauseDelayInMinutes 1440 -AsJob
602+
-Vcore 2 -Edition GeneralPurpose -ComputeModel Serverless -ComputeGeneration Gen5 -MinimumCapacity 2 -AutoPauseDelayInMinutes 1440 -AsJob
603603
$job | Wait-Job
604604
$db1 = $job.Output
605605
Assert-AreEqual $db1.DatabaseName $db.DatabaseName
606606
Assert-AreEqual $db1.Edition GeneralPurpose
607607
Assert-AreEqual $db1.CurrentServiceObjectiveName GP_S_Gen5_2
608-
Assert-AreEqual $db1.MinimumVCoreCapacity 2
608+
Assert-AreEqual $db1.MinimumCapacity 2
609609
Assert-AreEqual $db1.AutoPauseDelayInMinutes 1440
610610
}
611611
finally

src/Sql/Sql/Database/Cmdlet/NewAzureSqlDatabase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public class NewAzureSqlDatabase : AzureSqlDatabaseCmdletBase<AzureSqlDatabaseCr
182182
[Parameter(Mandatory = false,
183183
HelpMessage = "The Minimal capacity that database will always have allocated, if not paused. For serverless database only.")]
184184
[Alias("MinVCore", "MinCapacity")]
185-
public double MinimumVCoreCapacity { get; set; }
185+
public double MinimumCapacity { get; set; }
186186

187187
/// <summary>
188188
/// Overriding to add warning message
@@ -245,7 +245,7 @@ protected override AzureSqlDatabaseCreateOrUpdateModel ApplyUserInputToModel(Azu
245245
ZoneRedundant = MyInvocation.BoundParameters.ContainsKey("ZoneRedundant") ? (bool?)ZoneRedundant.ToBool() : null,
246246
LicenseType = LicenseType, // note: default license type will be LicenseIncluded in SQL RP if not specified
247247
AutoPauseDelayInMinutes = MyInvocation.BoundParameters.ContainsKey("AutoPauseDelayInMinutes") ? AutoPauseDelayInMinutes : (int?)null,
248-
MinimumVCoreCapacity = MyInvocation.BoundParameters.ContainsKey("AutoPauseDelayInMinutes") ? MinimumVCoreCapacity : (double?)null,
248+
MinimumCapacity = MyInvocation.BoundParameters.ContainsKey("AutoPauseDelayInMinutes") ? MinimumCapacity : (double?)null,
249249
};
250250

251251
if(ParameterSetName == DtuDatabaseParameterSet)

src/Sql/Sql/Database/Cmdlet/SetAzureSqlDatabase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ public class SetAzureSqlDatabase : AzureSqlDatabaseCmdletBase<IEnumerable<AzureS
211211
HelpMessage = "The Minimal capacity that database will always have allocated, if not paused. For serverless database only.",
212212
ParameterSetName = VcoreDatabaseParameterSet)]
213213
[Alias("MinVCore", "MinCapacity")]
214-
public double MinimumVCoreCapacity { get; set; }
214+
public double MinimumCapacity { get; set; }
215215

216216
/// <summary>
217217
/// Overriding to add warning message
@@ -256,7 +256,7 @@ protected override IEnumerable<AzureSqlDatabaseModel> ApplyUserInputToModel(IEnu
256256
: null,
257257
LicenseType = LicenseType ?? model.FirstOrDefault().LicenseType, // set to original license type
258258
AutoPauseDelayInMinutes = MyInvocation.BoundParameters.ContainsKey("AutoPauseDelayInMinutes") ? AutoPauseDelayInMinutes : (int?)null,
259-
MinimumVCoreCapacity = MyInvocation.BoundParameters.ContainsKey("MinimumVCoreCapacity") ? MinimumVCoreCapacity : (double?)null,
259+
MinimumCapacity = MyInvocation.BoundParameters.ContainsKey("MinimumCapacity") ? MinimumCapacity : (double?)null,
260260
};
261261

262262
var database = ModelAdapter.GetDatabase(ResourceGroupName, ServerName, DatabaseName);

src/Sql/Sql/Database/Model/AzureSqlDatabaseModel.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ public class AzureSqlDatabaseModel
173173
/// <summary>
174174
/// Minimal capacity that database will always have allocated, if not paused
175175
/// </summary>
176-
public double? MinimumVCoreCapacity { get; set; }
176+
public double? MinimumCapacity { get; set; }
177177

178178
/// <summary>
179179
/// Construct AzureSqlDatabaseModel
@@ -224,7 +224,7 @@ public AzureSqlDatabaseModel(string resourceGroup, string serverName, Management
224224

225225
ZoneRedundant = false;
226226
AutoPauseDelayInMinutes = null;
227-
MinimumVCoreCapacity = null;
227+
MinimumCapacity = null;
228228
}
229229

230230
/// <summary>
@@ -273,7 +273,7 @@ public AzureSqlDatabaseModel(string resourceGroup, string serverName, Management
273273
LicenseType = database.LicenseType;
274274

275275
AutoPauseDelayInMinutes = database.AutoPauseDelay;
276-
MinimumVCoreCapacity = database.MinCapacity;
276+
MinimumCapacity = database.MinCapacity;
277277
}
278278
}
279279
}

src/Sql/Sql/Database/Services/AzureSqlDatabaseAdapter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ internal AzureSqlDatabaseModel UpsertDatabaseWithNewSdk(string resourceGroup, st
159159
ElasticPoolId = elasticPoolId,
160160
LicenseType = model.Database.LicenseType,
161161
AutoPauseDelay = model.Database.AutoPauseDelayInMinutes,
162-
MinCapacity = model.Database.MinimumVCoreCapacity,
162+
MinCapacity = model.Database.MinimumCapacity,
163163
});
164164

165165
return CreateDatabaseModelFromResponse(resourceGroup, serverName, resp);

src/Sql/Sql/help/New-AzSqlDatabase.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Creates a database or an elastic database.
1818
New-AzSqlDatabase -DatabaseName <String> [-CollationName <String>] [-CatalogCollation <String>]
1919
[-MaxSizeBytes <Int64>] [-Edition <String>] [-RequestedServiceObjectiveName <String>]
2020
[-ElasticPoolName <String>] [-ReadScale <DatabaseReadScale>] [-Tags <Hashtable>] [-SampleName <String>]
21-
[-ZoneRedundant] [-AsJob] [-LicenseType <String>] [-AutoPauseDelayInMinutes <Int32>] [-MinimumVCoreCapacity <Double>]
21+
[-ZoneRedundant] [-AsJob] [-LicenseType <String>] [-AutoPauseDelayInMinutes <Int32>] [-MinimumCapacity <Double>]
2222
[-ServerName] <String> [-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
2323
[-Confirm] [<CommonParameters>]
2424
```
@@ -28,7 +28,7 @@ New-AzSqlDatabase -DatabaseName <String> [-CollationName <String>] [-CatalogColl
2828
New-AzSqlDatabase -DatabaseName <String> [-CollationName <String>] [-CatalogCollation <String>]
2929
[-MaxSizeBytes <Int64>] -Edition <String> [-ReadScale <DatabaseReadScale>] [-Tags <Hashtable>]
3030
[-SampleName <String>] [-ZoneRedundant] [-AsJob] -VCore <Int32> -ComputeGeneration <String>
31-
[-LicenseType <String>] [-ComputeModel <String>] [-AutoPauseDelayInMinutes <Int32>] [-MinimumVCoreCapacity <Double>]
31+
[-LicenseType <String>] [-ComputeModel <String>] [-AutoPauseDelayInMinutes <Int32>] [-MinimumCapacity <Double>]
3232
[-ServerName] <String> [-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf]
3333
[-Confirm] [<CommonParameters>]
3434
```
@@ -142,7 +142,7 @@ Family : Gen5
142142
SkuName : GP_S_Gen5
143143
LicenseType : LicenseIncluded
144144
AutoPauseDelayInMinutes : 360
145-
MinimumVCoreCapacity : 0.5
145+
MinimumCapacity : 0.5
146146
```
147147

148148
This command creates a Serverless database named Database04 on server Server01.
@@ -352,7 +352,7 @@ Accept pipeline input: False
352352
Accept wildcard characters: False
353353
```
354354
355-
### -MinimumVCoreCapacity
355+
### -MinimumCapacity
356356
The Minimal capacity that database will always have allocated, if not paused.
357357
For serverless Azure Sql databases only.
358358

src/Sql/Sql/help/Set-AzSqlDatabase.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Sets properties for a database, or moves an existing database into an elastic po
1818
Set-AzSqlDatabase [-DatabaseName] <String> [-MaxSizeBytes <Int64>] [-Edition <String>]
1919
[-RequestedServiceObjectiveName <String>] [-ElasticPoolName <String>] [-ReadScale <DatabaseReadScale>]
2020
[-Tags <Hashtable>] [-ZoneRedundant] [-AsJob] [-LicenseType <String>] [-ComputeModel <String>]
21-
[-AutoPauseDelayInMinutes <Int32>] [-MinimumVCoreCapacity <Double>] [-ServerName] <String>
21+
[-AutoPauseDelayInMinutes <Int32>] [-MinimumCapacity <Double>] [-ServerName] <String>
2222
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
2323
[<CommonParameters>]
2424
```
@@ -28,7 +28,7 @@ Set-AzSqlDatabase [-DatabaseName] <String> [-MaxSizeBytes <Int64>] [-Edition <St
2828
Set-AzSqlDatabase [-DatabaseName] <String> [-MaxSizeBytes <Int64>] [-Edition <String>]
2929
[-ReadScale <DatabaseReadScale>] [-Tags <Hashtable>] [-ZoneRedundant] [-AsJob] [-VCore <Int32>]
3030
[-ComputeGeneration <String>] [-LicenseType <String>] [-ComputeModel <String>]
31-
[-AutoPauseDelayInMinutes <Int32>] [-MinimumVCoreCapacity <Double>] [-ServerName] <String>
31+
[-AutoPauseDelayInMinutes <Int32>] [-MinimumCapacity <Double>] [-ServerName] <String>
3232
[-ResourceGroupName] <String> [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm]
3333
[<CommonParameters>]
3434
```
@@ -284,7 +284,7 @@ Accept pipeline input: False
284284
Accept wildcard characters: False
285285
```
286286
287-
### -MinimumVCoreCapacity
287+
### -MinimumCapacity
288288
The Minimal capacity that database will always have allocated, if not paused.
289289
For serverless Azure Sql databases only.
290290

0 commit comments

Comments
 (0)