CapacityReservationGroupInner Class
- java.
lang. Object - com.
azure. core. management. ProxyResource - com.
azure. core. management. Resource - com.
azure. resourcemanager. compute. fluent. models. CapacityReservationGroupInner
- com.
- com.
- com.
public final class CapacityReservationGroupInner
extends Resource
Specifies information about the capacity reservation group that the capacity reservations should be assigned to. Currently, a capacity reservation can only be added to a capacity reservation group at creation time. An existing capacity reservation cannot be added or moved to another capacity reservation group.
Constructor Summary
| Constructor | Description |
|---|---|
| CapacityReservationGroupInner() |
Creates an instance of Capacity |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
|
List<Sub |
capacityReservations()
Get the capacity |
|
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. |
|
Reservation |
reservationType()
Get the reservation |
|
Resource |
sharingProfile()
Get the sharing |
|
System |
systemData()
Get the system |
|
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 |
withReservationType(ReservationType reservationType)
Set the reservation |
|
Capacity |
withSharingProfile(ResourceSharingProfile sharingProfile)
Set the sharing |
|
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
CapacityReservationGroupInner
public CapacityReservationGroupInner()
Creates an instance of CapacityReservationGroupInner class.
Method Details
capacityReservations
public List<SubResourceReadOnly> capacityReservations()
Get the capacityReservations property: A list of all capacity reservation resource ids that belong to capacity reservation group.
Returns:
fromJson
public static CapacityReservationGroupInner fromJson(JsonReader jsonReader)
Reads an instance of CapacityReservationGroupInner from the JsonReader.
Parameters:
Returns:
Throws:
id
public String id()
Get the id property: Fully qualified resource Id for the resource.
Overrides:
CapacityReservationGroupInner.id()Returns:
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:
name
public String name()
Get the name property: The name of the resource.
Overrides:
CapacityReservationGroupInner.name()Returns:
reservationType
public ReservationType reservationType()
Get the reservationType property: Indicates the type of capacity reservation. Allowed values are 'Block' for block capacity reservations that enable a VM to consume capacity only from this capacity block when it is associated using a capacity reservation group, 'Targeted' for reservations that enable a VM to consume capacity from an explicitly associated capacity reservation group and fall back to the publicly available capacity if the reservation is full, and 'Open' for reservations that a VM consumes when it is eligible from an implicitly associated capacity reservation group with the matching VM size and zone without associating that capacity reservation group and fall back to the publicly available capacity if the reservation is full. The reservation type is immutable and cannot be changed after the capacity reservation group is created.
Returns:
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:
systemData
public SystemData systemData()
Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
Returns:
toJson
public JsonWriter toJson(JsonWriter jsonWriter)
Overrides:
CapacityReservationGroupInner.toJson(JsonWriter jsonWriter)Parameters:
Throws:
type
public String type()
Get the type property: The type of the resource.
Overrides:
CapacityReservationGroupInner.type()Returns:
validate
public void validate()
Validates the instance.
virtualMachinesAssociated
public List<SubResourceReadOnly> virtualMachinesAssociated()
Get the virtualMachinesAssociated property: A list of references to all virtual machines associated to the capacity reservation group.
Returns:
withLocation
public CapacityReservationGroupInner withLocation(String location)
Overrides:
CapacityReservationGroupInner.withLocation(String location)Parameters:
withReservationType
public CapacityReservationGroupInner withReservationType(ReservationType reservationType)
Set the reservationType property: Indicates the type of capacity reservation. Allowed values are 'Block' for block capacity reservations that enable a VM to consume capacity only from this capacity block when it is associated using a capacity reservation group, 'Targeted' for reservations that enable a VM to consume capacity from an explicitly associated capacity reservation group and fall back to the publicly available capacity if the reservation is full, and 'Open' for reservations that a VM consumes when it is eligible from an implicitly associated capacity reservation group with the matching VM size and zone without associating that capacity reservation group and fall back to the publicly available capacity if the reservation is full. The reservation type is immutable and cannot be changed after the capacity reservation group is created.
Parameters:
Returns:
withSharingProfile
public CapacityReservationGroupInner 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:
Returns:
withTags
public CapacityReservationGroupInner withTags(Map<String,String> tags)
Overrides:
CapacityReservationGroupInner.withTags(Map<String,String> tags)Parameters:
withZones
public CapacityReservationGroupInner 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: