調(diào)用DescribeAccountList接口獲取賬號(hào)列表。

調(diào)試

您可以在OpenAPI Explorer中直接運(yùn)行該接口,免去您計(jì)算簽名的困擾。運(yùn)行成功后,OpenAPI Explorer可以自動(dòng)生成SDK代碼示例。

請(qǐng)求參數(shù)

名稱 類型 是否必選 示例值 描述
Action String DescribeAccountList

系統(tǒng)規(guī)定參數(shù)。取值:DescribeAccountList

RegionId String cn-hangzhou

實(shí)例所在地域。

DBInstanceName String pxc-********

實(shí)例名稱。

AccountName String testaccount

賬號(hào)名稱,需要查詢某個(gè)賬號(hào)時(shí)輸入。

AccountType String 0

賬號(hào)類型,需要查詢某類賬號(hào)時(shí)輸入,null返回所有賬號(hào)。

  • 開(kāi)啟三權(quán)分立前:0代表普通賬號(hào),1代表高權(quán)限賬號(hào);
  • 開(kāi)啟三權(quán)分立后,0代表普通賬號(hào),2代表系統(tǒng)管理員賬號(hào),3代表安全管理員賬號(hào),4代表審計(jì)管理員賬號(hào)。

返回?cái)?shù)據(jù)

名稱 類型 示例值 描述
Message String success

返回信息,成功返回success,錯(cuò)誤返回對(duì)應(yīng)錯(cuò)誤碼。

RequestId String 9B2F3840-5C98-475C-B269-2D5C3A31797C

請(qǐng)求ID。

Success Boolean true

請(qǐng)求是否成功。

Data Array of Account

數(shù)據(jù)結(jié)構(gòu)體。

GmtCreated String 2012-06-08T15:00Z

賬號(hào)創(chuàng)建時(shí)間.

DBInstanceName String pxc-*********

實(shí)例名稱。

AccountDescription String testaccount desc

賬號(hào)描述。

DBName String testdb

賬號(hào)被授予權(quán)限的數(shù)據(jù)庫(kù)。

AccountPrivilege String ReadWrite

賬號(hào)被授予的權(quán)限。

AccountType String 0

賬號(hào)類型。

  • 開(kāi)啟三權(quán)分立前:0代表普通賬號(hào),1代表高權(quán)限賬號(hào);
  • 開(kāi)啟三權(quán)分立后,0代表普通賬號(hào),2代表系統(tǒng)管理員賬號(hào),3代表安全管理員賬號(hào),4代表審計(jì)管理員賬號(hào)。
AccountName String testAccount

賬號(hào)名稱。

示例

請(qǐng)求示例

http(s)://[Endpoint]/?Action=DescribeAccountList
&RegionId=cn-hangzhou
&DBInstanceName=pxc-********
&AccountName=testaccount
&AccountType=0
&公共請(qǐng)求參數(shù)

正常返回示例

XML格式

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

<DescribeAccountListResponse>
    <Message>success</Message>
    <RequestId>9B2F3840-5C98-475C-B269-2D5C3A31797C</RequestId>
    <Success>true</Success>
    <Data>
        <GmtCreated>2012-06-08T15:00Z</GmtCreated>
        <DBInstanceName>pxc-*********</DBInstanceName>
        <AccountDescription>testaccount desc</AccountDescription>
        <DBName>testdb</DBName>
        <AccountPrivilege>ReadWrite</AccountPrivilege>
        <AccountType>0</AccountType>
        <AccountName>testAccount</AccountName>
    </Data>
</DescribeAccountListResponse>

JSON格式

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

{
  "Message" : "success",
  "RequestId" : "9B2F3840-5C98-475C-B269-2D5C3A31797C",
  "Success" : true,
  "Data" : [ {
    "GmtCreated" : "2012-06-08T15:00Z",
    "DBInstanceName" : "pxc-*********",
    "AccountDescription" : "testaccount desc",
    "DBName" : "testdb",
    "AccountPrivilege" : "ReadWrite",
    "AccountType" : "0",
    "AccountName" : "testAccount"
  } ]
}

錯(cuò)誤碼

訪問(wèn)錯(cuò)誤中心查看更多錯(cuò)誤碼。