代码仓
中
VncService
更新时间: 2026/07/01
在AtomGit上查看源码

ResourceDefinition ​

uris ​

  • /redfish/v1/Managers/manager_id/VncService

properties ​

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue-VNC资源模型的OData描述信息
@odata.idstringtrue-VNC资源的访问路径
@odata.typestringtrue-VNC资源的类型
Idstringtrue-VNC资源的ID
Namestringtrue-VNC资源的名称
SSLEncryptionEnabledbooleanfalse-SSL加密使能
Passwordnullfalse-VNC密码
PasswordValidityDaysnumbertrue-密码有效期
KeyboardLayoutstringfalse-键盘布局
● en:美式键盘
● jp:日式键盘
● de:德式键盘
MaximumNumberOfSessionsnumbertrue-VNC最大会话数
NumberOfActivatedSessionsnumbertrue-VNC当前会话数
SessionTimeoutMinutesnumberfalse-会话超时时间
SessionModenulltrue-会话模式
● Shared:共享
● Private:独占
LoginRule [ {arrayfalse-登录规则
● Rule1:规则1
● Rule2:规则2
● Rule3:规则3
LoginRule[].@odata.idstringtrue-成员资源节点的访问路径
} ]
PasswordRulePolicystringfalse-密码校验规则:
● Default:默认密码复杂度校验
● Customized:自定义正则校验
● Hybrid:两种校验模式共同生效
PasswordPatternstringfalse-密码校验正则表达式
DisableKeyboardDuringBiosStartupbooleanfalse-禁止BIOS启动阶段通过热键进入BIOS Setup菜单BMC300 5.10.0.1及以上版本支持
Links {objecttrue-VNC资源相关链接信息
Links.Sessions[].@odata.idstringtrue-成员资源节点的访问路径
Links.Sessions[ ]arraytrue-会话列表
}

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
}

请求头参数说明

参见 请求头参数说明

请求体参数说明

参数参数说明取值
SSLEncryptionEnabledSSL加密使能● true:开启
● false:关闭
PasswordVNC密码如果复杂度检查开关没开的话,密码设置为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