调用CreateInstanceOpsTask创建一个运维任务。
接口说明
接口说明
运维任务支持以下两种:
coredump:开启 coredump 后,在容器异常终止时,系统会生成 core 文件,以便您分析异常,找出问题原因。更多信息,请参见开启 coredump。
tcpdump:开启 tcpdump 后,系统将抓取网络数据包,以便您分析报文,定位网络问题。更多信息,请参见开启 tcpdump。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
eci:CreateInstanceOpsTask |
create |
*全部资源
|
|
无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
地域 ID。 |
cn-hangzhou |
| RegionId |
string |
是 |
地域 ID。 |
cn-hangzhou |
| ContainerGroupId |
string |
是 |
ECI 实例 ID。 |
eci-bp1dvysdafbh00t7**** |
| OpsType |
string |
是 |
运维任务类型。取值范围:
|
coredump |
| OpsValue |
string |
是 |
运维任务参数。根据 OpsType 的取值,可设置相应参数。
|
enable |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
89945DD3-9072-47D0-A318-353284CFC7B |
| Result |
string |
运维任务执行结果。 |
Enable Success |
示例
正常返回示例
JSON格式
{
"RequestId": "89945DD3-9072-47D0-A318-353284CFC7B",
"Result": "Enable Success"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | Coredump.RefrshIntervalTooShort | The time interval since last setting too short, please try again later. | |
| 400 | Ops.TypeNotSupport | %s | |
| 400 | Coredump.RegionNotSupport | %s | |
| 400 | CorePattern.UpdateFail | Update coredump settings fail, please try again later | |
| 400 | Coredump.InvalidCorePatternType | %s | |
| 400 | InvalidCorePatternValue | %s | |
| 400 | InvalidInstanceId.NotFound | The specified instanceId does not exist | |
| 400 | Ops.InstanceNotSupport | %s | |
| 400 | Ops.IntervalTooShort | The time interval since last setting too short, please try again later. | |
| 400 | Ops.RegionNotSupport | %s | |
| 400 | Ops.OpsValueInvalid | Ops value check failed, please confirm by ops type and try again later. | |
| 400 | Ops.ExecuteTaskFail | %s | |
| 400 | Tcpdump.InvalidValue | %s |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。