CapacityReservationInner Class
- java.
lang. Object - com.
azure. core. management. ProxyResource - com.
azure. core. management. Resource - com.
azure. resourcemanager. compute. fluent. models. CapacityReservationInner
- com.
- com.
- com.
public final class CapacityReservationInner
extends Resource
Specifies information about the capacity reservation.
Constructor Summary
| Constructor | Description |
|---|---|
| CapacityReservationInner() |
Creates an instance of Capacity |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
static
Capacity |
fromJson(JsonReader jsonReader)
Reads an instance of Capacity |
| String |
id()
Get the id property: Fully qualified resource Id for the resource. |
|
Capacity |
instanceView()
Get the instance |
| String |
name()
Get the name property: The name of the resource. |
| Integer |
platformFaultDomainCount()
Get the platform |
| String |
provisioningState()
Get the provisioning |
|
Offset |
provisioningTime()
Get the provisioning |
| String |
reservationId()
Get the reservation |
|
Schedule |
scheduleProfile()
Get the schedule |
| Sku |
sku()
Get the sku property: SKU of the resource for which capacity needs be reserved. |
|
System |
systemData()
Get the system |
|
Offset |
timeCreated()
Get the time |
|
Json |
toJson(JsonWriter jsonWriter) |
| String |
type()
Get the type property: The type of the resource. |
| void |
validate()
Validates the instance. |
|
List<Sub |
virtualMachinesAssociated()
Get the virtual |
|
Capacity |
withLocation(String location) |
|
Capacity |
withScheduleProfile(ScheduleProfile scheduleProfile)
Set the schedule |
|
Capacity |
withSku(Sku sku)
Set the sku property: SKU of the resource for which capacity needs be reserved. |
|
Capacity |
withTags(Map<String,String> tags) |
|
Capacity |
withZones(List<String> zones)
Set the zones property: The availability zones. |
| List<String> |
zones()
Get the zones property: The availability zones. |
Methods inherited from ProxyResource
Methods inherited from Resource
Methods inherited from java.lang.Object
Constructor Details
CapacityReservationInner
public CapacityReservationInner()
Creates an instance of CapacityReservationInner class.
Method Details
fromJson
public static CapacityReservationInner fromJson(JsonReader jsonReader)
Reads an instance of CapacityReservationInner from the JsonReader.
Parameters:
Returns:
Throws:
id
public String id()
Get the id property: Fully qualified resource Id for the resource.
Overrides:
CapacityReservationInner.id()Returns:
instanceView
public CapacityReservationInstanceView instanceView()
Get the instanceView property: The Capacity reservation instance view.
Returns:
name
public String name()
Get the name property: The name of the resource.
Overrides:
CapacityReservationInner.name()Returns:
platformFaultDomainCount
public Integer platformFaultDomainCount()
Get the platformFaultDomainCount property: Specifies the value of fault domain count that Capacity Reservation supports for requested VM size. **Note:** The fault domain count specified for a resource (like virtual machines scale set) must be less than or equal to this value if it deploys using capacity reservation. Minimum api-version: 2022-08-01.
Returns:
provisioningState
public String provisioningState()
Get the provisioningState property: The provisioning state, which only appears in the response.
Returns:
provisioningTime
public OffsetDateTime provisioningTime()
Get the provisioningTime property: The date time when the capacity reservation was last updated.
Returns:
reservationId
public String reservationId()
Get the reservationId property: A unique id generated and assigned to the capacity reservation by the platform which does not change throughout the lifetime of the resource.
Returns:
scheduleProfile
public ScheduleProfile scheduleProfile()
Get the scheduleProfile property: 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.
Returns:
sku
public Sku sku()
Get the sku property: SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. For Block capacity reservations, sku.capacity can only accept values 1, 2, 4, 8, 16, 32, 64. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. When 'CapacityReservationSupported' is true, the SKU capability also specifies the 'SupportedCapacityReservationTypes', which lists the types of capacity reservations (such as Targeted or Block) that the SKU supports. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.
Returns:
systemData
public SystemData systemData()
Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
Returns:
timeCreated
public OffsetDateTime timeCreated()
Get the timeCreated property: Specifies the time at which the Capacity Reservation resource was created. Minimum api-version: 2021-11-01.
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
CapacityReservationInner.toJson(JsonWriter jsonWriter)Parameters:
Throws:
type
public String type()
Get the type property: The type of the resource.
Overrides:
CapacityReservationInner.type()Returns:
validate
public void validate()
Validates the instance.
virtualMachinesAssociated
public List<SubResourceReadOnly> virtualMachinesAssociated()
Get the virtualMachinesAssociated property: A list of all virtual machine resource ids that are associated with the capacity reservation.
Returns:
withLocation
public CapacityReservationInner withLocation(String location)
Overrides:
CapacityReservationInner.withLocation(String location)Parameters:
withScheduleProfile
public CapacityReservationInner withScheduleProfile(ScheduleProfile scheduleProfile)
Set the scheduleProfile property: 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.
Parameters:
Returns:
withSku
public CapacityReservationInner withSku(Sku sku)
Set the sku property: SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. For Block capacity reservations, sku.capacity can only accept values 1, 2, 4, 8, 16, 32, 64. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. When 'CapacityReservationSupported' is true, the SKU capability also specifies the 'SupportedCapacityReservationTypes', which lists the types of capacity reservations (such as Targeted or Block) that the SKU supports. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.
Parameters:
Returns:
withTags
public CapacityReservationInner withTags(Map<String,String> tags)
Overrides:
CapacityReservationInner.withTags(Map<String,String> tags)Parameters:
withZones
public CapacityReservationInner withZones(List<String> zones)
Set the zones property: The availability zones.
Parameters:
Returns:
zones
public List<String> zones()
Get the zones property: The availability zones.
Returns: