CapacityReservationsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:capacity_reservations> attribute.
- Inheritance
-
builtins.objectCapacityReservationsOperations
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. |
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.
async 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) -> AsyncLROPoller[_models.CapacityReservation]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. 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 either a CapacityReservation type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either CapacityReservation or the result of cls(response) |
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.
async begin_delete(resource_group_name: str, capacity_reservation_group_name: str, capacity_reservation_name: str, **kwargs: Any) -> AsyncLROPoller[None]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. 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 AsyncLROPoller that returns either None or the result of cls(response) |
Exceptions
Type | Description |
---|---|
begin_update
The operation to update a capacity reservation.
async 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) -> AsyncLROPoller[_models.CapacityReservation]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. 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 either a CapacityReservationUpdate type or a IO[bytes] type. Required. |
Returns
Type | Description |
---|---|
An instance of AsyncLROPoller that returns either CapacityReservation or the result of cls(response) |
Exceptions
Type | Description |
---|---|
get
The operation that retrieves information about the capacity reservation.
async 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. 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. |
Returns
Type | Description |
---|---|
CapacityReservation or the result of cls(response) |
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, **kwargs: Any) -> AsyncIterable[CapacityReservation]
Parameters
Name | Description |
---|---|
resource_group_name
Required
|
The name of the resource group. Required. |
capacity_reservation_group_name
Required
|
The name of the capacity reservation group. Required. |
Returns
Type | Description |
---|---|
An iterator like instance of either CapacityReservation or the result of cls(response) |
Exceptions
Type | Description |
---|---|
Attributes
models
models = <module 'azure.mgmt.compute.v2023_03_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\compute\\v2023_03_01\\models\\__init__.py'>
Azure SDK for Python