Creates an operations and maintenance task.
Operation description
O&M tasks are classified into:
- coredump: After you enable coredump, the system generates a core dump file when a container unexpectedly stops. You can use the core dump file to analyze the exception and find out the cause of the problem. For more information, see Enable coredump.
- tcpdump: After you enable tcpdump, the system captures network packets when a container unexpectedly stops. You can analyze the packets and locate network problems. For more information, see Enable tcpdump .
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
eci:CreateInstanceOpsTask | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The region ID of the O&M task. | cn-hangzhou |
ContainerGroupId | string | Yes | The ID of the container group. | eci-bp1dvysdafbh00t7**** |
OpsType | string | Yes | The type of the O&M task. Valid values:
| coredump |
OpsValue | string | Yes | The value of the O&M task. You can set this parameter based on the value of OpsType.
| enable |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "89945DD3-9072-47D0-A318-353284CFC7B",
"Result": "Coredump settings has been configured successfully."
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
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 |
For a list of error codes, visit the Service error codes.