elastic_pools
Creates, updates, deletes, gets or lists an elastic_pools resource.
Overview
| Name | elastic_pools |
| Type | Resource |
| Id | azure.sql.elastic_pools |
Fields
The following fields are returned by SELECT queries:
- get
- list_by_server
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
autoPauseDelay | integer | Time in minutes after which elastic pool is automatically paused. A value of -1 means that automatic pause is disabled. |
availabilityZone | string | Specifies the availability zone the pool's primary replica is pinned to. Known values are: "NoPreference", "1", "2", and "3". (NoPreference, 1, 2, 3) |
creationDate | string (date-time) | The creation date of the elastic pool (ISO8601 format). |
highAvailabilityReplicaCount | integer | 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. |
kind | string | Kind of elastic pool. This is metadata used for the Azure portal experience. |
licenseType | string | The license type to apply for this elastic pool. Known values are: "LicenseIncluded" and "BasePrice". (LicenseIncluded, BasePrice) |
location | string | The geo-location where the resource lives. Required. |
maintenanceConfigurationId | string | Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. |
maxSizeBytes | integer | The storage limit for the database elastic pool in bytes. |
minCapacity | number | Minimal capacity that serverless pool will not shrink below, if not paused. |
perDatabaseSettings | object | The per database settings for the elastic pool. |
preferredEnclaveType | string | Type of enclave requested on the elastic pool. Known values are: "Default" and "VBS". (Default, VBS) |
sku | object | 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: .. code-block:: azurecli az sql elastic-pool list-editions -l -o table |
state | string | The state of the elastic pool. Known values are: "Creating", "Ready", and "Disabled". (Creating, Ready, Disabled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
zoneRedundant | boolean | Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. |
| Name | Datatype | Description |
|---|---|---|
id | string | Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}. |
name | string | The name of the resource. |
autoPauseDelay | integer | Time in minutes after which elastic pool is automatically paused. A value of -1 means that automatic pause is disabled. |
availabilityZone | string | Specifies the availability zone the pool's primary replica is pinned to. Known values are: "NoPreference", "1", "2", and "3". (NoPreference, 1, 2, 3) |
creationDate | string (date-time) | The creation date of the elastic pool (ISO8601 format). |
highAvailabilityReplicaCount | integer | 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. |
kind | string | Kind of elastic pool. This is metadata used for the Azure portal experience. |
licenseType | string | The license type to apply for this elastic pool. Known values are: "LicenseIncluded" and "BasePrice". (LicenseIncluded, BasePrice) |
location | string | The geo-location where the resource lives. Required. |
maintenanceConfigurationId | string | Maintenance configuration id assigned to the elastic pool. This configuration defines the period when the maintenance updates will will occur. |
maxSizeBytes | integer | The storage limit for the database elastic pool in bytes. |
minCapacity | number | Minimal capacity that serverless pool will not shrink below, if not paused. |
perDatabaseSettings | object | The per database settings for the elastic pool. |
preferredEnclaveType | string | Type of enclave requested on the elastic pool. Known values are: "Default" and "VBS". (Default, VBS) |
sku | object | 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: .. code-block:: azurecli az sql elastic-pool list-editions -l -o table |
state | string | The state of the elastic pool. Known values are: "Creating", "Ready", and "Disabled". (Creating, Ready, Disabled) |
systemData | object | Azure Resource Manager metadata containing createdBy and modifiedBy information. |
tags | object | Resource tags. |
type | string | The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts". |
zoneRedundant | boolean | Whether or not this elastic pool is zone redundant, which means the replicas of this elastic pool will be spread across multiple availability zones. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | resource_group_name, server_name, elastic_pool_name, subscription_id | Gets an elastic pool. | |
list_by_server | select | resource_group_name, server_name, subscription_id | $skip | Gets all elastic pools in a server. |
create_or_update | insert | resource_group_name, server_name, elastic_pool_name, subscription_id, location | Creates or updates an elastic pool. | |
update | update | resource_group_name, server_name, elastic_pool_name, subscription_id | Updates an elastic pool. | |
create_or_update | replace | resource_group_name, server_name, elastic_pool_name, subscription_id, location | Creates or updates an elastic pool. | |
delete | delete | resource_group_name, server_name, elastic_pool_name, subscription_id | Deletes an elastic pool. | |
failover | exec | resource_group_name, server_name, elastic_pool_name, subscription_id | Failovers an elastic pool. |
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 |
|---|---|---|
elastic_pool_name | string | The name of the elastic pool. Required. |
resource_group_name | string | The name of the resource group. The name is case insensitive. Required. |
server_name | string | The name of the server. Required. |
subscription_id | string | |
$skip | integer | The number of elements in the collection to skip. Default value is None. |
SELECT examples
- get
- list_by_server
Gets an elastic pool.
SELECT
id,
name,
autoPauseDelay,
availabilityZone,
creationDate,
highAvailabilityReplicaCount,
kind,
licenseType,
location,
maintenanceConfigurationId,
maxSizeBytes,
minCapacity,
perDatabaseSettings,
preferredEnclaveType,
sku,
state,
systemData,
tags,
type,
zoneRedundant
FROM azure.sql.elastic_pools
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND elastic_pool_name = '{{ elastic_pool_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
;
Gets all elastic pools in a server.
SELECT
id,
name,
autoPauseDelay,
availabilityZone,
creationDate,
highAvailabilityReplicaCount,
kind,
licenseType,
location,
maintenanceConfigurationId,
maxSizeBytes,
minCapacity,
perDatabaseSettings,
preferredEnclaveType,
sku,
state,
systemData,
tags,
type,
zoneRedundant
FROM azure.sql.elastic_pools
WHERE resource_group_name = '{{ resource_group_name }}' -- required
AND server_name = '{{ server_name }}' -- required
AND subscription_id = '{{ subscription_id }}' -- required
AND $skip = '{{ $skip }}'
;
INSERT examples
- create_or_update
- Manifest
Creates or updates an elastic pool.
INSERT INTO azure.sql.elastic_pools (
tags,
location,
properties,
sku,
resource_group_name,
server_name,
elastic_pool_name,
subscription_id
)
SELECT
'{{ tags }}',
'{{ location }}' /* required */,
'{{ properties }}',
'{{ sku }}',
'{{ resource_group_name }}',
'{{ server_name }}',
'{{ elastic_pool_name }}',
'{{ subscription_id }}'
RETURNING
id,
name,
kind,
location,
properties,
sku,
systemData,
tags,
type
;
# Description fields are for documentation purposes
- name: elastic_pools
props:
- name: resource_group_name
value: "{{ resource_group_name }}"
description: Required parameter for the elastic_pools resource.
- name: server_name
value: "{{ server_name }}"
description: Required parameter for the elastic_pools resource.
- name: elastic_pool_name
value: "{{ elastic_pool_name }}"
description: Required parameter for the elastic_pools resource.
- name: subscription_id
value: "{{ subscription_id }}"
description: Required parameter for the elastic_pools resource.
- name: tags
value: "{{ tags }}"
description: |
Resource tags.
- name: location
value: "{{ location }}"
description: |
The geo-location where the resource lives. Required.
- name: properties
description: |
Resource properties.
value:
state: "{{ state }}"
creationDate: "{{ creationDate }}"
maxSizeBytes: {{ maxSizeBytes }}
minCapacity: {{ minCapacity }}
perDatabaseSettings:
minCapacity: {{ minCapacity }}
maxCapacity: {{ maxCapacity }}
autoPauseDelay: {{ autoPauseDelay }}
zoneRedundant: {{ zoneRedundant }}
licenseType: "{{ licenseType }}"
maintenanceConfigurationId: "{{ maintenanceConfigurationId }}"
highAvailabilityReplicaCount: {{ highAvailabilityReplicaCount }}
autoPauseDelay: {{ autoPauseDelay }}
preferredEnclaveType: "{{ preferredEnclaveType }}"
availabilityZone: "{{ availabilityZone }}"
- name: sku
description: |
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: .. code-block:: azurecli az sql elastic-pool list-editions -l -o table
value:
name: "{{ name }}"
tier: "{{ tier }}"
size: "{{ size }}"
family: "{{ family }}"
capacity: {{ capacity }}
UPDATE examples
- update
Updates an elastic pool.
UPDATE azure.sql.elastic_pools
SET
sku = '{{ sku }}',
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND elastic_pool_name = '{{ elastic_pool_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
RETURNING
id,
name,
kind,
location,
properties,
sku,
systemData,
tags,
type;
REPLACE examples
- create_or_update
Creates or updates an elastic pool.
REPLACE azure.sql.elastic_pools
SET
tags = '{{ tags }}',
location = '{{ location }}',
properties = '{{ properties }}',
sku = '{{ sku }}'
WHERE
resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND elastic_pool_name = '{{ elastic_pool_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
AND location = '{{ location }}' --required
RETURNING
id,
name,
kind,
location,
properties,
sku,
systemData,
tags,
type;
DELETE examples
- delete
Deletes an elastic pool.
DELETE FROM azure.sql.elastic_pools
WHERE resource_group_name = '{{ resource_group_name }}' --required
AND server_name = '{{ server_name }}' --required
AND elastic_pool_name = '{{ elastic_pool_name }}' --required
AND subscription_id = '{{ subscription_id }}' --required
;
Lifecycle Methods
- failover
Failovers an elastic pool.
EXEC azure.sql.elastic_pools.failover
@resource_group_name='{{ resource_group_name }}' --required,
@server_name='{{ server_name }}' --required,
@elastic_pool_name='{{ elastic_pool_name }}' --required,
@subscription_id='{{ subscription_id }}' --required
;