Other Interfaces
Last Updated:2020-07-20
Query an Availability Zone List
Interface description
The interface is used to query an availability zone list.
Request structure
GET /v{version}/zone HTTP/1.1
HOST: drds.bj.baidubce.com
Authorization: authorization string
Request header field
There are no other special header fields except for the common header field.
Request parameters
Parameter Name | Type | Required? | Parameter Position | Description |
---|---|---|---|---|
version | String | Yes | URI parameter | API version number |
Response header field
There are no other special header fields except for the common header field.
Response parameter
Parameter Name | Type | Description |
---|---|---|
zones | List<ZoneNames> | Availability zone list |
ZoneNames
Parameter Name | Type | Description |
---|---|---|
zoneNames | List<String> | Availability zone list |
Request example
GET https://drds.bj.baidubce.com/v1/zone HTTP/1.1
HOST: drds.bj.baidubce.com
Authorization: bce-auth-v1/rdsak/2016-07-03T06:13:13Z/1800/x-bce-date/{signature}
Return example
HTTP/1.1 200 OK
x-bce-request-id: 7869616F-7A68-6977-656E-406261696475
ETag:xxx-xxx-xxx
Content-Type: application/json
Content-Length: 567
{
"zones": [
{"zoneNames":["cn-bj-a","cn-bj-b"]}
]
}
Query a Subnet
Interface description
The interface is used to query the subnet information.
Request structure
GET /v{version}/subnet?vpcId={vpcId}&zoneName={zoneName} HTTP/1.1
HOST: drds.bj.baidubce.com
Authorization: authorization string
Request header field
There are no other special header fields except for the common header field.
Request parameters
Parameter Name | Type | Required? | Parameter Position | Description |
---|---|---|---|---|
version | String | Yes | URI parameter | API version number |
vpcId | String | No | Query parameters | ID of vpc |
zoneName | String | No | Query parameters | Name of availability zone |
Response header field
There are no other special header fields except for the common header field.
Response parameter
Parameter Name | Type | Description |
---|---|---|
subnets | List<Subnet> | Subnet list |
Subnet
Parameter Name | Type | Description |
---|---|---|
name | String | Subnet name |
subnetId | String | Subnet ID |
zoneName | String | Availability zone of the subnet |
cidr | String | Subnet CIDR |
vpcId | String | ID of vpc |
Request example
GET http://drds.bj.baidubce.com/v1/subnet?vpcId=vpc-dwecjdnv&zoneName=cn-bj-a HTTP/1.1
HOST: drds.bj.baidubce.com
Authorization: bce-auth-v1/rdsak/2016-07-03T06:13:13Z/1800/x-bce-date/{signature}
Return example
HTTP/1.1 200 OK
x-bce-request-id: 7869616F-7A68-6977-656E-406261696475
ETag:xxx-xxx-xxx
Content-Type: application/json
Content-Length: 567
{
"subnets": [
{
"name": "System predefined subnet",
"subnetId": "sbn-IyWRnII7",
"zoneName": "cn-bj-a",
"cidr": "192.168.0.0/20",
"vpcId":"vpc-fyvffxshgq6d"
}
]
}
Status code definition
Instance status
Status value | Description |
---|---|
Available | Running |
Creating | Creating |
Resizing | Configuration changing |
Restoring | Backup restoring |
Abnormal | Exceptional |
Deleted | Released |
Deleting | Releasing |
Failed | Failed |
Account privilege
Privilege value | Description |
---|---|
ReadOnly | Read-only account: Has SELECT privileges |
ReadWrite | Read-write account: has SELECT, INSERT, UPDATE, and DELETE privileges. |
Account status
Status value | Description |
---|---|
Creating | Creating |
Available | Running |
Updating | Updating |
Deleting | Deleting |
Deleted | Deleted |