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
Succeeded
Name | Datatype | Description |
---|---|---|
kind | string | Kind of elastic pool. This is metadata used for the Azure portal experience. |
location | string | Resource location. |
properties | object | Resource properties. |
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:```azurecli az sql elastic-pool list-editions -l <location> -o table ```` |
tags | object | Resource tags. |
Succeeded
Name | Datatype | Description |
---|---|---|
kind | string | Kind of elastic pool. This is metadata used for the Azure portal experience. |
location | string | Resource location. |
properties | object | Resource properties. |
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:```azurecli az sql elastic-pool list-editions -l <location> -o table ```` |
tags | object | Resource tags. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | resourceGroupName , serverName , elasticPoolName , subscriptionId | Gets an elastic pool. | |
list_by_server | select | resourceGroupName , serverName , subscriptionId | $skip | Gets all elastic pools in a server. |
create_or_update | insert | resourceGroupName , serverName , elasticPoolName , subscriptionId , data__location | Creates or updates an elastic pool. | |
update | update | resourceGroupName , serverName , elasticPoolName , subscriptionId | Updates an elastic pool. | |
delete | delete | resourceGroupName , serverName , elasticPoolName , subscriptionId | Deletes an elastic pool. | |
failover | exec | resourceGroupName , serverName , elasticPoolName , subscriptionId | 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 |
---|---|---|
elasticPoolName | string | The name of the elastic pool to failover. |
resourceGroupName | string | The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. |
serverName | string | The name of the server. |
subscriptionId | string | The subscription ID that identifies an Azure subscription. |
$skip | integer (int64) | The number of elements in the collection to skip. |
SELECT
examples
- get
- list_by_server
Gets an elastic pool.
SELECT
kind,
location,
properties,
sku,
tags
FROM azure.sql.elastic_pools
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serverName = '{{ serverName }}' -- required
AND elasticPoolName = '{{ elasticPoolName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
;
Gets all elastic pools in a server.
SELECT
kind,
location,
properties,
sku,
tags
FROM azure.sql.elastic_pools
WHERE resourceGroupName = '{{ resourceGroupName }}' -- required
AND serverName = '{{ serverName }}' -- required
AND subscriptionId = '{{ subscriptionId }}' -- required
AND $skip = '{{ $skip }}'
;
INSERT
examples
- create_or_update
- Manifest
Creates or updates an elastic pool.
INSERT INTO azure.sql.elastic_pools (
data__location,
data__tags,
data__sku,
data__properties,
resourceGroupName,
serverName,
elasticPoolName,
subscriptionId
)
SELECT
'{{ location }}' /* required */,
'{{ tags }}',
'{{ sku }}',
'{{ properties }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ elasticPoolName }}',
'{{ subscriptionId }}'
RETURNING
kind,
location,
properties,
sku,
tags
;
# Description fields are for documentation purposes
- name: elastic_pools
props:
- name: resourceGroupName
value: string
description: Required parameter for the elastic_pools resource.
- name: serverName
value: string
description: Required parameter for the elastic_pools resource.
- name: elasticPoolName
value: string
description: Required parameter for the elastic_pools resource.
- name: subscriptionId
value: string
description: Required parameter for the elastic_pools resource.
- name: location
value: string
description: |
Resource location.
- name: tags
value: object
description: |
Resource tags.
- name: sku
value: object
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:
```azurecli
az sql elastic-pool list-editions -l <location> -o table
- name: properties value: object description: | Resource properties.
</TabItem>
</Tabs>
## `UPDATE` examples
<Tabs
defaultValue="update"
values={[
{ label: 'update', value: 'update' }
]}
>
<TabItem value="update">
Updates an elastic pool.
```sql
UPDATE azure.sql.elastic_pools
SET
data__sku = '{{ sku }}',
data__properties = '{{ properties }}',
data__tags = '{{ tags }}'
WHERE
resourceGroupName = '{{ resourceGroupName }}' --required
AND serverName = '{{ serverName }}' --required
AND elasticPoolName = '{{ elasticPoolName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
RETURNING
kind,
location,
properties,
sku,
tags;
DELETE
examples
- delete
Deletes an elastic pool.
DELETE FROM azure.sql.elastic_pools
WHERE resourceGroupName = '{{ resourceGroupName }}' --required
AND serverName = '{{ serverName }}' --required
AND elasticPoolName = '{{ elasticPoolName }}' --required
AND subscriptionId = '{{ subscriptionId }}' --required
;
Lifecycle Methods
- failover
Failovers an elastic pool.
EXEC azure.sql.elastic_pools.failover
@resourceGroupName='{{ resourceGroupName }}' --required,
@serverName='{{ serverName }}' --required,
@elasticPoolName='{{ elasticPoolName }}' --required,
@subscriptionId='{{ subscriptionId }}' --required
;