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.objectCapacityReservationGroupsOperations
Constructor
CapacityReservationGroupsOperations(client, config, serializer, deserializer)
Parameters
- client
Client for service requests.
- config
Configuration of service client.
- serializer
An object model serializer.
- deserializer
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
- parameters
- CapacityReservationGroup
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
- 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
- expand
- str or CapacityReservationGroupInstanceViewTypes
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
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
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
- parameters
- CapacityReservationGroupUpdate
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'>
Feedback
Submit and view feedback for