Skip to content

Commit 73ccff6

Browse files
authored
[AppService] Add Pv4 and Pmv4 ASP support (Azure#27326)
1 parent 7534d88 commit 73ccff6

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

src/Websites/Websites/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Added AppServicePlan management support for Pv4 and Pmv4 tiers.
2122

2223
## Version 3.4.0
2324
* Add support for pull based deployments from a URL with MSI authentication in `Publish-AzWebApp`

src/Websites/Websites/Cmdlets/AppServicePlans/NewAzureAppServicePlan.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public class NewAzureAppServicePlanCmdlet : AppServicePlanBaseCmdlet
3535
[ValidateNotNullOrEmpty]
3636
public string Location { get; set; }
3737

38-
[Parameter(Position = 3, Mandatory = false, HelpMessage = "The App Service plan tier. Allowed values are [Free|Shared|Basic|Standard|Premium|PremiumV2|PremiumV3]. For ASE: [Isolated|IsolatedV2].")]
39-
[PSArgumentCompleter("Free", "Shared", "Basic", "Standard", "Premium", "PremiumV2", "Premium0V3", "PremiumV3", "PremiumMV3", "Isolated", "IsolatedV2", "PremiumContainer")]
38+
[Parameter(Position = 3, Mandatory = false, HelpMessage = "The App Service plan tier. Allowed values are [Free|Shared|Basic|Standard|Premium|PremiumV2|Premium0V3|PremiumV3|PremiumMV3|PremiumV4|PremiumMV4]. For ASE: [Isolated|IsolatedV2].")]
39+
[PSArgumentCompleter("Free", "Shared", "Basic", "Standard", "Premium", "PremiumV2", "Premium0V3", "PremiumV3", "PremiumMV3", "PremiumV4", "PremiumMV4", "Isolated", "IsolatedV2", "PremiumContainer")]
4040
public string Tier { get; set; }
4141

4242
[Parameter(Position = 4, Mandatory = false, HelpMessage = "Number of Workers to be allocated.")]
4343
[ValidateNotNullOrEmpty]
4444
public int NumberofWorkers { get; set; }
4545

46-
[Parameter(Position = 5, Mandatory = false, HelpMessage = "Size of workers to be allocated. Allowed values are [Small|Medium|Large|ExtraLarge]")]
46+
[Parameter(Position = 5, Mandatory = false, HelpMessage = "Size of workers to be allocated. Allowed values are [Small|Medium|Large|ExtraLarge|ExtraExtraLarge]")]
4747
[ValidateSet("ExtraSmall", "Small", "Medium", "Large", "ExtraLarge", "ExtraExtraLarge", IgnoreCase = true)]
4848
public string WorkerSize { get; set; }
4949

src/Websites/Websites/Cmdlets/AppServicePlans/SetAzureAppServicePlan.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ public class SetAzureAppServicePlanCmdlet : AppServicePlanBaseCmdlet
3434
[ValidateNotNullOrEmpty]
3535
public string AdminSiteName { get; set; }
3636

37-
[Parameter(ParameterSetName = ParameterSet1Name, Position = 3, Mandatory = false, HelpMessage = "The App Service plan tier. Allowed values are [Free|Shared|Basic|Standard|Premium|PremiumV2|PremiumV3] or [Isolated|IsolatedV2]")]
38-
[PSArgumentCompleter("Free", "Shared", "Basic", "Standard", "Premium", "PremiumV2", "Premium0V3", "PremiumV3", "PremiumMV3", "Isolated", "IsolatedV2")]
37+
[Parameter(ParameterSetName = ParameterSet1Name, Position = 3, Mandatory = false, HelpMessage = "The App Service plan tier. Allowed values are [Free|Shared|Basic|Standard|Premium|PremiumV2|Premium0V3|PremiumV3|PremiumMV3|PremiumV4|PremiumMV4] or [Isolated|IsolatedV2]")]
38+
[PSArgumentCompleter("Free", "Shared", "Basic", "Standard", "Premium", "PremiumV2", "Premium0V3", "PremiumV3", "PremiumMV3", "PremiumV4", "PremiumMV4", "Isolated", "IsolatedV2")]
3939
public string Tier { get; set; }
4040

4141
[Parameter(ParameterSetName = ParameterSet1Name, Position = 4, Mandatory = false, HelpMessage = "Number of Workers to be allocated.")]
4242
public int NumberofWorkers { get; set; }
4343

44-
[Parameter(ParameterSetName = ParameterSet1Name, Position = 5, Mandatory = false, HelpMessage = "Size of workers to be allocated. Allowed values are [Small|Medium|Large|ExtraLarge]")]
44+
[Parameter(ParameterSetName = ParameterSet1Name, Position = 5, Mandatory = false, HelpMessage = "Size of workers to be allocated. Allowed values are [Small|Medium|Large|ExtraLarge|ExtraExtraLarge]")]
4545
[PSArgumentCompleter("ExtraSmall", "Small", "Medium", "Large", "ExtraLarge", "ExtraExtraLarge")]
4646
public string WorkerSize { get; set; }
4747

src/Websites/Websites/Utilities/CmdletHelpers.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,16 @@ internal static string GetSkuName(string tier, int workerSize)
318318
sku = "P" + workerSize + "MV3";
319319
return sku;
320320
}
321+
else if (string.Equals("PremiumV4", tier, StringComparison.OrdinalIgnoreCase))
322+
{
323+
sku = "P" + workerSize + "V4";
324+
return sku;
325+
}
326+
else if (string.Equals("PremiumMV4", tier, StringComparison.OrdinalIgnoreCase))
327+
{
328+
sku = "P" + workerSize + "MV4";
329+
return sku;
330+
}
321331
else if (string.Equals("PremiumContainer", tier, StringComparison.OrdinalIgnoreCase))
322332
{
323333
sku = "PC" + workerSize + 1;

0 commit comments

Comments
 (0)