跳到主要内容

PATCH – 创建自定义角色(适用于基于 Intel Purley 的系统)

使用 PATCH 方法为 Redfish 服务创建自定义角色。此方法适用于基于 Intel Purley 的 Lenovo 系统。

请求 URL

PATCH https://<BMC_IPADDR>/redfish/v1/AccountService/Roles/CustomRole{N}

请求正文

字段类型描述

OemPrivileges

数组

字符串

此属性的值应为此角色包含的 OEM 权限。对于预定义的角色,此属性应为 readOnly。对于自定义角色,某些实现可能不允许对此属性进行写入。这些值可以是:

“UserAccountManagement”、

“RemoteConsoleAccess”、

“RemoteConsoleAndVirtualMediaAccess”、

“RemoteServerPowerRestartAccess”、

“AbilityClearEventLogs”、

“Configuration_Basic”、

“Configuration_NetworkingAndSecurity”、

“Configuration_Advanced”、

“Configuration_UEFISecurity”

响应

响应返回的内容与 GET 操作相同,但更新了属性。

状态代码

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

示例

以下示例是 PATCH 正文。

{
"OemPrivileges": [
"RemoteConsoleAccess",
"RemoteConsoleAndVirtualMediaAccess",
"RemoteServerPowerRestartAccess"
]
}

返回以下示例 JSON 响应:

{
"@odata.etag": "\"66da6541a5fb25ae602\"",
"OemPrivileges": [
"RemoteConsoleAccess",
"RemoteConsoleAndVirtualMediaAccess",
"RemoteServerPowerRestartAccess"
],
"OemPrivileges@Redfish.AllowableValues": [
"Supervisor",
"ReadOnly",
"UserAccountManagement",
"RemoteConsoleAccess",
"RemoteConsoleAndVirtualMediaAccess",
"RemoteServerPowerRestartAccess",
"AbilityClearEventLogs",
"AdapterConfiguration_Basic",
"AdapterConfiguration_NetworkingAndSecurity",
"AdapterConfiguration_Advanced"
],
"RoleId": "CustomRole2",
"IsPredefined": false,
"AssignedPrivileges": [
"Login"
],
"Id": "CustomRole2",
"Name": "CustomRole2",
"@odata.type": "#Role.v1_2_4.Role",
"@odata.id": "/redfish/v1/AccountService/Roles/CustomRole2",
"Description": "This resource is used to represent a user role for the user account for a Redfish implementation."
}