Update Event Subscription Label

PUT/zstack/v1/zwatch/events/subscriptions/labels/{uuid}/actions

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateEventSubscriptionLabel": {
    "key": "VMUuid",
    "value": "42c233c17c6e4907b7be1f11a41f3a17",
    "operator": "Equal"
  },
  "systemTags": [],
  "userTags": []
}

In the above example, the systemTags and userTags fields are optional. They are listed to indicate that the body can contain these two fields.

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X PUT -d '{"updateEventSubscriptionLabel":{"key":"VMUuid","value":"228fc2c5041248df9b0d317f6f7a8585","operator":"Equal"}}' http://localhost:8080/zstack/v1/zwatch/events/subscriptions/labels/cfb859d412933a1da57ae99e2aa442ce/actions

Parameter List

Name

Type

Location

Description

Allowed Values

Starting Version

uuid

String

url

The UUID of the original event subscription label. Uniquely identifies the resource

 

3.9.0

key

String

body (contained in the updateEventSubscriptionLabel structure)

The new name of the label

 

3.9.0

value

String

body (contained in the updateEventSubscriptionLabel structure)

The new value of the label

 

3.9.0

operator

String

body (contained in the updateEventSubscriptionLabel structure)

The new operator of the label

  • Regex
  • Equal

3.9.0

systemTags (Optional)

List

body

 

 

3.9.0

userTags (Optional)

List

body

 

 

3.9.0

API Response

Response Example

{
  "inventory": {
    "uuid": "d937a1c6d9de3f2285b0cb23316624a8",
    "key": "VMUuid",
    "operator": "Equal",
    "value": "19cf33283b484ff6b73a6d98e1d762f5"
  }
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null on success. See error3.9.0
inventoryEventSubscriptionLabelInventorySee inventory3.9.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, such as SYS.1000, HOST.10013.9.0
descriptionStringA brief description of the error3.9.0
detailsStringThe detailed error information3.9.0
elaborationStringReserved field. Default is null3.9.0
opaqueLinkedHashMapReserved field. Default is null3.9.0
causeErrorCodeThe root error. The source error that caused the current error. This field is null if there is no root error3.9.0

inventory

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource. Uniquely identifies the resource3.9.0
keyStringThe label name3.9.0
valueStringThe label value3.9.0
operatorOperatorSee operator3.9.0

operator

NameTypeDescriptionStarting Version
opString 3.9.0
nameStringThe resource name3.9.0
ordinalint 3.9.0

SDK Examples

Java SDK

UpdateEventSubscriptionLabelAction action = new UpdateEventSubscriptionLabelAction();
action.uuid = "cfb859d412933a1da57ae99e2aa442ce";
action.key = "VMUuid";
action.value = "9d7099dd361049aaaf801ca6b17b2858";
action.operator = "Equal";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateEventSubscriptionLabelAction.Result res = action.call();

Python SDK

UpdateEventSubscriptionLabelAction action = UpdateEventSubscriptionLabelAction()
action.uuid = "cfb859d412933a1da57ae99e2aa442ce"
action.key = "VMUuid"
action.value = "27e59f9fe7ed46118a2f6b8a383ce494"
action.operator = "Equal"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateEventSubscriptionLabelAction.Result res = action.call()