Skip to content

Commit baab3b7

Browse files
authored
Merge pull request #4875 from Azure/release50ShouldProcOutChange
[Insights] Introduce announced breaking changes, implement ShouldProcess, rename parameters to singluar names and add aliases to keep it non-breaking
2 parents a89c101 + e90b67d commit baab3b7

File tree

97 files changed

+879
-2385
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+879
-2385
lines changed

src/ResourceManager/Insights/AzureRM.Insights.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ NestedModules = @('.\Microsoft.Azure.Commands.Insights.dll')
7272
FunctionsToExport = @()
7373

7474
# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
75-
CmdletsToExport = 'Get-AzureRmUsage', 'Get-AzureRmMetricDefinition',
75+
CmdletsToExport = 'Get-AzureRmMetricDefinition',
7676
'Get-AzureRmMetric', 'Remove-AzureRmLogProfile',
7777
'Get-AzureRmLogProfile', 'Add-AzureRmLogProfile', 'Get-AzureRmLog',
7878
'Set-AzureRmDiagnosticSetting', 'Get-AzureRmDiagnosticSetting',
7979
'New-AzureRmAutoscaleNotification', 'New-AzureRmAutoscaleProfile',
8080
'New-AzureRmAutoscaleRule', 'Add-AzureRmAutoscaleSetting',
8181
'Get-AzureRmAutoscaleHistory', 'Get-AzureRmAutoscaleSetting',
8282
'New-AzureRmAutoscaleWebhook', 'Remove-AzureRmAutoscaleSetting',
83-
'Add-AzureRmMetricAlertRule', 'Add-AzureRmLogAlertRule',
83+
'Add-AzureRmMetricAlertRule',
8484
'Add-AzureRmWebtestAlertRule', 'Get-AzureRmAlertHistory',
8585
'Get-AzureRmAlertRule', 'New-AzureRmAlertRuleEmail',
8686
'New-AzureRmAlertRuleWebhook', 'Remove-AzureRmAlertRule',

src/ResourceManager/Insights/ChangeLog.md

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,96 @@
1818
- Additional information about change #1
1919
-->
2020
## Current Release
21-
21+
**Add-AzureRMLogAlertRule**
22+
- Deprecated as announced since April 2017
23+
- After October 1st using this cmdlet no longer had any effect as this functionality was transitioned to Activity Log Alerts. Please see https://aka.ms/migratemealerts for more information.
24+
25+
**Get-AzureRMUsage**
26+
- Deprecated as announced since April 2017
27+
28+
**Add-AzureRmMetricAlertRule**
29+
**Add-AzureRmWebtestAlertRule**
30+
- The argument ResourceGroup has been renamed as ResourceGroupName, i.e. a non-breaking change.
31+
- The parameter Actions has been renamed to Action and the Actions has been added to the alias list, i.e. a non-breaking change.
32+
- Warning message about the future deprecation of the plural parameter names added.
33+
34+
**Add-AzureRmAutoscaleSetting**
35+
- The argument ResourceGroup has been renamed as ResourceGroupName, i.e. a non-breaking change.
36+
- The parameter AutoscaleProfiles has been renamed to AutoscaleProfiles and the AutoscaleProfiles has been added to the alias list, i.e. a non-breaking change.
37+
- The parameter Notifications has been renamed to Notification and the Notifications has been added to the alias list, i.e. a non-breaking change.
38+
- Warning message about the future deprecation of the plural parameter names added.
39+
40+
**Remove-AzureRmAutoscaleSetting**
41+
- The argument ResourceGroup has been renamed as ResourceGroupName, i.e. a non-breaking change.
42+
43+
**Get-AzureRmAlertRule**
44+
- Output changed as announced since April 2017. The output is now a list of PSAlertRule (descendant of AzureAlertRule) objects: no Properties attribute in them.
45+
- The argument ResourceGroup has been renamed as ResourceGroupName, i.e. a non-breaking change.
46+
- Warning message added for the future deprecation of the DetailedOutput parameter.
47+
48+
**Remove-AzureRmAlertRule**
49+
- Output changed as announced since April 2017. The output is now an AzureOperationResponse object including status code and request Id.
50+
- The argument ResourceGroup has been renamed as ResourceGroupName, i.e. a non-breaking change.
51+
- The cmdlet now implements the ShouldProcess protocol.
52+
53+
**Get-AzureRmAutoscaleSetting**
54+
- Output changed as announced since April 2017. The output is now a list of PSAutoscaleSetting (descendant of AutoscaleSettingResource.) The breaking change is the elimination of the AutoscaleSettingResourceName attribute from the output, since it is always the same as the Name property.
55+
- The argument ResourceGroup has been renamed as ResourceGroupName, i.e. a non-breaking change.
56+
- Warning message added for the future deprecation of the DetailedOutput parameter.
57+
58+
**Remove-AzureRmLogProfile**
59+
- Output changed as announced since April 2017. The output is now an AzureOperationResponse object including status code and request Id.
60+
- The cmdlet now implements the ShouldProcess protocol.
61+
62+
**Add-AzureRmLogProfile**
63+
- The parameter Locations has been renamed to Location and the Locations has been added to the alias list, i.e. a non-breaking change.
64+
- The parameter RetentionInDays has been renamed to RetentionInDay and the RetentionInDays has been added to the alias list, i.e. a non-breaking change.
65+
- The parameter Categories has been renamed to Category and the Categories has been added to the alias list, i.e. a non-breaking change.
66+
- The cmdlet now implements the ShouldProcess protocol.
67+
- Warning message about the future deprecation of the plural parameter names added.
68+
69+
**Get-AzureRmMetricDefinition**
70+
**Get-AzureRmMetric**
71+
- The parameter MetricNames has been renamed to MetricName and the MetricNames has been added to the alias list, i.e. a non-breaking change.
72+
- Warning message about the future deprecation of the plural parameter names added.
73+
74+
**Get-AzureRmLog**
75+
- Output changed as announced since April 2017. The output is now a list of PSEventData (a descendant of EventData) objects. The breaking change is the elimination of the EventChannels attribute from the PSEventData, in the previous version it was returning a fixed value.
76+
- Warning message added for the future deprecation of the DetailedOutput parameter.
77+
- The parameter MaxEvents has been renamed as MaxRecord (there was already an alias MaxRecords which is kept.) MaxEvents has been moved to the alias list, i.e. non-breaking change.
78+
- Warning message about the future deprecation of the plural parameter names added.
79+
80+
**Get-AzureRmAlertHistory**
81+
**GetAzureRmAutoscaleHistory**
82+
- Output changed as announced since April 2017. The output is now a list of PSEventData (a descendant of EventData) objects. The breaking change is the elimination of the EventChannels attribute from the PSEventData, in the previous version it was returning a fixed value.
83+
- Warning message added for the future deprecation of the DetailedOutput parameter.
84+
85+
**New-AzureRmAutoscaleNotification**
86+
- The parameter SendEmailToSubscriptionCoAdministrators has been renamed to SendEmailToSubscriptionCoAdministrator and the SendEmailToSubscriptionCoAdministrators has been added to the alias list, i.e. a non-breaking change.
87+
- The parameter CustomEmails has been renamed to CustomEmail and the CustomEmails has been added to the alias list, i.e. a non-breaking change.
88+
- The parameter Webhooks has been renamed to Webhook and the Webhooks has been added to the alias list, i.e. a non-breaking change.
89+
- Warning message about the future deprecation of the plural parameter names added.
90+
91+
**New-AzureRmAutoscaleProfile**
92+
- The parameter ScheduleDays has been renamed to ScheduleDay and the ScheduleDays has been added to the alias list, i.e. a non-breaking change.
93+
- The parameter ScheduleHours has been renamed to ScheduleHour and the ScheduleHours has been added to the alias list, i.e. a non-breaking change.
94+
- The parameter ScheduleMinutes has been renamed to ScheduleMinute and the ScheduleMinutes has been added to the alias list, i.e. a non-breaking change.
95+
- The parameter Rules has been renamed to Rule and the Rules has been added to the alias list, i.e. a non-breaking change.
96+
- Warning message about the future deprecation of the plural parameter names added.
97+
98+
**New-AzureRmAutoscaleWebhook**
99+
- The parameter Properties has been renamed to Property and the Properties has been added to the alias list, i.e. a non-breaking change.
100+
- Warning message about the future deprecation of the plural parameter names added.
101+
102+
**New-AzureRmAlertRuleEmail**
103+
- The parameter CustomEmails has been renamed to CustomEmail and the CustomEmails has been added to the alias list, i.e. a non-breaking change.
104+
- The parameter SendToServiceOwners has been renamed to SendToServiceOwner and the SendToServiceOwners has been added to the alias list, i.e. a non-breaking change.
105+
- Warning message about the future deprecation of the plural parameter names added.
106+
107+
**New-AzureRmAlertRuleWebhook**
108+
- The parameter Properties has been renamed to Property and the Properties has been added to the alias list, i.e. a non-breaking change.
109+
- Warning message about the future deprecation of the plural parameter names added.
110+
22111
## Version 3.4.1
23112
* Add-AzureRmLogAlertRule
24113
- Adding details to deprecation warning introduced in April 2017: the cmdlet will stop having effect: its functionality is moved to the "ActivityLogAlerts" cmdlets.

src/ResourceManager/Insights/Commands.Insights.Test/ActivityLogs/GetAzureRmLogTests.cs

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ public void GetAzureSubscriptionIdLogCommandParametersProcessing()
8585
requiredFieldName: null,
8686
requiredFieldValue: null,
8787
filter: ref this.filter,
88-
selected: ref this.selected,
8988
startDate: startDate,
9089
nextLink: ref this.nextLink);
9190
}
@@ -99,7 +98,7 @@ public void GetAzureCorrelationIdLogCommandParametersProcessing()
9998
// Setting required parameter
10099
cmdlet.CorrelationId = Utilities.Correlation;
101100
cmdlet.ResourceId = null;
102-
cmdlet.ResourceGroup = null;
101+
cmdlet.ResourceGroupName = null;
103102
cmdlet.ResourceProvider = null;
104103

105104
Utilities.ExecuteVerifications(
@@ -108,7 +107,6 @@ public void GetAzureCorrelationIdLogCommandParametersProcessing()
108107
requiredFieldName: "correlationId",
109108
requiredFieldValue: Utilities.Correlation,
110109
filter: ref this.filter,
111-
selected: ref this.selected,
112110
startDate: startDate,
113111
nextLink: ref this.nextLink);
114112
}
@@ -120,7 +118,7 @@ public void GetAzureResourceGroupLogCommandParametersProcessing()
120118
var startDate = DateTime.Now.AddSeconds(-1);
121119

122120
// Setting required parameter
123-
cmdlet.ResourceGroup = Utilities.ResourceGroup;
121+
cmdlet.ResourceGroupName = Utilities.ResourceGroup;
124122
cmdlet.CorrelationId = null;
125123
cmdlet.ResourceId = null;
126124
cmdlet.ResourceProvider = null;
@@ -131,7 +129,6 @@ public void GetAzureResourceGroupLogCommandParametersProcessing()
131129
requiredFieldName: "resourceGroupName",
132130
requiredFieldValue: Utilities.ResourceGroup,
133131
filter: ref this.filter,
134-
selected: ref this.selected,
135132
startDate: startDate,
136133
nextLink: ref this.nextLink);
137134
}
@@ -144,7 +141,7 @@ public void GetAzureResourceLogCommandParametersProcessing()
144141

145142
// Setting required parameter
146143
cmdlet.ResourceId = Utilities.ResourceUri;
147-
cmdlet.ResourceGroup = null;
144+
cmdlet.ResourceGroupName = null;
148145
cmdlet.CorrelationId = null;
149146
cmdlet.ResourceProvider = null;
150147

@@ -154,7 +151,6 @@ public void GetAzureResourceLogCommandParametersProcessing()
154151
requiredFieldName: "resourceUri",
155152
requiredFieldValue: Utilities.ResourceUri,
156153
filter: ref this.filter,
157-
selected: ref this.selected,
158154
startDate: startDate,
159155
nextLink: ref this.nextLink);
160156
}
@@ -168,7 +164,7 @@ public void GetAzureResourceProviderLogCommandParametersProcessing()
168164
// Setting required parameter
169165
cmdlet.ResourceProvider = Utilities.ResourceProvider;
170166
cmdlet.ResourceId = null;
171-
cmdlet.ResourceGroup = null;
167+
cmdlet.ResourceGroupName = null;
172168
cmdlet.CorrelationId = null;
173169

174170
Utilities.ExecuteVerifications(
@@ -177,7 +173,6 @@ public void GetAzureResourceProviderLogCommandParametersProcessing()
177173
requiredFieldName: "resourceProvider",
178174
requiredFieldValue: Utilities.ResourceProvider,
179175
filter: ref this.filter,
180-
selected: ref this.selected,
181176
startDate: startDate,
182177
nextLink: ref this.nextLink);
183178
}

0 commit comments

Comments
 (0)