Update the comment parameter of an SNMP user
PATCH /support/snmp/users/{engine_id}/{name}
Updates the comment parameter of an SNMP user.
Optional properties
-
comment
- Comment text.
Related ONTAP commands
-
security login modify
Learn more
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
engine_id |
string |
path |
True |
Engine ID of owning SVM or remote switch. |
name |
string |
path |
True |
SNMP user name. |
return_timeout |
integer |
query |
False |
The number of seconds to allow the call to execute before returning. When doing a POST, PATCH, or DELETE operation on a single record, the default is 0 seconds. This means that if an asynchronous operation is started, the server immediately returns HTTP code 202 (Accepted) along with a link to the job. If a non-zero value is specified for POST, PATCH, or DELETE operations, ONTAP waits that length of time to see if the job completes so it can return something other than 202. |
Request Body
Name | Type | Description |
---|---|---|
_links |
||
authentication_method |
string |
Optional authentication method. |
comment |
string |
Optional comment text. |
engine_id |
string |
Optional SNMPv3 engine identifier. For a local SNMP user belonging to the administrative Storage Virtual Machine (SVM), the default value of this parameter is the SNMPv3 engine identifier for the administrative SVM. For a local SNMP user belonging to a data SVM, the default value of this parameter is the SNMPv3 engine identifier for that data SVM. For an SNMPv1/SNMPv2c community, this parameter should not be specified in "POST" method. For a remote switch SNMPv3 user, this parameter specifies the SNMPv3 engine identifier for the remote switch. This parameter can also optionally specify a custom engine identifier. |
name |
string |
SNMP user name. |
owner |
Optional name and UUID of owning Storage Virtual Machine (SVM). |
|
scope |
string |
Set to "svm" for interfaces owned by an SVM. Otherwise, set to "cluster". |
snmpv3 |
Optional parameter that can be specified only for an SNMPv3 user i.e. when 'authentication_method' is either 'usm' or 'both'. This parameter defines the SNMPv3 credentials for an SNMPv3 user. |
|
switch_address |
string |
Optional remote switch address. It can be an IPv4 address or an IPv6 address. A remote switch can be queried over SNMPv3 using ONTAP SNMP client functionality. Querying such a switch requires an SNMPv3 user (remote switch user) to be configured on the switch. Since ONTAP requires remote switch user's SNMPv3 credentials (to query it), this user must be configured in ONTAP as well. This parameter is specified when configuring such a user.
|
Example request
{
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"authentication_method": "usm",
"comment": "This is a comment.",
"engine_id": "80000315055415ab26d4aae811ac4d005056bb792e",
"name": "snmpv3user2",
"owner": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
},
"scope": "svm",
"snmpv3": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"authentication_password": "humTdumt*@t0nAwa11",
"authentication_protocol": "sha2_256",
"privacy_password": "p@**GOandCLCt*200",
"privacy_protocol": "aes128"
},
"switch_address": "10.23.34.45"
}
Response
Status: 200, Ok
Error
Status: Default
ONTAP Error Response Codes
Error Code | Description |
---|---|
2621475 |
This operation is not allowed on a node SVM. |
2621699 |
This operation is not allowed on a system SVM. |
5636123 |
Cannot create an SNMP user with a role other than readonly, none, or admin. |
5636124 |
Cannot create an SNMP user with a role other than vsadmin-readonly, none, or vsadmin. |
5832712 |
Cannot modify attributes for user "diag." |
7077906 |
Cannot use given role with this SVM because a role with that name has not been defined for the SVM. |
9043999 |
ONTAP failed to create an SNMPv3 user because SNMPv3 is disabled in the cluster. |
Name | Type | Description |
---|---|---|
error |
Example error
{
"error": {
"arguments": [
{
"code": "string",
"message": "string"
}
],
"code": "4",
"message": "entry doesn't exist",
"target": "uuid"
}
}
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
_links
Name | Type | Description |
---|---|---|
self |
owner
Optional name and UUID of owning Storage Virtual Machine (SVM).
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
The name of the SVM. |
uuid |
string |
The unique identifier of the SVM. |
snmpv3
Optional parameter that can be specified only for an SNMPv3 user i.e. when 'authentication_method' is either 'usm' or 'both'. This parameter defines the SNMPv3 credentials for an SNMPv3 user.
Name | Type | Description |
---|---|---|
_links |
||
authentication_password |
string |
Authentication protocol password. |
authentication_protocol |
string |
Authentication protocol. |
privacy_password |
string |
Privacy protocol password. |
privacy_protocol |
string |
Privacy protocol. |
snmp_user
An SNMP user can be an SNMPv1/SNMPv2c user or an SNMPv3 user. SNMPv1/SNMPv2c user is also called a "community" user. An SNMPv3 user, also called a User-based Security Model (USM) user, can be a local SNMPv3 user or a remote SNMPv3 user. A local SNMPv3 user can be used for querying ONTAP SNMP server over SNMPv3 and/or for sending SNMPv3 traps. The local SNMPv3 user used for sending SNMPv3 traps must be configured with the same authentication and privacy credentials on the traphost receiver as well. A remote SNMPv3 user is also configured on a remote switch and used by ONTAP SNMP client functionality to query the remote switch over SNMPv3. An SNMP user is scoped to its owning Storage Virtual Machine (SVM). Owning SVM could be a data SVM or the administrative SVM.
Name | Type | Description |
---|---|---|
_links |
||
authentication_method |
string |
Optional authentication method. |
comment |
string |
Optional comment text. |
engine_id |
string |
Optional SNMPv3 engine identifier. For a local SNMP user belonging to the administrative Storage Virtual Machine (SVM), the default value of this parameter is the SNMPv3 engine identifier for the administrative SVM. For a local SNMP user belonging to a data SVM, the default value of this parameter is the SNMPv3 engine identifier for that data SVM. For an SNMPv1/SNMPv2c community, this parameter should not be specified in "POST" method. For a remote switch SNMPv3 user, this parameter specifies the SNMPv3 engine identifier for the remote switch. This parameter can also optionally specify a custom engine identifier. |
name |
string |
SNMP user name. |
owner |
Optional name and UUID of owning Storage Virtual Machine (SVM). |
|
scope |
string |
Set to "svm" for interfaces owned by an SVM. Otherwise, set to "cluster". |
snmpv3 |
Optional parameter that can be specified only for an SNMPv3 user i.e. when 'authentication_method' is either 'usm' or 'both'. This parameter defines the SNMPv3 credentials for an SNMPv3 user. |
|
switch_address |
string |
Optional remote switch address. It can be an IPv4 address or an IPv6 address. A remote switch can be queried over SNMPv3 using ONTAP SNMP client functionality. Querying such a switch requires an SNMPv3 user (remote switch user) to be configured on the switch. Since ONTAP requires remote switch user's SNMPv3 credentials (to query it), this user must be configured in ONTAP as well. This parameter is specified when configuring such a user.
|
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
error
Name | Type | Description |
---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |