Skip to main content

elastic_pools

Creates, updates, deletes, gets or lists a elastic_pools resource.

Overview

Nameelastic_pools
TypeResource
Idazure.sql.elastic_pools

Fields

NameDatatypeDescription
availability_zonetextfield from the properties object
creation_datetextfield from the properties object
elasticPoolNametextfield from the properties object
high_availability_replica_counttextfield from the properties object
kindtextKind of elastic pool. This is metadata used for the Azure portal experience.
license_typetextfield from the properties object
locationtextResource location.
maintenance_configuration_idtextfield from the properties object
max_size_bytestextfield from the properties object
min_capacitytextfield from the properties object
per_database_settingstextfield from the properties object
preferred_enclave_typetextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
skutextAn ARM Resource SKU.
statetextfield from the properties object
subscriptionIdtextfield from the properties object
tagstextResource tags.
zone_redundanttextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTelasticPoolName, resourceGroupName, serverName, subscriptionIdGets an elastic pool.
list_by_serverSELECTresourceGroupName, serverName, subscriptionIdGets all elastic pools in a server.
create_or_updateINSERTelasticPoolName, resourceGroupName, serverName, subscriptionId, data__locationCreates or updates an elastic pool.
deleteDELETEelasticPoolName, resourceGroupName, serverName, subscriptionIdDeletes an elastic pool.
updateUPDATEelasticPoolName, resourceGroupName, serverName, subscriptionIdUpdates an elastic pool.
failoverEXECelasticPoolName, resourceGroupName, serverName, subscriptionIdFailovers an elastic pool.

SELECT examples

Gets all elastic pools in a server.

SELECT
availability_zone,
creation_date,
elasticPoolName,
high_availability_replica_count,
kind,
license_type,
location,
maintenance_configuration_id,
max_size_bytes,
min_capacity,
per_database_settings,
preferred_enclave_type,
resourceGroupName,
serverName,
sku,
state,
subscriptionId,
tags,
zone_redundant
FROM azure.sql.vw_elastic_pools
WHERE resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

INSERT example

Use the following StackQL query and manifest file to create a new elastic_pools resource.

/*+ create */
INSERT INTO azure.sql.elastic_pools (
elasticPoolName,
resourceGroupName,
serverName,
subscriptionId,
data__location,
location,
tags,
sku,
properties
)
SELECT
'{{ elasticPoolName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ data__location }}',
'{{ location }}',
'{{ tags }}',
'{{ sku }}',
'{{ properties }}'
;

UPDATE example

Updates a elastic_pools resource.

/*+ update */
UPDATE azure.sql.elastic_pools
SET
sku = '{{ sku }}',
properties = '{{ properties }}',
tags = '{{ tags }}'
WHERE
elasticPoolName = '{{ elasticPoolName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';

DELETE example

Deletes the specified elastic_pools resource.

/*+ delete */
DELETE FROM azure.sql.elastic_pools
WHERE elasticPoolName = '{{ elasticPoolName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}';