Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ public sealed class GetAzureResourceCmdlet : ResourceManagerCmdletBase
/// </summary>
[Parameter(ParameterSetName = GetAzureResourceCmdlet.GetResourceParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = false, HelpMessage = "The parent resource type. e.g. Servers/myServer.")]
[ValidateNotNullOrEmpty]
[Obsolete("This parameter is obsolete and will be removed in future releases. Please use the -ResourceType and -ResourceName parameters instead.")]
public string ParentResource { get; set; }

/// <summary>
Expand Down Expand Up @@ -232,6 +231,14 @@ public GetAzureResourceCmdlet()
protected override void OnProcessRecord()
{
base.OnProcessRecord();
if(!string.IsNullOrEmpty(this.TagName) || !string.IsNullOrEmpty(this.TagValue))
{
this.WriteWarning("The TagName and TagValue parameters are obsolete and will be removed in future releases.");
}
if(!string.IsNullOrEmpty(this.ParentResource))
{
this.WriteWarning("The ParentResource parameter is obsolete and will be removed in future releases. Please use the -ResourceType and -ResourceName parameters instead.");
}
this.subscriptionIds.AddRange(this.SubscriptionId.CoalesceEnumerable());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ protected override void OnProcessRecord()
this.SubscriptionId = this.Profile.Context.Subscription.Id;
}

if(!string.IsNullOrEmpty(this.ApiVersion))
{
this.WriteWarning("The parameter ApiVersion in Get-AzureResourceGroupDeploymentOperation cmdlet is being deprecated and will be removed in a future release.");
}

this.RunCmdlet();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@ protected override void OnEndProcessing()
/// </summary>
private void RunCmdlet()
{
if(this.NoWait.IsPresent)
{
this.WriteWarning("The NoWait parameter is obsolete and will be removed in future releases.");
}
var resourceIdsToUse = this.resourceIds
.Concat(this.ResourceId)
.DistinctArray(StringComparer.InvariantCultureIgnoreCase);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

namespace Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -94,6 +95,10 @@ protected override void OnProcessRecord()
{
base.OnProcessRecord();
this.DetermineOutputObjectFormat();
if(this.IsFullObject.IsPresent)
{
this.WriteWarning("The IsFullObject parameter is obsolete and will be removed in future releases.");
}
if (this.OutputObjectFormat == ResourceObjectFormat.Legacy)
{
this.WriteWarning("This cmdlet is using the legacy properties object format. This format is being deprecated. Please use '-OutputObjectFormat New' and update your scripts.");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public abstract class ResourceManipulationCmdletBase : ResourceManagerCmdletBase
/// </summary>
[Parameter(ParameterSetName = ResourceManipulationCmdletBase.SubscriptionLevelResoruceParameterSet, Mandatory = false, ValueFromPipelineByPropertyName = false, HelpMessage = "The parent resource type. e.g. Servers/myServer.")]
[ValidateNotNullOrEmpty]
[Obsolete("This parameter is obsolete and will be removed in future releases. Please use the -ResourceType and -ResourceName parameters instead.")]
public string ParentResource { get; set; }

/// <summary>
Expand Down Expand Up @@ -125,6 +124,14 @@ public abstract class ResourceManipulationCmdletBase : ResourceManagerCmdletBase
/// </summary>
protected override void OnProcessRecord()
{
if(this.SubscriptionId != null)
{
this.WriteWarning("The SubscriptionId parameter is obsolete and will be removed in future releases.");
}
if (!string.IsNullOrEmpty(this.ParentResource))
{
this.WriteWarning("The ParentResource parameter is obsolete and will be removed in future releases. Please use the -ResourceType and -ResourceName parameters instead.");
}
if (string.IsNullOrWhiteSpace(this.ResourceId) && !this.TenantLevel && this.SubscriptionId == null)
{
this.SubscriptionId = this.Profile.Context.Subscription.Id;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ protected override void OnProcessRecord()
this.WriteWarning("This cmdlet is using the legacy properties object format. This format is being deprecated. Please use '-OutputObjectFormat New' and update your scripts.");
}

if(!string.IsNullOrEmpty(this.ODataQuery))
{
this.WriteWarning("The ODataQuery parameter is being deprecated in Set-AzureResource cmdlet and will be removed in a future release.");
}

var resourceId = this.GetResourceId();
this.ConfirmAction(
this.Force,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@ public override void ExecuteCmdlet()
new List<string>() { ProvisioningState }
};

if(!string.IsNullOrEmpty(Name))
{
WriteWarning("The parameter 'Name' in Get-AzureResourceGroupDeployment cmdlet is being renamed to DeploymentName and will be updated in a future release.");
}

WriteObject(ResourcesClient.FilterResourceGroupDeployments(options), true);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ public override void ExecuteCmdlet()
StorageAccountName = StorageAccountName
};

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

if(this.Mode == DeploymentMode.Complete)
{
this.ConfirmAction(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ public override void ExecuteCmdlet()
Tag = Tag,
ConfirmAction = ConfirmAction
};

if(!string.IsNullOrEmpty(DeploymentName) || !string.IsNullOrEmpty(GalleryTemplateIdentity) || !string.IsNullOrEmpty(TemplateFile)
|| !string.IsNullOrEmpty(TemplateVersion) || TemplateParameterObject != null || !string.IsNullOrEmpty(StorageAccountName))
{
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.");
}
WriteObject(ResourcesClient.CreatePSResourceGroup(parameters));
}
}
Expand Down