Microsoft.Compute capacityReservationGroups/capacityReservations

Bicep resource definition

The capacityReservationGroups/capacityReservations resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Compute/capacityReservationGroups/capacityReservations resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.Compute/capacityReservationGroups/capacityReservations@2024-07-01' = {
  name: 'string'
  location: 'string'
  tags: {
    tagName1: 'tagValue1'
    tagName2: 'tagValue2'
  }
  sku: {
    capacity: int
    name: 'string'
    tier: 'string'
  }
  parent: resourceSymbolicName
  properties: {}
  zones: [
    'string' or int
  ]
}

Property values

capacityReservationGroups/capacityReservations

Name Description Value
name The resource name

See how to set names and types for child resources in Bicep.
string (required)
location Resource location string (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
sku SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (/rest/api/compute/resourceskus/list) for supported values. Sku (required)
parent In Bicep, you can specify the parent resource for a child resource. You only need to add this property when the child resource is declared outside of the parent resource.

For more information, see Child resource outside parent resource.
Symbolic name for resource of type: capacityReservationGroups
properties Properties of the Capacity reservation. CapacityReservationProperties
zones 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. Array of availability zones as string or int.

CapacityReservationProperties

This object doesn't contain any properties to set during deployment. All properties are ReadOnly.

Sku

Name Description Value
capacity Specifies the number of virtual machines in the scale set. int
name The sku name. string
tier Specifies the tier of virtual machines in a scale set.

Possible Values:

Standard

Basic
string

ARM template resource definition

The capacityReservationGroups/capacityReservations resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Compute/capacityReservationGroups/capacityReservations resource, add the following JSON to your template.

{
  "type": "Microsoft.Compute/capacityReservationGroups/capacityReservations",
  "apiVersion": "2024-07-01",
  "name": "string",
  "location": "string",
  "tags": {
    "tagName1": "tagValue1",
    "tagName2": "tagValue2"
  },
  "sku": {
    "capacity": "int",
    "name": "string",
    "tier": "string"
  },
  "properties": {},
  "zones": [ "string" or int ]
}

Property values

capacityReservationGroups/capacityReservations

Name Description Value
type The resource type 'Microsoft.Compute/capacityReservationGroups/capacityReservations'
apiVersion The resource api version '2024-07-01'
name The resource name

See how to set names and types for child resources in JSON ARM templates.
string (required)
location Resource location string (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
sku SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (/rest/api/compute/resourceskus/list) for supported values. Sku (required)
properties Properties of the Capacity reservation. CapacityReservationProperties
zones 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. Array of availability zones as string or int.

CapacityReservationProperties

This object doesn't contain any properties to set during deployment. All properties are ReadOnly.

Sku

Name Description Value
capacity Specifies the number of virtual machines in the scale set. int
name The sku name. string
tier Specifies the tier of virtual machines in a scale set.

Possible Values:

Standard

Basic
string

Terraform (AzAPI provider) resource definition

The capacityReservationGroups/capacityReservations resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.Compute/capacityReservationGroups/capacityReservations resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.Compute/capacityReservationGroups/capacityReservations@2024-07-01"
  name = "string"
  location = "string"
  parent_id = "string"
  tags = {
    tagName1 = "tagValue1"
    tagName2 = "tagValue2"
  }
  body = jsonencode({
    properties = {}
    zones = [
      "string" or int
    ]
    sku = {
      capacity = int
      name = "string"
      tier = "string"
    }
  })
}

Property values

capacityReservationGroups/capacityReservations

Name Description Value
type The resource type "Microsoft.Compute/capacityReservationGroups/capacityReservations@2024-07-01"
name The resource name string (required)
location Resource location string (required)
parent_id The ID of the resource that is the parent for this resource. ID for resource of type: capacityReservationGroups
tags Resource tags Dictionary of tag names and values.
sku SKU of the resource for which capacity needs be reserved. The SKU name and capacity is required to be set. Currently VM Skus with the capability called 'CapacityReservationSupported' set to true are supported. Refer to List Microsoft.Compute SKUs in a region (/rest/api/compute/resourceskus/list) for supported values. Sku (required)
properties Properties of the Capacity reservation. CapacityReservationProperties
zones 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. Array of availability zones as string or int.

CapacityReservationProperties

This object doesn't contain any properties to set during deployment. All properties are ReadOnly.

Sku

Name Description Value
capacity Specifies the number of virtual machines in the scale set. int
name The sku name. string
tier Specifies the tier of virtual machines in a scale set.

Possible Values:

Standard

Basic
string