Skip to content

Commit 4e7024a

Browse files
committed
Add more warning messages for upcoming changes in ARM cmdlets
1 parent f0b5063 commit 4e7024a

12 files changed

+24
-65
lines changed

src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/GetAzureResourceGroupDeploymentCommand.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@ public override void ExecuteCmdlet()
4747
new List<string>() { ProvisioningState }
4848
};
4949

50-
if(!string.IsNullOrEmpty(Name))
50+
if(!string.IsNullOrEmpty(ProvisioningState))
5151
{
52-
WriteWarning("The parameter 'Name' in Get-AzureResourceGroupDeployment cmdlet is being renamed to DeploymentName and will be updated in a future release.");
52+
WriteWarning("The ProvisioningState parameter is being deprecated and will be removed in a future release.");
5353
}
54-
5554
WriteObject(ResourcesClient.FilterResourceGroupDeployments(options), true);
5655
}
5756
}

src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/NewAzureResourceGroupDeploymentCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ public override void ExecuteCmdlet()
6161
StorageAccountName = StorageAccountName
6262
};
6363

64-
if(!string.IsNullOrEmpty(TemplateVersion) || !string.IsNullOrEmpty(StorageAccountName))
64+
if (!string.IsNullOrEmpty(TemplateVersion) || !string.IsNullOrEmpty(StorageAccountName) || !string.IsNullOrEmpty(GalleryTemplateIdentity))
6565
{
66-
WriteWarning("The TemplateVersion and StorageAccountName parameters in New-AzureResourceGroupDeployment cmdlet is being deprecated and will be removed in a future release.");
66+
WriteWarning("The GalleryTemplateIdentity, TemplateVersion and StorageAccountName parameters in New-AzureResourceGroupDeployment cmdlet is being deprecated and will be removed in a future release.");
6767
}
6868

6969
if(this.Mode == DeploymentMode.Complete)

src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/RemoveAzureResourceGroupDeploymentCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public override void ExecuteCmdlet()
5050

5151
if (PassThru)
5252
{
53+
WriteWarning("The PassThru switch parameter is being deprecated and will be removed in a future release.");
5354
WriteObject(true);
5455
}
5556
}

src/ResourceManager/Resources/Commands.Resources/ResourceGroupDeployments/StopAzureResourceGroupDeploymentCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public override void ExecuteCmdlet()
5050

5151
if (PassThru)
5252
{
53+
WriteWarning("The output object of this cmdlet will be modified in a future release.");
5354
WriteObject(true);
5455
}
5556
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public class GetAzureLocationCommand : ResourcesBaseCmdlet, IModuleAssemblyIniti
2929
{
3030
public override void ExecuteCmdlet()
3131
{
32+
WriteWarning("The output object of this cmdlet will be modified in a future release.");
3233
WriteObject(ResourcesClient.GetLocations(), true);
3334
}
3435

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ public class GetAzureResourceGroupCommand : ResourcesBaseCmdlet
3838

3939
public override void ExecuteCmdlet()
4040
{
41+
if(this.Tag != null)
42+
{
43+
WriteWarning("The Tag parameter is being deprecated and will be removed in a future release.");
44+
}
45+
if(this.Detailed.IsPresent)
46+
{
47+
WriteWarning("The Detailed switch parameter is being deprecated and will be removed in a future release.");
48+
}
49+
WriteWarning("The output object of this cmdlet will be modified in a future release.");
4150
var detailed = Detailed.IsPresent || !string.IsNullOrEmpty(Name);
4251
WriteObject(ResourcesClient.FilterResourceGroups(Name, Tag, detailed), true);
4352
}

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

Lines changed: 0 additions & 59 deletions
This file was deleted.

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public override void ExecuteCmdlet()
6767
{
6868
WriteWarning("The deployment parameters in New-AzureResourceGroup cmdlet is being deprecated and will be removed in a future release. Please use New-AzureResourceGroupDeployment to submit deployments.");
6969
}
70+
WriteWarning("The output object of this cmdlet is being modified and will be changed in a future release.");
7071
WriteObject(ResourcesClient.CreatePSResourceGroup(parameters));
7172
}
7273
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public override void ExecuteCmdlet()
4646

4747
if (PassThru)
4848
{
49+
WriteWarning("The PassThru switch parameter is being deprecated and will be removed in a future release.");
4950
WriteObject(true);
5051
}
5152
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public override void ExecuteCmdlet()
4040
ResourceGroupName = Name,
4141
Tag = Tag
4242
};
43-
43+
WriteWarning("The output object of this cmdlet will be modified in a future release.");
4444
WriteObject(ResourcesClient.UpdatePSResourceGroup(parameters));
4545
}
4646
}

src/ResourceManager/Resources/Commands.Resources/Templates/SaveAzureResourceGroupGalleryTemplateCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public class SaveAzureResourceGroupGalleryTemplateCommand : ResourcesBaseCmdlet
3737

3838
public override void ExecuteCmdlet()
3939
{
40+
WriteWarning("This cmdlet is being deprecated and will be removed in a future release.");
4041
string path = GalleryTemplatesClient.DownloadGalleryTemplateFile(
4142
Identity,
4243
string.IsNullOrEmpty(Path) ? System.IO.Path.Combine(CurrentPath(), Identity) : this.TryResolvePath(Path),

src/ResourceManager/Resources/Commands.Resources/Templates/TestAzureResourceGroupTemplateCommand.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ public TestAzureResourceGroupTemplateCommand()
4141
public override void ExecuteCmdlet()
4242
{
4343
this.WriteWarning("The Test-AzureResourceGroupTemplate cmdlet is being renamed to Test-AzureResourceGroupDeployment in a future release.");
44+
if (!string.IsNullOrEmpty(TemplateVersion) || !string.IsNullOrEmpty(StorageAccountName) || !string.IsNullOrEmpty(GalleryTemplateIdentity))
45+
{
46+
WriteWarning("The GalleryTemplateIdentity, TemplateVersion and StorageAccountName parameters are being deprecated and will be removed in a future release.");
47+
}
4448
ValidatePSResourceGroupDeploymentParameters parameters = new ValidatePSResourceGroupDeploymentParameters()
4549
{
4650
ResourceGroupName = ResourceGroupName,

0 commit comments

Comments
 (0)