Method update

Updates the specified ClickHouse user.

HTTP request

PATCH https://mdb.api.cloud.yandex.net/managed-clickhouse/v1/clusters/{clusterId}/users/{userName}

Path parameters

Parameter Description
clusterId Required. ID of the ClickHouse 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 user to be updated. 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 [a-zA-Z0-9_]*.

Body parameters

{
  "updateMask": "string",
  "password": "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
updateMask string

Field mask that specifies which attributes of the ClickHouse user should be updated.

A comma-separated names off ALL fields to be updated. Оnly the specified fields will be changed. The others will be left untouched. If the field is specified in updateMask and no value for that field was sent in the request, the field's value will be reset to the default. The default value for most fields is null or 0.

If updateMask is not sent in the request, all fields' values will be updated. Fields specified in the request will be updated to provided values. The rest of the fields will be reset to the default.

password string

New password for the user.

The string length in characters must be 8-128.

permissions[] object

New set of permissions for 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.

Response

HTTP Code: 200 - OK

{
  "id": "string",
  "description": "string",
  "createdAt": "string",
  "createdBy": "string",
  "modifiedAt": "string",
  "done": true,
  "metadata": "object",

  //  includes only one of the fields `error`, `response`
  "error": {
    "code": "integer",
    "message": "string",
    "details": [
      "object"
    ]
  },
  "response": "object",
  // end of the list of possible fields

}

An Operation resource. For more information, see Operation.

Field Description
id string

ID of the operation.

description string

Description of the operation. 0-256 characters long.

createdAt string (date-time)

Creation timestamp.

String in RFC3339 text format.

createdBy string

ID of the user or service account who initiated the operation.

modifiedAt string (date-time)

The time when the Operation resource was last modified.

String in RFC3339 text format.

done boolean (boolean)

If the value is false, it means the operation is still in progress. If true, the operation is completed, and either error or response is available.

metadata object

Service-specific metadata associated with the operation. It typically contains the ID of the target resource that the operation is performed on. Any method that returns a long-running operation should document the metadata type, if any.

error object
The error result of the operation in case of failure or cancellation.
includes only one of the fields error, response

The error result of the operation in case of failure or cancellation.

error.
code
integer (int32)

Error code. An enum value of google.rpc.Code.

error.
message
string

An error message.

error.
details[]
object

A list of messages that carry the error details.

response object
includes only one of the fields error, response

The normal response of the operation in case of success. If the original method returns no data on success, such as Delete, the response is google.protobuf.Empty. If the original method is the standard Create/Update, the response should be the target resource of the operation. Any method that returns a long-running operation should document the response type, if any.