Skip to content

Commit 2f4bc72

Browse files
authored
add breaking change attribute of acr (#21328)
* add breaking change attribute of acr * add breaking change attribute of acr * added changelog
1 parent 9926ea5 commit 2f4bc72

20 files changed

+88
-7
lines changed

src/ContainerRegistry/ContainerRegistry/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 breaking change attributes for cmdlets
2122

2223
## Version 3.0.2
2324
* Updated Azure.Core to 1.28.0.

src/ContainerRegistry/ContainerRegistry/Commands/GetAzureContainerRegistry.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1616
using System.Collections.Generic;
1717
using System.Management.Automation;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
19+
1820

1921
namespace Microsoft.Azure.Commands.ContainerRegistry
2022
{
23+
[GenericBreakingChange("The Az.ContainerRegistry module is upgrading. The output properties may have some changes", "4.0.0.0", "05/23/2023")]
2124
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ContainerRegistry", DefaultParameterSetName = ListRegistriesParameterSet)]
2225
[OutputType(typeof(PSContainerRegistry))]
2326
public class GetAzureContainerRegistry : ContainerRegistryCmdletBase
@@ -35,7 +38,8 @@ public class GetAzureContainerRegistry : ContainerRegistryCmdletBase
3538

3639
[Parameter(Mandatory = false, HelpMessage = "Show more details about the container registry.")]
3740
public SwitchParameter IncludeDetail { get; set; }
38-
41+
public const string ChangeDesc = "Parameter is being deprecated without being replaced";
42+
[CmdletParameterBreakingChange("ResourceId", "4.0.0.0", "05/23/2023", ChangeDescription = ChangeDesc)]
3943
[Parameter(Mandatory = true, ParameterSetName = ResourceIdParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "The container registry resource id")]
4044
[ValidateNotNullOrEmpty]
4145
[Alias(ResourceIdAlias)]

src/ContainerRegistry/ContainerRegistry/Commands/GetAzureContainerRegistryCredential.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@
1414

1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1616
using System.Management.Automation;
17+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
18+
1719

1820
namespace Microsoft.Azure.Commands.ContainerRegistry
1921
{
22+
[GenericBreakingChange("The Az.ContainerRegistry module is upgrading. The output properties may have some changes", "4.0.0.0")]
2023
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ContainerRegistryCredential", DefaultParameterSetName = NameResourceGroupParameterSet)]
2124
[OutputType(typeof(PSContainerRegistryCredential))]
2225
public class GetAzureContainerRegistryCredential : ContainerRegistryCmdletBase
@@ -34,7 +37,8 @@ public class GetAzureContainerRegistryCredential : ContainerRegistryCmdletBase
3437
[Parameter(Mandatory = true, ParameterSetName = RegistryObjectParameterSet, HelpMessage = "Container Registry Object.")]
3538
[ValidateNotNull]
3639
public PSContainerRegistry Registry { get; set; }
37-
40+
public const string ChangeDesc = "Parameter is being deprecated without being replaced";
41+
3842
[Parameter(Mandatory = true, ParameterSetName = ResourceIdParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "The container registry resource id")]
3943
[ValidateNotNullOrEmpty]
4044
[Alias(ResourceIdAlias)]

src/ContainerRegistry/ContainerRegistry/Commands/GetAzureContainerRegistryReplication.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,12 @@
1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1616
using System.Collections.Generic;
1717
using System.Management.Automation;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
19+
1820

1921
namespace Microsoft.Azure.Commands.ContainerRegistry
2022
{
23+
[GenericBreakingChange("The Az.ContainerRegistry module is upgrading. The output properties may have some changes", "4.0.0.0")]
2124
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ContainerRegistryReplication", DefaultParameterSetName = ListReplicationByNameResourceGroupParameterSet)]
2225
[OutputType(typeof(PSContainerRegistryReplication))]
2326
public class GetAzureContainerRegistryReplication : ContainerRegistryCmdletBase
@@ -45,6 +48,8 @@ public class GetAzureContainerRegistryReplication : ContainerRegistryCmdletBase
4548
[ValidateNotNull]
4649
public PSContainerRegistry Registry { get; set; }
4750

51+
public const string ChangeDesc = "Parameter is being deprecated without being replaced";
52+
[CmdletParameterBreakingChange("ResourceId", ChangeDescription = ChangeDesc)]
4853
[Parameter(Mandatory = true, ParameterSetName = ResourceIdParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "The container registry replication resource id")]
4954
[ValidateNotNullOrEmpty]
5055
[Alias(ResourceIdAlias)]

src/ContainerRegistry/ContainerRegistry/Commands/GetAzureContainerRegistryUsage.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@
1919
using System.Collections;
2020
using System.Collections.Generic;
2121
using System.Management.Automation;
22+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2223

2324
namespace Microsoft.Azure.Commands.ContainerRegistry.Commands
2425
{
26+
[GenericBreakingChange("The Az.ContainerRegistry module is upgrading. The output properties may have some changes", "4.0.0.0")]
2527
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ContainerRegistryUsage")]
2628
[OutputType(typeof(PSRegistryUsage))]
2729
public class GetAzureContainerRegistryUsage : ContainerRegistryCmdletBase

src/ContainerRegistry/ContainerRegistry/Commands/GetAzureContainerRegistryWebhook.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,17 @@
1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1616
using System.Collections.Generic;
1717
using System.Management.Automation;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
19+
1820

1921
namespace Microsoft.Azure.Commands.ContainerRegistry
2022
{
23+
[GenericBreakingChange("The Az.ContainerRegistry module is upgrading. The output properties may have some changes", "4.0.0.0")]
2124
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ContainerRegistryWebhook", DefaultParameterSetName = ListWebhookByNameResourceGroupParameterSet)]
2225
[OutputType(typeof(PSContainerRegistryWebhook))]
2326
public class GetAzureContainerRegistryWebhook : ContainerRegistryCmdletBase
2427
{
28+
public const string ChangeDesc = "Parameter is being deprecated without being replaced";
2529
[Parameter(Position = 0, Mandatory = true, ParameterSetName = ShowWebhookByNameResourceGroupParameterSet, HelpMessage = "Webhook Name.")]
2630
[Parameter(Position = 0, Mandatory = true, ParameterSetName = ShowWebhookByRegistryObjectParameterSet, HelpMessage = "Webhook Name.")]
2731
[ValidateNotNullOrEmpty]
@@ -45,9 +49,12 @@ public class GetAzureContainerRegistryWebhook : ContainerRegistryCmdletBase
4549
[ValidateNotNull]
4650
public PSContainerRegistry Registry { get; set; }
4751

52+
53+
[CmdletParameterBreakingChange("IncludeConfiguration", "4.0.0.0", "05/23/2023", ChangeDescription = ChangeDesc)]
4854
[Parameter(Mandatory = false, HelpMessage = "Get the configuration information for a webhook.")]
4955
public SwitchParameter IncludeConfiguration { get; set; }
5056

57+
[CmdletParameterBreakingChange("ResourceId", "4.0.0.0", "05/23/2023", ChangeDescription = ChangeDesc)]
5158
[Parameter(Mandatory = true, ParameterSetName = ResourceIdParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "The container registry Webhook resource id")]
5259
[ValidateNotNullOrEmpty]
5360
[Alias(ResourceIdAlias)]

src/ContainerRegistry/ContainerRegistry/Commands/GetAzureContainerRegistryWebhookEvent.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,18 @@
1515
using Microsoft.Azure.Commands.ResourceManager.Common.ArgumentCompleters;
1616
using System.Collections.Generic;
1717
using System.Management.Automation;
18+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
19+
1820

1921
namespace Microsoft.Azure.Commands.ContainerRegistry
2022
{
23+
[GenericBreakingChange("The Az.ContainerRegistry module is upgrading. The output properties may have some changes", "4.0.0.0")]
2124
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ContainerRegistryWebhookEvent", DefaultParameterSetName = ListWebhookEventsByNameResourceGroupParameterSet)]
2225
[OutputType(typeof(PSContainerRegistryWebhookEvent))]
2326
public class GetAzureContainerRegistryWebhookEvent : ContainerRegistryCmdletBase
2427
{
28+
public const string ChangeDesc = "Parameter is being deprecated without being replaced";
29+
2530
[Parameter(Position = 0, Mandatory = true, ParameterSetName = ListWebhookEventsByNameResourceGroupParameterSet, HelpMessage = "Webhook Name.")]
2631
[ValidateNotNullOrEmpty]
2732
public string WebhookName { get; set; }
@@ -40,6 +45,7 @@ public class GetAzureContainerRegistryWebhookEvent : ContainerRegistryCmdletBase
4045
[ValidateNotNull]
4146
public PSContainerRegistryWebhook Webhook { get; set; }
4247

48+
[CmdletParameterBreakingChange("ResourceId", "4.0.0.0", "05/23/2023", ChangeDescription = ChangeDesc)]
4349
[Parameter(Mandatory = true, ParameterSetName = ResourceIdParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "The container registry Webhook resource id")]
4450
[ValidateNotNullOrEmpty]
4551
[Alias(ResourceIdAlias)]

src/ContainerRegistry/ContainerRegistry/Commands/NewAzureContainerRegistry.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
using System;
2121
using System.Collections;
2222
using System.Management.Automation;
23+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
2324

2425
namespace Microsoft.Azure.Commands.ContainerRegistry
2526
{
27+
[GenericBreakingChange("The Az.ContainerRegistry module is upgrading. The output properties may have some changes", "4.0.0.0")]
2628
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ContainerRegistry", SupportsShouldProcess = true)]
2729
[OutputType(typeof(PSContainerRegistry))]
2830
public class NewAzureContainerRegistry : ContainerRegistryCmdletBase

src/ContainerRegistry/ContainerRegistry/Commands/NewAzureContainerRegistryNetworkRule.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@
2121
using System;
2222
using System.Collections;
2323
using System.Management.Automation;
24+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
25+
2426

2527
namespace Microsoft.Azure.Commands.ContainerRegistry.Commands
2628
{
29+
[CmdletDeprecation("4.0.0.0", "05/23/2023", ReplacementCmdletName = "New-AzContainerRegistryIPRuleObject")]
2730
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ContainerRegistryNetworkRule", DefaultParameterSetName = ByVirtualNetworkRule)]
2831
[OutputType(typeof(IPSNetworkRule))]
2932
public class NewAzureContainerRegistryNetworkRule : ContainerRegistryCmdletBase

src/ContainerRegistry/ContainerRegistry/Commands/NewAzureContainerRegistryReplication.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@
1616
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
1717
using System.Collections;
1818
using System.Management.Automation;
19+
using Microsoft.WindowsAzure.Commands.Common.CustomAttributes;
20+
1921

2022
namespace Microsoft.Azure.Commands.ContainerRegistry
2123
{
24+
[GenericBreakingChange("The Az.ContainerRegistry module is upgrading. The output properties may have some changes", "4.0.0.0")]
2225
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "ContainerRegistryReplication", DefaultParameterSetName = NameResourceGroupParameterSet, SupportsShouldProcess = true)]
2326
[OutputType(typeof(PSContainerRegistryReplication))]
2427
public class NewAzureContainerRegistryReplication : ContainerRegistryCmdletBase
@@ -53,6 +56,8 @@ public class NewAzureContainerRegistryReplication : ContainerRegistryCmdletBase
5356
[Alias(TagsAlias)]
5457
public Hashtable Tag { get; set; }
5558

59+
public const string ChangeDesc = "Parameter is being deprecated without being replaced";
60+
[CmdletParameterBreakingChange("ResourceId", "4.0.0.0", "05/23/2023", ChangeDescription = ChangeDesc)]
5661
[Parameter(Mandatory = true, ParameterSetName = ResourceIdParameterSet, ValueFromPipelineByPropertyName = true, HelpMessage = "The container registry resource id")]
5762
[ValidateNotNullOrEmpty]
5863
[Alias(ResourceIdAlias)]

0 commit comments

Comments
 (0)