CapacityReservationGroupsOperations Class

CapacityReservationGroupsOperations 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
CapacityReservationGroupsOperations

Constructor

CapacityReservationGroupsOperations(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

create_or_update

The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details.

delete

The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.

get

The operation that retrieves information about a capacity reservation group.

list_by_resource_group

Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups.

list_by_subscription

Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups.

update

The operation to update a capacity reservation group. When updating a capacity reservation group, only tags may be modified.

create_or_update

The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags may be modified. Please refer to https://aka.ms/CapacityReservation for more details.

create_or_update(resource_group_name: str, capacity_reservation_group_name: str, parameters: _models.CapacityReservationGroup, **kwargs: Any) -> _models.CapacityReservationGroup

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.

parameters
CapacityReservationGroup
Required

Parameters supplied to the Create capacity reservation Group.

cls
callable

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

Returns

CapacityReservationGroup, or the result of cls(response)

Return type

Exceptions

delete

The operation to delete a capacity reservation group. This operation is allowed only if all the associated resources are disassociated from the reservation group and all capacity reservations under the reservation group have also been deleted. Please refer to https://aka.ms/CapacityReservation for more details.

delete(resource_group_name: str, capacity_reservation_group_name: str, **kwargs: Any) -> 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.

cls
callable

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

Returns

None, or the result of cls(response)

Return type

Exceptions

get

The operation that retrieves information about a capacity reservation group.

get(resource_group_name: str, capacity_reservation_group_name: str, expand: Optional[Union[str, _models.CapacityReservationGroupInstanceViewTypes]] = None, **kwargs: Any) -> _models.CapacityReservationGroup

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.

expand
str or CapacityReservationGroupInstanceViewTypes
default value: None

The expand expression to apply on the operation. 'InstanceView' will retrieve the list of instance views of the capacity reservations under the capacity reservation group which is a snapshot of the runtime properties of a 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

CapacityReservationGroup, or the result of cls(response)

Return type

Exceptions

list_by_resource_group

Lists all of the capacity reservation groups in the specified resource group. Use the nextLink property in the response to get the next page of capacity reservation groups.

list_by_resource_group(resource_group_name: str, expand: Optional[Union[str, _models.ExpandTypesForGetCapacityReservationGroups]] = None, **kwargs: Any) -> Iterable[_models.CapacityReservationGroupListResult]

Parameters

resource_group_name
str
Required

The name of the resource group.

expand
str or ExpandTypesForGetCapacityReservationGroups
default value: None

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.

cls
callable

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

Returns

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

Return type

Exceptions

list_by_subscription

Lists all of the capacity reservation groups in the subscription. Use the nextLink property in the response to get the next page of capacity reservation groups.

list_by_subscription(expand: Optional[Union[str, _models.ExpandTypesForGetCapacityReservationGroups]] = None, **kwargs: Any) -> Iterable[_models.CapacityReservationGroupListResult]

Parameters

expand
str or ExpandTypesForGetCapacityReservationGroups
default value: None

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.

cls
callable

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

Returns

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

Return type

Exceptions

update

The operation to update a capacity reservation group. When updating a capacity reservation group, only tags may be modified.

update(resource_group_name: str, capacity_reservation_group_name: str, parameters: _models.CapacityReservationGroupUpdate, **kwargs: Any) -> _models.CapacityReservationGroup

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.

parameters
CapacityReservationGroupUpdate
Required

Parameters supplied to the Update capacity reservation Group operation.

cls
callable

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

Returns

CapacityReservationGroup, or the result of cls(response)

Return type

Exceptions

Attributes

models

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