AssociateVpcSubnet
AssociateVpcSubnet
1. API Description
This API is used to add a subnet into a VPC.
2. Input Parameters
The following request parameter list only provides API request parameters.
subnetId
Yes
String
Subnet ID.
vpcId
Yes
String
VPC ID.
3. Output Parameters
requestId
String
The unique request ID, which is returned for each request. RequestId is required for locating a problem.
4. Code Example
Add a subnet into a VPC.
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.
404
INVALID_VPC_NOT_FOUND
VPC not found.
404
INVALID_SUBNET_NOT_FOUND
Subnet not found.
403
OPERATION_DENIED_SUBNET_STATUS_NOT_SUPPORT
Subnet status not supported.
403
OPERATION_DENIED_SUBNET_ASSOCIATED_OTHER_VPC
Subnet is in other VPC.
403
OPERATION_DENIED_VPC_STATUS_NOT_SUPPORT
VPC status not supported.
403
OPERATION_DENIED_NO_AVAILABLE_VPC_REGION
Invalid availability region ID of VPC.
403
OPERATION_DENIED_ZONE_NOT_BELONG_VPC
Zone of subnet does not belong to the availability region of VPC.
403
OPERATION_DENIED_VPC_ZONE_SUBNET_EXCEED_LIMIT
Quantity of subnets exceeds the limit of the zone.
400
INVALID_PARAMETER_VPC_SUBNET_OVER_LAP
Overlapped CIDR blocks of subnets in VPC.
Last updated