GET – 角色属性
使用 GET 方法检索 Redfish 服务的 Role 资源中的属性。
请求 URL
GET https://<BMC_IPADDR>/redfish/v1/AccountService/Roles/{Administrator,Operator,ReadOnly and $RoleId}
请求正文
无
响应正文
字段 | 类型 | 描述 | |||
---|---|---|---|---|---|
Name | 字符串 | “Administrator”、“Operator”、“ReadOnly”和“CustomRole{N}”中的任何一个 | |||
Id | 字符串 | “Administrator”、“Operator”、“ReadOnly”和“CustomRole{N}”中的任何一个 | |||
RoleId | 字符串 | 预定义角色:“Administrator”、“Operator”和“ReadOnly” | |||
OemPrivileges | 数组 | 此属性的值是此角色包含的 OEM 权限集。对于预定义的角色,此属性应为 readOnly。这些值可以是: “Supervisor”、 “ReadOnly”、 “UserAccountManagement”、 “RemoteConsoleAccess”、 “RemoteConsoleAndVirtualMediaAccess”、 “RemoteServerPowerRestartAccess”、 “AbilityClearEventLogs”、 “AdapterConfiguration_Basic”、 “AdapterConfiguration_NetworkingAndSecurity”、 “AdapterConfiguration_Advanced” | |||
OemPrivileges[N] | 字符串 | OEM 权限字符串。此值可能取决于用户的选择。请参阅 OemPrivileges@Redfish.AllowableValues。 | |||
OemPrivileges@Redfish.AllowableValues | 数组 | UPDATE 操作所允许的 OEM 权限。此属性显示在自定义角色中,并对 Administrator、Operator 和 ReadOnly 角色隐藏。 | |||
OemPrivileges@Redfish.AllowableValues[N] | 字符串 | 值为: “UserAccountManagement”、 “RemoteConsoleAccess”、 “RemoteConsoleAndVirtualMediaAccess”、 “RemoteServerPowerRestartAccess”、 “AbilityClearEventLogs”、 “Configuration_Basic”、 “Configuration_NetworkingAndSecurity”、 “Configuration_Advanced”、 “Configuration_UEFISecurity” | |||
IsPredefined | 布尔 | 此角色是否是预定义的。 注 预定义的角色为 Administrator、Operator、ReadOnly。 | |||
AssignedPrivileges | 数组 | 为此角色定义的标准权限。 | |||
Description | 字符串 | “This resource is used to represent a user role for the user account for a Redfish implementation.” |
状态代码
HTTP 状态代码 | 错误消息 ID |
---|---|
500 | InternalError |
示例
返回以下示例 JSON 响应:
资源 /AccountService/Roles/Administrator:
{
"Id": "Administrator",
"Name": "Administrator",
"OemPrivileges": [
"Supervisor"
],
"@odata.id": "/redfish/v1/AccountService/Roles/Administrator",
"@odata.etag": "\"3b82a78633e02965953\"",
"AssignedPrivileges": [
"Login",
"ConfigureManager",
"ConfigureUsers",
"ConfigureSelf",
"ConfigureComponents"
],
"RoleId": "Administrator",
"IsPredefined": true,
"Description": "This resource is used to represent a user role for the user account for a Redfish implementation.",
"@odata.context": "/redfish/v1/$metadata#Role.Role",
"@odata.type": "#Role.v1_3_1.Role"
}
资源 /AccountService/Roles/Operator:
{
"OemPrivileges": [
"RemoteServerPowerRestartAccess",
"AbilityClearEventLogs",
"Configuration_Basic",
"Configuration_NetworkingAndSecurity",
"Configuration_Advanced"
],
"Id": "Operator",
"Name": "Operator",
"@odata.type": "#Role.v1_3_1.Role",
"@odata.id": "/redfish/v1/AccountService/Roles/Operator",
"@odata.etag": "\"43fc90854f7728ab334\"",
"@odata.context": "/redfish/v1/$metadata#Role.Role",
"Description": "This resource is used to represent a user role for the user account for a Redfish implementation.",
"RoleId": "Operator",
"AssignedPrivileges": [
"Login",
"ConfigureSelf",
"ConfigureComponents"
],
"IsPredefined": true
}
资源 /AccountService/Roles/ReadOnly:
{
"RoleId": "ReadOnly",
"AssignedPrivileges": [
"Login",
"ConfigureSelf"
],
"Id": "ReadOnly",
"Name": "ReadOnly",
"@odata.type": "#Role.v1_3_1.Role",
"@odata.id": "/redfish/v1/AccountService/Roles/ReadOnly",
"@odata.etag": "\"347a35f336d526655a8\"",
"@odata.context": "/redfish/v1/$metadata#Role.Role",
"Description": "This resource is used to represent a user role for the user account for a Redfish implementation.",
"OemPrivileges": [
"ReadOnly"
],
"IsPredefined": true
}
资源 /AccountService/Roles/CustomRole12:
{
"AssignedPrivileges": [
"Login"
],
"Id": "CustomRole12",
"RoleId": "CustomRole12",
"@odata.type": "#Role.v1_3_1.Role",
"@odata.id": "/redfish/v1/AccountService/Roles/CustomRole12",
"@odata.etag": "\"5b5db60befdb25abd48\"",
"@odata.context": "/redfish/v1/$metadata#Role.Role",
"IsPredefined": false,
"Name": "CustomRole12",
"Description": "This resource is used to represent a user role for the user account for a Redfish implementation.",
"OemPrivileges": [
"UserAccountManagement"
],
"OemPrivileges@Redfish.AllowableValues": [
"UserAccountManagement",
"RemoteConsoleAccess",
"RemoteConsoleAndVirtualMediaAccess",
"RemoteServerPowerRestartAccess",
"AbilityClearEventLogs",
"Configuration_Basic",
"Configuration_NetworkingAndSecurity",
"Configuration_Advanced",
"Configuration_UEFISecurity"
]
}