Instructions for Other Interfaces
Last Updated:2020-07-20
Get an AZ(Availability Zone) list
Request structure
GET /v{version}/zone HTTP/1.1
HOST: rds.bj.baidubce.com
Authorization authorization string
Request header field
There are no other special header fields except the common header field.
Request Parameters
Parameter Name | Type | Required | Parameter Position | Description |
---|---|---|---|---|
version | string | Yes | URL parameter | API Version Number |
Return header field
No other special header fields are available, except for common header fields.
Return parameter
Parameter Name | Type | Description |
---|---|---|
zones | List ZoneNames | AZ list |
ZoneNames
Parameter name | Type | Description |
---|---|---|
zoneNames | List String | AZ list |
Request example
GET /v1/zone HTTP/1.1
HOST: rds.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"]},
{"zoneNames":["cn-bj-b"]},
{"zoneNames":["cn-bj-a","cn-bj-b"]}
]
}
Get a subnet list
Request structure
GET /v{version}/subnet?vpcId={vpcId}&zoneName={zoneName} HTTP/1.1
HOST: rds.bj.baidubce.com
Authorization authorization string
Request header field
There are no other special header fields except the common header field.
Request Parameters
Parameter Name | Type | Required | Parameter Position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API Version Number |
vpcId | String | No | Query parameters | ID of current vpc |
zoneName | String | No | Query parameters | Name of AZ |
Return header field
No other special header fields are available, except for common header fields.
Return parameter
Parameter Name | Type | Description |
---|---|---|
subnets | List Subnet | Subnet List, Subnet Object |
Request example
GET /v1/subnet?vpcId=vpc-dwecjdnv&zoneName=cn-bj-a HTTP/1.1
HOST: rds.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"
}
]
}