GetCandidateL3NetworksForChangeVmNicNetwork

API Request

URLs
GET zstack/v1/vm-instances/nics/{vmNicUuid}/l3-networks-candidates
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/vm-instances/nics/3382601183c9319384d5aa17ec956a3f/l3-networks-candidates
Request Parameters
Name Type Location Description Valid Value Starting Version
vmNicUuid String url The VM NIC UUID. 4.1.0
systemTags List query Optional. The system tags. 4.1.0
userTags List query Optional. The user tags. 4.1.0

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "f8fc36eaff6f3253a134bab93823baf1",
      "name": "private L3",
      "type": "L3BasicNetwork",
      "zoneUuid": "9ef7d386414c3101adeecd45ec9a2d51",
      "l2NetworkUuid": "ad3adf2da22f36c2946d90fae7f99b19",
      "state": "Enabled",
      "createDate": "Nov 14, 2017 10:20:57 PM",
      "lastOpDate": "Nov 14, 2017 10:20:57 PM",
      "ipRanges": [
        {
          "uuid": "16f163ee55f93d4f8dca9fefcac41ecc",
          "l3NetworkUuid": "f8fc36eaff6f3253a134bab93823baf1",
          "name": "ip range",
          "startIp": "192.168.0.10",
          "endIp": "192.168.0.100",
          "netmask": "255.255.255.0",
          "gateway": "192.168.0.1",
          "createDate": "Nov 14, 2017 10:20:57 PM",
          "lastOpDate": "Nov 14, 2017 10:20:57 PM"
        }
      ],
      "networkServices": [
        {
          "l3NetworkUuid": "f8fc36eaff6f3253a134bab93823baf1",
          "networkServiceProviderUuid": "f714dba2f49a3d6788aafbe8b5ab3dc2",
          "networkServiceType": "DHCP"
        },
        {
          "l3NetworkUuid": "f8fc36eaff6f3253a134bab93823baf1",
          "networkServiceProviderUuid": "f714dba2f49a3d6788aafbe8b5ab3dc2",
          "networkServiceType": "DNS"
        },
        {
          "l3NetworkUuid": "f8fc36eaff6f3253a134bab93823baf1",
          "networkServiceProviderUuid": "f714dba2f49a3d6788aafbe8b5ab3dc2",
          "networkServiceType": "SNAT"
        }
      ]
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error 4.1.0
inventory List See inventory 4.1.0
#error
Name Type Description Starting Version
code String The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001. 4.1.0
description String The brief description of the error. 4.1.0
details String The details about the error. 4.1.0
elaboration String The reserved field. Default value: null. 4.1.0
opaque LinkedHashMap The reserved field. Default value: null. 4.1.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 4.1.0
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 4.1.0
name String The resource name. 4.1.0
description String Optional. The detailed description of the resource. 4.1.0
type String 4.1.0
zoneUuid String The zone UUID. 4.1.0
l2NetworkUuid String The L2 network UUID. 4.1.0
state String 4.1.0
dnsDomain String 4.1.0
system Boolean 4.1.0
category String 4.1.0
ipVersion Integer The IP version. 4.1.0
createDate Timestamp The creation time. 4.1.0
lastOpDate Timestamp The last update time. 4.1.0
dns List 4.1.0
ipRanges List See ipRanges. 4.1.0
networkServices List See networkServices. 4.1.0
hostRoute List See ipRangesx. 4.1.0
#ipRanges
Name Type Description Starting Version
uuid String The resource UUID. 4.1.0
l3NetworkUuid String The L3 network UUID. 4.1.0
name String The resource name. 4.1.0
description String Optional. The detailed description of the resource. 4.1.0
startIp String The start IP address. 4.1.0
endIp String The end IP address. 4.1.0
netmask String The netmask. 4.1.0
prefixLen String The netmask length. 4.1.0
gateway String The gateway. 4.1.0
networkCidr String The network CIDR. 4.1.0
ipVersion Integer The IP version. 4.1.0
addressMode String The IPv6 address distribution mode. 4.1.0
createDate Timestamp The creation time. 4.1.0
lastOpDate Timestamp The last update time. 4.1.0
ipRangeType IpRangeType See ipRangeType. 4.1.0
#ipRangeType
Name Type Description Starting Version
Normal IpRangeType Normal IP address 4.1.0
AddressPool IpRangeType Address pool 4.1.0
#networkServices
Name Type Description Starting Version
l3NetworkUuid String The L3 network UUID. 4.1.0
networkServiceProviderUuid String The network service provider UUID. 4.1.0
networkServiceType String 4.1.0
#hostRoute
Name Type Description Starting Version
id Long 4.1.0
l3NetworkUuid String The L3 network UUID. 4.1.0
prefix String 4.1.0
nexthop String 4.1.0
createDate Timestamp The creation time. 4.1.0
lastOpDate Timestamp The last update time. 4.1.0

SDK Sample

Java SDK
GetCandidateL3NetworksForChangeVmNicNetworkAction action = new GetCandidateL3NetworksForChangeVmNicNetworkAction();
action.vmNicUuid = "3382601183c9319384d5aa17ec956a3f";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
GetCandidateL3NetworksForChangeVmNicNetworkAction.Result res = action.call();
Python SDK
GetCandidateL3NetworksForChangeVmNicNetworkAction action = GetCandidateL3NetworksForChangeVmNicNetworkAction()
action.vmNicUuid = "3382601183c9319384d5aa17ec956a3f"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
GetCandidateL3NetworksForChangeVmNicNetworkAction.Result res = action.call()