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:
{
    "IsPredefined": true,
    "@odata.id": "/redfish/v1/AccountService/Roles/Administrator",
    "AssignedPrivileges": [
        "Login",
        "ConfigureManager",
        "ConfigureUsers",
        "ConfigureSelf",
        "ConfigureComponents"
    ],
    "Name": "Administrator",
    "@odata.type": "#Role.v1_2_4.Role",
    "OemPrivileges": [
        "Supervisor"
    ],
    "Id": "Administrator",
    "@odata.etag": "\"aade26bf7b815e38f2c05df254f8a080\"",
    "RoleId": "Administrator",
    "Description": "This resource is used to represent a user role for the user account for a Redfish implementation."
}
资源 /AccountService/Roles/Operator:
{
    "IsPredefined": true,
    "Id": "Operator",
    "AssignedPrivileges": [
        "Login",
        "ConfigureSelf",
        "ConfigureComponents"
    ],
    "Name": "Operator",
    "@odata.type": "#Role.v1_2_4.Role",
    "OemPrivileges": [
        "RemoteServerPowerRestartAccess",
        "AbilityClearEventLogs",
        "Configuration_Basic",
        "Configuration_NetworkingAndSecurity"
    ],
    "@odata.id": "/redfish/v1/AccountService/Roles/Operator",
    "@odata.etag": "\"e2f69b3d79821fd69587ccad12295c70\"",
    "RoleId": "Operator",
    "Description": "This resource is used to represent a user role for the user account for a Redfish implementation."
}
资源 /AccountService/Roles/ReadOnly:
{
    "IsPredefined": true,
    "Id": "ReadOnly",
    "AssignedPrivileges": [
        "Login",
        "ConfigureSelf"
    ],
    "Name": "ReadOnly",
    "@odata.type": "#Role.v1_2_4.Role",
    "OemPrivileges": [
        "ReadOnly"
    ],
    "@odata.id": "/redfish/v1/AccountService/Roles/ReadOnly",
    "@odata.etag": "\"aa8e529f6994a33c3a1f4c923f51c4cb\"",
    "RoleId": "ReadOnly",
    "Description": "This resource is used to represent a user role for the user account for a Redfish implementation."
}
资源 /AccountService/Roles/CustomRole12:
{
    "IsPredefined": false,
    "Id": "CustomRole12",
    "AssignedPrivileges": [
        "Login"
    ],
    "Name": "CustomRole12",
    "@odata.type": "#Role.v1_2_4.Role",
    "RoleId": "CustomRole12",
    "OemPrivileges": [
        "UserAccountManagement"
    ],
    "@odata.id": "/redfish/v1/AccountService/Roles/CustomRole12",
    "@odata.etag": "\"1cb07bd5147b5751700f2728e290e080\"",
    "OemPrivileges@Redfish.AllowableValues": [
        "UserAccountManagement",
        "RemoteConsoleAccess",
        "RemoteConsoleAndVirtualMediaAccess",
        "RemoteServerPowerRestartAccess",
        "AbilityClearEventLogs",
        "Configuration_Basic",
        "Configuration_NetworkingAndSecurity",
        "Configuration_Advanced",
        "Configuration_UEFISecurity"
    ],
    "Description": "This resource is used to represent a user role for the user account for a Redfish implementation."
}