Creating a Subnet CIDR Reservation
Function
This API is used to create a subnet CIDR reservation.
Calling Method
For details, see Calling APIs.
URI
POST /v3/{project_id}/vpc/virsubnet-cidr-reservations
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
dry_run |
No |
Boolean |
|
virsubnet_cidr_reservation |
Yes |
Request body for creating a subnet CIDR reservation. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
virsubnet_id |
Yes |
String |
|
ip_version |
Yes |
Integer |
|
cidr |
No |
String |
|
mask |
No |
Integer |
|
name |
No |
String |
|
description |
No |
String |
|
Response Parameters
Status code: 201
Parameter |
Type |
Description |
---|---|---|
request_id |
String |
Request ID. |
virsubnet_cidr_reservation |
VirsubnetCidrReservation object |
Response body for creating a subnet CIDR reservation. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
|
virsubnet_id |
String |
|
vpc_id |
String |
|
ip_version |
Integer |
|
cidr |
String |
|
name |
String |
|
description |
String |
|
project_id |
String |
|
created_at |
String |
|
updated_at |
String |
|
Example Requests
Create a subnet CIDR reservation. The virtual subnet ID is fb0e2bd6-190f-0d1a-7728-a5f6b1d8dd19, the IPv4 version is used, the subnet CIDR reservation is 192.168.21.96/28, the name is test, and the description is for test.
POST https://{Endpoint}/v3/{project_id}/vpc/virsubnet-cidr-reservations { "virsubnet_cidr_reservation" : { "virsubnet_id" : "fb0e2bd6-190f-0d1a-7728-a5f6b1d8dd19", "ip_version" : 4, "cidr" : "192.168.21.96/28", "name" : "test", "description" : "for test" } }
Example Responses
Status code: 201
The POST operation is successful. For more status codes, see Status Codes.
{ "virsubnet_cidr_reservation": { "id": "ed4edb94-754c-7848-bb77-2d381906c535", "virsubnet_id": "fb0e2bd6-190f-0d1a-7728-a5f6b1d8dd19", "vpc_id": "cef5d621-6c20-d5df-74e8-746271fba734", "ip_version": 4, "cidr": "192.168.21.96/28", "name": "test", "description": "for test", "project_id": "11e8dd119c77479db890e266e68c1ecf", "created_at": "2024-09-09T11:56:27Z", "updated_at": "2024-09-09T11:56:27Z", }, "request_id": "fd48620df5f57b04917f2cc5ebeaf277" }
Status Codes
Status Code |
Description |
---|---|
201 |
The POST operation is successful. For more status codes, see Status Codes. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot