Query the List of Key Pairs
Last Updated:2020-09-21
- This interface is used to query the key pair list.
Request structure
GET /v{version}/keypair?marker={marker}&maxKeys={maxKeys} HTTP/1.1
Host: bcc.bj.baidubce.com
Authorization: authorization string
Request header
There are no special headers except the common header.
Request parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number |
marker | String | No | Query parameter | The starting location of query for batch acquisition of lists, and is one string generated by the system. |
maxKeys | int | No | Query parameter | Maximum number contained in each page, generally not exceeding 1000. The default value is 1000. |
Return header
There are no special headers except the common header.
Return parameter
Parameter name | Type | Description |
---|---|---|
marker | String | It marks the queried starting position. |
isTruncated | boolean | True means there are additional data in the following pages and false means the current page is the last page. |
nextMarker | String | The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false. |
maxKeys | int | Maximum number contained in each page. |
keypairs | List<KeypairModel> | Key pair result set |
Error code
No special return error code
Request example
GET /v2/keypair?marker=k-IyWRtII7&maxKeys=1 HTTP/1.1
Host: bcc.bj.baidubce.com
ContentType: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2015-08-11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
Return example
HTTP/1.1 200 OK
x-bce-request-id: 1214cca7-4ad5-451d-9215-71cb844c0a50
Date: Wed, 03 Dec 2014 06:42:19 GMT
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"nextMarker": "k-xktdeMSf",
"marker": "k-IyWRtII7",
"maxKeys": 1,
"isTruncated": true,
"keypairs": [
{
"keypairId": "k-IyWRtII7",
"createTime": "2018-01-27T13:23:13Z",
"name": "instance-j93wzbn1",
"regionId":"bj",
"instanceCount":3
}
]
}