Skip to main content

capacity_reservation_groups

Creates, updates, deletes, gets or lists a capacity_reservation_groups resource.

Overview

Namecapacity_reservation_groups
TypeResource
Idazure.compute.capacity_reservation_groups

Fields

NameDatatypeDescription
idtextResource Id
nametextResource name
capacityReservationGroupNametextfield from the properties object
capacity_reservationstextfield from the properties object
instance_viewtextfield from the properties object
locationtextResource location
resourceGroupNametextfield from the properties object
sharing_profiletextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags
typetextResource type
virtual_machines_associatedtextfield from the properties object
zonestextAvailability Zones to use for this capacity reservation group. The zones can be assigned only during creation. If not provided, the group supports only regional resources in the region. If provided, enforces each capacity reservation in the group to be in one of the zones.

Methods

NameAccessible byRequired ParamsDescription
getSELECTcapacityReservationGroupName, resourceGroupName, subscriptionIdThe operation that retrieves information about a capacity reservation group.
list_by_resource_groupSELECTresourceGroupName, subscriptionIdLists 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_subscriptionSELECTsubscriptionIdLists 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.
create_or_updateINSERTcapacityReservationGroupName, resourceGroupName, subscriptionIdThe 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.
deleteDELETEcapacityReservationGroupName, resourceGroupName, subscriptionIdThe 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.
updateUPDATEcapacityReservationGroupName, resourceGroupName, subscriptionIdThe operation to update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified.

SELECT examples

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.

SELECT
id,
name,
capacityReservationGroupName,
capacity_reservations,
instance_view,
location,
resourceGroupName,
sharing_profile,
subscriptionId,
tags,
type,
virtual_machines_associated,
zones
FROM azure.compute.vw_capacity_reservation_groups
WHERE subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new capacity_reservation_groups resource.

/*+ create */
INSERT INTO azure.compute.capacity_reservation_groups (
capacityReservationGroupName,
resourceGroupName,
subscriptionId,
properties,
zones,
location,
tags
)
SELECT
'{{ capacityReservationGroupName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ zones }}',
'{{ location }}',
'{{ tags }}'
;

UPDATE example

Updates a capacity_reservation_groups resource.

/*+ update */
UPDATE azure.compute.capacity_reservation_groups
SET
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
capacityReservationGroupName = '{{ capacityReservationGroupName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified capacity_reservation_groups resource.

/*+ delete */
DELETE FROM azure.compute.capacity_reservation_groups
WHERE capacityReservationGroupName = '{{ capacityReservationGroupName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';