CapacityReservationGroupsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:capacity_reservation_groups> attribute.
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 and sharing profile 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 and sharing profile may be modified. |
create_or_update
The operation to create or update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile 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
|
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. |
|
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
|
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. |
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
|
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. |
|
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. Default value: 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) -> ItemPaged[CapacityReservationGroup]
Parameters
| Name | Description |
|---|---|
|
resource_group_name
Required
|
The name of the resource group. The name is case insensitive. Required. |
|
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 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, resource_ids_only: str | ResourceIdOptionsForGetCapacityReservationGroups | None = None, **kwargs: Any) -> ItemPaged[CapacityReservationGroup]
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
|
|
resource_ids_only
|
The query option to fetch Capacity Reservation Group Resource Ids.
Default value: 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 and sharing profile 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
|
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. |
|
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.models' from 'C:\\ToolCache\\Python\\3.11.9\\x64\\Lib\\site-packages\\py2docfx\\venv\\venv89\\Lib\\site-packages\\azure\\mgmt\\compute\\models\\__init__.py'>