创建新的 iSCSI 目标组。请求正文是带有单个 name 属性的 JSON 对象,此属性是此新组的名称。
请求示例:
POST /api/san/v1/iscsi/target-groups HTTP/1.1 Host: zfs-storage.example.com:215 Authorization: Basic abcd123MWE Accept: application/json Content-Type: application/json Content-Length: 97 {"name":"test-group", "targets": ["iqn.1986-03.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008"]}
响应示例:
HTTP/1.1 201 Created Content-Type: application/json Content-Length: 154 X-Zfssa-San-Api: 1.0 Location: /api/san/v1/iscsi/target-groups/test-group { "group": { "href": "/api/san/v1/iscsi/target-groups/test-group", "name": "test-group", "targets": [ "iqn.1986-03.com.sun:02:31d26d2e-6aa0-6054-fe58-8b1fb508b008"] } }