User

A set of methods for managing ClickHouse User resources.

JSON Representation

{
  "name": "string",
  "clusterId": "string",
  "permissions": [
    {
      "databaseName": "string"
    }
  ],
  "settings": {
    "readonly": "integer",
    "allowDdl": true,
    "insertQuorum": "integer",
    "insertQuorumTimeout": "integer",
    "selectSequentialConsistency": true,
    "maxReplicaDelayForDistributedQueries": "integer",
    "fallbackToStaleReplicasForDistributedQueries": true,
    "maxThreads": "integer",
    "maxBlockSize": "integer",
    "maxInsertBlockSize": "integer",
    "maxMemoryUsage": "integer",
    "maxMemoryUsageForUser": "integer",
    "maxRowsToRead": "integer",
    "maxBytesToRead": "integer",
    "readOverflowMode": "string",
    "maxRowsToGroupBy": "integer",
    "groupByOverflowMode": "string",
    "maxRowsToSort": "integer",
    "maxBytesToSort": "integer",
    "sortOverflowMode": "string",
    "maxResultRows": "integer",
    "maxResultBytes": "integer",
    "resultOverflowMode": "string",
    "maxRowsInDistinct": "integer",
    "maxBytesInDistinct": "integer",
    "distinctOverflowMode": "string",
    "maxRowsToTransfer": "integer",
    "maxBytesToTransfer": "integer",
    "transferOverflowMode": "string",
    "maxExecutionTime": "integer",
    "timeoutOverflowMode": "string",
    "maxColumnsToRead": "integer",
    "maxTemporaryColumns": "integer",
    "maxTemporaryNonConstColumns": "integer",
    "maxQuerySize": "integer",
    "maxAstDepth": "integer",
    "maxAstElements": "integer",
    "maxExpandedAstElements": "integer"
  }
}
Field Description
name string

Name of the ClickHouse user.

clusterId string

ID of the ClickHouse cluster the user belongs to.

permissions[] object

Set of permissions granted to the user.

permissions[].
databaseName
string

Name of the database that the permission grants access to.

settings object

ClickHouse user settings. Supported settings are a limited subset of all settings described in ClickHouse documentation.

settings.
readonly
integer (int64)

See in-depth description in ClickHouse documentation.

Acceptable values are 0 to 2, inclusive.

settings.
allowDdl
boolean (boolean)

See in-depth description in ClickHouse documentation.

settings.
insertQuorum
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
insertQuorumTimeout
integer (int64)

Quorum write timeout in milliseconds. Default value: 60000. See in-depth description in ClickHouse documentation.

The minimum value is 1000.

settings.
selectSequentialConsistency
boolean (boolean)

See in-depth description in ClickHouse documentation.

settings.
maxReplicaDelayForDistributedQueries
integer (int64)

Max replica delay in milliseconds. If a replica lags more than the set value, this replica is not used. Default value: 300000. See in-depth description in ClickHouse documentation.

The minimum value is 1000.

settings.
fallbackToStaleReplicasForDistributedQueries
boolean (boolean)

See in-depth description in ClickHouse documentation.

settings.
maxThreads
integer (int64)

See in-depth description in ClickHouse documentation.

Value must be greater than 0.

settings.
maxBlockSize
integer (int64)

See in-depth description in ClickHouse documentation.

Value must be greater than 0.

settings.
maxInsertBlockSize
integer (int64)

See in-depth description in ClickHouse documentation.

Value must be greater than 0.

settings.
maxMemoryUsage
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
maxMemoryUsageForUser
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
maxRowsToRead
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
maxBytesToRead
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
readOverflowMode
string

See in-depth description in ClickHouse documentation.

settings.
maxRowsToGroupBy
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
groupByOverflowMode
string

See in-depth description in ClickHouse documentation.

settings.
maxRowsToSort
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
maxBytesToSort
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
sortOverflowMode
string

See in-depth description in ClickHouse documentation.

settings.
maxResultRows
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
maxResultBytes
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
resultOverflowMode
string

See in-depth description in ClickHouse documentation.

settings.
maxRowsInDistinct
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
maxBytesInDistinct
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
distinctOverflowMode
string

See in-depth description in ClickHouse documentation.

settings.
maxRowsToTransfer
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
maxBytesToTransfer
integer (int64)

See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
transferOverflowMode
string

See in-depth description in ClickHouse documentation.

settings.
maxExecutionTime
integer (int64)

Maximum query execution time in milliseconds. See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
timeoutOverflowMode
string

See in-depth description in ClickHouse documentation.

settings.
maxColumnsToRead
integer (int64)

Maximum number of columns that can be read from a table in a single query. See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
maxTemporaryColumns
integer (int64)

Maximum number of temporary columns that must be kept in RAM at the same time when running a query, including constant columns. See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
maxTemporaryNonConstColumns
integer (int64)

Maximum number of temporary columns that must be kept in RAM at the same time when running a query, excluding constant columns. See in-depth description in ClickHouse documentation.

The minimum value is 0.

settings.
maxQuerySize
integer (int64)

The maximum part of a query that can be taken to RAM for parsing with the SQL parser, in bytes. Default value: 262144. See in-depth description in ClickHouse documentation.

Value must be greater than 0.

settings.
maxAstDepth
integer (int64)

Maximum depth of query syntax tree. Default value: 1000. See in-depth description in ClickHouse documentation.

Value must be greater than 0.

settings.
maxAstElements
integer (int64)

Maximum size of query syntax tree in number of nodes. Default value: 50000. See in-depth description in ClickHouse documentation.

Value must be greater than 0.

settings.
maxExpandedAstElements
integer (int64)

Maximum size of query syntax tree in number of nodes after expansion of aliases and the asterisk. Default value: 500000.

Value must be greater than 0.

Methods

Method Description
create Creates a ClickHouse user in the specified cluster.
delete Deletes the specified ClickHouse user.
get Returns the specified ClickHouse User resource.
grantPermission Grants a permission to the specified ClickHouse user.
list Retrieves the list of ClickHouse User resources in the specified cluster.
revokePermission Revokes a permission from the specified ClickHouse user.
update Updates the specified ClickHouse user.