GetVipUsedPorts

API Request

URLs
GET zstack/v1/vips/{uuid}/usedports
Headers
Authorization: OAuth the-session-uuid
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth e7b86195e5f74c698dc5d0521b0ad25d" \
-X GET http://localhost:8080/zstack/v1/vips/d8474e0dbfe84d47a449bb34979cbcb9/usedports?protocol=TCP
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String query The VIP UUID. 2.2
protocol String query The protocol.
  • tcp
  • udp
2.2
systemTags List query Optional. The system tags. 2.2
userTags List query Optional. The user tags. 2.2

API Response

Sample Response
{
  "inventories": [
    {
      "uuid": "4f5f926580f4452a897b05b8f99e67ec",
      "protcol": "TCP",
      "usedPorts": [
        "100",
        "200",
        "201",
        "202",
        "204",
        "1000"
      ]
    }
  ]
}
Name Type Description Starting Version
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 2.2
inventories List See inventories. 2.2
#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. 2.2
description String The brief description of the error. 2.2
details String The details about the error. 2.2
elaboration String The reserved field. Default value: null. 2.2
opaque LinkedHashMap The reserved field. Default value: null. 2.2
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 2.2
#inventories
Name Type Description Starting Version
uuid String The VIP UUID. 2.2
protcol String 2.2
usedPorts List 2.2

SDK Sample

Java SDK
GetVipUsedPortsAction action = new GetVipUsedPortsAction();
action.uuid = "771a6f6fae9d49dca26ae309d137549e";
action.protocol = "TCP";
action.sessionId = "ef2bbc8896fa4368a4da1c4b2e39a9d8";
GetVipUsedPortsAction.Result res = action.call();
Python SDK
GetVipUsedPortsAction action = GetVipUsedPortsAction()
action.uuid = "66313677af4e42fe8926703d89cf0164"
action.protocol = "TCP"
action.sessionId = "62f7ea6470954497966345142873bbfa"
GetVipUsedPortsAction.Result res = action.call()