1. Packages
  2. Azure Classic
  3. API Docs
  4. mssql
  5. getElasticPool

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

azure.mssql.getElasticPool

Explore with Pulumi AI

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi

Use this data source to access information about an existing SQL elastic pool.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";

const example = azure.mssql.getElasticPool({
    name: "mssqlelasticpoolname",
    resourceGroupName: "example-resources",
    serverName: "example-sql-server",
});
export const elasticpoolId = example.then(example => example.id);
Copy
import pulumi
import pulumi_azure as azure

example = azure.mssql.get_elastic_pool(name="mssqlelasticpoolname",
    resource_group_name="example-resources",
    server_name="example-sql-server")
pulumi.export("elasticpoolId", example.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/mssql"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := mssql.LookupElasticPool(ctx, &mssql.LookupElasticPoolArgs{
			Name:              "mssqlelasticpoolname",
			ResourceGroupName: "example-resources",
			ServerName:        "example-sql-server",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("elasticpoolId", example.Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;

return await Deployment.RunAsync(() => 
{
    var example = Azure.MSSql.GetElasticPool.Invoke(new()
    {
        Name = "mssqlelasticpoolname",
        ResourceGroupName = "example-resources",
        ServerName = "example-sql-server",
    });

    return new Dictionary<string, object?>
    {
        ["elasticpoolId"] = example.Apply(getElasticPoolResult => getElasticPoolResult.Id),
    };
});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.mssql.MssqlFunctions;
import com.pulumi.azure.mssql.inputs.GetElasticPoolArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var example = MssqlFunctions.getElasticPool(GetElasticPoolArgs.builder()
            .name("mssqlelasticpoolname")
            .resourceGroupName("example-resources")
            .serverName("example-sql-server")
            .build());

        ctx.export("elasticpoolId", example.applyValue(getElasticPoolResult -> getElasticPoolResult.id()));
    }
}
Copy
variables:
  example:
    fn::invoke:
      function: azure:mssql:getElasticPool
      arguments:
        name: mssqlelasticpoolname
        resourceGroupName: example-resources
        serverName: example-sql-server
outputs:
  elasticpoolId: ${example.id}
Copy

Using getElasticPool

Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

function getElasticPool(args: GetElasticPoolArgs, opts?: InvokeOptions): Promise<GetElasticPoolResult>
function getElasticPoolOutput(args: GetElasticPoolOutputArgs, opts?: InvokeOptions): Output<GetElasticPoolResult>
Copy
def get_elastic_pool(name: Optional[str] = None,
                     resource_group_name: Optional[str] = None,
                     server_name: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetElasticPoolResult
def get_elastic_pool_output(name: Optional[pulumi.Input[str]] = None,
                     resource_group_name: Optional[pulumi.Input[str]] = None,
                     server_name: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetElasticPoolResult]
Copy
func LookupElasticPool(ctx *Context, args *LookupElasticPoolArgs, opts ...InvokeOption) (*LookupElasticPoolResult, error)
func LookupElasticPoolOutput(ctx *Context, args *LookupElasticPoolOutputArgs, opts ...InvokeOption) LookupElasticPoolResultOutput
Copy

> Note: This function is named LookupElasticPool in the Go SDK.

public static class GetElasticPool 
{
    public static Task<GetElasticPoolResult> InvokeAsync(GetElasticPoolArgs args, InvokeOptions? opts = null)
    public static Output<GetElasticPoolResult> Invoke(GetElasticPoolInvokeArgs args, InvokeOptions? opts = null)
}
Copy
public static CompletableFuture<GetElasticPoolResult> getElasticPool(GetElasticPoolArgs args, InvokeOptions options)
public static Output<GetElasticPoolResult> getElasticPool(GetElasticPoolArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: azure:mssql/getElasticPool:getElasticPool
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Name This property is required. string
The name of the elastic pool.
ResourceGroupName This property is required. string
The name of the resource group which contains the elastic pool.
ServerName This property is required. string
The name of the SQL Server which contains the elastic pool.
Name This property is required. string
The name of the elastic pool.
ResourceGroupName This property is required. string
The name of the resource group which contains the elastic pool.
ServerName This property is required. string
The name of the SQL Server which contains the elastic pool.
name This property is required. String
The name of the elastic pool.
resourceGroupName This property is required. String
The name of the resource group which contains the elastic pool.
serverName This property is required. String
The name of the SQL Server which contains the elastic pool.
name This property is required. string
The name of the elastic pool.
resourceGroupName This property is required. string
The name of the resource group which contains the elastic pool.
serverName This property is required. string
The name of the SQL Server which contains the elastic pool.
name This property is required. str
The name of the elastic pool.
resource_group_name This property is required. str
The name of the resource group which contains the elastic pool.
server_name This property is required. str
The name of the SQL Server which contains the elastic pool.
name This property is required. String
The name of the elastic pool.
resourceGroupName This property is required. String
The name of the resource group which contains the elastic pool.
serverName This property is required. String
The name of the SQL Server which contains the elastic pool.

getElasticPool Result

The following output properties are available:

EnclaveType string
The type of enclave being used by the elastic pool.
Id string
The provider-assigned unique ID for this managed resource.
LicenseType string
The license type to apply for this elastic pool.
Location string
Specifies the supported Azure location where the resource exists.
MaxSizeBytes int
The max data size of the elastic pool in bytes.
MaxSizeGb double
The max data size of the elastic pool in gigabytes.
Name string
Specifies the SKU Name for this Elasticpool.
PerDbMaxCapacity int
The maximum capacity any one database can consume.
PerDbMinCapacity int
The minimum capacity all databases are guaranteed.
ResourceGroupName string
ServerName string
Skus List<GetElasticPoolSkus>
A sku block as defined below.
Tags Dictionary<string, string>
A mapping of tags to assign to the resource.
ZoneRedundant bool
Whether or not this elastic pool is zone redundant.
EnclaveType string
The type of enclave being used by the elastic pool.
Id string
The provider-assigned unique ID for this managed resource.
LicenseType string
The license type to apply for this elastic pool.
Location string
Specifies the supported Azure location where the resource exists.
MaxSizeBytes int
The max data size of the elastic pool in bytes.
MaxSizeGb float64
The max data size of the elastic pool in gigabytes.
Name string
Specifies the SKU Name for this Elasticpool.
PerDbMaxCapacity int
The maximum capacity any one database can consume.
PerDbMinCapacity int
The minimum capacity all databases are guaranteed.
ResourceGroupName string
ServerName string
Skus []GetElasticPoolSkus
A sku block as defined below.
Tags map[string]string
A mapping of tags to assign to the resource.
ZoneRedundant bool
Whether or not this elastic pool is zone redundant.
enclaveType String
The type of enclave being used by the elastic pool.
id String
The provider-assigned unique ID for this managed resource.
licenseType String
The license type to apply for this elastic pool.
location String
Specifies the supported Azure location where the resource exists.
maxSizeBytes Integer
The max data size of the elastic pool in bytes.
maxSizeGb Double
The max data size of the elastic pool in gigabytes.
name String
Specifies the SKU Name for this Elasticpool.
perDbMaxCapacity Integer
The maximum capacity any one database can consume.
perDbMinCapacity Integer
The minimum capacity all databases are guaranteed.
resourceGroupName String
serverName String
skus List<GetElasticPoolSkus>
A sku block as defined below.
tags Map<String,String>
A mapping of tags to assign to the resource.
zoneRedundant Boolean
Whether or not this elastic pool is zone redundant.
enclaveType string
The type of enclave being used by the elastic pool.
id string
The provider-assigned unique ID for this managed resource.
licenseType string
The license type to apply for this elastic pool.
location string
Specifies the supported Azure location where the resource exists.
maxSizeBytes number
The max data size of the elastic pool in bytes.
maxSizeGb number
The max data size of the elastic pool in gigabytes.
name string
Specifies the SKU Name for this Elasticpool.
perDbMaxCapacity number
The maximum capacity any one database can consume.
perDbMinCapacity number
The minimum capacity all databases are guaranteed.
resourceGroupName string
serverName string
skus GetElasticPoolSkus[]
A sku block as defined below.
tags {[key: string]: string}
A mapping of tags to assign to the resource.
zoneRedundant boolean
Whether or not this elastic pool is zone redundant.
enclave_type str
The type of enclave being used by the elastic pool.
id str
The provider-assigned unique ID for this managed resource.
license_type str
The license type to apply for this elastic pool.
location str
Specifies the supported Azure location where the resource exists.
max_size_bytes int
The max data size of the elastic pool in bytes.
max_size_gb float
The max data size of the elastic pool in gigabytes.
name str
Specifies the SKU Name for this Elasticpool.
per_db_max_capacity int
The maximum capacity any one database can consume.
per_db_min_capacity int
The minimum capacity all databases are guaranteed.
resource_group_name str
server_name str
skus Sequence[GetElasticPoolSkus]
A sku block as defined below.
tags Mapping[str, str]
A mapping of tags to assign to the resource.
zone_redundant bool
Whether or not this elastic pool is zone redundant.
enclaveType String
The type of enclave being used by the elastic pool.
id String
The provider-assigned unique ID for this managed resource.
licenseType String
The license type to apply for this elastic pool.
location String
Specifies the supported Azure location where the resource exists.
maxSizeBytes Number
The max data size of the elastic pool in bytes.
maxSizeGb Number
The max data size of the elastic pool in gigabytes.
name String
Specifies the SKU Name for this Elasticpool.
perDbMaxCapacity Number
The maximum capacity any one database can consume.
perDbMinCapacity Number
The minimum capacity all databases are guaranteed.
resourceGroupName String
serverName String
skus List<Property Map>
A sku block as defined below.
tags Map<String>
A mapping of tags to assign to the resource.
zoneRedundant Boolean
Whether or not this elastic pool is zone redundant.

Supporting Types

GetElasticPoolSkus

Capacity This property is required. int
The scale up/out capacity, representing server's compute units.
Family This property is required. string
The family of hardware.
Name This property is required. string
The name of the elastic pool.
Tier This property is required. string
The tier of the particular SKU.
Capacity This property is required. int
The scale up/out capacity, representing server's compute units.
Family This property is required. string
The family of hardware.
Name This property is required. string
The name of the elastic pool.
Tier This property is required. string
The tier of the particular SKU.
capacity This property is required. Integer
The scale up/out capacity, representing server's compute units.
family This property is required. String
The family of hardware.
name This property is required. String
The name of the elastic pool.
tier This property is required. String
The tier of the particular SKU.
capacity This property is required. number
The scale up/out capacity, representing server's compute units.
family This property is required. string
The family of hardware.
name This property is required. string
The name of the elastic pool.
tier This property is required. string
The tier of the particular SKU.
capacity This property is required. int
The scale up/out capacity, representing server's compute units.
family This property is required. str
The family of hardware.
name This property is required. str
The name of the elastic pool.
tier This property is required. str
The tier of the particular SKU.
capacity This property is required. Number
The scale up/out capacity, representing server's compute units.
family This property is required. String
The family of hardware.
name This property is required. String
The name of the elastic pool.
tier This property is required. String
The tier of the particular SKU.

Package Details

Repository
Azure Classic pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.

We recommend using Azure Native.

Azure v6.22.0 published on Tuesday, Apr 1, 2025 by Pulumi