Create an SNMP Endpoint

POST/zstack/v1/sns/application-endpoints/snmp

Headers

Authorization: OAuth the-session-uuid

Body

{
  "params": {
    "name": "snmp endpoint",
    "platformUuid": "c453382b049c3280b69157501914870d"
  },
  "systemTags": [],
  "userTags": []
}

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 POST -d '{"params":{"name":"snmp endpoint","platformUuid":"c453382b049c3280b69157501914870d"}}' \
http://localhost:8080/zstack/v1/sns/application-endpoints/snmp

Parameter List

NameTypeLocationDescriptionAllowed ValuesStarting Version
nameStringbody (contained in the params structure)Resource name 4.10.0
description (optional)Stringbody (contained in the params structure)Detailed description of the resource 4.10.0
platformUuid (optional)Stringbody (contained in the params structure)  4.10.0
resourceUuid (optional)Stringbody (contained in the params structure)  4.10.0
tagUuids (optional)Listbody (contained in the params structure)Tag UUID list 4.10.0
systemTags (optional)ListbodySystem tags 4.10.0
userTags (optional)ListbodyUser tags 4.10.0

API Response

Response Example

{
  "inventory": {
    "name": "example",
    "uuid": "917fe66f76b241f0843dfbd6be685fc1",
    "description": "description example",
    "type": "Email",
    "state": "Enabled",
    "platformUuid": "4eb0ceebf95b452585ebeacd647d9f35",
    "createDate": "Dec 25, 2023 2:08:53 PM",
    "lastOpDate": "Dec 25, 2023 2:08:53 PM"
  }
}
NameTypeDescriptionStarting Version
successboolean 4.10.0
errorErrorCodeThe error code. If not null, the operation failed. This field is null when the operation succeeds. For details, see error4.10.0
inventorySNSApplicationEndpointInventoryFor details, see inventory4.10.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.1001.4.10.0
descriptionStringA brief description of the error4.10.0
detailsStringDetailed information about the error4.10.0
elaborationStringReserved field. Default is null.4.10.0
opaqueLinkedHashMapReserved field. Default is null.4.10.0
causeErrorCodeThe root error. The source error that caused the current error. If there is no root error, this field is null.4.10.0

inventory

NameTypeDescriptionStarting Version
nameStringSNMP endpoint name4.10.0
uuidStringThe UUID of the SNMP endpoint. Uniquely identifies the resource.4.10.0
descriptionStringDetailed description of the SNMP endpoint4.10.0
typeStringSNMP endpoint type4.10.0
platformUuidStringApplication platform UUID4.10.0
createDateTimestampCreation time4.10.0
lastOpDateTimestampLast modification time4.10.0

SDK Examples

Java SDK

CreateSNSSnmpEndpointAction action = new CreateSNSSnmpEndpointAction();
action.name = "snmp endpoint";
action.platformUuid = "c453382b049c3280b69157501914870d";
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
CreateSNSSnmpEndpointAction.Result res = action.call();

Python SDK

CreateSNSSnmpEndpointAction action = CreateSNSSnmpEndpointAction()
action.name = "snmp endpoint"
action.platformUuid = "c453382b049c3280b69157501914870d"
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
CreateSNSSnmpEndpointAction.Result res = action.call()