Azure SQL Database Elastic Pools REST API Reference
This document provides detailed reference information for the Azure SQL Database Elastic Pools REST API. You can use these REST API operations to programmatically manage your elastic pools.
API Endpoint Structure
All elastic pool operations are performed against the following base URL:
https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools
You will need to replace the placeholders with your specific Azure subscription ID, resource group name, and SQL server name.
Create Elastic Pool
PUT/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}
Creates or updates an elastic pool.
Request Body
{
"location": "East US",
"sku": {
"name": "BasicPool",
"tier": "Basic",
"capacity": 5,
"family": "Gen5"
},
"properties": {
"storageMB": 102400,
"maxSizeBytes": 204800,
"zoneRedundant": false
}
}
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
subscriptionId |
String | The ID of your Azure subscription. | Yes |
resourceGroupName |
String | The name of the resource group. | Yes |
serverName |
String | The name of the Azure SQL server. | Yes |
elasticPoolName |
String | The name of the elastic pool to create. | Yes |
location |
String | The location of the elastic pool. | Yes |
sku.name |
String | The name of the SKU (e.g., BasicPool, StandardPool, PremiumPool). |
Yes |
sku.tier |
String | The tier of the SKU (e.g., Basic, Standard, Premium). |
Yes |
sku.capacity |
Integer | The number of DTUs or vCores for the pool. | No |
sku.family |
String | The hardware family of the compute. | No |
properties.storageMB |
Integer | The storage limit in MB. | No |
properties.maxSizeBytes |
Integer | The maximum storage size in bytes. | No |
properties.zoneRedundant |
Boolean | Whether the elastic pool is zone redundant. | No |
Get Elastic Pool
GET/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}
Gets an elastic pool.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
subscriptionId |
String | The ID of your Azure subscription. | Yes |
resourceGroupName |
String | The name of the resource group. | Yes |
serverName |
String | The name of the Azure SQL server. | Yes |
elasticPoolName |
String | The name of the elastic pool. | Yes |
Response Body Example
200 OK
{
"location": "East US",
"sku": {
"name": "BasicPool",
"tier": "Basic",
"capacity": 5,
"family": "Gen5"
},
"properties": {
"storageMB": 102400,
"maxSizeBytes": 204800,
"zoneRedundant": false,
"creationDate": "2023-10-27T10:30:00Z",
"state": "Online"
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/servers/myServer/elasticPools/myElasticPool",
"name": "myElasticPool",
"type": "Microsoft.Sql/servers/elasticPools"
}
List Elastic Pools
GET/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools
Gets a list of all elastic pools in a server.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
subscriptionId |
String | The ID of your Azure subscription. | Yes |
resourceGroupName |
String | The name of the resource group. | Yes |
serverName |
String | The name of the Azure SQL server. | Yes |
Response Body Example
200 OK
{
"value": [
{
"location": "East US",
"sku": {
"name": "BasicPool",
"tier": "Basic",
"capacity": 5,
"family": "Gen5"
},
"properties": {
"storageMB": 102400,
"maxSizeBytes": 204800,
"zoneRedundant": false,
"creationDate": "2023-10-27T10:30:00Z",
"state": "Online"
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/servers/myServer/elasticPools/myElasticPool1",
"name": "myElasticPool1",
"type": "Microsoft.Sql/servers/elasticPools"
},
{
"location": "East US",
"sku": {
"name": "StandardPool",
"tier": "Standard",
"capacity": 10,
"family": "Gen5"
},
"properties": {
"storageMB": 204800,
"maxSizeBytes": 409600,
"zoneRedundant": false,
"creationDate": "2023-09-15T11:00:00Z",
"state": "Online"
},
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.Sql/servers/myServer/elasticPools/myElasticPool2",
"name": "myElasticPool2",
"type": "Microsoft.Sql/servers/elasticPools"
}
]
}
Update Elastic Pool
PATCH/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}
Updates an elastic pool's properties.
Request Body
The request body can include any updatable properties from the create operation, such as SKU, storage, or zone redundancy.
{
"sku": {
"name": "StandardPool",
"tier": "Standard",
"capacity": 15
},
"properties": {
"storageMB": 153600
}
}
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
subscriptionId |
String | The ID of your Azure subscription. | Yes |
resourceGroupName |
String | The name of the resource group. | Yes |
serverName |
String | The name of the Azure SQL server. | Yes |
elasticPoolName |
String | The name of the elastic pool to update. | Yes |
Delete Elastic Pool
DELETE/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/elasticPools/{elasticPoolName}
Deletes an elastic pool.
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
subscriptionId |
String | The ID of your Azure subscription. | Yes |
resourceGroupName |
String | The name of the resource group. | Yes |
serverName |
String | The name of the Azure SQL server. | Yes |
elasticPoolName |
String | The name of the elastic pool to delete. | Yes |