CreateSubnet
Users can use this API to create a Lingjun subnet under the Lingjun network segment.
Operation description
When you call this operation to create a Lingjun subnet, note that:
-
You have created a Lingjun CIDR block.
-
Only one network segment can be specified for a Lingjun subnet.
-
The network segment cannot be modified after the Lingjun subnet is created.
-
Make sure that you have sufficient Lingjun subnet quota.
-
This interface is an asynchronous interface. After calling this interface, the system will return the ID of a Lingjun subnet. At this time, the Lingjun network segment may not be created yet, and the system background creation task is still in progress. You can call the ListSubnets or GetSubnet operation to query the status of the CIDR block of Lingjun.
If the status of the Lingjun subnet is Executed, it indicates that it is being created.
If the status of the Lingjun subnet is Available, the creation is successful.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
eflo:CreateSubnet |
create |
*Subnet
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| SubnetName |
string |
Yes |
Lingjun subnet instance name |
subnet-1 |
| RegionId |
string |
Yes |
The region ID. |
cn-wulanchabu |
| ZoneId |
string |
Yes |
The zone ID. |
cn-wulanchabu-b |
| VpdId |
string |
Yes |
The ID of the Lingjun CIDR block. |
vpd-xcuhjyrj |
| Cidr |
string |
Yes |
The CIDR block of the Subnet.
|
10.0.0.0/16 |
| Type |
string |
No |
Lingjun Subnet Usage Type; optional; optional. Valid values:
|
OOB |
| Tag |
array<object> |
No |
The tag information. You can specify up to 20 tags. |
|
|
object |
No |
The tag information of the instance. |
||
| Key |
string |
No |
The tag key of the VPN attachment. You cannot specify an empty string as a tag key. It can be up to 64 characters in length and cannot start with aliyun or acs:. It cannot contain http:// or https://. You can specify at most 20 tag keys in each call. |
tag-subnet |
| Value |
string |
No |
The tag value of the VPN connection. The tag value can be empty or a string of up to 128 characters. It cannot start with aliyun or acs:, and cannot contain http:// or https://. Each key-value pair must be unique. You can specify values for at most 20 tag keys in each call. |
subnet-tag-1 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
AjaxResult |
||
| Code |
integer |
The response status code. |
0 |
| Message |
string |
The error message. (If the instance is in the Exception state, the exception cause is prompted.) |
成功 |
| RequestId |
string |
The request ID, which is used to locate and troubleshoot issues. |
A88DFED5-24B7-5A3E-87DE-380BF06F3C90 |
| Content |
object |
The response parameters. |
|
| SubnetId |
string |
Lingjun subnet instance ID |
subnet-yuvn29bn |
| AccessDeniedDetail |
string |
The detailed information about the failed permission verification. |
None |
Examples
Success response
JSON format
{
"Code": 0,
"Message": "成功",
"RequestId": "A88DFED5-24B7-5A3E-87DE-380BF06F3C90",
"Content": {
"SubnetId": "subnet-yuvn29bn"
},
"AccessDeniedDetail": "None"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.