ScheduleProfile Class

  • java.lang.Object
    • com.azure.resourcemanager.compute.models.ScheduleProfile

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 ScheduleProfile class.

Method Summary

Modifier and Type Method and Description
String end()

Get the end property: The required end date for Block capacity reservations.

static ScheduleProfile fromJson(JsonReader jsonReader)

Reads an instance of ScheduleProfile from the JsonReader.

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.

OffsetDateTime modifiableUntil()

Get the modifiableUntil property: The date/time until which a Future capacity reservation can be updated or deleted.

String start()

Get the start property: The required start date for Block or Future capacity reservations.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ScheduleProfile withEnd(String end)

Set the end property: The required end date for Block capacity reservations.

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.

ScheduleProfile 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:

the end value.

fromJson

public static ScheduleProfile fromJson(JsonReader jsonReader)

Reads an instance of ScheduleProfile from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ScheduleProfile if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If an error occurs while reading the ScheduleProfile.

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:

the minimumCommitmentDays value.

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:

the modifiableUntil value.

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:

the start value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

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:

end - the end value to set.

Returns:

the ScheduleProfile object itself.

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:

minimumCommitmentDays - the minimumCommitmentDays value to set.

Returns:

the ScheduleProfile object itself.

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:

start - the start value to set.

Returns:

the ScheduleProfile object itself.

Applies to