Managed Service for PostgreSQL API, REST: User.get
Returns the specified PostgreSQL User resource.
To get the list of available PostgreSQL User resources, make a list request.
HTTP request
GET https://mdb.api.cloud.yandex.net/managed-postgresql/v1/clusters/{clusterId}/users/{userName}
Path parameters
Parameter | Description |
---|---|
clusterId | Required. ID of the PostgreSQL cluster the user belongs to. To get the cluster ID, use a list request. The maximum string length in characters is 50. |
userName | Required. Name of the PostgreSQL User resource to return. To get the name of the user, use a list request. The maximum string length in characters is 63. Value must match the regular expression |
Response
HTTP Code: 200 - OK
{
"name": "string",
"clusterId": "string",
"permissions": [
{
"databaseName": "string"
}
],
"connLimit": "string",
"settings": {
"defaultTransactionIsolation": "string",
"lockTimeout": "integer",
"logMinDurationStatement": "integer",
"synchronousCommit": "string",
"tempFileLimit": "integer",
"logStatement": "string",
"poolMode": "string",
"preparedStatementsPooling": true,
"catchupTimeout": "integer",
"walSenderTimeout": "integer",
"idleInTransactionSessionTimeout": "integer",
"statementTimeout": "integer",
"pgaudit": {
"log": [
"string"
]
}
},
"login": true,
"grants": [
"string"
],
"deletionProtection": true,
"userPasswordEncryption": "string"
}
A PostgreSQL User resource. For more information, see
the Developer's Guide.
Field | Description |
---|---|
name | string Name of the PostgreSQL user. |
clusterId | string ID of the PostgreSQL cluster the user belongs to. |
permissions[] | object Set of permissions granted to the user to access specific databases. |
permissions[]. databaseName |
string Name of the database that the permission grants access to. |
connLimit | string (int64) Maximum number of database connections available to the user. When used in session pooling, this setting limits the number of connections to every single host in PostgreSQL cluster. In this case, the setting's value must be greater than the total number of connections that backend services can open to access the PostgreSQL cluster. The setting's value should not exceed the value of the Cluster.config.postgresqlConfig_12.effectiveConfig.maxConnections setting. When used in transaction pooling, this setting limits the number of user's active transactions; therefore, in this mode user can open thousands of connections, but only Minimum value: |
settings | object PostgreSQL user settings. |
settings. defaultTransactionIsolation |
string SQL sets an isolation level for each transaction. This setting defines the default isolation level to be set for all new SQL transactions. For more information, see the PostgreSQL documentation.
|
settings. lockTimeout |
integer (int64) The maximum time (in milliseconds) for any statement to wait for acquiring a lock on an table, index, row or other database object. If the wait time is longer than the specified amount, then this statement is aborted. Default value: |
settings. logMinDurationStatement |
integer (int64) This setting controls logging of the duration of statements. The duration of each completed statement will be logged if the statement ran for at least the specified amount of time (in milliseconds). E.g., if this setting's value is set to Value of Value of For more information, see the PostgreSQL documentation. |
settings. synchronousCommit |
string This setting defines whether DBMS will commit transaction in a synchronous way. When synchronization is enabled, cluster waits for the synchronous operations to be completed prior to reporting For more information, see the PostgreSQL documentation.
|
settings. tempFileLimit |
integer (int64) The maximum storage space size (in kilobytes) that a single process can use to create temporary files. If a transaction exceeds this limit during execution, it will be aborted. A huge query may not fit into a server's RAM, therefore PostgreSQL will use some storage to store and execute such a query. Too big queries can make excessive use of the storage system, effectively making other quieries to run slow. This setting prevents execution of a big queries that can influence other queries by limiting size of temporary files. |
settings. logStatement |
string This setting specifies which SQL statements should be logged (on the user level). For more information, see the PostgreSQL documentation.
|
settings. poolMode |
string Mode that the connection pooler is working in with specified user. For more information, see the Odyssey documentation.
|
settings. preparedStatementsPooling |
boolean (boolean) User can use prepared statements with transaction pooling. For more information, see the PostgreSQL documentation. |
settings. catchupTimeout |
integer (int64) The connection pooler setting. It determines the maximum allowed replication lag (in seconds). Pooler will reject connections to the replica with a lag above this threshold. It can be useful to prevent application from reading stale data. Default value: 0 Value of |
settings. walSenderTimeout |
integer (int64) The maximum time (in milliseconds) to wait for WAL replication (can be set only for PostgreSQL 12+) Terminate replication connections that are inactive for longer than this amount of time. Default value: Value of For more information, see the PostgreSQL documentation. |
settings. idleInTransactionSessionTimeout |
integer (int64) Sets the maximum allowed idle time, in milliseconds, between queries while in a transaction. The default value is For more information, see the PostgreSQL documentation. Acceptable values are 0 to 2147483647, inclusive. |
settings. statementTimeout |
integer (int64) The maximum time (in milliseconds) to wait for statement. The timeout is measured from the time a command arrives at the server until it is completed by the server. If Value of For more information, see the PostgreSQL documentation. |
settings. pgaudit |
object Settings of the PostgreSQL Audit Extension (pgaudit). |
settings. pgaudit. log[] |
string Defines which user queries will be written to the audit log. Corresponds to the Pg audit log user setting. The possible values are the following:
The default value is PG_AUDIT_SETTINGS_LOG_UNSPECIFIED. In this case, the parameter is not configured. |
login | boolean (boolean) This flag defines whether the user can login to a PostgreSQL database. Default value: |
grants[] | string A set of roles and privileges that are granted to the user. For more information, see the documentation. The maximum string length in characters for each value is 63. Each value must match the regular expression |
deletionProtection | boolean (boolean) Determines whether the user deletion protection is enabled. The default value is |
userPasswordEncryption | string Password-based authentication method for user. Possible values are |