CreateSubnet
CreateVpc
1. API Description
This API is used to create a subnet.
Prerequisites
Before creating a subnet, call DescribeSubnetAvailableResources
to check the zones available for subnet creation.
Note
The quantity of subnets you can create in one zone is limited. If you need more, please contact Zenlayer Support.
Create a subnet separately if you need a Layer 2 network; create subnets in a VPC if you need a Layer 3 network. You are recommended to create subnets in a VPC because they can communicate with each other. You can also create a subnet separately and then upgrade it into a VPC.
This API is an async API. A subnet ID list is returned after the creation request is sent. However, it does not mean the creation has been completed. The status of the subnet will be
CREATING
during the creation. You can useDescribeSubnets
to query the status of the subnet. If the status changes fromCreating
toAvailable
, it means that the subnet has been created successfully;CREATE_FAILED
means the subnet has been created failed. Any operations on the subnets are not allowed while creating.
2. Input Parameters
The following request parameter list only provides API request parameters.
3. Output Parameters
4. Code Example
Create a subnet in zone SIN-B
.
5. Developer Resources
Zenlayer Cloud API 2.0 integrates SDKs to make it easier for you to call APIs. More programming languages will be supported.
6. Error Codes
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Last updated