Obtain the Subnet List
Last Updated:2021-08-06
Request Structure
GET /v{version}/subnet?vpcId={vpcId}&zoneName={zoneName} HTTP/1.1
HOST: rds.bj.baidubce.com
Authorization: authorization string
Request header field
No other special header fields are available, except for common header fields.
Request Parameter
Parameter name | Type | Required? | Parameter Position | Description |
---|---|---|---|---|
version | String | Yes | URL Parameter | API version number |
vpcId | String | No | Query parameters | Vpc Id |
zoneName | String | No | Query parameters | Name of availability zone |
Return a header field
There are no other special header fields except the common header field.
Return Parameter
Parameter Name | Type | Description |
---|---|---|
subnets | List Subnet | Subnet List, Subnet Object details |
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"
}
]
}