Class CapacityReservationInner

java.lang.Object
com.azure.core.management.ProxyResource
com.azure.core.management.Resource
com.azure.resourcemanager.compute.fluent.models.CapacityReservationInner
All Implemented Interfaces:
com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>

public final class CapacityReservationInner extends com.azure.core.management.Resource
Specifies information about the capacity reservation.
  • Constructor Details

    • CapacityReservationInner

      public CapacityReservationInner()
      Creates an instance of CapacityReservationInner class.
  • Method Details

    • 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. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.
      Returns:
      the sku value.
    • 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. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (https://docs.microsoft.com/rest/api/compute/resourceskus/list) for supported values.
      Parameters:
      sku - the sku value to set.
      Returns:
      the CapacityReservationInner object itself.
    • zones

      public List<String> zones()
      Get the zones property: Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.
      Returns:
      the zones value.
    • withZones

      public CapacityReservationInner withZones(List<String> zones)
      Set the zones property: Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone.
      Parameters:
      zones - the zones value to set.
      Returns:
      the CapacityReservationInner object itself.
    • type

      public String type()
      Get the type property: The type of the resource.
      Overrides:
      type in class com.azure.core.management.ProxyResource
      Returns:
      the type value.
    • name

      public String name()
      Get the name property: The name of the resource.
      Overrides:
      name in class com.azure.core.management.ProxyResource
      Returns:
      the name value.
    • id

      public String id()
      Get the id property: Fully qualified resource Id for the resource.
      Overrides:
      id in class com.azure.core.management.ProxyResource
      Returns:
      the id value.
    • withLocation

      public CapacityReservationInner withLocation(String location)
      Overrides:
      withLocation in class com.azure.core.management.Resource
    • withTags

      public CapacityReservationInner withTags(Map<String,String> tags)
      Overrides:
      withTags in class com.azure.core.management.Resource
    • 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:
      the reservationId value.
    • 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:
      the platformFaultDomainCount value.
    • 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:
      the virtualMachinesAssociated value.
    • provisioningTime

      public OffsetDateTime provisioningTime()
      Get the provisioningTime property: The date time when the capacity reservation was last updated.
      Returns:
      the provisioningTime value.
    • provisioningState

      public String provisioningState()
      Get the provisioningState property: The provisioning state, which only appears in the response.
      Returns:
      the provisioningState value.
    • instanceView

      public CapacityReservationInstanceView instanceView()
      Get the instanceView property: The Capacity reservation instance view.
      Returns:
      the instanceView value.
    • 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:
      the timeCreated value.
    • validate

      public void validate()
      Validates the instance.
      Throws:
      IllegalArgumentException - thrown if the instance is not valid.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<com.azure.core.management.ProxyResource>
      Overrides:
      toJson in class com.azure.core.management.Resource
      Throws:
      IOException
    • fromJson

      public static CapacityReservationInner fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of CapacityReservationInner from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of CapacityReservationInner if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the CapacityReservationInner.