Class MaintenanceWindow
java.lang.Object
com.azure.resourcemanager.containerservice.models.MaintenanceWindow
Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the durationHours property: Length of maintenance window range from 4 to 24 hours.Get the notAllowedDates property: Date ranges on which upgrade is not allowed.schedule()Get the schedule property: Recurrence schedule for the maintenance window.Get the startDate property: The date the maintenance window activates.Get the startTime property: The start time of the maintenance window.Get the utcOffset property: The UTC offset in format +/-HH:mm.voidvalidate()Validates the instance.withDurationHours(int durationHours) Set the durationHours property: Length of maintenance window range from 4 to 24 hours.withNotAllowedDates(List<DateSpan> notAllowedDates) Set the notAllowedDates property: Date ranges on which upgrade is not allowed.withSchedule(Schedule schedule) Set the schedule property: Recurrence schedule for the maintenance window.withStartDate(LocalDate startDate) Set the startDate property: The date the maintenance window activates.withStartTime(String startTime) Set the startTime property: The start time of the maintenance window.withUtcOffset(String utcOffset) Set the utcOffset property: The UTC offset in format +/-HH:mm.
-
Constructor Details
-
MaintenanceWindow
public MaintenanceWindow()Creates an instance of MaintenanceWindow class.
-
-
Method Details
-
schedule
Get the schedule property: Recurrence schedule for the maintenance window.- Returns:
- the schedule value.
-
withSchedule
Set the schedule property: Recurrence schedule for the maintenance window.- Parameters:
schedule- the schedule value to set.- Returns:
- the MaintenanceWindow object itself.
-
durationHours
public int durationHours()Get the durationHours property: Length of maintenance window range from 4 to 24 hours.- Returns:
- the durationHours value.
-
withDurationHours
Set the durationHours property: Length of maintenance window range from 4 to 24 hours.- Parameters:
durationHours- the durationHours value to set.- Returns:
- the MaintenanceWindow object itself.
-
utcOffset
Get the utcOffset property: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.- Returns:
- the utcOffset value.
-
withUtcOffset
Set the utcOffset property: The UTC offset in format +/-HH:mm. For example, '+05:30' for IST and '-07:00' for PST. If not specified, the default is '+00:00'.- Parameters:
utcOffset- the utcOffset value to set.- Returns:
- the MaintenanceWindow object itself.
-
startDate
Get the startDate property: The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away.- Returns:
- the startDate value.
-
withStartDate
Set the startDate property: The date the maintenance window activates. If the current date is before this date, the maintenance window is inactive and will not be used for upgrades. If not specified, the maintenance window will be active right away.- Parameters:
startDate- the startDate value to set.- Returns:
- the MaintenanceWindow object itself.
-
startTime
Get the startTime property: The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'.- Returns:
- the startTime value.
-
withStartTime
Set the startTime property: The start time of the maintenance window. Accepted values are from '00:00' to '23:59'. 'utcOffset' applies to this field. For example: '02:00' with 'utcOffset: +02:00' means UTC time '00:00'.- Parameters:
startTime- the startTime value to set.- Returns:
- the MaintenanceWindow object itself.
-
notAllowedDates
Get the notAllowedDates property: Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time.- Returns:
- the notAllowedDates value.
-
withNotAllowedDates
Set the notAllowedDates property: Date ranges on which upgrade is not allowed. 'utcOffset' applies to this field. For example, with 'utcOffset: +02:00' and 'dateSpan' being '2022-12-23' to '2023-01-03', maintenance will be blocked from '2022-12-22 22:00' to '2023-01-03 22:00' in UTC time.- Parameters:
notAllowedDates- the notAllowedDates value to set.- Returns:
- the MaintenanceWindow object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-