ScheduleProfile Class
- java.
lang. Object - com.
azure. resourcemanager. compute. models. ScheduleProfile
- com.
Implements
public final class ScheduleProfile
implements JsonSerializable<ScheduleProfile>
Defines the schedule for Block and Future capacity reservations. Specifies the schedule during which capacity reservation is active and VM or VMSS resource can be allocated using reservation. For Block capacity reservations, the scheduleProfile, start, and end fields are immutable after creation. Please refer to https://aka.ms/blockcapacityreservation for more details. Minimum API version for Block capacity reservations: 2025-04-01. Future capacity reservations must use this property with only a start time, which can be changed until the ‘modifiableUntil’ time. Please refer to https://aka.ms/futurecapacityreservation for more details. Minimum API version for Future capacity reservations: 2026-04-01.
Constructor Summary
| Constructor | Description |
|---|---|
| ScheduleProfile() |
Creates an instance of Schedule |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| String |
end()
Get the end property: The required end date for Block capacity reservations. |
|
static
Schedule |
fromJson(JsonReader jsonReader)
Reads an instance of Schedule |
| Integer |
minimumCommitmentDays()
Get the minimum |
|
Offset |
modifiableUntil()
Get the modifiable |
| String |
start()
Get the start property: The required start date for Block or Future capacity reservations. |
|
Json |
toJson(JsonWriter jsonWriter) |
| void |
validate()
Validates the instance. |
|
Schedule |
withEnd(String end)
Set the end property: The required end date for Block capacity reservations. |
|
Schedule |
withMinimumCommitmentDays(Integer minimumCommitmentDays)
Set the minimum |
|
Schedule |
withStart(String start)
Set the start property: The required start date for Block or Future capacity reservations. |
Methods inherited from java.lang.Object
Constructor Details
ScheduleProfile
public ScheduleProfile()
Creates an instance of ScheduleProfile class.
Method Details
end
public String end()
Get the end property: The required end date for Block capacity reservations. Must be after the start date, with a duration of either 1–14 whole days or 3–26 whole weeks. Example: 2025-06-28.
Returns:
fromJson
public static ScheduleProfile fromJson(JsonReader jsonReader)
Reads an instance of ScheduleProfile from the JsonReader.
Parameters:
Returns:
Throws:
minimumCommitmentDays
public Integer minimumCommitmentDays()
Get the minimumCommitmentDays property: The minimum number of days that must pass after the start date before a Future capacity reservation can be updated or deleted once it has been committed. Will be populated with a default value if not provided.
Returns:
modifiableUntil
public OffsetDateTime modifiableUntil()
Get the modifiableUntil property: The date/time until which a Future capacity reservation can be updated or deleted. Read-only.
Returns:
start
public String start()
Get the start property: The required start date for Block or Future capacity reservations. Block capacity reservations: Must be today or within 56 days in the future. For same-day scheduling, requests must be submitted before 11:30 AM UTC. Future capacity reservations: Must be at least 7 days in the future, and maximum 6 months in the future. Minimum API version for Future capacity reservations: 2026-04-01. Example: 2025-06-27, applicable for both Block and Future capacity reservations.
Returns:
toJson
validate
public void validate()
Validates the instance.
withEnd
public ScheduleProfile withEnd(String end)
Set the end property: The required end date for Block capacity reservations. Must be after the start date, with a duration of either 1–14 whole days or 3–26 whole weeks. Example: 2025-06-28.
Parameters:
Returns:
withMinimumCommitmentDays
public ScheduleProfile withMinimumCommitmentDays(Integer minimumCommitmentDays)
Set the minimumCommitmentDays property: The minimum number of days that must pass after the start date before a Future capacity reservation can be updated or deleted once it has been committed. Will be populated with a default value if not provided.
Parameters:
Returns:
withStart
public ScheduleProfile withStart(String start)
Set the start property: The required start date for Block or Future capacity reservations. Block capacity reservations: Must be today or within 56 days in the future. For same-day scheduling, requests must be submitted before 11:30 AM UTC. Future capacity reservations: Must be at least 7 days in the future, and maximum 6 months in the future. Minimum API version for Future capacity reservations: 2026-04-01. Example: 2025-06-27, applicable for both Block and Future capacity reservations.
Parameters:
Returns: