CapacityReservationGroupsOperations Class

Warning

DO NOT instantiate this class directly.

Instead, you should access the following operations through

ComputeManagementClient's

<xref:capacity_reservation_groups> attribute.

Inheritance
builtins.object
CapacityReservationGroupsOperations

Constructor

CapacityReservationGroupsOperations(*args, **kwargs)

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, *, content_type: str = 'application/json', **kwargs: Any) -> _models.CapacityReservationGroup

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

capacity_reservation_group_name
Required
str

The name of the capacity reservation group. Required.

parameters
Required

Parameters supplied to the Create capacity reservation Group. Is either a CapacityReservationGroup type or a IO[bytes] type. Required.

Returns

Type Description

CapacityReservationGroup or the result of cls(response)

Exceptions

Type Description

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

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

capacity_reservation_group_name
Required
str

The name of the capacity reservation group. Required.

Returns

Type Description

None or the result of cls(response)

Exceptions

Type Description

get

The operation that retrieves information about a capacity reservation group.

get(resource_group_name: str, capacity_reservation_group_name: str, *, expand: str | CapacityReservationGroupInstanceViewTypes | None = None, **kwargs: Any) -> CapacityReservationGroup

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

capacity_reservation_group_name
Required
str

The name of the capacity reservation group. Required.

Keyword-Only Parameters

Name Description
expand

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. "instanceView" Default value is None.

Returns

Type Description

CapacityReservationGroup or the result of cls(response)

Exceptions

Type Description

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: str | ExpandTypesForGetCapacityReservationGroups | None = None, **kwargs: Any) -> Iterable[CapacityReservationGroup]

Parameters

Name Description
resource_group_name
Required
str

The name of the resource 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.

Returns

Type Description

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

Exceptions

Type Description

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: str | ExpandTypesForGetCapacityReservationGroups | None = None, **kwargs: Any) -> Iterable[CapacityReservationGroup]

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.

Returns

Type Description

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

Exceptions

Type Description

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, *, content_type: str = 'application/json', **kwargs: Any) -> _models.CapacityReservationGroup

Parameters

Name Description
resource_group_name
Required
str

The name of the resource group. Required.

capacity_reservation_group_name
Required
str

The name of the capacity reservation group. Required.

parameters
Required

Parameters supplied to the Update capacity reservation Group operation. Is either a CapacityReservationGroupUpdate type or a IO[bytes] type. Required.

Returns

Type Description

CapacityReservationGroup or the result of cls(response)

Exceptions

Type Description

Attributes

models

models = <module 'azure.mgmt.compute.v2022_11_01.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.11.9\\x64\\Lib\\site-packages\\azure\\mgmt\\compute\\v2022_11_01\\models\\__init__.py'>