PATCH – 创建帐户(适用于基于 Intel Purley 的系统)
通过 HTTP PATCH 方法在帐户数组的“空插槽”中为 Redfish 服务创建帐户资源。此方法适用于基于 Intel Purley 的 Lenovo 系统,因为这些系统上预先填充了帐户的“插槽”。在“空插槽”中,属性“UserName”的值为空字符串。
请求 URL
注
在创建帐户之前,请确保新帐户名和密码遵循 AccountService 中的规则,例如长度、密码复杂性、更改间隔等。
PATCH https://<BMC_IPADDR>/redfish/v1/AccountService/Accounts/{1...12}
请求正文
请求正文与 4.2.3 相同。
响应正文
响应返回的内容与 GET 操作相同,但更新了属性。
状态代码
HTTP 状态代码 | 错误消息 ID |
---|---|
500 | InternalError |
示例
以下示例是 PATCH 正文
{
"UserName": "TempUser",
"Password": "Passw0rd4U",
"RoleId": "Administrator",
"SNMP": {
"AuthenticationProtocol": "HMAC_SHA96",
"EncryptionKey": "snmpPassw0rd",
"EncryptionProtocol": "CFB128_AES128"
}
}
返回以下示例 JSON 响应:
{
"Oem": {
"Lenovo": {
"@odata.type": "#LenovoManagerAccount.v1_0_0.LenovoManagerAccount",
"SSHPublicKey": [
null,
null,
null,
null
]
}
},
"Description": "This resource is used to represent an account for the manager for a Redfish implementation.",
"RoleId@Redfish.AllowableValues": [
"Administrator",
"Operator",
"ReadOnly",
"CustomRole2"
],
"UserName": "TempUser",
"Id": "2",
"Name": "User2",
"AccountTypes": [
"Redfish"
],
"@odata.id": "/redfish/v1/AccountService/Accounts/2",
"RoleId": "Administrator",
"Locked": false,
"@odata.etag": "\"d9e5633a7024f737e544883bbd1c5cc332a05d16\"",
"SNMP": {
"AuthenticationProtocol": "HMAC_SHA96",
"EncryptionProtocol": "CFB128_AES128",
"EncryptionKey": null,
"EncryptionKeySet": true
},
"Enabled": false,
"@odata.type": "#ManagerAccount.v1_6_0.ManagerAccount",
"Password": null,
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/Administrator"
}
}
}
提供反馈