Skip to content

Commit 0ae86b9

Browse files
author
Rachid Cesin Gorostieta
committed
Update parameter resource group cmdlets
1 parent 211ba0d commit 0ae86b9

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

src/ResourceManager/Resources/Commands.Resources/ResourceGroups/NewAzureResourceGroupCommand.cs

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@
1515
using System.Collections;
1616
using System.Management.Automation;
1717
using Microsoft.Azure.Commands.Resources.Models;
18-
using Microsoft.WindowsAzure.Commands.Utilities.Common;
18+
using Microsoft.Azure.Commands.Resources.Models.ActiveDirectory;
1919

2020
namespace Microsoft.Azure.Commands.Resources
2121
{
22+
2223
/// <summary>
2324
/// Creates a new resource group.
2425
/// </summary>
25-
[Cmdlet(VerbsCommon.New, "AzureRmResourceGroup", DefaultParameterSetName = BaseParameterSetName), OutputType(typeof(PSResourceGroup))]
26-
public class NewAzureResourceGroupCommand : ResourceWithParameterBaseCmdlet, IDynamicParameters
26+
[Cmdlet(VerbsCommon.New, "AzureRmResourceGroup", DefaultParameterSetName = ParameterSet.Empty), OutputType(typeof(PSResourceGroup))]
27+
public class NewAzureResourceGroupCommand : ResourcesBaseCmdlet
2728
{
2829
[Alias("ResourceGroupName")]
2930
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The resource group name.")]
@@ -34,11 +35,6 @@ public class NewAzureResourceGroupCommand : ResourceWithParameterBaseCmdlet, IDy
3435
[ValidateNotNullOrEmpty]
3536
public string Location { get; set; }
3637

37-
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true,
38-
HelpMessage = "The name of the deployment it's going to create. Only valid when a template is used. When a template is used, if the user doesn't specify a deployment name, use the current time, like \"20131223140835\".")]
39-
[ValidateNotNullOrEmpty]
40-
public string DeploymentName { get; set; }
41-
4238
[Alias("Tags")]
4339
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "An array of hashtables which represents resource tags.")]
4440
public Hashtable[] Tag { get; set; }
@@ -52,21 +48,11 @@ protected override void ProcessRecord()
5248
{
5349
ResourceGroupName = Name,
5450
Location = Location,
55-
DeploymentName = DeploymentName,
56-
GalleryTemplateIdentity = GalleryTemplateIdentity,
57-
TemplateFile = TemplateUri ?? this.TryResolvePath(TemplateFile),
58-
TemplateParameterObject = GetTemplateParameterObject(TemplateParameterObject),
59-
TemplateVersion = TemplateVersion,
60-
StorageAccountName = StorageAccountName,
6151
Force = Force.IsPresent,
6252
Tag = Tag,
6353
ConfirmAction = ConfirmAction
6454
};
65-
if(!string.IsNullOrEmpty(DeploymentName) || !string.IsNullOrEmpty(GalleryTemplateIdentity) || !string.IsNullOrEmpty(TemplateFile)
66-
|| !string.IsNullOrEmpty(TemplateVersion) || TemplateParameterObject != null || !string.IsNullOrEmpty(StorageAccountName))
67-
{
68-
WriteWarning("The deployment parameters in New-AzureRmResourceGroup cmdlet is being deprecated and will be removed in a future release. Please use New-AzureRmResourceGroupDeployment to submit deployments.");
69-
}
55+
7056
WriteWarning("The output object of this cmdlet will be modified in a future release.");
7157
WriteObject(ResourcesClient.CreatePSResourceGroup(parameters));
7258
}

0 commit comments

Comments
 (0)