Delete Custom Attribute Value

DELETE/zstack/v1/resource-attributes/{keyUuid}/resources

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X DELETE http://localhost:8080/zstack/v1/resource-attributes/ff03a2b491023030bf58b1b35ea9cd00/resources?resourceUuids=ff01ec80fd11327cba7519b66119d900

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
keyUuidStringurlCustom attribute key UUID 4.10.16
resourceUuidsListqueryResource UUID 4.10.16
systemTags (optional)ListquerySystem tags 4.10.16
userTags (optional)ListqueryUser tags 4.10.16

API Response

On success, this API returns an empty JSON structure {}. On error, the returned JSON structure contains an error field, for example:

{
  "error": {
    "code": "SYS.1001",
    "description": "A message or a operation timeout",
    "details": "Create VM on KVM timeout after 300s"
  }
}

SDK Examples

Java SDK

DeleteResourceAttributeValueAction action = new DeleteResourceAttributeValueAction();
action.keyUuid = "ff03a2b491023030bf58b1b35ea9cd00";
action.resourceUuids = asList("ff01ec80fd11327cba7519b66119d900");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
DeleteResourceAttributeValueAction.Result res = action.call();

Python SDK

action = DeleteResourceAttributeValueAction()
action.keyUuid = "ff03a2b491023030bf58b1b35ea9cd00"
action.resourceUuids = [ff01ec80fd11327cba7519b66119d900]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
res = action.call()