Queries the information of a database account.

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
DBInstanceId String Yes gp-xxxxxxxxx

The instance ID.

AccountName String No onlyreadacc

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

The information of the account, which is an array of DBInstanceAccount data.

DBInstanceId String gp-xxxxxxxx

The instance ID.

AccountName String testacc01

The name of the account.

AccountStatus String 1

The state of the account. Valid values:

  • 0: indicates that the account is being created.
  • 1: indicates that the account is in use.
  • 3: indicates that the account is being deleted.
AccountDescription String testacc01

The description of the account.

Examples

Sample requests

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

Sample success responses

XML format

<DescribeAccountsResponse>
           <RequestId>7565770E-7C45-462D-BA4A-8A5396F2CAD1</RequestId>
             <Accounts>
                   <DBInstanceAccount>
                        <AccountName>testaccount_1</AccountName>
                        <DBInstanceId>gp-xxxxxxx</DBInstanceId>
                        <AccountStatus>1</AccountStatus>
                        <AccountDescription></AccountDescription>
                   </DBInstanceAccount>
             </Accounts>
</DescribeAccountsResponse>

JSON format

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

Error codes

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