Class CapacityReservationGroupUpdate

java.lang.Object
com.azure.resourcemanager.compute.models.UpdateResource
com.azure.resourcemanager.compute.models.CapacityReservationGroupUpdate
All Implemented Interfaces:
com.azure.json.JsonSerializable<UpdateResource>

public final class CapacityReservationGroupUpdate extends UpdateResource
Specifies information about the capacity reservation group. Only tags can be updated.
  • Constructor Details

    • CapacityReservationGroupUpdate

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

    • withTags

      Set the tags property: Resource tags.
      Overrides:
      withTags in class UpdateResource
      Parameters:
      tags - the tags value to set.
      Returns:
      the UpdateResource object itself.
    • capacityReservations

      public List<SubResourceReadOnly> capacityReservations()
      Get the capacityReservations property: A list of all capacity reservation resource ids that belong to capacity reservation group.
      Returns:
      the capacityReservations value.
    • virtualMachinesAssociated

      public List<SubResourceReadOnly> virtualMachinesAssociated()
      Get the virtualMachinesAssociated property: A list of references to all virtual machines associated to the capacity reservation group.
      Returns:
      the virtualMachinesAssociated value.
    • instanceView

      public CapacityReservationGroupInstanceView instanceView()
      Get the instanceView property: The capacity reservation group instance view which has the list of instance views for all the capacity reservations that belong to the capacity reservation group.
      Returns:
      the instanceView value.
    • sharingProfile

      public ResourceSharingProfile sharingProfile()
      Get the sharingProfile property: Specifies the settings to enable sharing across subscriptions for the capacity reservation group resource. The capacity reservation group resource can generally be shared across subscriptions belonging to a single Azure AAD tenant or across AAD tenants if there is a trust relationship established between the tenants. Block capacity reservation does not support sharing across subscriptions. **Note:** Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details.
      Returns:
      the sharingProfile value.
    • withSharingProfile

      public CapacityReservationGroupUpdate withSharingProfile(ResourceSharingProfile sharingProfile)
      Set the sharingProfile property: Specifies the settings to enable sharing across subscriptions for the capacity reservation group resource. The capacity reservation group resource can generally be shared across subscriptions belonging to a single Azure AAD tenant or across AAD tenants if there is a trust relationship established between the tenants. Block capacity reservation does not support sharing across subscriptions. **Note:** Minimum api-version: 2023-09-01. Please refer to https://aka.ms/computereservationsharing for more details.
      Parameters:
      sharingProfile - the sharingProfile value to set.
      Returns:
      the CapacityReservationGroupUpdate object itself.
    • reservationType

      public ReservationType reservationType()
      Get the reservationType property: Indicates the type of capacity reservation. Allowed values are 'Block' for block capacity reservations and 'Targeted' for reservations that enable a VM to consume a specific capacity reservation when a capacity reservation group is provided. The reservation type is immutable and cannot be changed after it is assigned.
      Returns:
      the reservationType value.
    • withReservationType

      public CapacityReservationGroupUpdate withReservationType(ReservationType reservationType)
      Set the reservationType property: Indicates the type of capacity reservation. Allowed values are 'Block' for block capacity reservations and 'Targeted' for reservations that enable a VM to consume a specific capacity reservation when a capacity reservation group is provided. The reservation type is immutable and cannot be changed after it is assigned.
      Parameters:
      reservationType - the reservationType value to set.
      Returns:
      the CapacityReservationGroupUpdate object itself.
    • validate

      public void validate()
      Validates the instance.
      Overrides:
      validate in class UpdateResource
      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<UpdateResource>
      Overrides:
      toJson in class UpdateResource
      Throws:
      IOException
    • fromJson

      public static CapacityReservationGroupUpdate fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of CapacityReservationGroupUpdate from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of CapacityReservationGroupUpdate 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 CapacityReservationGroupUpdate.