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
The following fields are returned by SELECT
queries:
- get
- list_by_resource_group
- list_by_subscription
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. |
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. |
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
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , capacityReservationGroupName , subscriptionId | $expand | The operation that retrieves information about a capacity reservation group. |
list_by_resource_group | select | resourceGroupName , subscriptionId | $expand | 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 | $expand , resourceIdsOnly | 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 | resourceGroupName , capacityReservationGroupName , 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. | |
update | update | resourceGroupName , capacityReservationGroupName , subscriptionId | The operation to update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified. | |
delete | delete | resourceGroupName , capacityReservationGroupName , 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. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
capacityReservationGroupName | string | The name of the capacity reservation group. |
resourceGroupName | string | The name of the resource group. |
subscriptionId | string | Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call. |
$expand | string | 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. |
resourceIdsOnly | string | The query option to fetch Capacity Reservation Group Resource Ids. 'CreatedInSubscription' enables fetching Resource Ids for all capacity reservation group resources created in the subscription. 'SharedWithSubscription' enables fetching Resource Ids for all capacity reservation group resources shared with the subscription. 'All' enables fetching Resource Ids for all capacity reservation group resources shared with the subscription and created in the subscription. |
SELECT
examples
- get
- list_by_resource_group
- list_by_subscription
The operation that retrieves information about a capacity reservation group.
SELECT
id,
name,
location,
properties,
tags,
type,
zones
FROM azure.compute.capacity_reservation_groups
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND capacityReservationGroupName = '{{ capacityReservationGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $expand = '{{ $expand }}'
;
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.
SELECT
id,
name,
location,
properties,
tags,
type,
zones
FROM azure.compute.capacity_reservation_groups
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $expand = '{{ $expand }}'
;
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,
location,
properties,
tags,
type,
zones
FROM azure.compute.capacity_reservation_groups
WHERE subscriptionId = '{{ subscriptionId }}' -- required
AND $expand = '{{ $expand }}'
AND resourceIdsOnly = '{{ resourceIdsOnly }}'
;
INSERT
examples
- create_or_update
- Manifest
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.
INSERT INTO azure.compute.capacity_reservation_groups (
data__properties,
data__zones,
data__location,
data__tags,
resourceGroupName,
capacityReservationGroupName,
subscriptionId
)
SELECT
'{{ properties }}',
'{{ zones }}',
'{{ location }}',
'{{ tags }}',
'{{ resourceGroupName }}',
'{{ capacityReservationGroupName }}',
'{{ subscriptionId }}'
RETURNING
id,
name,
location,
properties,
tags,
type,
zones
;
# Description fields are for documentation purposes
- name: capacity_reservation_groups
props:
- name: resourceGroupName
value: string
description: Required parameter for the capacity_reservation_groups resource.
- name: capacityReservationGroupName
value: string
description: Required parameter for the capacity_reservation_groups resource.
- name: subscriptionId
value: string
description: Required parameter for the capacity_reservation_groups resource.
- name: properties
value: object
description: |
capacity reservation group Properties.
- name: zones
value: array
description: |
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: location
value: string
description: |
Resource location
- name: tags
value: object
description: |
Resource tags
UPDATE
examples
- update
The operation to update a capacity reservation group. When updating a capacity reservation group, only tags and sharing profile may be modified.
UPDATE azure.compute.capacity_reservation_groups
SET
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND capacityReservationGroupName = '{{ capacityReservationGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
id,
name,
location,
properties,
tags,
type,
zones;
DELETE
examples
- 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 FROM azure.compute.capacity_reservation_groups
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND capacityReservationGroupName = '{{ capacityReservationGroupName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;