Ready to level-up your engineering skills? Join a Pulumi Workshop. Register Now

getConnectionPool

# Connection Pool Data Source

The Connection Pool data source provides information about the existing Aiven Connection Pool.

Example Usage

using Pulumi;
using Aiven = Pulumi.Aiven;

class MyStack : Stack
{
    public MyStack()
    {
        var mytestpool = Output.Create(Aiven.GetConnectionPool.InvokeAsync(new Aiven.GetConnectionPoolArgs
        {
            PoolName = "mypool",
            Project = aiven_project.Myproject.Project,
            ServiceName = aiven_service.Myservice.Service_name,
        }));
    }

}
package main

import (
    "github.com/pulumi/pulumi-aiven/sdk/v3/go/aiven"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := aiven.LookupConnectionPool(ctx, &aiven.LookupConnectionPoolArgs{
            PoolName:    "mypool",
            Project:     aiven_project.Myproject.Project,
            ServiceName: aiven_service.Myservice.Service_name,
        }, nil)
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aiven as aiven

mytestpool = aiven.get_connection_pool(pool_name="mypool",
    project=aiven_project["myproject"]["project"],
    service_name=aiven_service["myservice"]["service_name"])
import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";

const mytestpool = pulumi.all([aiven_project_myproject.project, aiven_service_myservice.serviceName]).apply(([project, serviceName]) => aiven.getConnectionPool({
    poolName: "mypool",
    project: project,
    serviceName: serviceName,
}, { async: true }));

Using getConnectionPool

function getConnectionPool(args: GetConnectionPoolArgs, opts?: InvokeOptions): Promise<GetConnectionPoolResult>
def get_connection_pool(connection_uri: Optional[str] = None, database_name: Optional[str] = None, pool_mode: Optional[str] = None, pool_name: Optional[str] = None, pool_size: Optional[int] = None, project: Optional[str] = None, service_name: Optional[str] = None, username: Optional[str] = None, opts: Optional[InvokeOptions] = None) -> GetConnectionPoolResult
func LookupConnectionPool(ctx *Context, args *LookupConnectionPoolArgs, opts ...InvokeOption) (*LookupConnectionPoolResult, error)

Note: This function is named LookupConnectionPool in the Go SDK.

public static class GetConnectionPool {
    public static Task<GetConnectionPoolResult> InvokeAsync(GetConnectionPoolArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

PoolName string

is the name of the pool.

Project string

and service_name - (Required) define the project and service the connection pool belongs to. They should be defined using reference as shown above to set up dependencies correctly. These properties cannot be changed once the service is created. Doing so will result in the connection pool being deleted and new one created instead.

ServiceName string
ConnectionUri string

is a computed property that tells the URI for connecting to the pool. This value cannot be set, only read.

DatabaseName string

is the name of the database the pool connects to. This should be defined using reference as shown above to set up dependencies correctly.

PoolMode string

is the mode the pool operates in (session, transaction, statement).

PoolSize int

is the number of connections the pool may create towards the backend server. This does not affect the number of incoming connections, which is always a much larger number.

Username string

is the name of the service user used to connect to the database. This should be defined using reference as shown above to set up dependencies correctly.

PoolName string

is the name of the pool.

Project string

and service_name - (Required) define the project and service the connection pool belongs to. They should be defined using reference as shown above to set up dependencies correctly. These properties cannot be changed once the service is created. Doing so will result in the connection pool being deleted and new one created instead.

ServiceName string
ConnectionUri string

is a computed property that tells the URI for connecting to the pool. This value cannot be set, only read.

DatabaseName string

is the name of the database the pool connects to. This should be defined using reference as shown above to set up dependencies correctly.

PoolMode string

is the mode the pool operates in (session, transaction, statement).

PoolSize int

is the number of connections the pool may create towards the backend server. This does not affect the number of incoming connections, which is always a much larger number.

Username string

is the name of the service user used to connect to the database. This should be defined using reference as shown above to set up dependencies correctly.

poolName string

is the name of the pool.

project string

and service_name - (Required) define the project and service the connection pool belongs to. They should be defined using reference as shown above to set up dependencies correctly. These properties cannot be changed once the service is created. Doing so will result in the connection pool being deleted and new one created instead.

serviceName string
connectionUri string

is a computed property that tells the URI for connecting to the pool. This value cannot be set, only read.

databaseName string

is the name of the database the pool connects to. This should be defined using reference as shown above to set up dependencies correctly.

poolMode string

is the mode the pool operates in (session, transaction, statement).

poolSize number

is the number of connections the pool may create towards the backend server. This does not affect the number of incoming connections, which is always a much larger number.

username string

is the name of the service user used to connect to the database. This should be defined using reference as shown above to set up dependencies correctly.

pool_name str

is the name of the pool.

project str

and service_name - (Required) define the project and service the connection pool belongs to. They should be defined using reference as shown above to set up dependencies correctly. These properties cannot be changed once the service is created. Doing so will result in the connection pool being deleted and new one created instead.

service_name str
connection_uri str

is a computed property that tells the URI for connecting to the pool. This value cannot be set, only read.

database_name str

is the name of the database the pool connects to. This should be defined using reference as shown above to set up dependencies correctly.

pool_mode str

is the mode the pool operates in (session, transaction, statement).

pool_size int

is the number of connections the pool may create towards the backend server. This does not affect the number of incoming connections, which is always a much larger number.

username str

is the name of the service user used to connect to the database. This should be defined using reference as shown above to set up dependencies correctly.

getConnectionPool Result

The following output properties are available:

ConnectionUri string

is a computed property that tells the URI for connecting to the pool. This value cannot be set, only read.

Id string

The provider-assigned unique ID for this managed resource.

PoolName string
Project string
ServiceName string
DatabaseName string

is the name of the database the pool connects to. This should be defined using reference as shown above to set up dependencies correctly.

PoolMode string

is the mode the pool operates in (session, transaction, statement).

PoolSize int

is the number of connections the pool may create towards the backend server. This does not affect the number of incoming connections, which is always a much larger number.

Username string

is the name of the service user used to connect to the database. This should be defined using reference as shown above to set up dependencies correctly.

ConnectionUri string

is a computed property that tells the URI for connecting to the pool. This value cannot be set, only read.

Id string

The provider-assigned unique ID for this managed resource.

PoolName string
Project string
ServiceName string
DatabaseName string

is the name of the database the pool connects to. This should be defined using reference as shown above to set up dependencies correctly.

PoolMode string

is the mode the pool operates in (session, transaction, statement).

PoolSize int

is the number of connections the pool may create towards the backend server. This does not affect the number of incoming connections, which is always a much larger number.

Username string

is the name of the service user used to connect to the database. This should be defined using reference as shown above to set up dependencies correctly.

connectionUri string

is a computed property that tells the URI for connecting to the pool. This value cannot be set, only read.

id string

The provider-assigned unique ID for this managed resource.

poolName string
project string
serviceName string
databaseName string

is the name of the database the pool connects to. This should be defined using reference as shown above to set up dependencies correctly.

poolMode string

is the mode the pool operates in (session, transaction, statement).

poolSize number

is the number of connections the pool may create towards the backend server. This does not affect the number of incoming connections, which is always a much larger number.

username string

is the name of the service user used to connect to the database. This should be defined using reference as shown above to set up dependencies correctly.

connection_uri str

is a computed property that tells the URI for connecting to the pool. This value cannot be set, only read.

id str

The provider-assigned unique ID for this managed resource.

pool_name str
project str
service_name str
database_name str

is the name of the database the pool connects to. This should be defined using reference as shown above to set up dependencies correctly.

pool_mode str

is the mode the pool operates in (session, transaction, statement).

pool_size int

is the number of connections the pool may create towards the backend server. This does not affect the number of incoming connections, which is always a much larger number.

username str

is the name of the service user used to connect to the database. This should be defined using reference as shown above to set up dependencies correctly.

Package Details

Repository
https://github.com/pulumi/pulumi-aiven
License
Apache-2.0
Notes
This Pulumi package is based on the aiven Terraform Provider.