MaintenanceWindow Class
- java.
lang. Object - com.
azure. resourcemanager. containerservice. models. MaintenanceWindow
- com.
Implements
public final class MaintenanceWindow
implements JsonSerializable<MaintenanceWindow>
Maintenance window used to configure scheduled auto-upgrade for a Managed Cluster.
Constructor Summary
Constructor | Description |
---|---|
MaintenanceWindow() |
Creates an instance of Maintenance |
Method Summary
Modifier and Type | Method and Description |
---|---|
int |
durationHours()
Get the duration |
static
Maintenance |
fromJson(JsonReader jsonReader)
Reads an instance of Maintenance |
List<Date |
notAllowedDates()
Get the not |
Schedule |
schedule()
Get the schedule property: Recurrence schedule for the maintenance window. |
Local |
startDate()
Get the start |
String |
startTime()
Get the start |
Json |
toJson(JsonWriter jsonWriter) |
String |
utcOffset()
Get the utc |
void |
validate()
Validates the instance. |
Maintenance |
withDurationHours(int durationHours)
Set the duration |
Maintenance |
withNotAllowedDates(List<DateSpan> notAllowedDates)
Set the not |
Maintenance |
withSchedule(Schedule schedule)
Set the schedule property: Recurrence schedule for the maintenance window. |
Maintenance |
withStartDate(LocalDate startDate)
Set the start |
Maintenance |
withStartTime(String startTime)
Set the start |
Maintenance |
withUtcOffset(String utcOffset)
Set the utc |
Methods inherited from java.lang.Object
Constructor Details
MaintenanceWindow
public MaintenanceWindow()
Creates an instance of MaintenanceWindow class.
Method Details
durationHours
public int durationHours()
Get the durationHours property: Length of maintenance window range from 4 to 24 hours.
Returns:
fromJson
public static MaintenanceWindow fromJson(JsonReader jsonReader)
Reads an instance of MaintenanceWindow from the JsonReader.
Parameters:
Returns:
Throws:
notAllowedDates
public List
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:
schedule
public Schedule schedule()
Get the schedule property: Recurrence schedule for the maintenance window.
Returns:
startDate
public LocalDate 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:
startTime
public String 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:
toJson
utcOffset
public String 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:
validate
public void validate()
Validates the instance.
withDurationHours
public MaintenanceWindow withDurationHours(int durationHours)
Set the durationHours property: Length of maintenance window range from 4 to 24 hours.
Parameters:
Returns:
withNotAllowedDates
public MaintenanceWindow withNotAllowedDates(List
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:
Returns:
withSchedule
public MaintenanceWindow withSchedule(Schedule schedule)
Set the schedule property: Recurrence schedule for the maintenance window.
Parameters:
Returns:
withStartDate
public MaintenanceWindow withStartDate(LocalDate startDate)
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:
Returns:
withStartTime
public MaintenanceWindow withStartTime(String startTime)
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:
Returns:
withUtcOffset
public MaintenanceWindow withUtcOffset(String utcOffset)
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:
Returns:
Applies to
Azure SDK for Java