capacity_reservations
Creates, updates, deletes, gets or lists a capacity_reservations
resource.
Overview
Name | capacity_reservations |
Type | Resource |
Id | azure.compute.capacity_reservations |
Fields
- vw_capacity_reservations
- capacity_reservations
Name | Datatype | Description |
---|---|---|
id | text | Resource Id |
name | text | Resource name |
capacityReservationGroupName | text | field from the properties object |
capacityReservationName | text | field from the properties object |
instance_view | text | field from the properties object |
location | text | Resource location |
platform_fault_domain_count | text | field from the properties object |
provisioning_state | text | field from the properties object |
provisioning_time | text | field from the properties object |
reservation_id | text | field from the properties object |
resourceGroupName | text | field from the properties object |
sku | text | Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name. |
subscriptionId | text | field from the properties object |
tags | text | Resource tags |
time_created | text | field from the properties object |
type | text | Resource type |
virtual_machines_associated | text | field from the properties object |
zones | text | Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone. |
Name | Datatype | Description |
---|---|---|
id | string | Resource Id |
name | string | Resource name |
location | string | Resource location |
properties | object | Properties of the Capacity reservation. |
sku | object | Describes a virtual machine scale set sku. NOTE: If the new VM SKU is not supported on the hardware the scale set is currently on, you need to deallocate the VMs in the scale set before you modify the SKU name. |
tags | object | Resource tags |
type | string | Resource type |
zones | array | Availability Zone to use for this capacity reservation. The zone has to be single value and also should be part for the list of zones specified during the capacity reservation group creation. The zone can be assigned only during creation. If not provided, the reservation supports only non-zonal deployments. If provided, enforces VM/VMSS using this capacity reservation to be in same zone. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | capacityReservationGroupName, capacityReservationName, resourceGroupName, subscriptionId | The operation that retrieves information about the capacity reservation. |
list_by_capacity_reservation_group | SELECT | capacityReservationGroupName, resourceGroupName, subscriptionId | Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations. |
create_or_update | INSERT | capacityReservationGroupName, capacityReservationName, resourceGroupName, subscriptionId, data__sku | The operation to create or update a capacity reservation. Please note some properties can be set only during capacity reservation creation. Please refer to https://aka.ms/CapacityReservation for more details. |
delete | DELETE | capacityReservationGroupName, capacityReservationName, resourceGroupName, subscriptionId | The operation to delete a capacity reservation. This operation is allowed only when all the associated resources are disassociated from the capacity reservation. Please refer to https://aka.ms/CapacityReservation for more details. |
update | UPDATE | capacityReservationGroupName, capacityReservationName, resourceGroupName, subscriptionId | The operation to update a capacity reservation. |
SELECT
examples
Lists all of the capacity reservations in the specified capacity reservation group. Use the nextLink property in the response to get the next page of capacity reservations.
- vw_capacity_reservations
- capacity_reservations
SELECT
id,
name,
capacityReservationGroupName,
capacityReservationName,
instance_view,
location,
platform_fault_domain_count,
provisioning_state,
provisioning_time,
reservation_id,
resourceGroupName,
sku,
subscriptionId,
tags,
time_created,
type,
virtual_machines_associated,
zones
FROM azure.compute.vw_capacity_reservations
WHERE capacityReservationGroupName = '{{ capacityReservationGroupName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
SELECT
id,
name,
location,
properties,
sku,
tags,
type,
zones
FROM azure.compute.capacity_reservations
WHERE capacityReservationGroupName = '{{ capacityReservationGroupName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new capacity_reservations
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO azure.compute.capacity_reservations (
capacityReservationGroupName,
capacityReservationName,
resourceGroupName,
subscriptionId,
data__sku,
properties,
sku,
zones,
location,
tags
)
SELECT
'{{ capacityReservationGroupName }}',
'{{ capacityReservationName }}',
'{{ resourceGroupName }}',
'{{ subscriptionId }}',
'{{ data__sku }}',
'{{ properties }}',
'{{ sku }}',
'{{ zones }}',
'{{ location }}',
'{{ tags }}'
;
- name: your_resource_model_name
props:
- name: properties
value:
- name: reservationId
value: string
- name: platformFaultDomainCount
value: integer
- name: virtualMachinesAssociated
value:
- - name: id
value: string
- name: provisioningTime
value: string
- name: provisioningState
value: string
- name: instanceView
value:
- 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: timeCreated
value: string
- name: sku
value:
- name: name
value: string
- name: tier
value: string
- name: capacity
value: integer
- 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_reservations
resource.
/*+ update */
UPDATE azure.compute.capacity_reservations
SET
properties = '{{ properties }}',
sku = '{{ sku }}',
tags = '{{ tags }}'
WHERE
capacityReservationGroupName = '{{ capacityReservationGroupName }}'
AND capacityReservationName = '{{ capacityReservationName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';
DELETE
example
Deletes the specified capacity_reservations
resource.
/*+ delete */
DELETE FROM azure.compute.capacity_reservations
WHERE capacityReservationGroupName = '{{ capacityReservationGroupName }}'
AND capacityReservationName = '{{ capacityReservationName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND subscriptionId = '{{ subscriptionId }}';