You need to enable JavaScript to run this app.
导航

UpdateSystemEvents

最近更新时间2024.02.28 15:03:40

首次发布时间2022.11.03 08:26:23

调用 UpdateSystemEvents 接口,修改系统事件状态。

说明

  • SystemMaintenance.Redeploy(系统维护,实例重新部署)事件授权时,支持使用OperatedStartAtOperatedEndAt参数调整运维时间窗。
  • OperatedStartAtOperatedEndAt 参数仅支持传入如下时间段:
    • 事件发生时间 ~ 事件发生时间+12h
    • 事件发生时间+12h ~ 事件发生时间+24h
    • 事件发生时间+24h ~ 事件发生时间+36h
    • 事件发生时间+36h ~ 事件发生时间+48h
    • 事件发生时间+48h ~ 事件发生时间+60h
    • 事件发生时间+60h ~ 事件发生时间+72h

调试

请求参数

名称类型是否必填示例值描述
ActionStringUpdateSystemEvents要执行的操作,取值:UpdateSystemEvents。
VersionString2020-04-01API的版本,取值: 2020-04-01。

EventIds.N

String

EventIds.1=e-3ti9101aju3vj0****&EventIds.2=e-3tiegs1y963vj0****

事件ID,最多支持100个ID。您可以通过事件通知DescribeSystemEvents接口查询获取。

  • 参数 - N:表示事件ID的序号。
  • 多个事件ID之间用&分隔。

Status

String

Executing

系统事件的状态,取值:

  • Executing:执行中
UpdatedAtString2021-06-28T18:29:38+08:00事件更新的时间,默认是收到请求的时间,格式为RFC3339。

OperatedStartAt

String

2022-08-30T15:11:46+08:00

事件运维时间窗开始时间,默认是收到请求的时间+60小时,格式为RFC3339。

SystemMaintenance.Redeploy(系统维护,实例重新部署)事件可调整运维时间。

OperatedEndAt

String

2022-09-02T15:11:46+08:00

事件运维时间窗结束时间,默认是收到请求的时间+72小时,格式为RFC3339。

SystemMaintenance.Redeploy(系统维护,实例重新部署)事件可调整运维时间。

返回数据

名称类型示例值描述
OperationDetailsArray of struct-操作详情。具体请参见下表“ OperationDetails结构 ”。

OperationDetails结构

字段类型示例值描述
EventIdStringe-3tiegs1y963vj0******系统事件ID。
ErrorStruct-某个事件状态修改失败的错误信息。具体请参见“Error结构”。

Error结构

名称类型示例值描述

Code

String

InvalidSystemEvent.NotFound

批量请求处理中,单个请求操作失败的错误码,具体请参见下表“错误码(批量操作时具体单个请求失败的异常)”。

MessageStringThe specified system event does not exist.批量请求处理中,单个请求的异常信息。具体请参见下表“错误码(批量操作时具体单个请求失败的异常)”中的错误信息。

错误码(批量操作时具体单个请求失败)

错误码错误信息描述
InvalidSystemEvent.NotFoundThe specified system event does not exist.指定的系统事件不存在。
InvalidSystemEventStatus.TypeMismatchThe specified system event type does not match this status.事件状态与事件类型不匹配。
InvalidSystemEventStatus.PreStatusMismatchThe specified system event does not match pre status.事件状态与事件前置状态不匹配。

请求示例

GET /?Action=UpdateSystemEvents&Version=2020-04-01&EventIds.1=t-3ti9101aju3vj0******&Status=Executing HTTP/1.1
Host: open.volcengineapi.com
Region: cn-beijing
ServiceName: ecs

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202106111445100102252431000052****",
        "Action": "UpdateSystemEvents",
        "Version": "2020-04-01",
        "Service": "ecs",
        "Region": "cn-beijing"
    },
    "Result": {
        "OperationDetails": [
            {
                "EventId": "e-ybq95rphkoawmb******",
                "Error": {
                    "Code": "InvalidSystemEvent.NotFound",
                    "Message": "The specified system event does not exist."
                }
            }
        ]
    }
}

错误码

HttpCode错误码错误信息描述
400InvalidOperatedEndAt.MalformedThe specified OperatedEndAt is malformed.指定的OperatedEndAt不合法。
400InvalidOperatedStartAt.MalformedThe specified OperatedStartAt is malformed.指定的OperatedStartAt不合法。
400MissingParameter.EventIdsThe required parameter EventIds is not supplied.事件ID不能为空。
400MissingParameter.StatusThe required parameter Status is not supplied.事件状态不能为空。
400LimitExceeded.MaximumEventIdsYou've reached the limit on the number of EventIds that you can set.指定的事件ID数量超过限制。
400InvalidStatus.MalformedThe specified Status is malformed.指定的事件状态不合法。
400InvalidUpdatedAt.MalformedThe specified UpdatedAt is malformed.指定的更新时间不合法,应符合RFC3339。
400InvalidArgumentThe specified argument is invalid.指定的参数不合法。
500InternalErrorAn internal error has occurred.内部错误,请重试。如果多次尝试失败,请提交工单。