1. Packages
  2. Aiven Provider
  3. API Docs
  4. getConnectionPool
Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi

aiven.getConnectionPool

Explore with Pulumi AI

aiven logo
Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi

    Gets information about a connection pool in an Aiven for PostgreSQLĀ® service.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aiven from "@pulumi/aiven";
    
    const main = aiven.getConnectionPool({
        project: exampleProject.project,
        serviceName: examplePostgres.serviceName,
        poolName: "example-pool",
    });
    
    import pulumi
    import pulumi_aiven as aiven
    
    main = aiven.get_connection_pool(project=example_project["project"],
        service_name=example_postgres["serviceName"],
        pool_name="example-pool")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aiven/sdk/v6/go/aiven"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := aiven.LookupConnectionPool(ctx, &aiven.LookupConnectionPoolArgs{
    			Project:     exampleProject.Project,
    			ServiceName: examplePostgres.ServiceName,
    			PoolName:    "example-pool",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aiven = Pulumi.Aiven;
    
    return await Deployment.RunAsync(() => 
    {
        var main = Aiven.GetConnectionPool.Invoke(new()
        {
            Project = exampleProject.Project,
            ServiceName = examplePostgres.ServiceName,
            PoolName = "example-pool",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aiven.AivenFunctions;
    import com.pulumi.aiven.inputs.GetConnectionPoolArgs;
    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 main = AivenFunctions.getConnectionPool(GetConnectionPoolArgs.builder()
                .project(exampleProject.project())
                .serviceName(examplePostgres.serviceName())
                .poolName("example-pool")
                .build());
    
        }
    }
    
    variables:
      main:
        fn::invoke:
          Function: aiven:getConnectionPool
          Arguments:
            project: ${exampleProject.project}
            serviceName: ${examplePostgres.serviceName}
            poolName: example-pool
    

    Using getConnectionPool

    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 getConnectionPool(args: GetConnectionPoolArgs, opts?: InvokeOptions): Promise<GetConnectionPoolResult>
    function getConnectionPoolOutput(args: GetConnectionPoolOutputArgs, opts?: InvokeOptions): Output<GetConnectionPoolResult>
    def get_connection_pool(pool_name: Optional[str] = None,
                            project: Optional[str] = None,
                            service_name: Optional[str] = None,
                            opts: Optional[InvokeOptions] = None) -> GetConnectionPoolResult
    def get_connection_pool_output(pool_name: Optional[pulumi.Input[str]] = None,
                            project: Optional[pulumi.Input[str]] = None,
                            service_name: Optional[pulumi.Input[str]] = None,
                            opts: Optional[InvokeOptions] = None) -> Output[GetConnectionPoolResult]
    func LookupConnectionPool(ctx *Context, args *LookupConnectionPoolArgs, opts ...InvokeOption) (*LookupConnectionPoolResult, error)
    func LookupConnectionPoolOutput(ctx *Context, args *LookupConnectionPoolOutputArgs, opts ...InvokeOption) LookupConnectionPoolResultOutput

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

    public static class GetConnectionPool 
    {
        public static Task<GetConnectionPoolResult> InvokeAsync(GetConnectionPoolArgs args, InvokeOptions? opts = null)
        public static Output<GetConnectionPoolResult> Invoke(GetConnectionPoolInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetConnectionPoolResult> getConnectionPool(GetConnectionPoolArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: aiven:index/getConnectionPool:getConnectionPool
      arguments:
        # arguments dictionary

    The following arguments are supported:

    PoolName string
    Name of the pool. Changing this property forces recreation of the resource.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    PoolName string
    Name of the pool. Changing this property forces recreation of the resource.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    poolName String
    Name of the pool. Changing this property forces recreation of the resource.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    poolName string
    Name of the pool. Changing this property forces recreation of the resource.
    project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    pool_name str
    Name of the pool. Changing this property forces recreation of the resource.
    project str
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    service_name str
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    poolName String
    Name of the pool. Changing this property forces recreation of the resource.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.

    getConnectionPool Result

    The following output properties are available:

    ConnectionUri string
    The URI for connecting to the pool.
    DatabaseName string
    The name of the database the pool connects to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    PoolMode string
    The operational mode. The possible values are session, transaction and statement. The default value is transaction.
    PoolName string
    Name of the pool. Changing this property forces recreation of the resource.
    PoolSize int
    The number of PostgreSQL server connections this pool can use at a time. This does not affect the number of incoming connections. Each pool can handle a minimum of 5000 client connections. The default value is 10.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Username string
    The name of the service user used to connect to the database. To set up proper dependencies please refer to this variable as a reference.
    ConnectionUri string
    The URI for connecting to the pool.
    DatabaseName string
    The name of the database the pool connects to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    PoolMode string
    The operational mode. The possible values are session, transaction and statement. The default value is transaction.
    PoolName string
    Name of the pool. Changing this property forces recreation of the resource.
    PoolSize int
    The number of PostgreSQL server connections this pool can use at a time. This does not affect the number of incoming connections. Each pool can handle a minimum of 5000 client connections. The default value is 10.
    Project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    ServiceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    Username string
    The name of the service user used to connect to the database. To set up proper dependencies please refer to this variable as a reference.
    connectionUri String
    The URI for connecting to the pool.
    databaseName String
    The name of the database the pool connects to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    poolMode String
    The operational mode. The possible values are session, transaction and statement. The default value is transaction.
    poolName String
    Name of the pool. Changing this property forces recreation of the resource.
    poolSize Integer
    The number of PostgreSQL server connections this pool can use at a time. This does not affect the number of incoming connections. Each pool can handle a minimum of 5000 client connections. The default value is 10.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username String
    The name of the service user used to connect to the database. To set up proper dependencies please refer to this variable as a reference.
    connectionUri string
    The URI for connecting to the pool.
    databaseName string
    The name of the database the pool connects to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    id string
    The provider-assigned unique ID for this managed resource.
    poolMode string
    The operational mode. The possible values are session, transaction and statement. The default value is transaction.
    poolName string
    Name of the pool. Changing this property forces recreation of the resource.
    poolSize number
    The number of PostgreSQL server connections this pool can use at a time. This does not affect the number of incoming connections. Each pool can handle a minimum of 5000 client connections. The default value is 10.
    project string
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName string
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username string
    The name of the service user used to connect to the database. To set up proper dependencies please refer to this variable as a reference.
    connection_uri str
    The URI for connecting to the pool.
    database_name str
    The name of the database the pool connects to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    id str
    The provider-assigned unique ID for this managed resource.
    pool_mode str
    The operational mode. The possible values are session, transaction and statement. The default value is transaction.
    pool_name str
    Name of the pool. Changing this property forces recreation of the resource.
    pool_size int
    The number of PostgreSQL server connections this pool can use at a time. This does not affect the number of incoming connections. Each pool can handle a minimum of 5000 client connections. The default value is 10.
    project str
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    service_name str
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username str
    The name of the service user used to connect to the database. To set up proper dependencies please refer to this variable as a reference.
    connectionUri String
    The URI for connecting to the pool.
    databaseName String
    The name of the database the pool connects to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    id String
    The provider-assigned unique ID for this managed resource.
    poolMode String
    The operational mode. The possible values are session, transaction and statement. The default value is transaction.
    poolName String
    Name of the pool. Changing this property forces recreation of the resource.
    poolSize Number
    The number of PostgreSQL server connections this pool can use at a time. This does not affect the number of incoming connections. Each pool can handle a minimum of 5000 client connections. The default value is 10.
    project String
    The name of the project this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    serviceName String
    The name of the service that this resource belongs to. To set up proper dependencies please refer to this variable as a reference. Changing this property forces recreation of the resource.
    username String
    The name of the service user used to connect to the database. To set up proper dependencies please refer to this variable as a reference.

    Package Details

    Repository
    Aiven pulumi/pulumi-aiven
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aiven Terraform Provider.
    aiven logo
    Aiven v6.25.0 published on Friday, Sep 27, 2024 by Pulumi