Network ResourcesDistributed Port Group Related Interfaces

CheckIpAvailability

GET/zstack/v1/l3-networks/{l3NetworkUuid}/ip/{ip}/availability

Headers

Authorization: OAuth the-session-uuid

Curl Sample

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth 642bc388bc3040ce9ed0c477bd6b3874" \
-X GET http://localhost:8080/zstack/v1/l3-networks/44fc110c3d87326299b46975aacb1705/ip/192.168.10.100/availability?arpCheck=false&ipRangeCheck=true

Request Parameters

NameTypeLocationDescriptionAllowed ValuesStarting Version
l3NetworkUuidStringurlThe L3 network UUID. 0.6
ipStringurlThe IP address. 0.6
systemTagsListqueryOptional. The system tags. 0.6
userTagsListqueryOptional. The user tags. 0.6
arpCheckBooleanqueryOptional. Specifies whether to use arping to check IP availability. 4.10.16
ipRangeCheckBooleanqueryOptional. Specifies whether to check IP availability within the IP range in the database. 4.10.16

API Response

Sample Response

{
  "available": true
}
NameTypeDescriptionStarting Version
availablebooleanIndicates whether the IP address is available.0.6
successbooleanIndicates whether the operation is successful.0.6
errorErrorCodeThe error code. If not null, the operation fails, or vice versa. For more information, see error.0.6

error

NameTypeDescriptionStarting Version
codeStringThe error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.0.6
descriptionStringThe brief description of the error.0.6
detailsStringThe details about the error.0.6
elaborationStringThe reserved field. Default value: null.0.6
opaqueLinkedHashMapThe reserved field. Default value: null.0.6
causeErrorCodeThe root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.0.6

SDK Sample

Java SDK

CheckIpAvailabilityAction action = new CheckIpAvailabilityAction();
action.l3NetworkUuid = "44fc110c3d87326299b46975aacb1705";
action.ip = "192.168.10.100";
action.arpCheck = false;
action.ipRangeCheck = true;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CheckIpAvailabilityAction.Result res = action.call();

Python SDK

action = CheckIpAvailabilityAction()
action.l3NetworkUuid = "44fc110c3d87326299b46975aacb1705"
action.ip = "192.168.10.100"
action.arpCheck = false
action.ipRangeCheck = true
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()