AssociateSubnetInstances
AssociateSubnetInstances
1. API Description
This API is used to add one or more instances into a subnet and assign private IPs to instances.
2. Input Parameters
The following request parameter list only provides API request parameters.
subnetId
Yes
String
Subnet 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 instance into a subnet and assign a private IP to it.
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.
403
OPERATION_DENIED_INSTANCE_NOT_SUPPORT_SUBNET
Operations on adding the instance into a subnet not supported.
403
OPERATION_DENIED_INSTANCE_NOT_RUNNING
Only operations on instances in RUNNING
status are supported.
404
INVALID_SUBNET_NOT_FOUND
Subnet not found.
403
OPERATION_DENIED_SUBNET_STATUS_NOT_SUPPORT
Subnet status not supported.
403
OPERATION_DENIED_DIFFERENT_ZONE
Instances can only be added into the subnet in the same zone.
403
OPERATION_DENIED_SUBNET_EXIST_INSTANCE
Instance already exists in the subnet.
400
INVALID_PARAMETER_DUPLICATE_LAN_IP
Duplicated private IPs assigned to instances.
400
INVALID_PARAMETER_LAN_IP_NOT_SUPPORT
Private IP ended with .1 cannot be assigned.
403
OPERATION_DENIED_IP_ASSOCIATED_INSTANCE
Unavailable private IP. This has already been assigned to an instance.
403
OPERATION_DENIED_SUBNET_NOT_REPEAT_INSTANCE
Duplicated instances in the subnet.
Last updated