Skip to content

[Insights] Introduce announced breaking changes, implement ShouldProcess, rename parameters to singluar names and add aliases to keep it non-breaking #4875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Nov 3, 2017
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
4 changes: 2 additions & 2 deletions src/ResourceManager/Insights/AzureRM.Insights.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ NestedModules = @('.\Microsoft.Azure.Commands.Insights.dll')
FunctionsToExport = @()

# 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.
CmdletsToExport = 'Get-AzureRmUsage', 'Get-AzureRmMetricDefinition',
CmdletsToExport = 'Get-AzureRmMetricDefinition',
'Get-AzureRmMetric', 'Remove-AzureRmLogProfile',
'Get-AzureRmLogProfile', 'Add-AzureRmLogProfile', 'Get-AzureRmLog',
'Set-AzureRmDiagnosticSetting', 'Get-AzureRmDiagnosticSetting',
'New-AzureRmAutoscaleNotification', 'New-AzureRmAutoscaleProfile',
'New-AzureRmAutoscaleRule', 'Add-AzureRmAutoscaleSetting',
'Get-AzureRmAutoscaleHistory', 'Get-AzureRmAutoscaleSetting',
'New-AzureRmAutoscaleWebhook', 'Remove-AzureRmAutoscaleSetting',
'Add-AzureRmMetricAlertRule', 'Add-AzureRmLogAlertRule',
'Add-AzureRmMetricAlertRule',
'Add-AzureRmWebtestAlertRule', 'Get-AzureRmAlertHistory',
'Get-AzureRmAlertRule', 'New-AzureRmAlertRuleEmail',
'New-AzureRmAlertRuleWebhook', 'Remove-AzureRmAlertRule',
Expand Down
91 changes: 90 additions & 1 deletion src/ResourceManager/Insights/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,96 @@
- Additional information about change #1
-->
## Current Release

**Add-AzureRMLogAlertRule**
- Deprecated as announced since April 2017
- 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.

**Get-AzureRMUsage**
- Deprecated as announced since April 2017

**Add-AzureRmMetricAlertRule**
**Add-AzureRmWebtestAlertRule**
- The argument ResourceGroup has been renamed as ResourceGroupName, i.e. a non-breaking change.
- The parameter Actions has been renamed to Action and the Actions has been added to the alias list, i.e. a non-breaking change.
- Warning message about the future deprecation of the plural parameter names added.

**Add-AzureRmAutoscaleSetting**
- The argument ResourceGroup has been renamed as ResourceGroupName, i.e. a non-breaking change.
- The parameter AutoscaleProfiles has been renamed to AutoscaleProfiles and the AutoscaleProfiles has been added to the alias list, i.e. a non-breaking change.
- The parameter Notifications has been renamed to Notification and the Notifications has been added to the alias list, i.e. a non-breaking change.
- Warning message about the future deprecation of the plural parameter names added.

**Remove-AzureRmAutoscaleSetting**
- The argument ResourceGroup has been renamed as ResourceGroupName, i.e. a non-breaking change.

**Get-AzureRmAlertRule**
- Output changed as announced since April 2017. The output is now a list of PSAlertRule (descendant of AzureAlertRule) objects: no Properties attribute in them.
- The argument ResourceGroup has been renamed as ResourceGroupName, i.e. a non-breaking change.
- Warning message added for the future deprecation of the DetailedOutput parameter.

**Remove-AzureRmAlertRule**
- Output changed as announced since April 2017. The output is now an AzureOperationResponse object including status code and request Id.
- The argument ResourceGroup has been renamed as ResourceGroupName, i.e. a non-breaking change.
- The cmdlet now implements the ShouldProcess protocol.

**Get-AzureRmAutoscaleSetting**
- 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.
- The argument ResourceGroup has been renamed as ResourceGroupName, i.e. a non-breaking change.
- Warning message added for the future deprecation of the DetailedOutput parameter.

**Remove-AzureRmLogProfile**
- Output changed as announced since April 2017. The output is now an AzureOperationResponse object including status code and request Id.
- The cmdlet now implements the ShouldProcess protocol.

**Add-AzureRmLogProfile**
- The parameter Locations has been renamed to Location and the Locations has been added to the alias list, i.e. a non-breaking change.
- The parameter RetentionInDays has been renamed to RetentionInDay and the RetentionInDays has been added to the alias list, i.e. a non-breaking change.
- The parameter Categories has been renamed to Category and the Categories has been added to the alias list, i.e. a non-breaking change.
- The cmdlet now implements the ShouldProcess protocol.
- Warning message about the future deprecation of the plural parameter names added.

**Get-AzureRmMetricDefinition**
**Get-AzureRmMetric**
- The parameter MetricNames has been renamed to MetricName and the MetricNames has been added to the alias list, i.e. a non-breaking change.
- Warning message about the future deprecation of the plural parameter names added.

**Get-AzureRmLog**
- 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.
- Warning message added for the future deprecation of the DetailedOutput parameter.
- 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.
- Warning message about the future deprecation of the plural parameter names added.

**Get-AzureRmAlertHistory**
**GetAzureRmAutoscaleHistory**
- 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.
- Warning message added for the future deprecation of the DetailedOutput parameter.

**New-AzureRmAutoscaleNotification**
- The parameter SendEmailToSubscriptionCoAdministrators has been renamed to SendEmailToSubscriptionCoAdministrator and the SendEmailToSubscriptionCoAdministrators has been added to the alias list, i.e. a non-breaking change.
- The parameter CustomEmails has been renamed to CustomEmail and the CustomEmails has been added to the alias list, i.e. a non-breaking change.
- The parameter Webhooks has been renamed to Webhook and the Webhooks has been added to the alias list, i.e. a non-breaking change.
- Warning message about the future deprecation of the plural parameter names added.

**New-AzureRmAutoscaleProfile**
- The parameter ScheduleDays has been renamed to ScheduleDay and the ScheduleDays has been added to the alias list, i.e. a non-breaking change.
- The parameter ScheduleHours has been renamed to ScheduleHour and the ScheduleHours has been added to the alias list, i.e. a non-breaking change.
- The parameter ScheduleMinutes has been renamed to ScheduleMinute and the ScheduleMinutes has been added to the alias list, i.e. a non-breaking change.
- The parameter Rules has been renamed to Rule and the Rules has been added to the alias list, i.e. a non-breaking change.
- Warning message about the future deprecation of the plural parameter names added.

**New-AzureRmAutoscaleWebhook**
- The parameter Properties has been renamed to Property and the Properties has been added to the alias list, i.e. a non-breaking change.
- Warning message about the future deprecation of the plural parameter names added.

**New-AzureRmAlertRuleEmail**
- The parameter CustomEmails has been renamed to CustomEmail and the CustomEmails has been added to the alias list, i.e. a non-breaking change.
- The parameter SendToServiceOwners has been renamed to SendToServiceOwner and the SendToServiceOwners has been added to the alias list, i.e. a non-breaking change.
- Warning message about the future deprecation of the plural parameter names added.

**New-AzureRmAlertRuleWebhook**
- The parameter Properties has been renamed to Property and the Properties has been added to the alias list, i.e. a non-breaking change.
- Warning message about the future deprecation of the plural parameter names added.

## Version 3.4.1
* Add-AzureRmLogAlertRule
- Adding details to deprecation warning introduced in April 2017: the cmdlet will stop having effect: its functionality is moved to the "ActivityLogAlerts" cmdlets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ public void GetAzureSubscriptionIdLogCommandParametersProcessing()
requiredFieldName: null,
requiredFieldValue: null,
filter: ref this.filter,
selected: ref this.selected,
startDate: startDate,
nextLink: ref this.nextLink);
}
Expand All @@ -99,7 +98,7 @@ public void GetAzureCorrelationIdLogCommandParametersProcessing()
// Setting required parameter
cmdlet.CorrelationId = Utilities.Correlation;
cmdlet.ResourceId = null;
cmdlet.ResourceGroup = null;
cmdlet.ResourceGroupName = null;
cmdlet.ResourceProvider = null;

Utilities.ExecuteVerifications(
Expand All @@ -108,7 +107,6 @@ public void GetAzureCorrelationIdLogCommandParametersProcessing()
requiredFieldName: "correlationId",
requiredFieldValue: Utilities.Correlation,
filter: ref this.filter,
selected: ref this.selected,
startDate: startDate,
nextLink: ref this.nextLink);
}
Expand All @@ -120,7 +118,7 @@ public void GetAzureResourceGroupLogCommandParametersProcessing()
var startDate = DateTime.Now.AddSeconds(-1);

// Setting required parameter
cmdlet.ResourceGroup = Utilities.ResourceGroup;
cmdlet.ResourceGroupName = Utilities.ResourceGroup;
cmdlet.CorrelationId = null;
cmdlet.ResourceId = null;
cmdlet.ResourceProvider = null;
Expand All @@ -131,7 +129,6 @@ public void GetAzureResourceGroupLogCommandParametersProcessing()
requiredFieldName: "resourceGroupName",
requiredFieldValue: Utilities.ResourceGroup,
filter: ref this.filter,
selected: ref this.selected,
startDate: startDate,
nextLink: ref this.nextLink);
}
Expand All @@ -144,7 +141,7 @@ public void GetAzureResourceLogCommandParametersProcessing()

// Setting required parameter
cmdlet.ResourceId = Utilities.ResourceUri;
cmdlet.ResourceGroup = null;
cmdlet.ResourceGroupName = null;
cmdlet.CorrelationId = null;
cmdlet.ResourceProvider = null;

Expand All @@ -154,7 +151,6 @@ public void GetAzureResourceLogCommandParametersProcessing()
requiredFieldName: "resourceUri",
requiredFieldValue: Utilities.ResourceUri,
filter: ref this.filter,
selected: ref this.selected,
startDate: startDate,
nextLink: ref this.nextLink);
}
Expand All @@ -168,7 +164,7 @@ public void GetAzureResourceProviderLogCommandParametersProcessing()
// Setting required parameter
cmdlet.ResourceProvider = Utilities.ResourceProvider;
cmdlet.ResourceId = null;
cmdlet.ResourceGroup = null;
cmdlet.ResourceGroupName = null;
cmdlet.CorrelationId = null;

Utilities.ExecuteVerifications(
Expand All @@ -177,7 +173,6 @@ public void GetAzureResourceProviderLogCommandParametersProcessing()
requiredFieldName: "resourceProvider",
requiredFieldValue: Utilities.ResourceProvider,
filter: ref this.filter,
selected: ref this.selected,
startDate: startDate,
nextLink: ref this.nextLink);
}
Expand Down
Loading