跳到主要内容

PATCH – 删除帐户(适用于基于 Intel Purley 的系统)

通过 HTTP PATCH 方法删除 Redfish 服务的帐户资源,并将帐户的“UserName”设置为空字符串(“”)。此方法适用于基于 Intel Purley 的 Lenovo 系统,因为这些系统上预先填充了帐户的“插槽”。

请求 URL

PATCH https://<BMC_IPADDR>/redfish/v1/AccountService/Accounts/{1...12}

请求正文

字段类型描述
UserName字符串将其设置为空字符串“”。

响应正文

响应返回的内容与对帐户的空“插槽”执行的 GET 操作相同。

状态代码

HTTP 状态代码错误消息 ID
500InternalError

示例

以下示例是 PATCH 正文

{
"UserName": ""
}

返回以下示例 JSON 响应:

{
"@odata.id": "/redfish/v1/AccountService/Accounts/2",
"UserName": "",
"Enabled": false,
"Description": "This resource is used to represent an account for the manager for a Redfish implementation.",
"RoleId": "CustomRole2",
"Password": null,
"Links": {
"Role": {
"@odata.id": "/redfish/v1/AccountService/Roles/CustomRole2"
}
},
"SNMP": {
"EncryptionProtocol": "None",
"AuthenticationProtocol": "None",
"EncryptionKeySet": false,
"EncryptionKey": null
},
"Locked": false,
"AccountTypes": [
"Redfish"
],
"@odata.type": "#ManagerAccount.v1_6_0.ManagerAccount",
"RoleId@Redfish.AllowableValues": [
"Administrator",
"Operator",
"ReadOnly",
"CustomRole2"
],
"Id": "2",
"Name": "User2",
"Oem": {
"Lenovo": {
"@odata.type": "#LenovoManagerAccount.v1_0_0.LenovoManagerAccount",
"SSHPublicKey": [
null,
null,
null,
null
]
}
},
"@odata.etag": "\"22ea0db164122f8b861444197c969a8932a05d16\""
}