Show / Hide Table of Contents

Class DatabaseConnectionPool

Provides a DigitalOcean database connection pool resource.

Example Usage

Create a new PostgreSQL database connection pool

using Pulumi;
using DigitalOcean = Pulumi.DigitalOcean;

class MyStack : Stack
{
public MyStack()
{
    var postgres_example = new DigitalOcean.DatabaseCluster("postgres-example", new DigitalOcean.DatabaseClusterArgs
    {
        Engine = "pg",
        Version = "11",
        Size = "db-s-1vcpu-1gb",
        Region = "nyc1",
        NodeCount = 1,
    });
    var pool_01 = new DigitalOcean.DatabaseConnectionPool("pool-01", new DigitalOcean.DatabaseConnectionPoolArgs
    {
        ClusterId = postgres_example.Id,
        Mode = "transaction",
        Size = 20,
        DbName = "defaultdb",
        User = "doadmin",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
DatabaseConnectionPool
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public class DatabaseConnectionPool : CustomResource

Constructors

View Source

DatabaseConnectionPool(String, DatabaseConnectionPoolArgs, CustomResourceOptions)

Create a DatabaseConnectionPool resource with the given unique name, arguments, and options.

Declaration
public DatabaseConnectionPool(string name, DatabaseConnectionPoolArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

DatabaseConnectionPoolArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

ClusterId

The ID of the source database cluster. Note: This must be a PostgreSQL cluster.

Declaration
public Output<string> ClusterId { get; }
Property Value
Type Description
Output<System.String>
View Source

DbName

The database for use with the connection pool.

Declaration
public Output<string> DbName { get; }
Property Value
Type Description
Output<System.String>
View Source

Host

The hostname used to connect to the database connection pool.

Declaration
public Output<string> Host { get; }
Property Value
Type Description
Output<System.String>
View Source

Mode

The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.

Declaration
public Output<string> Mode { get; }
Property Value
Type Description
Output<System.String>
View Source

Name

The name for the database connection pool.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

Password

Password for the connection pool's user.

Declaration
public Output<string> Password { get; }
Property Value
Type Description
Output<System.String>
View Source

Port

Network port that the database connection pool is listening on.

Declaration
public Output<int> Port { get; }
Property Value
Type Description
Output<System.Int32>
View Source

PrivateHost

Same as host, but only accessible from resources within the account and in the same region.

Declaration
public Output<string> PrivateHost { get; }
Property Value
Type Description
Output<System.String>
View Source

PrivateUri

Same as uri, but only accessible from resources within the account and in the same region.

Declaration
public Output<string> PrivateUri { get; }
Property Value
Type Description
Output<System.String>
View Source

Size

The desired size of the PGBouncer connection pool.

Declaration
public Output<int> Size { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Uri

The full URI for connecting to the database connection pool.

Declaration
public Output<string> Uri { get; }
Property Value
Type Description
Output<System.String>
View Source

User

The name of the database user for use with the connection pool.

Declaration
public Output<string> User { get; }
Property Value
Type Description
Output<System.String>

Methods

View Source

Get(String, Input<String>, DatabaseConnectionPoolState, CustomResourceOptions)

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

Declaration
public static DatabaseConnectionPool Get(string name, Input<string> id, DatabaseConnectionPoolState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

DatabaseConnectionPoolState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
DatabaseConnectionPool
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.