The following request sets the CHAP user name for the iSCSI target. Two types of CHAP user names can be set: the CHAP user name of the iSCSI target side and the CHAP user name of the host (iSCSI initiator) that connects to the iSCSI target.
Execution permission
Storage Administrator (Provisioning)
Request line
POST base-URL/v1/objects/chap-users
Request message
- Body
-
The following coding example sets the CHAP user name for the iSCSI target side:
{ "chapUserName": "MyRESTChapUser", "portId": "CL1-D", "hostGroupNumber": 1, "wayOfChapUser": "TAR" }
Attribute
Type
Description
chapUserName
string
(Required) Specify a CHAP user name consisting of 1 to 223 characters.
portId
string
(Required) Port number
hostGroupNumber
int
(Required) Target ID of the iSCSI target
wayOfChapUser
string
(Required) Type of the CHAP user name
- TAR: The CHAP user name of the iSCSI target side
- INI: The CHAP user name of the host bus adapter (iSCSI initiator) side
Response message
Status codes
For details on the status codes of the request for this operation, see the description on HTTP status codes.
Coding example
curl -v -H "Accept:application/json" -H "Content-Type:application/json" -H "Authorization:Session d7b673af189048468c5af9bcf3bbbb6f" -X POST --data-binary @./InputParameters.json https://192.0.2.100/ConfigurationManager/v1/objects/chap-users