Skip to content

Commit ef6a2ae

Browse files
authored
Add breaking changes warnings in preparation for October 27th milestone PR (#12683)
* New-AzManagedServicesDefinition changes * Revert "New-AzManagedServicesDefinition changes" This reverts commit 23ae023. * Added breaking changes warnings in preparation for Oct 27th breaking changes milestone
1 parent 775d267 commit ef6a2ae

7 files changed

+58
-0
lines changed

src/ManagedServices/ManagedServices/Commands/GetAzureRmManagedServicesAssignment.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@
1515
namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Commands
1616
{
1717
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
18+
using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Extensions;
1819
using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models;
20+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1921
using Microsoft.WindowsAzure.Commands.Utilities.Common;
2022
using System;
2123
using System.Management.Automation;
@@ -35,10 +37,20 @@ public class GetAzureRmManagedServicesAssignment : ManagedServicesCmdletBase
3537
[ScopeCompleter]
3638
public string Scope { get; set; }
3739

40+
[CmdletParameterBreakingChange(
41+
nameOfParameterChanging: "Id",
42+
deprecateByVersion: ManagedServicesUtility.UpcomingVersion,
43+
changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate,
44+
ReplaceMentCmdletParameterName = "Name")]
3845
[Parameter(Mandatory = true, ParameterSetName = ByIdParameterSet, HelpMessage = "The Registration Assignment identifier.")]
3946
[ValidateNotNullOrEmpty]
4047
public string Id { get; set; }
4148

49+
[CmdletParameterBreakingChange(
50+
nameOfParameterChanging: "ResourceId",
51+
deprecateByVersion: ManagedServicesUtility.UpcomingVersion,
52+
changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate,
53+
ChangeDescription = ManagedServicesUtility.DeprecatedParameterDescription)]
4254
[Parameter(
4355
Mandatory = true,
4456
ValueFromPipelineByPropertyName = true,

src/ManagedServices/ManagedServices/Commands/GetAzureRmManagedServicesDefinition.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15+
using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Extensions;
1516
using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models;
17+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1618
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1719
using System;
1820
using System.Management.Automation;
@@ -33,6 +35,11 @@ public class GetAzureRmManagedServicesDefinition : ManagedServicesCmdletBase
3335
[ValidateNotNullOrEmpty]
3436
public string Name { get; set; }
3537

38+
[CmdletParameterBreakingChange(
39+
nameOfParameterChanging: "ResourceId",
40+
deprecateByVersion: ManagedServicesUtility.UpcomingVersion,
41+
changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate,
42+
ChangeDescription = ManagedServicesUtility.DeprecatedParameterDescription)]
3643
[Parameter(
3744
ParameterSetName = ByResourceIdParameterSet,
3845
Mandatory = true,

src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesAssignment.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
16+
using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Extensions;
1617
using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1719
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1820
using System;
1921
using System.Collections.Generic;
@@ -44,6 +46,11 @@ public class NewAzureRmManagedServicesAssignment : ManagedServicesCmdletBase
4446
[ValidateNotNullOrEmpty]
4547
public string RegistrationDefinitionName { get; set; }
4648

49+
[CmdletParameterBreakingChange(
50+
nameOfParameterChanging: "RegistrationDefinitionResourceId",
51+
deprecateByVersion: ManagedServicesUtility.UpcomingVersion,
52+
changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate,
53+
ChangeDescription = ManagedServicesUtility.DeprecatedParameterDescription)]
4754
[Parameter(ParameterSetName = ByResourceIdParameterSet, ValueFromPipelineByPropertyName = true, Mandatory = true, HelpMessage = "The fully qualified resource id of the registration definition.")]
4855
[ValidateNotNullOrEmpty]
4956
[Alias("ResourceId")]

src/ManagedServices/ManagedServices/Commands/NewAzureRmManagedServicesDefinition.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
// ----------------------------------------------------------------------------------
1414

1515
using Microsoft.Azure.Management.ManagedServices.Models;
16+
using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Extensions;
1617
using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models;
1718
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1819
using System;
@@ -22,6 +23,10 @@
2223

2324
namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Commands
2425
{
26+
[WindowsAzure.Commands.Common.CustomAttributes.GenericBreakingChange(
27+
message: "New mandatory parameter 'DisplayName' will be added to represent a user-friendly name for a registration definition",
28+
deprecateByVersion: ManagedServicesUtility.UpcomingVersion,
29+
changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate)]
2530
[Cmdlet(
2631
VerbsCommon.New,
2732
Microsoft.Azure.Commands.ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ManagedServicesDefinition",

src/ManagedServices/ManagedServices/Commands/RemoveAzureRmManagedServcicesAssignment.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1616
using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Extensions;
1717
using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1819
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1920
using System;
2021
using System.Management.Automation;
@@ -37,10 +38,20 @@ public class RemoveAzureRmManagedServcicesAssignment : ManagedServicesCmdletBase
3738
[ScopeCompleter]
3839
public string Scope { get; set; }
3940

41+
[CmdletParameterBreakingChange(
42+
nameOfParameterChanging: "Id",
43+
deprecateByVersion: ManagedServicesUtility.UpcomingVersion,
44+
changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate,
45+
ReplaceMentCmdletParameterName = "Name")]
4046
[Parameter(ParameterSetName = DefaultParameterSet, Mandatory = true, HelpMessage = "The registration assignment Id.")]
4147
[ValidateNotNullOrEmpty]
4248
public string Id { get; set; }
4349

50+
[CmdletParameterBreakingChange(
51+
nameOfParameterChanging: "ResourceId",
52+
deprecateByVersion: ManagedServicesUtility.UpcomingVersion,
53+
changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate,
54+
ChangeDescription = ManagedServicesUtility.DeprecatedParameterDescription)]
4455
[Parameter(ParameterSetName = ByResourceIdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The fully qualified rsource id of the registration assignment.")]
4556
[ValidateNotNullOrEmpty]
4657
public string ResourceId { get; set; }

src/ManagedServices/ManagedServices/Commands/RemoveAzureRmManagedServicesDefinition.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Extensions;
1616
using Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Models;
17+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
1718
using Microsoft.WindowsAzure.Commands.Utilities.Common;
1819
using System;
1920
using System.Management.Automation;
@@ -32,10 +33,20 @@ public class RemoveAzureRmManagedServicesDefinition : ManagedServicesCmdletBase
3233
protected const string ByInputObjectParameterSet = "ByInputObject";
3334
protected const string ByResourceIdParameterSet = "ByResourceId";
3435

36+
[CmdletParameterBreakingChange(
37+
nameOfParameterChanging: "Id",
38+
deprecateByVersion: ManagedServicesUtility.UpcomingVersion,
39+
changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate,
40+
ReplaceMentCmdletParameterName = "Name")]
3541
[Parameter(ParameterSetName = DefaultParameterSet, Mandatory = true, HelpMessage = "The registration definition identifier.")]
3642
[ValidateNotNullOrEmpty]
3743
public string Id { get; set; }
3844

45+
[CmdletParameterBreakingChange(
46+
nameOfParameterChanging: "ResourceId",
47+
deprecateByVersion: ManagedServicesUtility.UpcomingVersion,
48+
changeInEfectByDate: ManagedServicesUtility.UpcomingVersionReleaseDate,
49+
ChangeDescription = ManagedServicesUtility.DeprecatedParameterDescription)]
3950
[Parameter(ParameterSetName = ByResourceIdParameterSet, Mandatory = true, ValueFromPipelineByPropertyName = true, HelpMessage = "The full qualified resource id of registration definition.")]
4051
[ValidateNotNullOrEmpty]
4152
public string ResourceId { get; set; }

src/ManagedServices/ManagedServices/Extensions/ManagedServicesUtility.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ namespace Microsoft.Azure.PowerShell.Cmdlets.ManagedServices.Extensions
2121
{
2222
public static class ManagedServicesUtility
2323
{
24+
// TODO: Remove these three string as well as breaking changes attributes for Oct. 27th change
25+
public const string UpcomingVersion = "1.0.3";
26+
public const string UpcomingVersionReleaseDate = "10/27/2020";
27+
public const string DeprecatedParameterDescription = "Parameter is being deprecated without being replaced";
28+
2429
public static readonly Regex AssignmentRegex = new Regex(@"(.*?)/providers/microsoft.managedservices/registrationAssignments/(?<assignmentName>[^/]+)",
2530
RegexOptions.IgnoreCase | RegexOptions.Compiled);
2631

0 commit comments

Comments
 (0)