UpdateSNSSnmpPlatform

API Request

URLs
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": []
}
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 '{"updateSNSSnmpPlatform":{"snmpAddress":"127.0.0.1","snmpPort":161,"name":"snmp platform name"}}' \
http://localhost:8080/zstack/v1/sns/application-platforms/snmp/cbd548888e9d37b594bc99c1892589ed
Request Parameters
Name Type Location Description Optional Value Starting Version
snmpAddress String body (contained in the updateSNSSnmpPlatform structure) The SNMP server address.
snmpPort Integer body (contained in the updateSNSSnmpPlatform structure) The SNMP port. 5.0.0
uuid String url The resource uuid. 5.0.0
name String body (contained in the updateSNSSnmpPlatform structure) Optional. The resource name. 5.0.0
description String body (contained in the updateSNSSnmpPlatform structure) Optional. The detailed description of the resource. 5.0.0
systemTags List body Optional. The system tags. 5.0.0
userTags List body Optional. The user tags. 5.0.0

API Response

Sample Response
{
  "inventory": {
    "uuid": "3bafba4ecdd647e8ba092a0adffcc9fe",
    "name": "email platform",
    "description": "example description",
    "state": "Enabled",
    "type": "Email",
    "createDate": "Dec 25, 2023 2:06:05 PM",
    "lastOpDate": "Dec 25, 2023 2:06:05 PM"
  }
}
Name Type Description Starting Version
success boolean 5.0.0
error ErrorCode The error code. If not null, the operation fails, or vice versa. For more information, see error. 5.0.0
inventory SNSApplicationPlatformInventory See inventory. 5.0.0
#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. 5.0.0
description String The brief description of the error. 5.0.0
details String The details about the error. 5.0.0
elaboration String The reserved field. Default value: null. 5.0.0
opaque LinkedHashMap The reserved field. Default value: null. 5.0.0
cause ErrorCode The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null. 5.0.0
#inventory
Name Type Description Starting Version
uuid String The resource UUID. 5.0.0
name String The resource name. 5.0.0
description String The detailed description of the resource. 5.0.0
type String The type. 5.0.0
createDate Timestamp The creation date. 5.0.0
lastOpDate Timestamp The last operation date. 5.0.0

SDK Sample

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()
API Reference | 5.4.12 | ZStack Cloud · ZCF | ZStack Resource Center