Reviewed-by: Szirovicza Gergő <a94652429@noreply.gitea.eco.tsi-dev.otc-service.com> Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: fanqinying <fanqinying@huawei.com> Co-committed-by: fanqinying <fanqinying@huawei.com>
32 KiB
Querying the Details of a VPC
Function
After a VPC is created, you can call this API to query all information about the VPC, including the VPC name, ID, and CIDR block.
URI
GET /v3/{project_id}/vpc/vpcs/{vpc_id}
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
|---|---|---|
request_id |
String |
|
vpc |
Vpc object |
Parameter |
Type |
Description |
|---|---|---|
id |
String |
|
name |
String |
|
description |
String |
|
cidr |
String |
|
extend_cidrs |
Array of strings |
|
status |
String |
|
project_id |
String |
|
enterprise_project_id |
String |
|
created_at |
String |
|
updated_at |
String |
|
cloud_resources |
Array of CloudResource objects |
|
tags |
Array of ResponseTag objects |
Example Requests
Querying the details of a VPC
GET https://{Endpoint}/v3/{project_id}/vpc/vpcs/0552091e-b83a-49dd-88a7-4a5c86fd9ec3
Example Responses
Status code: 200
Normal response to the GET operation. For more status codes, see Status Code.
{
"request_id" : "84eb4f775d66dd916db121768ec55626",
"vpc" : {
"id" : "0552091e-b83a-49dd-88a7-4a5c86fd9ec3",
"name" : "name-test",
"description" : "description-test",
"cidr" : "192.168.0.0/16",
"extend_cidrs" : [ "21.8.0.0/16" ],
"enterprise_project_id" : "0",
"tags" : [ {
"key" : "key",
"value" : "value"
} ],
"cloud_resources" : [ {
"resource_type" : "routetable",
"resource_count" : 1
} ],
"status" : "ACTIVE",
"project_id" : "060576782980d5762f9ec014dd2f1148",
"created_at" : "2018-03-23T09:26:08",
"updated_at" : "2018-08-24T08:49:53"
}
}
Status Codes
Status Code |
Description |
|---|---|
200 |
Normal response to the GET operation. For more status codes, see Status Code. |
Error Codes
See Error Codes.