Skip to content

Set-AzAlertProcessingRule Invalid DateTime Format Bug #17721

Open
@elvismangarae

Description

@elvismangarae

Description

The new Set-AzAlertProcessingRule cmdlet:
Below parameters only accept values in string representation of datetime format yyyy-MM-dd hh:mm:ss
-ScheduleStartDateTime
-ScheduleEndDateTime
Below parameters only accept values in string representation of time format hh:mm:ss
-ScheduleReccurenceStartTime
-ScheduleReccurenceEndTime
-ScheduleReccurence2StartTime
-ScheduleReccurence2EndTime

This does not allow for schedules later than 11:59:59 (AM).

SetAzureAlertProcessingRule.cs]
private void ValidateSchedule()
{
string format = "yyyy-MM-dd hh:mm:ss";
// needs to be string format = "yyyy-MM-dd HH:mm:ss";
}

Issue script & Debug output

DEBUG: 3:08:37 PM - SetAzureAlertProcessingRule begin processing with ParameterSet 'BySimplifiedFormatSuppressionActionRule'.
DEBUG: 3:08:37 PM - using account id '[email protected]'...
VERBOSE: Performing the operation "" on target "scheduleName from resource group: resourceGroupName".
Set-AzAlertProcessingRule: Invalid ScheduleReccurenceStartTime Format

Environment data

Name                           Value
----                           -----
PSVersion                      7.2.2
PSEdition                      Core
GitCommitId                    7.2.2
OS                             Microsoft Windows 10.0.19042
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

ModuleType Version    PreRelease Name                                ExportedCommands
---------- -------    ---------- ----                                ----------------
Script     0.4.0                 Az.AlertsManagement                 {Get-AzAlert, Get-AzAlertObjectHistory, Get-AzAlertProcessingRule, Get-AzSmartGroup…}

Error output

Set-AzAlertProcessingRule: Invalid ScheduleReccurenceStartTime Format

Metadata

Metadata

Assignees

No one assigned

    Labels

    Alerts ManagementbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reported

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions