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

UpdateSnmpAgent

UpdateSnmpAgent

Execution Availability

Try It Out

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

Request Inputs

Body Fields

  • updatesnmpagentObjectRequired

    updatesnmpagent request body object.

    • uuidStringRequired

      The resource UUID.

    • versionStringRequired

      The protocol version.

  • theupdatesnmpagentObjectRequired

    theupdatesnmpagent request body object.

    • readCommunityString

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

    • userNameString

      Optional. The user name (used for the 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.

  • 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

PUT/zstack/v1/snmp/agent/actions

/zstack/v1/snmp/agent/actions

Operation ID

UpdateSnmpAgent

Permalink

Request Example

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

Response Example

200
{ "inventory": { "uuid": "cad9965ebedd495aa1f5718f31da1aa8", "version": "v3", "userName": "zstack", "authAlgorithm": "SHA", "authPassword": "authPassword", "privacyAlgorithm": "AES128", "privacyPassword": "privPassword", "port": 162 } }

Change History

This API has no change history records yet.

View all change history