Document navigation

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 example above, the systemTags and userTags fields are optional. They are listed to indicate that these two fields can be included in the body.
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
Name Type Location Description Allowed Values Starting Version
snmpAddress String body (contained in the updateSNSSnmpPlatform structure) SNMP server address 4.10.0
snmpPort Integer body (contained in the updateSNSSnmpPlatform structure) SNMP port 4.10.0
uuid String url The UUID of the resource. Uniquely identifies the resource. 4.10.0
name (optional) String body (contained in the updateSNSSnmpPlatform structure) Resource name 4.10.0
description (optional) String body (contained in the updateSNSSnmpPlatform structure) Detailed description of the resource 4.10.0
systemTags (optional) List body System tags 4.10.0
userTags (optional) List body User tags 4.10.0

API Response

Response Example
{
  "inventory": {
    "uuid": "5687e054cc0744f0b048e825b5b9475f",
    "name": "email platform",
    "description": "example description",
    "state": "Enabled",
    "type": "Email",
    "createDate": "Dec 25, 2023 2:06:02 PM",
    "lastOpDate": "Dec 25, 2023 2:06:02 PM"
  }
}
Name Type Description Starting Version
success boolean Whether the operation succeeded. 4.10.0
error ErrorCode The error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error 4.10.0
inventory SNSApplicationPlatformInventory For details, see inventory 4.10.0
#error
Name Type Description Starting Version
code String The error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001. 4.10.0
description String A brief description of the error 4.10.0
details String Detailed information about the error 4.10.0
elaboration String Reserved field. Default is null. 4.10.0
opaque LinkedHashMap Reserved field. Default is null. 4.10.0
cause ErrorCode The root error. The source error that caused the current error. If there is no root error, this field is null. 4.10.0
#inventory
Name Type Description Starting Version
uuid String The UUID of the resource. Uniquely identifies the resource. 4.10.0
name String Resource name 4.10.0
description String Detailed description of the resource 4.10.0
type String Type 4.10.0
createDate Timestamp Creation time 4.10.0
lastOpDate Timestamp Last modification time 4.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()
API Reference | ZStack ZSphere · ZVF | ZStack Resource Center