Update a mapping
Update a mapping object by ID. This API call works with user, group or domain mapping object IDs.
Updating domain mappings may result in an updated object ID, but user and group object IDs should stay the same when updated.
The following parameters are only valid when updating domain mappings: ntDomain, nfs4Domain, kerberosRealm and canMapUnixNames.
The following parameters are only valid when updating group mappings: kerberosName and noKerberosMapping.
All other parameters are valid when updating user or group mappings.
HTTP request syntax (URI)
PATCH <base_URI>/v8/storage/mappings/{mappingObjectId}
Parameters
Name | Type | Required | Values | Description |
mappingObjectId | URI_PARAM | Y | string | Object Id of the mapping to update – can be user, group or domain mapping object |
unixName | BODY | N | string | Unix username. |
unixId | BODY | N | integer | Unix user ID |
noUnixMapping | BODY | N | boolean | If true, no automatic mapping will be attempted |
ntName | BODY | N | string | NT username |
ntId | BODY | N | string | NT user SID |
noNtMapping | BODY | N | boolean | If true, no automatic mapping will be attempted |
nfs4Name | BODY | N | string | NFSv4 username |
noNfs4Mapping | BODY | N | boolean | If true, no automatic mapping will be attempted |
kerberosName | BODY | N | string | Kerberos username |
noKerberosMapping | BODY | N | boolean | If true, no automatic mapping will be attempted |
ntDomain | BODY | N | string | NT domain name to map to/from |
nfs4Domain | BODY | N | string | NFSv4 domain name to map to/from |
kerberosRealm | BODY | N | string | Kerberos realm to map to/from |
canMapUnixNames | BODY | N | boolean | Can use this mapping entry to map to/from Unix names. Default is False. |
Return codes
Code | Data | Description |
204 | No Data | The mapping has been successfully updated. |
303 | domainMapping | The domain mapping has been successfully updated, but the Object Id has changed. |
400 | Error Message | Missing or invalid request contents. |
403 | Error Message | Operation forbidden by access level. |
404 | Error Message | Requested resource not found. |
500 | Error message | Error associated with the storage system. |
Any HTTP status code other than 204 or 303 indicates that the API did not complete successfully.
Request example: Update NFSv4 domain name for a domain mapping
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/mappings/303a3a3a6e74446f6d61696e3a3a3a6578616d706c653a3a3a303a3a3a4f49445f24232140255f56 -X PATCH -d '{"nfs4Domain":"example.com"}'
Response example
HTTP/1.1 303 See Other { "domainMapping": { "canMapUnixNames": false, "kerberosRealm": "EXAMPLE.COM", "nfs4Domain": "example.com", "ntDomain": "example", "objectId": "303a3a3a6e74446f6d61696e3a3a3a6578616d706c653a3a3a303a3a3a4f49445f24232140255f56" }, "uri": "https://172.27.5.11:8444/v8/storage/mappings/303a3a3a6e74446f6d61696e3a3a3a6578616d706c653a3a3a303a3a3a4f49445f24232140255f56" }
Request example: Update user mapping Unix ID and specifically set no Kerberos mapping
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/mappings/303a3a3a303a3a3a66653230353764302d343563362d313164382d393239382d3963353534373037356537353a3a3a303a3a3a4f49445f24232140255f56 -X PATCH -d '{"unixId":12777, "noKerberosMapping":true}'
Response example
HTTP/1.1 204 No Content