Update SNS SNMP Platform

PUT/zstack/v1/sns/application-platforms/snmp/{uuid}

Headers

Authorization: OAuth the-session-uuid

Body

{
  "updateSNSSnmpPlatform": {
    "snmpAddress": "127.0.0.1",
    "snmpPort": 161,
    "name": "snmp platform name"
  },
  "systemTags": [],
  "userTags": []
}

The systemTags and userTags fields in the above example 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 '{"updateSNSSnmpPlatform":{"snmpAddress":"127.0.0.1","snmpPort":161,"name":"snmp platform name"}}' http://localhost:8080/zstack/v1/sns/application-platforms/snmp/cbd548888e9d37b594bc99c1892589ed

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
snmpAddressStringbody (contained in the updateSNSSnmpPlatform structure)SNMP server address 4.10.0
snmpPortIntegerbody (contained in the updateSNSSnmpPlatform structure)SNMP server port 4.10.0
uuidStringurlResource UUID. Uniquely identifies the resource 4.10.0
name (optional)Stringbody (contained in the updateSNSSnmpPlatform structure)Resource name 4.10.0
description (optional)Stringbody (contained in the updateSNSSnmpPlatform structure)Detailed description of the resource 4.10.0
systemTags (optional)ListbodySystem tags 4.10.0
userTags (optional)ListbodyUser tags 4.10.0

API Response

Response Example

{
  "inventory": {
    "uuid": "38c619bf4e7a4cdaa04fcb44d85d5fc9",
    "name": "email platform",
    "description": "example description",
    "state": "Enabled",
    "type": "Email",
    "createDate": "Sep 28, 2023 4:32:51 PM",
    "lastOpDate": "Sep 28, 2023 4:32:51 PM"
  }
}
NameTypeDescriptionStarting Version
successboolean 4.10.0
errorErrorCodeError code. If not null, the operation failed. This field is null when the operation succeeds. See error4.10.0
inventorySNSApplicationPlatformInventorySee inventory4.10.0

error

NameTypeDescriptionStarting Version
codeStringError code number. A globally unique identifier for the error, e.g., SYS.1000, HOST.10014.10.0
descriptionStringBrief description of the error4.10.0
detailsStringDetailed error information4.10.0
elaborationStringReserved field. Defaults to null4.10.0
opaqueLinkedHashMapReserved field. Defaults to null4.10.0
causeErrorCodeRoot error. The source error that caused this error. Null if no root cause exists4.10.0

inventory

NameTypeDescriptionStarting Version
nameStringResource name4.10.0
uuidStringResource UUID. Uniquely identifies the resource4.10.0
descriptionStringDetailed description of the resource4.10.0
typeStringType4.10.0
createDateTimestampCreation time4.10.0
lastOpDateTimestampLast modification time4.10.0

SDK Examples

Java SDK

UpdateSNSSnmpPlatformAction action = new UpdateSNSSnmpPlatformAction();
action.snmpAddress = "127.0.0.1";
action.snmpPort = 161;
action.uuid = "cbd548888e9d37b594bc99c1892589ed";
action.name = "snmp platform name";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
UpdateSNSSnmpPlatformAction.Result res = action.call();

Python SDK

UpdateSNSSnmpPlatformAction action = UpdateSNSSnmpPlatformAction()
action.snmpAddress = "127.0.0.1"
action.snmpPort = 161
action.uuid = "cbd548888e9d37b594bc99c1892589ed"
action.name = "snmp platform name"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
UpdateSNSSnmpPlatformAction.Result res = action.call()