Skip to main content
Settings/SNMP Operations
POSTSNMP OperationsSince 4.7.21SynchronousAuth Required

CreateSnmpAgent

CreateSnmpAgent

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • paramsObjectRequired

    Request body parameter object.

    • versionStringRequired

      The protocol version.

    • readCommunityString

      Optional. The read community (used when for v2c version).

    • userNameString

      Optional. The user name (used for v3 version).

    • authAlgorithmString

      Optional. The authentication algorithm.

    • authPasswordString

      Optional. The authentication password.

    • privacyAlgorithmString

      Optional. The privacy algorithm.

    • privacyPasswordString

      Optional. The privacy password.

    • portintRequired

      The port.

    • resourceUuidString

      Optional. The resource UUID.

    • tagUuidsList

      Optional. The tag UUID.

  • systemTagsList

    Optional. the system tags.

  • userTagsList

    Optional. The user tags.

Responses

200 OK

On success, this API returns the following response structure.

  • successbooleanRequired

    操作是否成功。

  • errorErrorCodeRequired

    The error code. If not null, the operation fails, or vice versa. For more information, see error.

    • codeStringRequired

      The error code, which is a numbered or alphanumeric code that specifies an error. For example, SYS.1000, HOST.1001.

    • descriptionStringRequired

      The brief description of the error.

    • detailsStringRequired

      The details about the error.

    • elaborationStringRequired

      The reserved field. Default value: null.

    • opaqueLinkedHashMapRequired

      The reserved field. Default value: null.

    • causeErrorCodeRequired

      The root error, which is the associated root cause of the current error. If no root error exists, this parameter is null.

  • inventorySnmpAgentInventoryRequired

    See inventory.

    • uuidStringRequired

      The resource UUID.

    • versionStringRequired

      The protocol version.

    • readCommunityStringRequired

      The read community (used for the v2c version).

    • userNameStringRequired

      The user name (used for the v3 version).

    • authAlgorithmStringRequired

      The authentication algorithm.

    • authPasswordStringRequired

      The authentication password.

    • privacyAlgorithmStringRequired

      The privacy algorithm.

    • privacyPasswordStringRequired

      The privacy password.

    • portintRequired

      The port.

    • statusStringRequired

      The SNMP agent status.

    • securityLevelStringRequired

      The security level.

    • createDateTimestampRequired

      The creation date.

    • lastOpDateTimestampRequired

      The last operation date.

Endpoint

POST/zstack/v1/snmp/agent

/zstack/v1/snmp/agent

Operation ID

CreateSnmpAgent

Permalink

Request Example

curl -X POST 'http://{host}/zstack/v1/snmp/agent' -H 'Authorization: OAuth {sessionUuid}' -H 'Content-Type: application/json;charset=UTF-8' -d '{"params":{"version":"<version>","readCommunity":"<readCommunity>","userName":"<userName>","authAlgorithm":"<authAlgorithm>","authPassword":"<authPassword>","privacyAlgorithm":"<privacyAlgorithm>","privacyPassword":"<privacyPassword>","port":1,"resourceUuid":"<resourceUuid>","tagUuids":["<tagUuids>"]},"systemTags":["<systemTags>"],"userTags":["<userTags>"]}'

Response Example

200
{ "inventory": { "uuid": "6dac2a94d44c3216acc13286a50416aa", "version": "v3", "userName": "zstack", "authAlgorithm": "SHA512", "authPassword": "auth_password", "privacyAlgorithm": "DES", "privacyPassword": "priv_password", "port": 161, "status": "Enable", "securityLevel": "authPriv" } }

Change History

This API has no change history records yet.

View all change history