VncService
更新时间: 2026/07/01
在Gitcode上查看源码

ResourceDefinition

uris

  • /redfish/v1/Managers/manager_id/VncService

properties

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrueVNC资源模型的OData描述信息
@odata.idstringtrueVNC资源的访问路径
@odata.typestringtrueVNC资源的类型
IdstringtrueVNC资源的ID
NamestringtrueVNC资源的名称
SSLEncryptionEnabledbooleanfalseSSL加密使能
PasswordstringfalseVNC密码
PasswordValidityDaysnumbertrue密码有效期
KeyboardLayoutstringfalse键盘布局
● en:美式键盘
● jp:日式键盘
● de:德式键盘
MaximumNumberOfSessionsnumbertrueVNC最大会话数
NumberOfActivatedSessionsnumbertrueVNC当前会话数
SessionTimeoutMinutesnumberfalse会话超时时间
SessionModestringtrue会话模式
● Shared:共享
● Private:独占
LoginRulearrayfalse登录规则
● Rule1
● Rule2
● Rule3
PasswordRulePolicystringfalse密码校验规则:
● Default:默认密码复杂度校验
● Customized:自定义正则校验
● Hybrid:两种校验模式共同生效
PasswordPatternstringfalse密码校验正则表达式
DisableKeyboardDuringBiosStartupbooleanfalse禁止BIOS启动阶段通过热键进入BIOS Setup菜单BMC300 5.10.0.1及以上版本支持
Sessionsarraytrue会话列表

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
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
ifmatch_value请求消息的匹配参数可通过对相应资源发起GET操作,从响应头中获取(对应于 “ETag”参数)
SSLEncryptionEnabled_valueSSL加密使能● true:开启
● false:关闭
Password_valueVNC密码如果复杂度检查开关没开的话,密码设置为1-8位任意字符,如果复杂度开关开了,强制设置8位密码且符合一定的复杂性要求:如数字、字符、 字母任意组合
KeyboardLayout_value键盘布局键盘布局
● en:美式键盘
● jp:日式键盘
● de:德式键盘
SessionTimeoutMinutes_value会话超时时间0~480
LoginRule_value登录规则类型为数组,取值为 "Rule1"、"Rule2"、 "Rule3" 中的一个或者多个,分别表示规则一,规则二和规则三
PasswordRulePolicy_value密码校验规则● Default:默认密码复杂度校验
● Customized:自定义正则校验
● Hybrid:两种校验模式共同生效
PasswordPattern_value密码校验正则表达式带有起始符(^)和终止符的($) 的正则表达式长度0-255
DisableKeyboardDuringBiosStartup_value禁止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