{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"For PostgreSQL database clusters, connection pools can be used to allow a\ndatabase to share its idle connections. The popular PostgreSQL connection\npooling utility PgBouncer is used to provide this service. [See here for more information](https://docs.digitalocean.com/products/databases/postgresql/how-to/manage-connection-pools/)\nabout how and why to use PgBouncer connection pooling including\ndetails about the available transaction modes.\n\nTo add a new connection pool to a PostgreSQL database cluster, send a POST\nrequest to `/v2/databases/$DATABASE_ID/pools` specifying a name for the pool,\nthe user to connect with, the database to connect to, as well as its desired\nsize and transaction mode.\n","properties":{"path":{"type":"object","properties":{"database_cluster_uuid":{"type":"string","format":"uuid","examples":["9cc10173-e9ea-4176-9dbc-a4cee4c4ff30"],"description":"A unique identifier for a database cluster."}},"required":["database_cluster_uuid"],"additionalProperties":false},"body":{"$ref":"#/definitions/connection_pool","examples":[{"name":"backend-pool","mode":"transaction","size":10,"db":"defaultdb","user":"doadmin"}]}},"required":["path","body"],"additionalProperties":false,"definitions":{"connection_pool":{"type":"object","properties":{"name":{"type":"string","description":"A unique name for the connection pool. Must be between 3 and 60 characters.","examples":["backend-pool"]},"mode":{"type":"string","description":"The PGBouncer transaction mode for the connection pool. The allowed values are session, transaction, and statement.","examples":["transaction"]},"size":{"type":"integer","description":"The desired size of the PGBouncer connection pool. The maximum allowed size is determined by the size of the cluster's primary node. 25 backend server connections are allowed for every 1GB of RAM. Three are reserved for maintenance. For example, a primary node with 1 GB of RAM allows for a maximum of 22 backend server connections while one with 4 GB would allow for 97. Note that these are shared across all connection pools in a cluster.","examples":[10]},"db":{"type":"string","description":"The database for use with the connection pool.","examples":["defaultdb"]},"user":{"type":"string","description":"The name of the user for use with the connection pool. When excluded, all sessions connect to the database as the inbound user.","examples":["doadmin"]},"connection":{"allOf":[{"$ref":"#/definitions/database_connection"},{}]},"private_connection":{"allOf":[{"$ref":"#/definitions/database_connection"},{}]},"standby_connection":{"allOf":[{"$ref":"#/definitions/database_connection"},{}]},"standby_private_connection":{"allOf":[{"$ref":"#/definitions/database_connection"},{}]}},"required":["name","mode","size","db"]},"database_connection":{"type":"object","properties":{}}}},"name":"Add a New Connection Pool (PostgreSQL)","id":"digitalocean.databases_add_connectionpool","example":{"path":{"database_cluster_uuid":"9cc10173-e9ea-4176-9dbc-a4cee4c4ff30"},"body":{"name":"backend-pool","mode":"transaction","size":10,"db":"defaultdb"}},"maxRequests":1,"summary":false}}