Managed Service for PostgreSQL API, gRPC: UserService.List
Retrieves the list of PostgreSQL User resources in the specified cluster.
gRPC request
rpc List (ListUsersRequest) returns (ListUsersResponse)
ListUsersRequest
{
"cluster_id": "string",
"page_size": "int64",
"page_token": "string"
}
Field |
Description |
cluster_id |
string Required field. ID of the cluster to list PostgreSQL users in. |
page_size |
int64 The maximum number of results per page to return. If the number of available |
page_token |
string Page token. To get the next page of results, set |
ListUsersResponse
{
"users": [
{
"name": "string",
"cluster_id": "string",
"permissions": [
{
"database_name": "string"
}
],
"conn_limit": "int64",
"settings": {
"default_transaction_isolation": "TransactionIsolation",
"lock_timeout": "google.protobuf.Int64Value",
"log_min_duration_statement": "google.protobuf.Int64Value",
"synchronous_commit": "SynchronousCommit",
"temp_file_limit": "google.protobuf.Int64Value",
"log_statement": "LogStatement",
"pool_mode": "PoolingMode",
"prepared_statements_pooling": "google.protobuf.BoolValue",
"catchup_timeout": "google.protobuf.Int64Value",
"wal_sender_timeout": "google.protobuf.Int64Value",
"idle_in_transaction_session_timeout": "google.protobuf.Int64Value",
"statement_timeout": "google.protobuf.Int64Value",
"pgaudit": {
"log": [
"PGAuditSettingsLog"
]
}
},
"login": "google.protobuf.BoolValue",
"grants": [
"string"
],
"deletion_protection": "google.protobuf.BoolValue",
"user_password_encryption": "UserPasswordEncryption"
}
],
"next_page_token": "string"
}
Field |
Description |
users[] |
List of PostgreSQL User resources. |
next_page_token |
string This token allows you to get the next page of results for list requests. If the number of results |
User
A PostgreSQL User resource. For more information, see
the Developer's Guide.
Field |
Description |
name |
string Name of the PostgreSQL user. |
cluster_id |
string ID of the PostgreSQL cluster the user belongs to. |
permissions[] |
Set of permissions granted to the user to access specific databases. |
conn_limit |
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.postgresql_config_12.effective_config.max_connections 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. |
deletion_protection |
Determines whether the user deletion protection is enabled. The default value is |
user_password_encryption |
enum UserPasswordEncryption Password-based authentication method for user.
|
Permission
Field |
Description |
database_name |
string Name of the database that the permission grants access to. |
UserSettings
PostgreSQL user settings.
Field |
Description |
default_transaction_isolation |
enum TransactionIsolation SQL sets an isolation level for each transaction. For more information, see the PostgreSQL documentation
|
lock_timeout |
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: |
log_min_duration_statement |
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 |
synchronous_commit |
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
|
temp_file_limit |
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. |
log_statement |
enum LogStatement This setting specifies which SQL statements should be logged (on the user level). For more information, see the PostgreSQL documentation
|
pool_mode |
enum PoolingMode Mode that the connection pooler is working in with specified user. For more information, see the Odyssey documentation
|
prepared_statements_pooling |
User can use prepared statements with transaction pooling. For more information, see the PostgreSQL documentation |
catchup_timeout |
The connection pooler setting. It determines the maximum allowed replication lag (in seconds). Default value: 0 Value of |
wal_sender_timeout |
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 |
idle_in_transaction_session_timeout |
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 |
statement_timeout |
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.
|