Queries the information of the privileged account in an AnalyticDB for PostgreSQL instance.

Description

This operation is called to query the information of the privileged account in an AnalyticDB for PostgreSQL instance, such as its state, description, and the instance.

Limit

You can call this operation up to 1,000 times per second per account. If the number of the calls per second exceeds the limit, throttling is triggered and may affect your business. We recommend that you take note of the limit when you call this operation.

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.

DBInstanceId String Yes gp-bp***************

The ID of the instance.

Note You can call the DescribeDBInstances operation to query the details of all AnalyticDB for PostgreSQL instances in a specific region, including instance IDs.
AccountName String No testuser

The name of the account.

Response parameters

Parameter Type Example Description
RequestId String 7565770E-7C45-462D-BA4A-8A5396F2CAD1

The ID of the request.

Accounts Array of DBInstanceAccount

Details of the account.

DBInstanceAccount
AccountStatus String 1

The state of the account.

  • 0: The account is being created.
  • 1: The account is in use.
  • 3: The account is being deleted.
AccountDescription String testuser

The description of the account.

DBInstanceId String gp-bp***************

The ID of the instance.

AccountName String testuser

The name of the account.

Examples

Sample requests

http(s)://gpdb.aliyuncs.com/?Action=DescribeAccounts
&DBInstanceId=gp-xxxxxxxxx
&<Common request parameters>

Sample success responses

XML format

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

<DescribeAccountsResponse>
    <RequestId>7565770E-7C45-462D-BA4A-8A5396F2CAD1</RequestId>
    <Accounts>
        <AccountStatus>1</AccountStatus>
        <AccountDescription>testuser</AccountDescription>
        <DBInstanceId>gp-bp***************</DBInstanceId>
        <AccountName>testuser</AccountName>
    </Accounts>
</DescribeAccountsResponse>

JSON format

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

{
  "RequestId" : "7565770E-7C45-462D-BA4A-8A5396F2CAD1",
  "Accounts" : [ {
    "AccountStatus" : "1",
    "AccountDescription" : "testuser",
    "DBInstanceId" : "gp-bp***************",
    "AccountName" : "testuser"
  } ]
}

Error codes

For a list of error codes, visit the API Error Center.