Freigeben über


ScheduleProfile Class

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

Implements

public final class ScheduleProfile
implements JsonSerializable<ScheduleProfile>

Defines the schedule for Block-type capacity reservations. Specifies the schedule during which capacity reservation is active and VM or VMSS resource can be allocated using reservation. This property is required and only supported when the capacity reservation group type is 'Block'. The scheduleProfile, start, and end fields are immutable after creation. Minimum API version: 2025-04-01. Please refer to https://aka.ms/blockcapacityreservation for more details.

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.

String start()

Get the start property: The required start date for block 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 withStart(String start)

Set the start property: The required start date for block 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.

start

public String start()

Get the start property: The required start date for 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. Example: 2025-06-27.

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.

withStart

public ScheduleProfile withStart(String start)

Set the start property: The required start date for 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. Example: 2025-06-27.

Parameters:

start - the start value to set.

Returns:

the ScheduleProfile object itself.

Applies to