SetVipQos

API Request

URLs
PUT zstack/v1/vips/{uuid}/actions
Headers
Authorization: OAuth the-session-uuid
Body
{
  "setVipQos": {
    "port": 22.0,
    "outboundBandwidth": 1048576.0,
    "inboundBandwidth": 1048576.0
  },
  "systemTags": [],
  "userTags": []
}
Note: In the preceding sample, both systemTags and userTags are optional. These two fields can be included in the body structure.
Curl Sample
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"setVipQos":{"port":22.0,"outboundBandwidth":1048576.0,"inboundBandwidth":1048576.0}}' \
http://localhost:8080/zstack/v1/vips/9b500046ab303d42a8d8a17565b5673b/actions
Request Parameters
Name Type Location Description Optional Value Starting Version
uuid String url The resource UUID. 2.3
port Integer body (contained in the setVipQos structure) Optional. The port. 2.3
outboundBandwidth Long body (contained in the setVipQos structure) Optional. The outbound bandwidth of the request port. 2.3
inboundBandwidth Long body (contained in the setVipQos structure) Optional. The inbound bandwidth of the request port. Make sure that either inboundBandwidth or outboundBandwidth is not null. 2.3
systemTags List body Optional. The system tags. 2.3
userTags List body Optional. The user tags. 2.3
Note: Make sure that either inboundBandwidth or outboundBandwidth is not null.

API Response

Sample Response
{
  "inventory": {
    "uuid": "dd9459fe90ff4ae0b26ab3cbf1f1e3a2",
    "vipUuid": "e82e583934b441aaaf37039ff5eba877",
    "port": 80.0,
    "inboundBandwidth": 1048576.0,
    "outboundBandwidth": 1048576.0
  }
}
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.3
inventory VipQosInventory See inventory. 2.3
#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.3
description String The brief description of the error. 2.3
details String The details about the error. 2.3
elaboration String The reserved field. Default value: null. 2.3
opaque LinkedHashMap The reserved field. Default value: null. 2.3
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.3
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 2.3
vipUuid String The VIP UUID. 2.3
port Integer The port. 2.3
inboundBandwidth Long The outbound bandwidth of the response port. 2.3
outboundBandwidth Long The inbound bandwidth of the response port. 2.3
type String The QoS unit type. 2.3
createDate Timestamp The creation date. 2.3
lastOpDate Timestamp The last operation date. 2.3

SDK Sample

Java SDK
SetVipQosAction action = new SetVipQosAction();
action.uuid = "9b500046ab303d42a8d8a17565b5673b";
action.port = 22.0;
action.outboundBandwidth = 1048576.0;
action.inboundBandwidth = 1048576.0;
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
SetVipQosAction.Result res = action.call();
Python SDK
SetVipQosAction action = SetVipQosAction()
action.uuid = "9b500046ab303d42a8d8a17565b5673b"
action.port = 22.0
action.outboundBandwidth = 1048576.0
action.inboundBandwidth = 1048576.0
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
SetVipQosAction.Result res = action.call()