DeleteVmStaticIp
API Request
URLs
DELETE zstack/v1/vm-instances/{vmInstanceUuid}/static-ips?l3NetworkUuid={l3NetworkUuid}&deleteMode={deleteMode}Headers
Authorization: OAuth the-session-uuidBody
Note: In
the preceding sample, both systemTags and userTags are optional.
These two fields can be included in the body structure.
{
"params": {
"l3NetworkUuid": "0a52c0bd8b4049699ff5b772f3f3eb59",
"deleteMode": "Permissive"
},
"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 64d0600e594944eca1f49970ab4ca25c" \
-X DELETE http://localhost:8080/zstack/v1/vm-instances/faf465c53e7f47898b8f41c5e90e46d3/static-ips?l3NetworkUuid=4ef401fb452e3b48af5914bcd336d670&deleteMode=PermissiveRequest Parameters
| Name | Type | Location | Description | Optional Value | Starting Version |
|---|---|---|---|---|---|
| vmInstanceUuid | String | url | The VM instance UUID. | 0.6 | |
| l3NetworkUuid | String | body | The L3 network UUID. | 0.6 | |
| deleteMode | String | body | Optional. The delete mode. | 0.6 | |
| systemTags | List | body | Optional. The system tags. | 0.6 | |
| userTags | List | body | Optional. The user tags. | 0.6 |
API Response
Sample
Response
{
"inventory": {
"uuid": "aa498202ad064d949e953e6b1c34653a",
"name": "Test-VM",
"description": "web server VM",
"zoneUuid": "ac43427ffc5948c8a24aa364a4471ada",
"clusterUuid": "ba25be3393a1445b8fdfdba28f87155d",
"imageUuid": "b0884882126445ddb8e3d5de3490bdcf",
"hostUuid": "f4f2e93245bd40c3a5db51d9ac95c593",
"lastHostUuid": "88f9a2a245ef4a289588851f927763e2",
"instanceOfferingUuid": "1b206ad5484645528ba14a1c27c633d0",
"rootVolumeUuid": "200bf3e928de459d9182fea4cf7eb3fd",
"platform": "Linux",
"defaultL3NetworkUuid": "44b85e2a6d7f443b9f0bed0842449a35",
"type": "UserVm",
"hypervisorType": "KVM",
"memorySize": 8.589934592E9,
"cpuNum": 1.0,
"allocatorStrategy": "LastHostPreferredAllocatorStrategy",
"createDate": "May 11, 2017 1:22:29 PM",
"lastOpDate": "May 11, 2017 1:22:29 PM",
"state": "Running",
"vmNics": [
{
"uuid": "8767d51cb10341eebc866d756a23b160",
"vmInstanceUuid": "aa498202ad064d949e953e6b1c34653a",
"usedIpUuid": "cafa365e629846dd895cd4f273edd9bf",
"l3NetworkUuid": "44b85e2a6d7f443b9f0bed0842449a35",
"ip": "192.168.1.10",
"mac": "00:0c:29:bd:99:fc",
"netmask": "255.255.255.0",
"gateway": "192.168.1.1",
"deviceId": 0.0,
"createDate": "May 11, 2017 1:22:29 PM",
"lastOpDate": "May 11, 2017 1:22:29 PM"
}
],
"allVolumes": [
{
"uuid": "200bf3e928de459d9182fea4cf7eb3fd",
"name": "Root-Volume-For-VM-aa498202ad064d949e953e6b1c34653a",
"primaryStorageUuid": "251c44e3521e49d4982aa9c7b3b6116b",
"vmInstanceUuid": "aa498202ad064d949e953e6b1c34653a",
"diskOfferingUuid": "afd12ea56bd84e8b9a26fe27b11d20ca",
"rootImageUuid": "b0884882126445ddb8e3d5de3490bdcf",
"installPath": "/Cloud_ps/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-200bf3e928de459d9182fea4cf7eb3fd/200bf3e928de459d9182fea4cf7eb3fd.qcow2",
"type": "Root",
"format": "qcow2",
"size": 1.073741824E11,
"actualSize": 2.147483648E10,
"deviceId": 0.0,
"state": "Enabled",
"status": "Ready",
"createDate": "May 11, 2017 1:22:29 PM",
"lastOpDate": "May 11, 2017 1:22:29 PM"
}
]
}
}| Name | Type | Description | Starting Version |
|---|---|---|---|
| error | ErrorCode | The error code. If not null, the operation fails, or vice versa. For more information, see error. | 0.6 |
#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. | 0.6 |
| description | String | The brief description of the error. | 0.6 |
| details | String | The details about the error. | 0.6 |
| elaboration | String | The reserved field. Default value: null. | 0.6 |
| opaque | LinkedHashMap | The reserved field. Default value: null. | 0.6 |
| cause | ErrorCode | The 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
DeleteVmStaticIpAction action = new DeleteVmStaticIpAction();
action.vmInstanceUuid = "f81673bc3cf04884b19d5ded83cd9ff8";
action.l3NetworkUuid = "636a65b66bfc490985d44285a090ab11";
action.deleteMode = "Permissive";
action.sessionId = "93d5734188ee48058032d6a2cebebf80";
DeleteVmStaticIpAction.Result res = action.call();Python
SDK
DeleteVmStaticIpAction action = DeleteVmStaticIpAction()
action.vmInstanceUuid = "6fa2e4774cb34e72986f3a4860c5fad4"
action.l3NetworkUuid = "fa3953b839434d4a81a106e578a3a366"
action.deleteMode = "Permissive"
action.sessionId = "5cc00379d1224a1c9be943419e54f467"
DeleteVmStaticIpAction.Result res = action.call()