Class CapacityReservationUpdate
- java.lang.Object
-
- com.azure.resourcemanager.compute.models.UpdateResource
-
- com.azure.resourcemanager.compute.models.CapacityReservationUpdate
-
public final class CapacityReservationUpdate extends UpdateResource
Specifies information about the capacity reservation. Only tags and sku.capacity can be updated.
-
-
Constructor Summary
Constructors Constructor Description CapacityReservationUpdate()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CapacityReservationInstanceViewinstanceView()Get the instanceView property: The Capacity reservation instance view.StringprovisioningState()Get the provisioningState property: The provisioning state, which only appears in the response.OffsetDateTimeprovisioningTime()Get the provisioningTime property: The date time when the capacity reservation was last updated.StringreservationId()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.Skusku()Get the sku property: SKU of the resource for which capacity needs be reserved.OffsetDateTimetimeCreated()Get the timeCreated property: Specifies the time at which the Capacity Reservation resource was created.<br><br>Minimum api-version: 2021-11-01.voidvalidate()Validates the instance.List<SubResourceReadOnly>virtualMachinesAssociated()Get the virtualMachinesAssociated property: A list of all virtual machine resource ids that are associated with the capacity reservation.CapacityReservationUpdatewithSku(Sku sku)Set the sku property: SKU of the resource for which capacity needs be reserved.CapacityReservationUpdatewithTags(Map<String,String> tags)Set the tags property: Resource tags.-
Methods inherited from class com.azure.resourcemanager.compute.models.UpdateResource
tags
-
-
-
-
Method Detail
-
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 CapacityReservationUpdate 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 CapacityReservationUpdate object itself.
-
withTags
public CapacityReservationUpdate withTags(Map<String,String> tags)
Set the tags property: Resource tags.- Overrides:
withTagsin classUpdateResource- Parameters:
tags- the tags value to set.- Returns:
- the UpdateResource object itself.
-
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.
-
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.<br><br>Minimum api-version: 2021-11-01.- Returns:
- the timeCreated value.
-
validate
public void validate()
Validates the instance.- Overrides:
validatein classUpdateResource- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
-