Tüm Ürünler
Search
Belge Merkezi

:CreateInstanceOpsTask

Son Güncelleme:Sep 30, 2026

CreateInstanceOpsTask çağrısı yaparak bir operasyon ve bakım (O&M) görevi oluşturur.

Operation description

İşlem açıklaması\nAşağıdaki iki O&M görevi türü desteklenir:\n\n- coredump: coredump etkinleştirildikten sonra, bir konteyner anormal şekilde sonlandırıldığında sistem bir core dosyası oluşturur. İstisnayı analiz etmek ve nedeni belirlemek için core dosyasını kullanabilirsiniz. Daha fazla bilgi için bkz. coredump'u etkinleştirme.\n- tcpdump: tcpdump etkinleştirildikten sonra, sistem ağ paketlerini yakalar. Yakalanan paketleri iletileri analiz etmek ve ağ sorunlarını gidermek için kullanabilirsiniz. Daha fazla bilgi için bkz. tcpdump'u etkinleştirme.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

eci:CreateInstanceOpsTask

create

*All Resource

*

  • eci:tag
None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

Bölge kimliği.

cn-hangzhou

RegionId

string

Yes

Elastic Container Instance (ECI) örnek kimliği.

eci-bp1dvysdafbh00t7****

ContainerGroupId

string

Yes

O&M görevinin türü. Geçerli değerler:\n\n- coredump\n- tcpdump.

coredump

OpsType

string

Yes

O&M görevinin parametreleri. OpsType değerine göre ilgili parametreleri ayarlayabilirsiniz.\n- OpsType, coredump olarak ayarlanmışsa, OpsValue için geçerli değerler şunlardır:\n - enable: coredump'u etkinleştirir.\n - disable: coredump'u devre dışı bırakır.\n- OpsType, tcpdump olarak ayarlanmışsa, OpsValue, {"Enable":true, "IfDeviceName":"eth0"} gibi JSON biçimli bir parametre dizesidir. Aşağıdaki parametreler desteklenir:\n - Enable: tcpdump'un etkinleştirilip etkinleştirilmeyeceğini belirtir. Bu parametre zorunludur. true değeri tcpdump'u etkinleştirir, false değeri ise devre dışı bırakır.\n - Protocol: ağ protokolü. Geçerli değerler: tcp, udp ve icmpv4.\n - SourceIp: kaynak IP adresi.\n - SourceCidr: CIDR gösterimindeki kaynak CIDR bloğu. Hem bir IP adresi hem de bir CIDR bloğu belirtilmişse, CIDR bloğu geçerli olduğunda IP adresi ayarı yok sayılır.\n - SourcePort: kaynak bağlantı noktası. Geçerli değerler: 1 ile 65535 arası.\n - DestIp: hedef IP adresi.\n - DestCidr: CIDR gösterimindeki hedef CIDR bloğu. Hem bir IP adresi hem de bir CIDR bloğu belirtilmişse, CIDR bloğu geçerli olduğunda IP adresi ayarı yok sayılır.\n - DestPort: hedef bağlantı noktası. Geçerli değerler: 1 ile 65535 arası.\n - IfDeviceName: hedef ağ arabirimi denetleyicisi (NIC). Varsayılan değer: eth0.\n - Snaplen: paket yakalama uzunluğu. Varsayılan değer: 65535 bayt.\n - Duration: yakalama süresi. Birim: saniye.\n - PacketNum: yakalanacak hedef paket sayısı.\n - FileSize: yakalanan paketlerin hedef dosya boyutu. Birim: bayt. Maksimum değer: 1073741824 bayt (1 GB).

enable

OpsValue

string

Yes

The parameters for the O&M task. The parameters that you can set vary based on the value of OpsType.

  • If you set OpsType to coredump, valid values for OpsValue are:

    • enable: Enables coredump.

    • disable: Disables coredump.

  • If you set OpsType to tcpdump, set OpsValue to a JSON string of parameters. For example, {"Enable":true, "IfDeviceName":"eth0"}. The following parameters are available:

    • Enable: Specifies whether to enable tcpdump. This parameter is required. Set the value to true to enable tcpdump or false to disable it.

    • Protocol: The network protocol. Valid values: tcp, udp, and icmpv4.

    • SourceIp: The source IP address.

    • SourceCidr: The source CIDR block. The value must be in CIDR format. If you specify both an IP address and a CIDR block, the CIDR block takes precedence.

    • SourcePort: The source port. The value must be in the range of 1 to 65535.

    • DestIp: The destination IP address.

    • DestCidr: The destination CIDR block. The value must be in CIDR format. If you specify both an IP address and a CIDR block, the CIDR block takes precedence.

    • DestPort: The destination port. The value must be in the range of 1 to 65535.

    • IfDeviceName: The destination network interface card (NIC). The default value is eth0.

    • Snaplen: The length of the captured packet. The default value is 65535 bytes.

    • Duration: The capture duration. Unit: seconds.

    • PacketNum: The number of packets to capture.

    • FileSize: The size of the object file for the captured packets. Unit: bytes. The maximum value is 1073741824 bytes (1 GB).

enable

Response elements

Element

Type

Description

Example

object

RequestId

string

İstek kimliği.

89945DD3-9072-47D0-A318-353284CFC7B

Result

string

O&M görevinin yürütme sonucu.

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 Error Codes for a complete list.

Release notes

See Release Notes for a complete list.