capacity_reservation_groups
Creates, updates, deletes, gets or lists a capacity_reservation_groups
resource.
Overview
Name | capacity_reservation_groups |
Type | Resource |
Id | azure.compute.capacity_reservation_groups |
Fields
- vw_capacity_reservation_groups
- capacity_reservation_groups
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | text | Resource name |
capacityReservationGroupName | text | field from the properties object |
capacity_reservations | text | field from the properties object |
instance_view | text | field from the properties object |
location | text | Resource location |
resourceGroupName | text | field from the properties object |
sharing_profile | text | field from the properties object |
subscriptionId | text | field from the properties object |
tags | text | Resource tags |
type | text | Resource type |
virtual_machines_associated | text | field from the properties object |
zones | text | Availability 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. |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
location | string | Resource location |
properties | object | capacity reservation group Properties. |
tags | object | Resource tags |
type | string | Resource type |
zones | array | Availability 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
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | capacityReservationGroupName, resourceGroupName, subscriptionId | The operation that retrieves information about a capacity reservation group. |
list_by_resource_group | SELECT | resourceGroupName, subscriptionId | 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 | SELECT | subscriptionId | 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. |
create_or_update | INSERT | capacityReservationGroupName, resourceGroupName, subscriptionId | 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 | DELETE | capacityReservationGroupName, resourceGroupName, subscriptionId | 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. |
update | UPDATE | capacityReservationGroupName, resourceGroupName, subscriptionId | The 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.
- vw_capacity_reservation_groups
- 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 }}';
SELECT
id,
name,
location,
properties,
tags,
type,
zones
FROM azure.compute.capacity_reservation_groups
WHERE subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new capacity_reservation_groups
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.compute.capacity_reservation_groups (
capacityReservationGroupName,
resourceGroupName,
subscriptionId,
properties,
zones,
location,
tags
)
SELECT
'{{ capacityReservationGroupName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ properties }}',
'{{ zones }}',
'{{ location }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: capacityReservations
value:
- - name: id
value: string
- name: virtualMachinesAssociated
value:
- - name: id
value: string
- name: instanceView
value:
- name: capacityReservations
value:
- - name: name
value: string
- name: utilizationInfo
value:
- name: currentCapacity
value: integer
- name: virtualMachinesAllocated
value:
- - name: id
value: string
- name: statuses
value:
- - name: code
value: string
- name: level
value: string
- name: displayStatus
value: string
- name: message
value: string
- name: time
value: string
- name: sharedSubscriptionIds
value:
- - name: id
value: string
- name: sharingProfile
value:
- name: subscriptionIds
value:
- - name: id
value: string
- name: zones
value:
- string
- name: id
value: string
- name: name
value: string
- name: type
value: string
- name: location
value: string
- name: tags
value: object
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 }}';