ConnectionPool
Example Usage
using Pulumi;
using Aiven = Pulumi.Aiven;
class MyStack : Stack
{
public MyStack()
{
var mytestpool = new Aiven.ConnectionPool("mytestpool", new Aiven.ConnectionPoolArgs
{
DatabaseName = aiven_database.Mydatabase.Database_name,
PoolMode = "transaction",
PoolName = "mypool",
PoolSize = 10,
Project = aiven_project.Myproject.Project,
ServiceName = aiven_service.Myservice.Service_name,
Username = aiven_service_user.Myserviceuser.Username,
});
}
}
Coming soon!
import pulumi
import pulumi_aiven as aiven
mytestpool = aiven.ConnectionPool("mytestpool",
database_name=aiven_database["mydatabase"]["database_name"],
pool_mode="transaction",
pool_name="mypool",
pool_size=10,
project=aiven_project["myproject"]["project"],
service_name=aiven_service["myservice"]["service_name"],
username=aiven_service_user["myserviceuser"]["username"])import * as pulumi from "@pulumi/pulumi";
import * as aiven from "@pulumi/aiven";
const mytestpool = new aiven.ConnectionPool("mytestpool", {
databaseName: aiven_database_mydatabase.databaseName,
poolMode: "transaction",
poolName: "mypool",
poolSize: 10,
project: aiven_project_myproject.project,
serviceName: aiven_service_myservice.serviceName,
username: aiven_service_user_myserviceuser.username,
});Create a ConnectionPool Resource
new ConnectionPool(name: string, args: ConnectionPoolArgs, opts?: CustomResourceOptions);def ConnectionPool(resource_name, opts=None, database_name=None, pool_mode=None, pool_name=None, pool_size=None, project=None, service_name=None, username=None, __props__=None);func NewConnectionPool(ctx *Context, name string, args ConnectionPoolArgs, opts ...ResourceOption) (*ConnectionPool, error)public ConnectionPool(string name, ConnectionPoolArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args ConnectionPoolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ConnectionPoolArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ConnectionPoolArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
ConnectionPool Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The ConnectionPool resource accepts the following input properties:
- Database
Name string Name of the database the pool connects to
- Pool
Name string Name of the pool
- Project string
Project to link the connection pool to
- Service
Name string Service to link the connection pool to
- Username string
Name of the service user used to connect to the database
- Pool
Mode string Mode the pool operates in (session, transaction, statement)
- Pool
Size int Number of connections the pool may create towards the backend server
- Database
Name string Name of the database the pool connects to
- Pool
Name string Name of the pool
- Project string
Project to link the connection pool to
- Service
Name string Service to link the connection pool to
- Username string
Name of the service user used to connect to the database
- Pool
Mode string Mode the pool operates in (session, transaction, statement)
- Pool
Size int Number of connections the pool may create towards the backend server
- database
Name string Name of the database the pool connects to
- pool
Name string Name of the pool
- project string
Project to link the connection pool to
- service
Name string Service to link the connection pool to
- username string
Name of the service user used to connect to the database
- pool
Mode string Mode the pool operates in (session, transaction, statement)
- pool
Size number Number of connections the pool may create towards the backend server
- database_
name str Name of the database the pool connects to
- pool_
name str Name of the pool
- project str
Project to link the connection pool to
- service_
name str Service to link the connection pool to
- username str
Name of the service user used to connect to the database
- pool_
mode str Mode the pool operates in (session, transaction, statement)
- pool_
size float Number of connections the pool may create towards the backend server
Outputs
All input properties are implicitly available as output properties. Additionally, the ConnectionPool resource produces the following output properties:
- Connection
Uri string URI for connecting to the pool
- Id string
- The provider-assigned unique ID for this managed resource.
- Connection
Uri string URI for connecting to the pool
- Id string
- The provider-assigned unique ID for this managed resource.
- connection
Uri string URI for connecting to the pool
- id string
- The provider-assigned unique ID for this managed resource.
- connection_
uri str URI for connecting to the pool
- id str
- The provider-assigned unique ID for this managed resource.
Look up an Existing ConnectionPool Resource
Get an existing ConnectionPool 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?: ConnectionPoolState, opts?: CustomResourceOptions): ConnectionPoolstatic get(resource_name, id, opts=None, connection_uri=None, database_name=None, pool_mode=None, pool_name=None, pool_size=None, project=None, service_name=None, username=None, __props__=None);func GetConnectionPool(ctx *Context, name string, id IDInput, state *ConnectionPoolState, opts ...ResourceOption) (*ConnectionPool, error)public static ConnectionPool Get(string name, Input<string> id, ConnectionPoolState? state, CustomResourceOptions? opts = null)- 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.
The following state arguments are supported:
- Connection
Uri string URI for connecting to the pool
- Database
Name string Name of the database the pool connects to
- Pool
Mode string Mode the pool operates in (session, transaction, statement)
- Pool
Name string Name of the pool
- Pool
Size int Number of connections the pool may create towards the backend server
- Project string
Project to link the connection pool to
- Service
Name string Service to link the connection pool to
- Username string
Name of the service user used to connect to the database
- Connection
Uri string URI for connecting to the pool
- Database
Name string Name of the database the pool connects to
- Pool
Mode string Mode the pool operates in (session, transaction, statement)
- Pool
Name string Name of the pool
- Pool
Size int Number of connections the pool may create towards the backend server
- Project string
Project to link the connection pool to
- Service
Name string Service to link the connection pool to
- Username string
Name of the service user used to connect to the database
- connection
Uri string URI for connecting to the pool
- database
Name string Name of the database the pool connects to
- pool
Mode string Mode the pool operates in (session, transaction, statement)
- pool
Name string Name of the pool
- pool
Size number Number of connections the pool may create towards the backend server
- project string
Project to link the connection pool to
- service
Name string Service to link the connection pool to
- username string
Name of the service user used to connect to the database
- connection_
uri str URI for connecting to the pool
- database_
name str Name of the database the pool connects to
- pool_
mode str Mode the pool operates in (session, transaction, statement)
- pool_
name str Name of the pool
- pool_
size float Number of connections the pool may create towards the backend server
- project str
Project to link the connection pool to
- service_
name str Service to link the connection pool to
- username str
Name of the service user used to connect to the database
Package Details
- Repository
- https://github.com/pulumi/pulumi-aiven
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aivenTerraform Provider.