Queries the information about one or all database accounts for an ApsaraDB for ClickHouse cluster.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeAccounts

The operation that you want to perform. Set the value to DescribeAccounts.

DBClusterId String Yes cc-bp108z124a8o7****

The ID of the cluster.

AccountName String No test

The name of the database account.

Note If you do not specify this parameter, the information about all the database accounts for the ApsaraDB for ClickHouse cluster is queried by default.
PageSize Integer No 30

The number of entries to return on each page. Default value: 30. Valid values:

  • 30
  • 50
  • 100
PageNumber Integer No 1

The number of the page to return. The value must be an integer that is greater than 0. Default value: 1.

Response parameters

Parameter Type Example Description
TotalCount Integer 1

The total number of entries.

PageSize Integer 30

The number of entries returned on each page.

RequestId String F5178C10-1407-4987-9133-DE4DC9119F75

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

Accounts Array of Account

The details about the database accounts.

Account
AccountStatus String Creating

The state of the database account. Valid values:

  • Creating: The database account is being created.
  • Available: The database account is available.
  • AuthorityModifying: The permissions of the database account are being modified.
  • Deleting: The database account is being deleted.
Note Only database accounts configured by using XML configuration files can be in the AuthorityModifying state.
AccountDescription String test

The description of the database account.

AccountType String Super

The type of the database account. Valid values:

  • Super: a privileged account
  • Normal: a standard account
AccountName String test

The name of the database account.

ConfigType String SQL

The configuration mode of the database account.

Examples

Sample requests

http(s)://clickhouse.aliyuncs.com/?Action=DescribeAccounts
&DBClusterId=cc-bp108z124a8o7****
&AccountName=test
&PageSize=30
&PageNumber=1
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeAccountsResponse>
    <TotalCount>1</TotalCount>
    <PageSize>30</PageSize>
    <RequestId>F5178C10-1407-4987-9133-DE4DC9119F75</RequestId>
    <PageNumber>1</PageNumber>
    <Accounts>
        <AccountStatus>Creating</AccountStatus>
        <AccountDescription>test</AccountDescription>
        <AccountType>Super</AccountType>
        <AccountName>test</AccountName>
        <ConfigType>SQL</ConfigType>
    </Accounts>
</DescribeAccountsResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TotalCount" : 1,
  "PageSize" : 30,
  "RequestId" : "F5178C10-1407-4987-9133-DE4DC9119F75",
  "PageNumber" : 1,
  "Accounts" : [ {
    "AccountStatus" : "Creating",
    "AccountDescription" : "test",
    "AccountType" : "Super",
    "AccountName" : "test",
    "ConfigType" : "SQL"
  } ]
}

Error codes

HttpCode Error code Error message Description
404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The error message returned because the specified value for the DBClusterId parameter does not exist. Check whether the value is valid.

For a list of error codes, see Service error codes.