Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
- Latest
- 2024-11-01-preview
- 2024-05-01-preview
- 2023-08-01
- 2023-08-01-preview
- 2023-05-01-preview
- 2023-02-01-preview
- 2022-11-01-preview
- 2022-08-01-preview
- 2022-05-01-preview
- 2022-02-01-preview
- 2021-11-01
- 2021-11-01-preview
- 2021-08-01-preview
- 2021-05-01-preview
- 2021-02-01-preview
- 2020-11-01-preview
- 2020-08-01-preview
- 2020-02-02-preview
- 2017-10-01-preview
- 2014-04-01
Bicep resource definition
The servers/elasticPools 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.Sql/servers/elasticPools resource, add the following Bicep to your template.
resource symbolicname 'Microsoft.Sql/servers/elasticPools@2024-11-01-preview' = {
parent: resourceSymbolicName
location: 'string'
name: 'string'
properties: {
autoPauseDelay: int
availabilityZone: 'string'
highAvailabilityReplicaCount: int
licenseType: 'string'
maintenanceConfigurationId: 'string'
maxSizeBytes: int
minCapacity: int
perDatabaseSettings: {
autoPauseDelay: int
maxCapacity: int
minCapacity: int
}
preferredEnclaveType: 'string'
zoneRedundant: bool
}
sku: {
capacity: int
family: 'string'
name: 'string'
size: 'string'
tier: 'string'
}
tags: {
{customized property}: 'string'
}
}
Property Values
Microsoft.Sql/servers/elasticPools
| Name | Description | Value |
|---|---|---|
| location | Resource location. | string (required) |
| name | The resource name | string (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: servers |
| properties | Resource properties. | ElasticPoolProperties |
| sku | The elastic pool SKU. The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or the following command:```azurecli az sql elastic-pool list-editions -l <location> -o table ```` |
Sku |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
ElasticPoolPerDatabaseSettings
| Name | Description | Value |
|---|---|---|
| autoPauseDelay | Auto Pause Delay for per database within pool | int |
| maxCapacity | The maximum capacity any one database can consume. | int |
| minCapacity | The minimum capacity all databases are guaranteed. | int |
ElasticPoolProperties
| Name | Description | Value |
|---|---|---|
| autoPauseDelay | Time in minutes after which elastic pool is automatically paused. A value of -1 means that automatic pause is disabled | int |
| availabilityZone | Specifies the availability zone the pool's primary replica is pinned to. | '1' '2' '3' 'NoPreference' |
| highAvailabilityReplicaCount | The number of secondary replicas associated with the Business Critical, Premium, or Hyperscale edition elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools. | int |
| licenseType | The license type to apply for this elastic pool. | 'BasePrice' 'LicenseIncluded' |
| maintenanceConfigurationId | Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. | string |
| maxSizeBytes | The storage limit for the database elastic pool in bytes. | int |
| minCapacity | Minimal capacity that serverless pool will not shrink below, if not paused | int |
| perDatabaseSettings | The per database settings for the elastic pool. | ElasticPoolPerDatabaseSettings |
| preferredEnclaveType | Type of enclave requested on the elastic pool. | 'Default' 'VBS' |
| zoneRedundant | Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. | bool |
Sku
| Name | Description | Value |
|---|---|---|
| capacity | Capacity of the particular SKU. | int |
| family | If the service has different generations of hardware, for the same SKU, then that can be captured here. | string |
| name | The name of the SKU, typically, a letter + Number code, e.g. P3. | string (required) |
| size | Size of the particular SKU | string |
| tier | The tier or edition of the particular SKU, e.g. Basic, Premium. | string |
TrackedResourceTags
| Name | Description | Value |
|---|
ARM template resource definition
The servers/elasticPools 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.Sql/servers/elasticPools resource, add the following JSON to your template.
{
"type": "Microsoft.Sql/servers/elasticPools",
"apiVersion": "2024-11-01-preview",
"name": "string",
"location": "string",
"properties": {
"autoPauseDelay": "int",
"availabilityZone": "string",
"highAvailabilityReplicaCount": "int",
"licenseType": "string",
"maintenanceConfigurationId": "string",
"maxSizeBytes": "int",
"minCapacity": "int",
"perDatabaseSettings": {
"autoPauseDelay": "int",
"maxCapacity": "int",
"minCapacity": "int"
},
"preferredEnclaveType": "string",
"zoneRedundant": "bool"
},
"sku": {
"capacity": "int",
"family": "string",
"name": "string",
"size": "string",
"tier": "string"
},
"tags": {
"{customized property}": "string"
}
}
Property Values
Microsoft.Sql/servers/elasticPools
| Name | Description | Value |
|---|---|---|
| apiVersion | The api version | '2024-11-01-preview' |
| location | Resource location. | string (required) |
| name | The resource name | string (required) |
| properties | Resource properties. | ElasticPoolProperties |
| sku | The elastic pool SKU. The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or the following command:```azurecli az sql elastic-pool list-editions -l <location> -o table ```` |
Sku |
| tags | Resource tags | Dictionary of tag names and values. See Tags in templates |
| type | The resource type | 'Microsoft.Sql/servers/elasticPools' |
ElasticPoolPerDatabaseSettings
| Name | Description | Value |
|---|---|---|
| autoPauseDelay | Auto Pause Delay for per database within pool | int |
| maxCapacity | The maximum capacity any one database can consume. | int |
| minCapacity | The minimum capacity all databases are guaranteed. | int |
ElasticPoolProperties
| Name | Description | Value |
|---|---|---|
| autoPauseDelay | Time in minutes after which elastic pool is automatically paused. A value of -1 means that automatic pause is disabled | int |
| availabilityZone | Specifies the availability zone the pool's primary replica is pinned to. | '1' '2' '3' 'NoPreference' |
| highAvailabilityReplicaCount | The number of secondary replicas associated with the Business Critical, Premium, or Hyperscale edition elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools. | int |
| licenseType | The license type to apply for this elastic pool. | 'BasePrice' 'LicenseIncluded' |
| maintenanceConfigurationId | Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. | string |
| maxSizeBytes | The storage limit for the database elastic pool in bytes. | int |
| minCapacity | Minimal capacity that serverless pool will not shrink below, if not paused | int |
| perDatabaseSettings | The per database settings for the elastic pool. | ElasticPoolPerDatabaseSettings |
| preferredEnclaveType | Type of enclave requested on the elastic pool. | 'Default' 'VBS' |
| zoneRedundant | Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. | bool |
Sku
| Name | Description | Value |
|---|---|---|
| capacity | Capacity of the particular SKU. | int |
| family | If the service has different generations of hardware, for the same SKU, then that can be captured here. | string |
| name | The name of the SKU, typically, a letter + Number code, e.g. P3. | string (required) |
| size | Size of the particular SKU | string |
| tier | The tier or edition of the particular SKU, e.g. Basic, Premium. | string |
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Azure Quickstart Templates
The following Azure Quickstart templates deploy this resource type.
| Template | Description |
|---|---|
| Deploy a new SQL Elastic Pool |
This template allows you to deploy a new SQL Elastic Pool with its new associated SQL Server and new SQL Databases to assign to it. |
Terraform (AzAPI provider) resource definition
The servers/elasticPools 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.Sql/servers/elasticPools resource, add the following Terraform to your template.
resource "azapi_resource" "symbolicname" {
type = "Microsoft.Sql/servers/elasticPools@2024-11-01-preview"
name = "string"
parent_id = "string"
location = "string"
tags = {
{customized property} = "string"
}
body = {
properties = {
autoPauseDelay = int
availabilityZone = "string"
highAvailabilityReplicaCount = int
licenseType = "string"
maintenanceConfigurationId = "string"
maxSizeBytes = int
minCapacity = int
perDatabaseSettings = {
autoPauseDelay = int
maxCapacity = int
minCapacity = int
}
preferredEnclaveType = "string"
zoneRedundant = bool
}
sku = {
capacity = int
family = "string"
name = "string"
size = "string"
tier = "string"
}
}
}
Property Values
Microsoft.Sql/servers/elasticPools
| Name | Description | Value |
|---|---|---|
| location | Resource location. | string (required) |
| name | The resource name | string (required) |
| parent_id | The ID of the resource that is the parent for this resource. | ID for resource of type: servers |
| properties | Resource properties. | ElasticPoolProperties |
| sku | The elastic pool SKU. The list of SKUs may vary by region and support offer. To determine the SKUs (including the SKU name, tier/edition, family, and capacity) that are available to your subscription in an Azure region, use the Capabilities_ListByLocation REST API or the following command:```azurecli az sql elastic-pool list-editions -l <location> -o table ```` |
Sku |
| tags | Resource tags | Dictionary of tag names and values. |
| type | The resource type | "Microsoft.Sql/servers/elasticPools@2024-11-01-preview" |
ElasticPoolPerDatabaseSettings
| Name | Description | Value |
|---|---|---|
| autoPauseDelay | Auto Pause Delay for per database within pool | int |
| maxCapacity | The maximum capacity any one database can consume. | int |
| minCapacity | The minimum capacity all databases are guaranteed. | int |
ElasticPoolProperties
| Name | Description | Value |
|---|---|---|
| autoPauseDelay | Time in minutes after which elastic pool is automatically paused. A value of -1 means that automatic pause is disabled | int |
| availabilityZone | Specifies the availability zone the pool's primary replica is pinned to. | '1' '2' '3' 'NoPreference' |
| highAvailabilityReplicaCount | The number of secondary replicas associated with the Business Critical, Premium, or Hyperscale edition elastic pool that are used to provide high availability. Applicable only to Hyperscale elastic pools. | int |
| licenseType | The license type to apply for this elastic pool. | 'BasePrice' 'LicenseIncluded' |
| maintenanceConfigurationId | Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. | string |
| maxSizeBytes | The storage limit for the database elastic pool in bytes. | int |
| minCapacity | Minimal capacity that serverless pool will not shrink below, if not paused | int |
| perDatabaseSettings | The per database settings for the elastic pool. | ElasticPoolPerDatabaseSettings |
| preferredEnclaveType | Type of enclave requested on the elastic pool. | 'Default' 'VBS' |
| zoneRedundant | Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. | bool |
Sku
| Name | Description | Value |
|---|---|---|
| capacity | Capacity of the particular SKU. | int |
| family | If the service has different generations of hardware, for the same SKU, then that can be captured here. | string |
| name | The name of the SKU, typically, a letter + Number code, e.g. P3. | string (required) |
| size | Size of the particular SKU | string |
| tier | The tier or edition of the particular SKU, e.g. Basic, Premium. | string |
TrackedResourceTags
| Name | Description | Value |
|---|
Usage Examples
Terraform Samples
A basic example of deploying Azure SQL Elastic Pool.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
azurerm = {
source = "hashicorp/azurerm"
}
}
}
provider "azurerm" {
features {
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
variable "administrator_login_password" {
type = string
description = "The administrator login password for the SQL server"
sensitive = true
}
data "azurerm_client_config" "current" {
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "server" {
type = "Microsoft.Sql/servers@2021-02-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
administratorLogin = "4dm1n157r470r"
administratorLoginPassword = var.administrator_login_password
minimalTlsVersion = "1.2"
publicNetworkAccess = "Enabled"
restrictOutboundNetworkAccess = "Disabled"
version = "12.0"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
data "azapi_resource_id" "publicMaintenanceConfiguration" {
type = "Microsoft.Maintenance/publicMaintenanceConfigurations@2023-04-01"
parent_id = "/subscriptions/${data.azurerm_client_config.current.subscription_id}"
name = "SQL_Default"
}
resource "azapi_resource" "elasticPool" {
type = "Microsoft.Sql/servers/elasticPools@2020-11-01-preview"
parent_id = azapi_resource.server.id
name = var.resource_name
location = var.location
body = {
properties = {
maintenanceConfigurationId = data.azapi_resource_id.publicMaintenanceConfiguration.id
maxSizeBytes = 5.24288e+09
perDatabaseSettings = {
maxCapacity = 5
minCapacity = 0
}
zoneRedundant = false
}
sku = {
capacity = 50
family = ""
name = "BasicPool"
tier = "Basic"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
A basic example of deploying Azure SQL Elastic Pool.
terraform {
required_providers {
azapi = {
source = "Azure/azapi"
}
azurerm = {
source = "hashicorp/azurerm"
}
}
}
provider "azurerm" {
features {
}
}
provider "azapi" {
skip_provider_registration = false
}
variable "resource_name" {
type = string
default = "acctest0001"
}
variable "location" {
type = string
default = "westeurope"
}
variable "administrator_login_password" {
type = string
description = "The administrator login password for the SQL server"
sensitive = true
}
data "azurerm_client_config" "current" {
}
resource "azapi_resource" "resourceGroup" {
type = "Microsoft.Resources/resourceGroups@2020-06-01"
name = var.resource_name
location = var.location
}
resource "azapi_resource" "server" {
type = "Microsoft.Sql/servers@2021-02-01-preview"
parent_id = azapi_resource.resourceGroup.id
name = var.resource_name
location = var.location
body = {
properties = {
administratorLogin = "4dm1n157r470r"
administratorLoginPassword = var.administrator_login_password
minimalTlsVersion = "1.2"
publicNetworkAccess = "Enabled"
restrictOutboundNetworkAccess = "Disabled"
version = "12.0"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}
data "azapi_resource_id" "publicMaintenanceConfiguration" {
type = "Microsoft.Maintenance/publicMaintenanceConfigurations@2023-04-01"
parent_id = "/subscriptions/${data.azurerm_client_config.current.subscription_id}"
name = "SQL_Default"
}
resource "azapi_resource" "elasticPool" {
type = "Microsoft.Sql/servers/elasticPools@2020-11-01-preview"
parent_id = azapi_resource.server.id
name = var.resource_name
location = var.location
body = {
properties = {
maintenanceConfigurationId = data.azapi_resource_id.publicMaintenanceConfiguration.id
maxSizeBytes = 5.24288e+09
perDatabaseSettings = {
maxCapacity = 5
minCapacity = 0
}
zoneRedundant = false
}
sku = {
capacity = 50
family = ""
name = "BasicPool"
tier = "Basic"
}
}
schema_validation_enabled = false
response_export_values = ["*"]
}