Skip to content

Commit d756052

Browse files
authored
Breaking Change Message for Metric migrating to autorest (#24445)
* add breaking change message for Metric migrating to autorest add breaking change message for Metric migrating to autorest * Change log add breaking change message for Metric * Update Breaking change message for Monitor Metric
1 parent 9d86e4a commit d756052

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

src/Monitor/Monitor/ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
-->
2020

2121
## Upcoming Release
22+
* Added breaking change warning messages for Metric Management Plane
23+
* Get-AzMetric
24+
* Get-AzMetricDefinition
25+
* New-AzMetricFilter
2226

2327
## Version 5.1.0
2428
* Added support for the Metric Data Plane

src/Monitor/Monitor/Metrics/GetAzureRmMetricCommand.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ namespace Microsoft.Azure.Commands.Insights.Metrics
3131
/// Get the list of metric definition for a resource.
3232
/// </summary>
3333
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "Metric", DefaultParameterSetName = GetAzureRmAMetricParamGroup), OutputType(typeof(PSMetric))]
34+
[Microsoft.WindowsAzure.Commands.Common.CustomAttributes.GenericBreakingChangeWithVersion("Parameter set GetWithDefaultParameters will be removed", "12.0.0", "6.0.0", "2024/05/21")]
35+
[Microsoft.WindowsAzure.Commands.Common.CustomAttributes.GenericBreakingChangeWithVersion("Parameter set GetWithFullParameters will be changed to List2 and be 'Default' set", "12.0.0", "6.0.0", "2024/05/21")]
36+
[Microsoft.WindowsAzure.Commands.Common.CustomAttributes.CmdletOutputBreakingChangeWithVersion(typeof(PSMetric), "12.0.0", "6.0.0", "2024/05/21", ReplacementCmdletOutputTypeName = "Microsoft.Azure.PowerShell.Cmdlets.Metric.Models.IResponse", DeprecatedOutputProperties = new[] { "Microsoft.Azure.Commands.Insights.OutputClasses.PSMetric" } , NewOutputProperties = new[] { "Microsoft.Azure.PowerShell.Cmdlets.Metric.Models.ISubscriptionScopeMetricDefinition"})]
3437
public class GetAzureRmMetricCommand : ManagementCmdletBase
3538
{
3639
internal const string GetAzureRmAMetricParamGroup = "GetWithDefaultParameters";
@@ -52,6 +55,7 @@ public class GetAzureRmMetricCommand : ManagementCmdletBase
5255
/// <summary>
5356
/// Gets or sets the timegrain parameter of the cmdlet
5457
/// </summary>
58+
[Microsoft.WindowsAzure.Commands.Common.CustomAttributes.CmdletParameterBreakingChangeWithVersion("The interval (i.e.timegrain) of the query in ISO 8601 duration format", "12.0.0", "6.0.0", "2024/05/21")]
5559
[Parameter(ParameterSetName = GetAzureRmAMetricParamGroup, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The time grain of the query.")]
5660
[Parameter(ParameterSetName = GetAzureRmAMetricFullParamGroup, Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The time grain of the query.")]
5761
[ValidateNotNullOrEmpty]
@@ -111,7 +115,8 @@ public class GetAzureRmMetricCommand : ManagementCmdletBase
111115

112116
/// <summary>
113117
/// Gets or sets the dimension parameter of the cmdlet
114-
/// </summary>
118+
/// </summary>]
119+
[Microsoft.WindowsAzure.Commands.Common.CustomAttributes.CmdletParameterBreakingChangeWithVersion("Parameter Dimension will be removed", "12.0.0", "6.0.0", "2024/05/21")]
115120
[Parameter(Mandatory = false, ValueFromPipelineByPropertyName = true, HelpMessage = "The metric dimensions to query metrics for")]
116121
public string[] Dimension { get; set; }
117122

@@ -127,6 +132,7 @@ public class GetAzureRmMetricCommand : ManagementCmdletBase
127132
/// <summary>
128133
/// Gets or sets the detailedoutput parameter of the cmdlet
129134
/// </summary>
135+
[Microsoft.WindowsAzure.Commands.Common.CustomAttributes.CmdletParameterBreakingChangeWithVersion("Parameter DetailedOutput will be removed", "12.0.0", "6.0.0", "2024/05/21")]
130136
[Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "Return object with all the details of the records (the default is to return only some attributes, i.e. no detail)")]
131137
public SwitchParameter DetailedOutput { get; set; }
132138

src/Monitor/Monitor/Metrics/GetAzureRmMetricDefinitionCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ namespace Microsoft.Azure.Commands.Insights.Metrics
2323
/// Get the list of metric definitions for a resource.
2424
/// </summary>
2525
[Cmdlet("Get", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "MetricDefinition"), OutputType(typeof(PSMetricDefinition))]
26+
[Microsoft.WindowsAzure.Commands.Common.CustomAttributes.CmdletOutputBreakingChangeWithVersion(typeof(PSMetricDefinition), "12.0.0", "6.0.0", "2024/05/21", ReplacementCmdletOutputTypeName = "Microsoft.Azure.PowerShell.Cmdlets.Metric.Models.IMetricDefinition")]
2627
public class GetAzureRmMetricDefinitionCommand : ManagementCmdletBase
2728
{
2829
/// <summary>
@@ -35,6 +36,7 @@ public class GetAzureRmMetricDefinitionCommand : ManagementCmdletBase
3536
/// <summary>
3637
/// Gets or sets the metricnames parameter of the cmdlet
3738
/// </summary>
39+
[Microsoft.WindowsAzure.Commands.Common.CustomAttributes.CmdletParameterBreakingChangeWithVersion("Parameter MetricName will be removed", "12.0.0", "6.0.0", "2024/05/21")]
3840
[Parameter(ValueFromPipelineByPropertyName = true, HelpMessage = "The metric names of the query")]
3941
[ValidateNotNullOrEmpty]
4042
public string[] MetricName { get; set; }
@@ -48,6 +50,7 @@ public class GetAzureRmMetricDefinitionCommand : ManagementCmdletBase
4850
/// <summary>
4951
/// Gets or sets the detailedoutput parameter of the cmdlet
5052
/// </summary>
53+
[Microsoft.WindowsAzure.Commands.Common.CustomAttributes.CmdletParameterBreakingChangeWithVersion("Parameter DetailedOutput will be removed", "12.0.0", "6.0.0", "2024/05/21")]
5154
[Parameter(HelpMessage = "Return object with all the details of the records (the default is to return only some attributes, i.e. no detail)")]
5255
public SwitchParameter DetailedOutput { get; set; }
5356

src/Monitor/Monitor/Metrics/NewAzureRmMetricFilterCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ namespace Microsoft.Azure.Commands.Insights.Metrics
1818
/// <summary>
1919
/// Create a metric dimension filter
2020
/// </summary>
21+
[Microsoft.WindowsAzure.Commands.Common.CustomAttributes.GenericBreakingChangeWithVersion("Parameter DefaultProfile will be removed", "12.0.0", "6.0.0", "2024/05/21")]
2122
[Cmdlet("New", ResourceManager.Common.AzureRMConstants.AzureRMPrefix + "MetricFilter"), OutputType(typeof(string))]
2223
public class NewAzureRmMetricFilterCommand : MonitorCmdletBase
2324
{

0 commit comments

Comments
 (0)