GetServiceTask

Updated at:

Queries the details of a single service task under a specified application.

Operation description

Queries the details of a single service task based on the task ID. The response content varies depending on the task type. For heapdump, the response returns heap dump task information. For LiveDebug, the response returns task records and fields such as taskConfig (extraInfo).

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

cms:GetServiceTask

get

*Service

acs:cms:{#regionId}:{#accountId}:serviceTask/{#Workspace}/{#serviceId}/task/{#taskId}

None None

Request syntax

GET /serviceTask/{workspace}/{serviceId}/task/{taskId} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

workspace

string

Yes

The name of the workspace. Example: default-cms--.

default-cms-1672753017899339-cn-hangzhou

serviceId

string

Yes

The ID of the application or service (pid).

ggxw4lnjuz@f2fd3a6265a254a052afb

taskId

string

No

The task ID.

a1b2c3d4-e5f6-7890-abcd-ef1234567890

Request parameters

Parameter

Type

Required

Description

Example

type

string

No

The task type. This parameter is required. Valid values: heapdump (heap dump), LiveDebug Probe (live_debug_log_probe, live_debug_snapshot_probe, live_debug_metric_probe, live_debug_span_probe, and live_debug_span_tag_probe), LiveDebug Command (live_debug_inspect_object, live_debug_search_type, live_debug_search_method, live_debug_decompile, live_debug_get_thread_info, live_debug_get_runtime_info, live_debug_get_memory_info, live_debug_evaluate_expression, and live_debug_modify_logger_level), and LiveDebug hot code replacement (live_debug_code_replace). The value must be the same as the type specified when the task was created.

live_debug_log_probe

Path parameters include workspace, serviceId, and taskId. The query parameter type is required.

Response elements

Element

Type

Description

Example

object

The successful query response.

requestId

string

The request ID.

A1B2C3D4-E5F6-7890-ABCD-EF1234567890

serviceTask

object

The task details object. Common fields include taskId, serviceId, workspace, regionId, ip, taskType, extraInfo (taskConfig JSON for LiveDebug), createTime, and updateTime.

{"taskId":"a1b2c3d4-e5f6-7890-abcd-ef1234567890","serviceId":"ggxw4lnjuz@f2fd3a6265a254a052afb","taskType":"live_debug_log_probe","ip":"10.0.0.1","extraInfo":"{\"probeType\":\"LOG\",\"language\":\"java\"}"}

The response includes the requestId and the serviceTask object.

Examples

Success response

JSON format

{
  "requestId": "A1B2C3D4-E5F6-7890-ABCD-EF1234567890",
  "serviceTask": {
    "taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "serviceId": "ggxw4lnjuz@f2fd3a6265a254a052afb",
    "taskType": "live_debug_log_probe",
    "ip": "10.0.0.1",
    "extraInfo": "{\"probeType\":\"LOG\",\"language\":\"java\"}"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.