1. Registry
  2. Packages
  3. UpCloud
  4. API Docs
  5. ManagedDatabaseConnectionPool
Viewing docs for UpCloud v0.19.1
published on Friday, Sep 11, 2026 by UpCloudLtd
upcloud logo
Viewing docs for UpCloud v0.19.1
published on Friday, Sep 11, 2026 by UpCloudLtd

    This resource represents a connection pool in a managed database (PostgreSQL).

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as upcloud from "@upcloud/pulumi-upcloud";
    
    const example = new upcloud.ManagedDatabasePostgresql("example", {
        maintenanceWindowTime: "10:00:00",
        maintenanceWindowDow: "friday",
        name: "postgres",
        plan: "1x1xCPU-2GB-25GB",
        powered: true,
        title: "postgres",
        zone: "pl-waw1",
    });
    const exampleManagedDatabaseConnectionPool = new upcloud.ManagedDatabaseConnectionPool("example", {
        service: example.id,
        database: "defaultdb",
        mode: "session",
        name: "example-2",
        size: 95,
    });
    
    import pulumi
    import pulumi_upcloud as upcloud
    
    example = upcloud.ManagedDatabasePostgresql("example",
        maintenance_window_time="10:00:00",
        maintenance_window_dow="friday",
        name="postgres",
        plan="1x1xCPU-2GB-25GB",
        powered=True,
        title="postgres",
        zone="pl-waw1")
    example_managed_database_connection_pool = upcloud.ManagedDatabaseConnectionPool("example",
        service=example.id,
        database="defaultdb",
        mode="session",
        name="example-2",
        size=95)
    
    package main
    
    import (
    	"github.com/UpCloudLtd/pulumi-upcloud/sdk/go/upcloud"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := upcloud.NewManagedDatabasePostgresql(ctx, "example", &upcloud.ManagedDatabasePostgresqlArgs{
    			MaintenanceWindowTime: pulumi.String("10:00:00"),
    			MaintenanceWindowDow:  pulumi.String("friday"),
    			Name:                  pulumi.String("postgres"),
    			Plan:                  pulumi.String("1x1xCPU-2GB-25GB"),
    			Powered:               pulumi.Bool(true),
    			Title:                 pulumi.String("postgres"),
    			Zone:                  pulumi.String("pl-waw1"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = upcloud.NewManagedDatabaseConnectionPool(ctx, "example", &upcloud.ManagedDatabaseConnectionPoolArgs{
    			Service:  example.ID(),
    			Database: pulumi.String("defaultdb"),
    			Mode:     pulumi.String("session"),
    			Name:     pulumi.String("example-2"),
    			Size:     pulumi.Int(95),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using UpCloud = UpCloud.Pulumi.UpCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new UpCloud.ManagedDatabasePostgresql("example", new()
        {
            MaintenanceWindowTime = "10:00:00",
            MaintenanceWindowDow = "friday",
            Name = "postgres",
            Plan = "1x1xCPU-2GB-25GB",
            Powered = true,
            Title = "postgres",
            Zone = "pl-waw1",
        });
    
        var exampleManagedDatabaseConnectionPool = new UpCloud.ManagedDatabaseConnectionPool("example", new()
        {
            Service = example.Id,
            Database = "defaultdb",
            Mode = "session",
            Name = "example-2",
            Size = 95,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.upcloud.ManagedDatabasePostgresql;
    import com.pulumi.upcloud.ManagedDatabasePostgresqlArgs;
    import com.pulumi.upcloud.ManagedDatabaseConnectionPool;
    import com.pulumi.upcloud.ManagedDatabaseConnectionPoolArgs;
    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) {
            var example = new ManagedDatabasePostgresql("example", ManagedDatabasePostgresqlArgs.builder()
                .maintenanceWindowTime("10:00:00")
                .maintenanceWindowDow("friday")
                .name("postgres")
                .plan("1x1xCPU-2GB-25GB")
                .powered(true)
                .title("postgres")
                .zone("pl-waw1")
                .build());
    
            var exampleManagedDatabaseConnectionPool = new ManagedDatabaseConnectionPool("exampleManagedDatabaseConnectionPool", ManagedDatabaseConnectionPoolArgs.builder()
                .service(example.id())
                .database("defaultdb")
                .mode("session")
                .name("example-2")
                .size(95)
                .build());
    
        }
    }
    
    resources:
      example:
        type: upcloud:ManagedDatabasePostgresql
        properties:
          maintenanceWindowTime: 10:00:00
          maintenanceWindowDow: friday
          name: postgres
          plan: 1x1xCPU-2GB-25GB
          powered: true
          title: postgres
          zone: pl-waw1
      exampleManagedDatabaseConnectionPool:
        type: upcloud:ManagedDatabaseConnectionPool
        name: example
        properties:
          service: ${example.id}
          database: defaultdb
          mode: session
          name: example-2
          size: 95
    
    Example coming soon!
    

    Create ManagedDatabaseConnectionPool Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ManagedDatabaseConnectionPool(name: string, args: ManagedDatabaseConnectionPoolArgs, opts?: CustomResourceOptions);
    @overload
    def ManagedDatabaseConnectionPool(resource_name: str,
                                      args: ManagedDatabaseConnectionPoolArgs,
                                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ManagedDatabaseConnectionPool(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      database: Optional[str] = None,
                                      mode: Optional[str] = None,
                                      service: Optional[str] = None,
                                      size: Optional[int] = None,
                                      name: Optional[str] = None,
                                      username: Optional[str] = None)
    func NewManagedDatabaseConnectionPool(ctx *Context, name string, args ManagedDatabaseConnectionPoolArgs, opts ...ResourceOption) (*ManagedDatabaseConnectionPool, error)
    public ManagedDatabaseConnectionPool(string name, ManagedDatabaseConnectionPoolArgs args, CustomResourceOptions? opts = null)
    public ManagedDatabaseConnectionPool(String name, ManagedDatabaseConnectionPoolArgs args)
    public ManagedDatabaseConnectionPool(String name, ManagedDatabaseConnectionPoolArgs args, CustomResourceOptions options)
    
    type: upcloud:ManagedDatabaseConnectionPool
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "upcloud_managed_database_connection_pool" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ManagedDatabaseConnectionPoolArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ManagedDatabaseConnectionPoolArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ManagedDatabaseConnectionPoolArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ManagedDatabaseConnectionPoolArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ManagedDatabaseConnectionPoolArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var managedDatabaseConnectionPoolResource = new UpCloud.ManagedDatabaseConnectionPool("managedDatabaseConnectionPoolResource", new()
    {
        Database = "string",
        Mode = "string",
        Service = "string",
        Size = 0,
        Name = "string",
        Username = "string",
    });
    
    example, err := upcloud.NewManagedDatabaseConnectionPool(ctx, "managedDatabaseConnectionPoolResource", &upcloud.ManagedDatabaseConnectionPoolArgs{
    	Database: pulumi.String("string"),
    	Mode:     pulumi.String("string"),
    	Service:  pulumi.String("string"),
    	Size:     pulumi.Int(0),
    	Name:     pulumi.String("string"),
    	Username: pulumi.String("string"),
    })
    
    resource "upcloud_managed_database_connection_pool" "managedDatabaseConnectionPoolResource" {
      lifecycle {
        create_before_destroy = true
      }
      database = "string"
      mode     = "string"
      service  = "string"
      size     = 0
      name     = "string"
      username = "string"
    }
    
    var managedDatabaseConnectionPoolResource = new ManagedDatabaseConnectionPool("managedDatabaseConnectionPoolResource", ManagedDatabaseConnectionPoolArgs.builder()
        .database("string")
        .mode("string")
        .service("string")
        .size(0)
        .name("string")
        .username("string")
        .build());
    
    managed_database_connection_pool_resource = upcloud.ManagedDatabaseConnectionPool("managedDatabaseConnectionPoolResource",
        database="string",
        mode="string",
        service="string",
        size=0,
        name="string",
        username="string")
    
    const managedDatabaseConnectionPoolResource = new upcloud.ManagedDatabaseConnectionPool("managedDatabaseConnectionPoolResource", {
        database: "string",
        mode: "string",
        service: "string",
        size: 0,
        name: "string",
        username: "string",
    });
    
    type: upcloud:ManagedDatabaseConnectionPool
    properties:
        database: string
        mode: string
        name: string
        service: string
        size: 0
        username: string
    

    ManagedDatabaseConnectionPool Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ManagedDatabaseConnectionPool resource accepts the following input properties:

    Database string
    Name of the database.
    Mode string
    Connection pool mode.
    Service string
    UUID of the service to which this connection pool belongs.
    Size int
    Connection pool size.
    Name string
    Connection pool name.
    Username string
    Service username. If not set, all users are allowed to access this connection pool.
    Database string
    Name of the database.
    Mode string
    Connection pool mode.
    Service string
    UUID of the service to which this connection pool belongs.
    Size int
    Connection pool size.
    Name string
    Connection pool name.
    Username string
    Service username. If not set, all users are allowed to access this connection pool.
    database string
    Name of the database.
    mode string
    Connection pool mode.
    service string
    UUID of the service to which this connection pool belongs.
    size number
    Connection pool size.
    name string
    Connection pool name.
    username string
    Service username. If not set, all users are allowed to access this connection pool.
    database String
    Name of the database.
    mode String
    Connection pool mode.
    service String
    UUID of the service to which this connection pool belongs.
    size Integer
    Connection pool size.
    name String
    Connection pool name.
    username String
    Service username. If not set, all users are allowed to access this connection pool.
    database string
    Name of the database.
    mode string
    Connection pool mode.
    service string
    UUID of the service to which this connection pool belongs.
    size number
    Connection pool size.
    name string
    Connection pool name.
    username string
    Service username. If not set, all users are allowed to access this connection pool.
    database str
    Name of the database.
    mode str
    Connection pool mode.
    service str
    UUID of the service to which this connection pool belongs.
    size int
    Connection pool size.
    name str
    Connection pool name.
    username str
    Service username. If not set, all users are allowed to access this connection pool.
    database String
    Name of the database.
    mode String
    Connection pool mode.
    service String
    UUID of the service to which this connection pool belongs.
    size Number
    Connection pool size.
    name String
    Connection pool name.
    username String
    Service username. If not set, all users are allowed to access this connection pool.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ManagedDatabaseConnectionPool resource produces the following output properties:

    ConnectionUri string
    Connection URI for the connection pool.
    Id string
    The provider-assigned unique ID for this managed resource.
    ConnectionUri string
    Connection URI for the connection pool.
    Id string
    The provider-assigned unique ID for this managed resource.
    connection_uri string
    Connection URI for the connection pool.
    id string
    The provider-assigned unique ID for this managed resource.
    connectionUri String
    Connection URI for the connection pool.
    id String
    The provider-assigned unique ID for this managed resource.
    connectionUri string
    Connection URI for the connection pool.
    id string
    The provider-assigned unique ID for this managed resource.
    connection_uri str
    Connection URI for the connection pool.
    id str
    The provider-assigned unique ID for this managed resource.
    connectionUri String
    Connection URI for the connection pool.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ManagedDatabaseConnectionPool Resource

    Get an existing ManagedDatabaseConnectionPool resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ManagedDatabaseConnectionPoolState, opts?: CustomResourceOptions): ManagedDatabaseConnectionPool
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            connection_uri: Optional[str] = None,
            database: Optional[str] = None,
            mode: Optional[str] = None,
            name: Optional[str] = None,
            service: Optional[str] = None,
            size: Optional[int] = None,
            username: Optional[str] = None) -> ManagedDatabaseConnectionPool
    func GetManagedDatabaseConnectionPool(ctx *Context, name string, id IDInput, state *ManagedDatabaseConnectionPoolState, opts ...ResourceOption) (*ManagedDatabaseConnectionPool, error)
    public static ManagedDatabaseConnectionPool Get(string name, Input<string> id, ManagedDatabaseConnectionPoolState? state, CustomResourceOptions? opts = null)
    public static ManagedDatabaseConnectionPool get(String name, Output<String> id, ManagedDatabaseConnectionPoolState state, CustomResourceOptions options)
    resources:  _:    type: upcloud:ManagedDatabaseConnectionPool    get:      id: ${id}
    import {
      to = upcloud_managed_database_connection_pool.example
      id = "${id}"
    }
    
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    ConnectionUri string
    Connection URI for the connection pool.
    Database string
    Name of the database.
    Mode string
    Connection pool mode.
    Name string
    Connection pool name.
    Service string
    UUID of the service to which this connection pool belongs.
    Size int
    Connection pool size.
    Username string
    Service username. If not set, all users are allowed to access this connection pool.
    ConnectionUri string
    Connection URI for the connection pool.
    Database string
    Name of the database.
    Mode string
    Connection pool mode.
    Name string
    Connection pool name.
    Service string
    UUID of the service to which this connection pool belongs.
    Size int
    Connection pool size.
    Username string
    Service username. If not set, all users are allowed to access this connection pool.
    connection_uri string
    Connection URI for the connection pool.
    database string
    Name of the database.
    mode string
    Connection pool mode.
    name string
    Connection pool name.
    service string
    UUID of the service to which this connection pool belongs.
    size number
    Connection pool size.
    username string
    Service username. If not set, all users are allowed to access this connection pool.
    connectionUri String
    Connection URI for the connection pool.
    database String
    Name of the database.
    mode String
    Connection pool mode.
    name String
    Connection pool name.
    service String
    UUID of the service to which this connection pool belongs.
    size Integer
    Connection pool size.
    username String
    Service username. If not set, all users are allowed to access this connection pool.
    connectionUri string
    Connection URI for the connection pool.
    database string
    Name of the database.
    mode string
    Connection pool mode.
    name string
    Connection pool name.
    service string
    UUID of the service to which this connection pool belongs.
    size number
    Connection pool size.
    username string
    Service username. If not set, all users are allowed to access this connection pool.
    connection_uri str
    Connection URI for the connection pool.
    database str
    Name of the database.
    mode str
    Connection pool mode.
    name str
    Connection pool name.
    service str
    UUID of the service to which this connection pool belongs.
    size int
    Connection pool size.
    username str
    Service username. If not set, all users are allowed to access this connection pool.
    connectionUri String
    Connection URI for the connection pool.
    database String
    Name of the database.
    mode String
    Connection pool mode.
    name String
    Connection pool name.
    service String
    UUID of the service to which this connection pool belongs.
    size Number
    Connection pool size.
    username String
    Service username. If not set, all users are allowed to access this connection pool.

    Package Details

    Repository
    upcloud UpCloudLtd/pulumi-upcloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the upcloud Terraform Provider.
    upcloud logo
    Viewing docs for UpCloud v0.19.1
    published on Friday, Sep 11, 2026 by UpCloudLtd

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial