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",
});
}
}
Inherited Members
Namespace: Pulumi.DigitalOcean
Assembly: Pulumi.DigitalOcean.dll
Syntax
public class DatabaseConnectionPool : CustomResource
Constructors
View SourceDatabaseConnectionPool(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 SourceClusterId
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> |
DbName
The database for use with the connection pool.
Declaration
public Output<string> DbName { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Host
The hostname used to connect to the database connection pool.
Declaration
public Output<string> Host { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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> |
Name
The name for the database connection pool.
Declaration
public Output<string> Name { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Password
Password for the connection pool's user.
Declaration
public Output<string> Password { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Port
Network port that the database connection pool is listening on.
Declaration
public Output<int> Port { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
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> |
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> |
Size
The desired size of the PGBouncer connection pool.
Declaration
public Output<int> Size { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.Int32> |
Uri
The full URI for connecting to the database connection pool.
Declaration
public Output<string> Uri { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
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 SourceGet(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 |