CapacityReservationsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:capacity_reservations> attribute.
Constructor
CapacityReservationsOperations(*args, **kwargs)
Methods
| begin_create_or_update |
The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details. |
| begin_delete |
The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details. Note: Block capacity reservations cannot be deleted after it has been successfully allocated until the schedule end time. |
| begin_update |
The operation to update a capacity reservation. |
| get |
The operation that retrieves information about the capacity reservation. |
| list_by_capacity_reservation_group |
Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations. |
begin_create_or_update
The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details.
begin_create_or_update(resource_group_name: str, capacity_reservation_group_name: str, capacity_reservation_name: str, parameters: _models.CapacityReservation, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.CapacityReservation]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
capacity_reservation_group_name
Required
|
The name of the capacity reservation group. Required. |
|
capacity_reservation_name
Required
|
The name of the capacity reservation. Required. |
|
parameters
Required
|
Parameters supplied to the Create capacity reservation. Is one of the following types: CapacityReservation, JSON, IO[bytes] Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns CapacityReservation. The CapacityReservation is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
begin_delete
The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details. Note: Block capacity reservations cannot be deleted after it has been successfully allocated until the schedule end time.
begin_delete(resource_group_name: str, capacity_reservation_group_name: str, capacity_reservation_name: str, **kwargs: Any) -> LROPoller[None]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
capacity_reservation_group_name
Required
|
The name of the capacity reservation group. Required. |
|
capacity_reservation_name
Required
|
The name of the capacity reservation. Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns None |
Exceptions
| Type | Description |
|---|---|
begin_update
The operation to update a capacity reservation.
begin_update(resource_group_name: str, capacity_reservation_group_name: str, capacity_reservation_name: str, parameters: _models.CapacityReservationUpdate, *, content_type: str = 'application/json', **kwargs: Any) -> LROPoller[_models.CapacityReservation]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
capacity_reservation_group_name
Required
|
The name of the capacity reservation group. Required. |
|
capacity_reservation_name
Required
|
The name of the capacity reservation. Required. |
|
parameters
Required
|
Parameters supplied to the Update capacity reservation operation. Is one of the following types: CapacityReservationUpdate, JSON, IO[bytes] Required. |
Returns
| Type | Description |
|---|---|
|
An instance of LROPoller that returns CapacityReservation. The CapacityReservation is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
get
The operation that retrieves information about the capacity reservation.
get(resource_group_name: str, capacity_reservation_group_name: str, capacity_reservation_name: str, *, expand: str | CapacityReservationInstanceViewTypes | None = None, **kwargs: Any) -> CapacityReservation
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
capacity_reservation_group_name
Required
|
The name of the capacity reservation group. Required. |
|
capacity_reservation_name
Required
|
The name of the capacity reservation. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
expand
|
The expand expression to apply on the operation. 'InstanceView' retrieves a snapshot of the runtime properties of the capacity reservation that is managed by the platform and can change outside of control plane operations. "instanceView" Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
CapacityReservation. The CapacityReservation is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
list_by_capacity_reservation_group
Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations.
list_by_capacity_reservation_group(resource_group_name: str, capacity_reservation_group_name: str, *, expand: str | ExpandTypesForGetCapacityReservationGroups | None = None, **kwargs: Any) -> ItemPaged[CapacityReservation]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
capacity_reservation_group_name
Required
|
The name of the capacity reservation group. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
expand
|
The expand expression to apply on the operation. Based on the expand param(s) specified we return Virtual Machine or ScaleSet VM Instance or both resource Ids which are associated to capacity reservation group in the response. Known values are: "virtualMachineScaleSetVMs/$ref" and "virtualMachines/$ref". Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of CapacityReservation |
Exceptions
| Type | Description |
|---|---|