跳到主要内容

PATCH – 更新事件服务属性

使用 PATCH 方法更新事件服务资源属性。

请求 URL

PATCH https://<BMC_IPADDR>/redfish/v1/EventService

请求正文

字段类型描述

SMTP

对象

已展开

 

Authentication

字符串

SMTP 服务器的认证方法。

 

Port

数字

目标 SMTP 端口。

 

Password

字符串

用于向 SMTP 服务器进行认证的密码。此值在响应中为“null”。

 

Username

字符串

用于向 SMTP 服务器进行认证的用户名。

 

ServerAddress

字符串

SMTP 服务器的地址。

 

FromAddress

字符串

传出电子邮件的“发件人”地址。

响应

响应返回的内容与 GET 操作相同,但更新了属性。

状态代码

HTTP 状态代码错误消息 ID
500InternalError

示例

以下示例是 PATCH 正文

{
"SMTP": {
"Password": "PASSW0RD",
"Username": "USERID",
"Port": 25,
"ServerAddress": "0.0.0.0",
"Authentication": "None",
"FromAddress": "userid@lenovo.com"
}
}

成功运行 PATCH 操作后,更新服务资源查询将返回以下示例 JSON 响应:

{
"DeliveryRetryIntervalSeconds": 60,
"DeliveryRetryAttempts": 3,
"ServerSentEventUri": "/redfish/v1/EventService/ServerSentEvent",
"IncludeOriginOfConditionSupported": true,
"RegistryPrefixes": [
"Base",
"EventRegistry",
"ExtendedError",
"LenovoExtendedWarning",
"LenovoFirmwareUpdateRegistry",
"ResourceEvent",
"TaskEvent"
],
"SubordinateResourcesSupported": true,
"EventFormatTypes": [
"Event",
"MetricReport"
],
"SMTP": {
"Password": null,
"ServiceEnabled": true,
"Authentication": "None",
"Username": "USERID",
"Port": 25,
"ServerAddress": "0.0.0.0",
"Authentication@Redfish.AllowableValues": [
"None",
"Login",
"CRAM_MD5"
],
"ConnectionProtocol": "AutoDetect",
"FromAddress": "userid@lenovo.com",
"ConnectionProtocol@Redfish.AllowableValues": [
"AutoDetect"
]
},
"@odata.etag": "\"b84bdec2d6f72e14f9c04\"",
"ServiceEnabled": true,
"Name": "Event Service",
"Description": "This resource represents an event service for a Redfish implementation.",
"Id": "EventService",
"Actions": {
"#EventService.SubmitTestEvent": {
"title": "SubmitTestEvent",
"target": "/redfish/v1/EventService/Actions/EventService.SubmitTestEvent"
}
},
"SSEFilterPropertiesSupported": {
"RegistryPrefix": true,
"OriginResource": true,
"ResourceType": true,
"MessageId": true,
"EventFormatType": true,
"SubordinateResources": true,
"MetricReportDefinition": true
},
"Status": {
"Health": "OK",
"State": "Enabled"
},
"@odata.id": "/redfish/v1/EventService",
"@odata.type": "#EventService.v1_6_0.EventService",
"ResourceTypes": [
"LogService"
],
"Subscriptions": {
"@odata.id": "/redfish/v1/EventService/Subscriptions"
}
}