VncService
更新时间: 2026/07/01
在AtomGit上查看源码ResourceDefinition
uris
/redfish/v1/Managers/manager_id/VncService
properties
| 名称 | 类型 | 是否只读 | 取值范围/枚举值 | 说明 |
|---|---|---|---|---|
| @odata.context | string | true | - | VNC资源模型的OData描述信息 |
| @odata.id | string | true | - | VNC资源的访问路径 |
| @odata.type | string | true | - | VNC资源的类型 |
| Id | string | true | - | VNC资源的ID |
| Name | string | true | - | VNC资源的名称 |
| SSLEncryptionEnabled | boolean | false | - | SSL加密使能 |
| Password | null | false | - | VNC密码 |
| PasswordValidityDays | number | true | - | 密码有效期 |
| KeyboardLayout | string | false | - | 键盘布局 ● en:美式键盘 ● jp:日式键盘 ● de:德式键盘 |
| MaximumNumberOfSessions | number | true | - | VNC最大会话数 |
| NumberOfActivatedSessions | number | true | - | VNC当前会话数 |
| SessionTimeoutMinutes | number | false | - | 会话超时时间 |
| SessionMode | null | true | - | 会话模式 ● Shared:共享 ● Private:独占 |
| LoginRule [ { | array | false | - | 登录规则 ● Rule1:规则1 ● Rule2:规则2 ● Rule3:规则3 |
| LoginRule[].@odata.id | string | true | - | 成员资源节点的访问路径 |
| } ] | ||||
| PasswordRulePolicy | string | false | - | 密码校验规则: ● Default:默认密码复杂度校验 ● Customized:自定义正则校验 ● Hybrid:两种校验模式共同生效 |
| PasswordPattern | string | false | - | 密码校验正则表达式 |
| DisableKeyboardDuringBiosStartup | boolean | false | - | 禁止BIOS启动阶段通过热键进入BIOS Setup菜单BMC300 5.10.0.1及以上版本支持 |
| Links { | object | true | - | VNC资源相关链接信息 |
| Links.Sessions[].@odata.id | string | true | - | 成员资源节点的访问路径 |
| Links.Sessions[ ] | array | true | - | 会话列表 |
| } |
supported_methods
- GET
- PATCH
HTTP methods
GET
命令功能
查询 VNC 资源
命令格式
URL: https://device_ip/redfish/v1/Managers/manager_id/VncService
请求头:
X-Auth-Token: auth_value请求消息体: 无
参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| device_ip | 登录设备的IP地址 | IPv4或IPv6地址 |
| auth_value | 请求消息的鉴权参数 | 可通过/redfish/v1/SessionService/Sessions创建会话时获得 |
使用指南
GA140C机型不支持
使用实例
请求样例: GET https://device_ip/redfish/v1/Managers/manager_id/VncService
X-Auth-Token: auth_value 请求消息体:无
响应样例:
json
{
"@odata.context": "/redfish/v1/$metadata#HwVncService.HwVncService",
"@odata.id": "/redfish/v1/Managers/1/VncService",
"@odata.type": "#HwVncService.v1_0_0.HwVncService",
"Id": "VncService",
"Name": "Vnc Service",
"SSLEncryptionEnabled": false,
"Password": null,
"PasswordValidityDays": 40,
"KeyboardLayout": "jp",
"MaximumNumberOfSessions": 5,
"NumberOfActivatedSessions": 0,
"SessionTimeoutMinutes": 480,
"SessionMode": null,
"LoginRule": [
{
"@odata.id": "/redfish/v1/Managers/1#/Oem/Public/LoginRule/1"
},
{
"@odata.id": "/redfish/v1/Managers/1#/Oem/Public/LoginRule/2"
},
{
"@odata.id": "/redfish/v1/Managers/1#/Oem/Public/LoginRule/3"
}
],
"PasswordRulePolicy": "Default",
"PasswordPattern": "",
"DisableKeyboardDuringBiosStartup": false,
"Links": {
"Sessions": [
{
"@odata.id": "/redfish/v1/Sessionservice/Sessions/dfaa907263a608fd"
}
]
}
}响应码:200
PATCH
命令功能
修改 VNC 资源属性
命令格式
URL: https://device_ip/redfish/v1/Managers/manager_id/VncService
请求头:
X-Auth-Token: auth_value
Content-Type: header_type
If-Match: ifmatch_value请求消息体:
json
{
"SSLEncryptionEnabled": SSLEncryptionEnabled_value,
"Password": Password_value,
"KeyboardLayout": KeyboardLayout_value,
"SessionTimeoutMinutes": SessionTimeoutMinutes_value,
"LoginRule": LoginRule_value,
"PasswordRulePolicy": PasswordRulePolicy_value,
"PasswordPattern": PasswordPattern_value,
"DisableKeyboardDuringBiosStartup": DisableKeyboardDuringBiosStartup_value
}请求头参数说明
参见 请求头参数说明
请求体参数说明
| 参数 | 参数说明 | 取值 |
|---|---|---|
| SSLEncryptionEnabled | SSL加密使能 | ● true:开启 ● false:关闭 |
| Password | VNC密码 | 如果复杂度检查开关没开的话,密码设置为1-8位任意字符,如果复杂度开关开了,强制设置8位密码且符合一定的复杂性要求:如数字、字符、 字母任意组合 |
| KeyboardLayout | 键盘布局 | 键盘布局 ● en:美式键盘 ● jp:日式键盘 ● de:德式键盘 |
| SessionTimeoutMinutes | 会话超时时间 | 0~480 |
| LoginRule | 登录规则 | 类型为数组,取值为 "Rule1"、"Rule2"、 "Rule3" 中的一个或者多个,分别表示规则一,规则二和规则三 |
| PasswordRulePolicy | 密码校验规则 | ● Default:默认密码复杂度校验 ● Customized:自定义正则校验 ● Hybrid:两种校验模式共同生效 |
| PasswordPattern | 密码校验正则表达式 | 带有起始符(^)和终止符的($) 的正则表达式长度0-255 |
| DisableKeyboardDuringBiosStartup | 禁止BIOS启动阶段通过热键进入BIOS Setup菜单BMC300 5.10.0.1及以上版本支持 | ● true:禁用 ● false:不禁用 |
使用指南
可同时设置多个服务的参数。 GA140C机型不支持
使用实例
请求样例: PATCH https://device_ip/redfish/v1/Managers/manager_id/VncService
X-Auth-Token: auth_value Content-Type: header_type If-Match: ifmatch_value 请求消息体:
json
{
"SSLEncryptionEnabled": SSLEncryptionEnabled_value,
"Password": Password_value,
"KeyboardLayout": KeyboardLayout_value,
"SessionTimeoutMinutes": SessionTimeoutMinutes_value,
"LoginRule": LoginRule_value,
"PasswordRulePolicy": PasswordRulePolicy_value,
"PasswordPattern": PasswordPattern_value,
"DisableKeyboardDuringBiosStartup": DisableKeyboardDuringBiosStartup_value
}响应样例:
json
{
"@odata.context": "/redfish/v1/$metadata#HwVncService.HwVncService",
"@odata.id": "/redfish/v1/Managers/1/VncService",
"@odata.type": "#HwVncService.v1_0_0.HwVncService",
"Id": "VncService",
"Name": "Vnc Service",
"SSLEncryptionEnabled": false,
"Password": null,
"PasswordValidityDays": 40,
"KeyboardLayout": "jp",
"MaximumNumberOfSessions": 5,
"NumberOfActivatedSessions": 0,
"SessionTimeoutMinutes": 480,
"SessionMode": null,
"LoginRule": [
{
"@odata.id": "/redfish/v1/Managers/1#/Oem/Public/LoginRule/1"
},
{
"@odata.id": "/redfish/v1/Managers/1#/Oem/Public/LoginRule/2"
},
{
"@odata.id": "/redfish/v1/Managers/1#/Oem/Public/LoginRule/3"
}
],
"PasswordRulePolicy": "Default",
"PasswordPattern": "",
"DisableKeyboardDuringBiosStartup": false,
"Links": {
"Sessions": [
{
"@odata.id": "/redfish/v1/Sessionservice/Sessions/dfaa907263a608fd"
}
]
}
}响应码:200