private Schedule UpdateScheduleHelper(string automationAccountName, AutomationManagement.Models.Schedule schedule, bool?isEnabled, string description) { if (isEnabled.HasValue) { schedule.Properties.IsEnabled = isEnabled.Value; } if (description != null) { schedule.Properties.Description = description; } var scheduleUpdateParameters = new AutomationManagement.Models.ScheduleUpdateParameters { Name = schedule.Name, Properties = new AutomationManagement.Models.ScheduleUpdateProperties { Description = schedule.Properties.Description, IsEnabled = schedule.Properties.IsEnabled } }; this.automationManagementClient.Schedules.Update( automationAccountName, scheduleUpdateParameters); return(this.GetSchedule(automationAccountName, schedule.Name)); }
private Schedule UpdateScheduleHelper(string automationAccountName, AutomationManagement.Models.Schedule schedule, bool?isEnabled, string description) { // StartTime and ExpiryTime need to specified as Utc schedule.StartTime = DateTime.SpecifyKind(schedule.StartTime, DateTimeKind.Utc); schedule.ExpiryTime = DateTime.SpecifyKind(schedule.ExpiryTime, DateTimeKind.Utc); if (isEnabled.HasValue) { schedule.IsEnabled = isEnabled.Value; } if (description != null) { schedule.Description = description; } var scheduleUpdateParameters = new AutomationManagement.Models.ScheduleUpdateParameters { Schedule = schedule }; this.automationManagementClient.Schedules.Update( automationAccountName, scheduleUpdateParameters); var scheduleId = new Guid(schedule.Id); return(this.GetSchedule(automationAccountName, scheduleId)); }
private Schedule UpdateScheduleHelper(string automationAccountName, string scheduleName, bool? isEnabled, string description) { var scheduleUpdateParameters = new AutomationManagement.Models.ScheduleUpdateParameters { Name = scheduleName, Properties = new AutomationManagement.Models.ScheduleUpdateProperties { Description = description, IsEnabled = isEnabled } }; this.automationManagementClient.Schedules.Update( automationAccountName, scheduleUpdateParameters); return this.GetSchedule(automationAccountName, scheduleName); }
private Schedule UpdateScheduleHelper(string automationAccountName, AutomationManagement.Models.Schedule schedule, bool? isEnabled, string description) { // StartTime and ExpiryTime need to specified as Utc schedule.StartTime = DateTime.SpecifyKind(schedule.StartTime, DateTimeKind.Utc); schedule.ExpiryTime = DateTime.SpecifyKind(schedule.ExpiryTime, DateTimeKind.Utc); if (isEnabled.HasValue) { schedule.IsEnabled = isEnabled.Value; } if (description != null) { schedule.Description = description; } var scheduleUpdateParameters = new AutomationManagement.Models.ScheduleUpdateParameters { Schedule = schedule }; this.automationManagementClient.Schedules.Update( automationAccountName, scheduleUpdateParameters); var scheduleId = new Guid(schedule.Id); return this.GetSchedule(automationAccountName, scheduleId); }