CapacityReservationsOperations Class

CapacityReservationsOperations async operations.

You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute.

Inheritance
builtins.object
CapacityReservationsOperations

Constructor

CapacityReservationsOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

models

Alias to model classes used in this operation group.

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: azure.mgmt.compute.v2021_07_01.models._models_py3.CapacityReservation, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2021_07_01.models._models_py3.CapacityReservation]

Parameters

resource_group_name
str
Required

The name of the resource group.

capacity_reservation_group_name
str
Required

The name of the capacity reservation group.

capacity_reservation_name
str
Required

The name of the capacity reservation.

parameters
CapacityReservation
Required

Parameters supplied to the Create capacity reservation.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of AsyncLROPoller that returns either CapacityReservation or the result of cls(response)

Return type

Exceptions

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) -> azure.core.polling._async_poller.AsyncLROPoller[None]

Parameters

resource_group_name
str
Required

The name of the resource group.

capacity_reservation_group_name
str
Required

The name of the capacity reservation group.

capacity_reservation_name
str
Required

The name of the capacity reservation.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of AsyncLROPoller that returns either None or the result of cls(response)

Return type

Exceptions

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: azure.mgmt.compute.v2021_07_01.models._models_py3.CapacityReservationUpdate, **kwargs: Any) -> azure.core.polling._async_poller.AsyncLROPoller[azure.mgmt.compute.v2021_07_01.models._models_py3.CapacityReservation]

Parameters

resource_group_name
str
Required

The name of the resource group.

capacity_reservation_group_name
str
Required

The name of the capacity reservation group.

capacity_reservation_name
str
Required

The name of the capacity reservation.

parameters
CapacityReservationUpdate
Required

Parameters supplied to the Update capacity reservation operation.

cls
callable

A custom type or function that will be passed the direct response

continuation_token
str

A continuation token to restart a poller from a saved state.

polling
bool or AsyncPollingMethod

By default, your polling method will be AsyncARMPolling. Pass in False for this operation to not poll, or pass in your own initialized polling object for a personal polling strategy.

polling_interval
int

Default waiting time between two polls for LRO operations if no Retry-After header is present.

Returns

An instance of AsyncLROPoller that returns either CapacityReservation or the result of cls(response)

Return type

Exceptions

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: Optional[Union[str, azure.mgmt.compute.v2021_07_01.models._compute_management_client_enums.CapacityReservationInstanceViewTypes]] = None, **kwargs: Any) -> azure.mgmt.compute.v2021_07_01.models._models_py3.CapacityReservation

Parameters

resource_group_name
str
Required

The name of the resource group.

capacity_reservation_group_name
str
Required

The name of the capacity reservation group.

capacity_reservation_name
str
Required

The name of the capacity reservation.

expand
str or CapacityReservationInstanceViewTypes
default value: None

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.

cls
callable

A custom type or function that will be passed the direct response

Returns

CapacityReservation, or the result of cls(response)

Return type

Exceptions

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[azure.mgmt.compute.v2021_07_01.models._models_py3.CapacityReservationListResult]

Parameters

resource_group_name
str
Required

The name of the resource group.

capacity_reservation_group_name
str
Required

The name of the capacity reservation group.

cls
callable

A custom type or function that will be passed the direct response

Returns

An iterator like instance of either CapacityReservationListResult or the result of cls(response)

Return type

Exceptions

Attributes

models

models = <module 'azure.mgmt.compute.v2021_07_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\mgmt\\compute\\v2021_07_01\\models\\__init__.py'>