Managed Service for PostgreSQL API, gRPC: UserService.Get
Returns the specified PostgreSQL User resource.
To get the list of available PostgreSQL User resources, make a List request.
gRPC request
rpc Get (GetUserRequest) returns (User)
GetUserRequest
{
"clusterId": "string",
"userName": "string"
}
Field |
Description |
clusterId |
string Required field. ID of the PostgreSQL cluster the user belongs to. |
userName |
string Required field. Name of the PostgreSQL User resource to return. |
User
{
"name": "string",
"clusterId": "string",
"permissions": [
{
"databaseName": "string"
}
],
"connLimit": "int64",
"settings": {
"defaultTransactionIsolation": "TransactionIsolation",
"lockTimeout": "google.protobuf.Int64Value",
"logMinDurationStatement": "google.protobuf.Int64Value",
"synchronousCommit": "SynchronousCommit",
"tempFileLimit": "google.protobuf.Int64Value",
"logStatement": "LogStatement",
"poolMode": "PoolingMode",
"preparedStatementsPooling": "google.protobuf.BoolValue",
"catchupTimeout": "google.protobuf.Int64Value",
"walSenderTimeout": "google.protobuf.Int64Value",
"idleInTransactionSessionTimeout": "google.protobuf.Int64Value",
"statementTimeout": "google.protobuf.Int64Value",
"pgaudit": {
"log": [
"PGAuditSettingsLog"
]
}
},
"login": "google.protobuf.BoolValue",
"grants": [
"string"
],
"deletionProtection": "google.protobuf.BoolValue",
"userPasswordEncryption": "UserPasswordEncryption"
}
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[] |
Set of permissions granted to the user to access specific databases. |
connLimit |
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 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 |
|
login |
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. |
deletionProtection |
Determines whether the user deletion protection is enabled. The default value is |
userPasswordEncryption |
enum UserPasswordEncryption Password-based authentication method for user.
|
Permission
Field |
Description |
databaseName |
string Name of the database that the permission grants access to. |
UserSettings
PostgreSQL user settings.
Field |
Description |
defaultTransactionIsolation |
enum TransactionIsolation SQL sets an isolation level for each transaction. For more information, see the PostgreSQL documentation
|
lockTimeout |
The maximum time (in milliseconds) for any statement to wait for acquiring a lock on an table, index, row or other database object. Default value: |
logMinDurationStatement |
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). Value of Value of For more information, see the PostgreSQL documentation |
synchronousCommit |
enum SynchronousCommit 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
|
tempFileLimit |
The maximum storage space size (in kilobytes) that a single process can use to create temporary files. 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. |
logStatement |
enum LogStatement This setting specifies which SQL statements should be logged (on the user level). For more information, see the PostgreSQL documentation
|
poolMode |
enum PoolingMode Mode that the connection pooler is working in with specified user. For more information, see the Odyssey documentation
|
preparedStatementsPooling |
User can use prepared statements with transaction pooling. For more information, see the PostgreSQL documentation |
catchupTimeout |
The connection pooler setting. It determines the maximum allowed replication lag (in seconds). Default value: 0 Value of |
walSenderTimeout |
The maximum time (in milliseconds) to wait for WAL replication (can be set only for PostgreSQL 12+) Default value: Value of For more information, see the PostgreSQL documentation |
idleInTransactionSessionTimeout |
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 |
statementTimeout |
The maximum time (in milliseconds) to wait for statement. If Value of For more information, see the PostgreSQL documentation |
pgaudit |
Settings of the PostgreSQL Audit Extension |
PGAuditSettings
Field |
Description |
log[] |
enum PGAuditSettingsLog 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.
|