Call CreateInstanceOpsTask to create an Operations and Maintenance (O&M) task.
Operation description
API description
O&M tasks support the following two types:
coredump: After you enable coredump, the system generates a core file when a container ends abnormally. This file helps you analyze the issue and determine its cause. For more information, see Enable coredump.
tcpdump: After you enable tcpdump, the system captures network packets. This helps you analyze messages and locate network issues. For more information, see Enable tcpdump.
Try it now
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
Test
RAM authorization
Action | Access level | Resource type | Condition key | Dependent action |
eci:CreateInstanceOpsTask | create | *All Resource
|
| None |
Request parameters
Parameter | Type | Required | Description | Example |
RegionId | string | Yes | The region ID. | cn-hangzhou |
RegionId | string | Yes | The region ID. | cn-hangzhou |
ContainerGroupId | string | Yes | The ID of the ECI instance. | eci-bp1dvysdafbh00t7**** |
OpsType | string | Yes | The type of the O&M task. Valid values:
| coredump |
OpsValue | string | Yes | The parameters for the O&M task. The parameters that you can set vary based on the value of OpsType.
| enable |
Response elements
Element | Type | Description | Example |
object | |||
RequestId | string | The request ID. | 89945DD3-9072-47D0-A318-353284CFC7B |
Result | string | The result of the O&M task execution. | Enable Success |
Examples
Success response
JSON format
{
"RequestId": "89945DD3-9072-47D0-A318-353284CFC7B",
"Result": "Enable Success"
}Error codes
HTTP status code | Error code | Error message | Description |
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 |
See for a complete list.
Release notes
See 变更详情 for a complete list.