配置登录规则信息
命令功能
配置登录规则信息。
命令格式
操作类型:PATCH
URL:https://device_ip/redfish/v1/Systems/SecurityService/SecurityLoad
请求头:
X-Auth-Token: auth_value
请求消息体:
{ "Password":XXX, "load_cfg":[{ "enable":enable, "start_time": start_tim, "end_time": end_time, "ip_addr": ip_addr, "mac_addr": mac_addr }] }
请求参数
参数 |
是否必选 |
参数说明 |
取值要求 |
---|---|---|---|
Password |
必选 |
用户密码。 |
字符串,长度为8~20字符。 |
load_cfg |
必选 |
配置项列表。 |
列表,长度最大30。 |
enable |
必选 |
配置项是否使能。 |
字符串,取值为“true”或“false”。 |
start_time |
可选 |
允许登录的时间起点。 |
24小时制,样例:“小时:分钟” |
end_time |
可选 |
允许登录的时间终点。 |
24小时制,样例:“小时:分钟” |
ip_addr |
可选 |
允许登录的IP地址或IP地址及掩码位数。 |
字符串,IPV4地址,点分十进制。 掩码位数1~32。 |
mac_addr |
可选 |
允许登录的MAC地址。 |
字符串,只支持单播地址。 允许只配置单播地址高24位。 |
使用指南
无
使用实例
请求样例:
PATCH https://10.10.10.10/redfish/v1/Systems/SecurityLoad
请求头:
X-Auth-Token: auth_value
请求消息体:
{ "Password": "password", "load_cfg":[{ "enable": "true", "start_time": "06:00", "end_time": "12:00", "ip_addr": "xx.xx.xx.xx", "mac_addr": "00:89:01:xx:xx:04" }] }
响应样例:
{ "error": { "code": "Base.1.0.Success", "message": "Operation success. See ExtendedInfo for more information.", "@Message.ExtendedInfo": [ { "@odata.type": "#MessageRegistry.v1_0_0.MessageRegistry", "Description": "Indicates that no error has occurred.", "Message": "Config security load successfully.", "Severity": "OK", "NumberOfArgs": null, "ParamTypes": null, "Resolution": "None" } ] } }
响应码:202
输出说明
字段 |
类型 |
说明 |
---|---|---|
code |
字符串 |
指示消息注册表中特定消息ID的字符串。 |
message |
字符串 |
与消息注册表中的消息对应的易读的消息。 |
@odata.type |
字符串 |
消息资源的OData描述信息。 |
Description |
字符串 |
消息资源的具体描述。 |
Message |
字符串 |
消息资源的详细信息。 |
Severity |
字符串 |
严重性。支持的严重级别包括:
|
NumberOfArgs |
数字 |
消息描述的参数个数。 |
ParamTypes |
数组 |
参数类型列表。 |
Resolution |
字符串 |
事件处理建议。 |
父主题: 安全管理