Viewing docs for DigitalOcean v4.63.0
published on Wednesday, Mar 25, 2026 by Pulumi
published on Wednesday, Mar 25, 2026 by Pulumi
Viewing docs for DigitalOcean v4.63.0
published on Wednesday, Mar 25, 2026 by Pulumi
published on Wednesday, Mar 25, 2026 by Pulumi
Provides information on a DigitalOcean PostgreSQL database connection pool.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as digitalocean from "@pulumi/digitalocean";
const example = digitalocean.getDatabaseCluster({
name: "example-cluster",
});
const read_only = example.then(example => digitalocean.getDatabaseConnectionPool({
clusterId: example.id,
name: "pool-01",
}));
export const connectionPoolUriOutput = read_only.then(read_only => read_only.uri);
import pulumi
import pulumi_digitalocean as digitalocean
example = digitalocean.get_database_cluster(name="example-cluster")
read_only = digitalocean.get_database_connection_pool(cluster_id=example.id,
name="pool-01")
pulumi.export("connectionPoolUriOutput", read_only.uri)
package main
import (
"github.com/pulumi/pulumi-digitalocean/sdk/v4/go/digitalocean"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := digitalocean.LookupDatabaseCluster(ctx, &digitalocean.LookupDatabaseClusterArgs{
Name: "example-cluster",
}, nil)
if err != nil {
return err
}
read_only, err := digitalocean.LookupDatabaseConnectionPool(ctx, &digitalocean.LookupDatabaseConnectionPoolArgs{
ClusterId: example.Id,
Name: "pool-01",
}, nil)
if err != nil {
return err
}
ctx.Export("connectionPoolUriOutput", read_only.Uri)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;
return await Deployment.RunAsync(() =>
{
var example = DigitalOcean.GetDatabaseCluster.Invoke(new()
{
Name = "example-cluster",
});
var read_only = DigitalOcean.GetDatabaseConnectionPool.Invoke(new()
{
ClusterId = example.Apply(getDatabaseClusterResult => getDatabaseClusterResult.Id),
Name = "pool-01",
});
return new Dictionary<string, object?>
{
["connectionPoolUriOutput"] = read_only.Apply(read_only => read_only.Apply(getDatabaseConnectionPoolResult => getDatabaseConnectionPoolResult.Uri)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.digitalocean.DigitaloceanFunctions;
import com.pulumi.digitalocean.inputs.GetDatabaseClusterArgs;
import com.pulumi.digitalocean.inputs.GetDatabaseConnectionPoolArgs;
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 = DigitaloceanFunctions.getDatabaseCluster(GetDatabaseClusterArgs.builder()
.name("example-cluster")
.build());
final var read-only = DigitaloceanFunctions.getDatabaseConnectionPool(GetDatabaseConnectionPoolArgs.builder()
.clusterId(example.id())
.name("pool-01")
.build());
ctx.export("connectionPoolUriOutput", read_only.uri());
}
}
variables:
example:
fn::invoke:
function: digitalocean:getDatabaseCluster
arguments:
name: example-cluster
read-only:
fn::invoke:
function: digitalocean:getDatabaseConnectionPool
arguments:
clusterId: ${example.id}
name: pool-01
outputs:
connectionPoolUriOutput: ${["read-only"].uri}
Using getDatabaseConnectionPool
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 getDatabaseConnectionPool(args: GetDatabaseConnectionPoolArgs, opts?: InvokeOptions): Promise<GetDatabaseConnectionPoolResult>
function getDatabaseConnectionPoolOutput(args: GetDatabaseConnectionPoolOutputArgs, opts?: InvokeOptions): Output<GetDatabaseConnectionPoolResult>def get_database_connection_pool(cluster_id: Optional[str] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabaseConnectionPoolResult
def get_database_connection_pool_output(cluster_id: Optional[pulumi.Input[str]] = None,
name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatabaseConnectionPoolResult]func LookupDatabaseConnectionPool(ctx *Context, args *LookupDatabaseConnectionPoolArgs, opts ...InvokeOption) (*LookupDatabaseConnectionPoolResult, error)
func LookupDatabaseConnectionPoolOutput(ctx *Context, args *LookupDatabaseConnectionPoolOutputArgs, opts ...InvokeOption) LookupDatabaseConnectionPoolResultOutput> Note: This function is named LookupDatabaseConnectionPool in the Go SDK.
public static class GetDatabaseConnectionPool
{
public static Task<GetDatabaseConnectionPoolResult> InvokeAsync(GetDatabaseConnectionPoolArgs args, InvokeOptions? opts = null)
public static Output<GetDatabaseConnectionPoolResult> Invoke(GetDatabaseConnectionPoolInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDatabaseConnectionPoolResult> getDatabaseConnectionPool(GetDatabaseConnectionPoolArgs args, InvokeOptions options)
public static Output<GetDatabaseConnectionPoolResult> getDatabaseConnectionPool(GetDatabaseConnectionPoolArgs args, InvokeOptions options)
fn::invoke:
function: digitalocean:index/getDatabaseConnectionPool:getDatabaseConnectionPool
arguments:
# arguments dictionaryThe following arguments are supported:
- cluster_
id str - The ID of the original source database cluster.
- name str
- The name for the database connection pool.
getDatabaseConnectionPool Result
The following output properties are available:
- Cluster
Id string - Db
Name string - Name of the connection pool's default database.
- Host string
- Connection pool hostname.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mode string
- The transaction mode for the connection pool.
- Name string
- Password string
- Password for the connection pool's default user.
- Port int
- Network port that the connection pool is listening on.
- Private
Host string - Same as
host, but only accessible from resources within the account and in the same region. - Private
Uri string - Same as
uri, but only accessible from resources within the account and in the same region. - Size int
- Size of the connection pool.
- Uri string
- The full URI for connecting to the database connection pool.
- User string
- Username for the connection pool's default user.
- Cluster
Id string - Db
Name string - Name of the connection pool's default database.
- Host string
- Connection pool hostname.
- Id string
- The provider-assigned unique ID for this managed resource.
- Mode string
- The transaction mode for the connection pool.
- Name string
- Password string
- Password for the connection pool's default user.
- Port int
- Network port that the connection pool is listening on.
- Private
Host string - Same as
host, but only accessible from resources within the account and in the same region. - Private
Uri string - Same as
uri, but only accessible from resources within the account and in the same region. - Size int
- Size of the connection pool.
- Uri string
- The full URI for connecting to the database connection pool.
- User string
- Username for the connection pool's default user.
- cluster
Id String - db
Name String - Name of the connection pool's default database.
- host String
- Connection pool hostname.
- id String
- The provider-assigned unique ID for this managed resource.
- mode String
- The transaction mode for the connection pool.
- name String
- password String
- Password for the connection pool's default user.
- port Integer
- Network port that the connection pool is listening on.
- private
Host String - Same as
host, but only accessible from resources within the account and in the same region. - private
Uri String - Same as
uri, but only accessible from resources within the account and in the same region. - size Integer
- Size of the connection pool.
- uri String
- The full URI for connecting to the database connection pool.
- user String
- Username for the connection pool's default user.
- cluster
Id string - db
Name string - Name of the connection pool's default database.
- host string
- Connection pool hostname.
- id string
- The provider-assigned unique ID for this managed resource.
- mode string
- The transaction mode for the connection pool.
- name string
- password string
- Password for the connection pool's default user.
- port number
- Network port that the connection pool is listening on.
- private
Host string - Same as
host, but only accessible from resources within the account and in the same region. - private
Uri string - Same as
uri, but only accessible from resources within the account and in the same region. - size number
- Size of the connection pool.
- uri string
- The full URI for connecting to the database connection pool.
- user string
- Username for the connection pool's default user.
- cluster_
id str - db_
name str - Name of the connection pool's default database.
- host str
- Connection pool hostname.
- id str
- The provider-assigned unique ID for this managed resource.
- mode str
- The transaction mode for the connection pool.
- name str
- password str
- Password for the connection pool's default user.
- port int
- Network port that the connection pool is listening on.
- private_
host str - Same as
host, but only accessible from resources within the account and in the same region. - private_
uri str - Same as
uri, but only accessible from resources within the account and in the same region. - size int
- Size of the connection pool.
- uri str
- The full URI for connecting to the database connection pool.
- user str
- Username for the connection pool's default user.
- cluster
Id String - db
Name String - Name of the connection pool's default database.
- host String
- Connection pool hostname.
- id String
- The provider-assigned unique ID for this managed resource.
- mode String
- The transaction mode for the connection pool.
- name String
- password String
- Password for the connection pool's default user.
- port Number
- Network port that the connection pool is listening on.
- private
Host String - Same as
host, but only accessible from resources within the account and in the same region. - private
Uri String - Same as
uri, but only accessible from resources within the account and in the same region. - size Number
- Size of the connection pool.
- uri String
- The full URI for connecting to the database connection pool.
- user String
- Username for the connection pool's default user.
Package Details
- Repository
- DigitalOcean pulumi/pulumi-digitalocean
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
digitaloceanTerraform Provider.
Viewing docs for DigitalOcean v4.63.0
published on Wednesday, Mar 25, 2026 by Pulumi
published on Wednesday, Mar 25, 2026 by Pulumi
