All Products
Search
Document Center

E-MapReduce:ListJobRuns

Last Updated:Jun 11, 2026

Memanggil operasi ListJobRuns untuk mengambil daftar pekerjaan Spark.

Coba sekarang

Coba API ini di OpenAPI Explorer tanpa perlu penandatanganan manual. Panggilan yang berhasil akan secara otomatis menghasilkan contoh kode SDK sesuai dengan parameter Anda. Unduh kode tersebut dengan kredensial bawaan yang aman untuk penggunaan lokal.

Test

RAM authorization

Tabel berikut menjelaskan otorisasi yang diperlukan untuk memanggil API ini. Anda dapat menentukannya dalam kebijakan Resource Access Management (RAM). Kolom pada tabel dijelaskan sebagai berikut:

  • Action: Aksi yang dapat digunakan dalam elemen Action pada pernyataan kebijakan izin RAM untuk memberikan izin guna melakukan operasi tersebut.

  • API: API yang dapat Anda panggil untuk melakukan aksi tersebut.

  • Access level: Tingkat akses yang telah ditentukan untuk setiap API. Nilai yang valid: create, list, get, update, dan delete.

  • Resource type: Jenis resource yang mendukung otorisasi untuk melakukan aksi tersebut. Ini menunjukkan apakah aksi tersebut mendukung izin tingkat resource. Resource yang ditentukan harus kompatibel dengan aksi tersebut. Jika tidak, kebijakan tersebut tidak akan berlaku.

    • Untuk API dengan izin tingkat resource, jenis resource yang diperlukan ditandai dengan tanda bintang (*). Tentukan Nama Sumber Daya Alibaba Cloud (ARN) yang sesuai dalam elemen Resource pada kebijakan.

    • Untuk API tanpa izin tingkat resource, ditampilkan sebagai All Resources. Gunakan tanda bintang (*) dalam elemen Resource pada kebijakan.

  • Condition key: Kunci kondisi yang didefinisikan oleh layanan. Kunci ini memungkinkan kontrol granular, berlaku baik hanya untuk aksi maupun untuk aksi yang terkait dengan resource tertentu. Selain kunci kondisi spesifik layanan, Alibaba Cloud menyediakan serangkaian common condition keys yang berlaku di semua layanan yang didukung RAM.

  • Dependent action: Aksi dependen yang diperlukan untuk menjalankan aksi tersebut. Untuk menyelesaikan aksi tersebut, pengguna RAM atau role RAM harus memiliki izin untuk melakukan semua aksi dependen.

Action

Access level

Resource type

Condition key

Dependent action

emr-serverless-spark:ListJobRuns

list

*全部资源

*

None None

Sintaks permintaan

GET /api/v1/workspaces/{workspaceId}/jobRuns HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

workspaceId

string

Yes

ID ruang kerja.

w-d2d82aa09155****

Parameter permintaan

Parameter

Type

Required

Description

Example

nextToken

string

No

Token yang menentukan posisi untuk memulai pembacaan berikutnya.

DD6B1B2A-5837-5237-ABE4-FF0C89568980

maxResults

integer

No

Jumlah entri maksimum yang akan dikembalikan. Nilai maksimum adalah 100.

20

name

string

No

Nama pekerjaan.

emr-spark-demo-job

creator

string

No

UID pengguna yang membuat pekerjaan.

150976534701****

jobRunId

string

No

ID eksekusi pekerjaan.

j-xxx

tags

array<object>

No

Daftar tag.

object

No

A tag object.

key

string

No

The tag key.

tag_key

value

string

No

The tag value.

value

states

array

No

Status eksekusi pekerjaan.

["Running","Submitted"]

string

No

The state of the job run. Valid values:

  • Submitted: The job is submitted.

  • Pending: The job is pending.

  • Running: The job is running.

  • Success: The job is successful.

  • Failed: The job failed.

  • Cancelling: The job is being canceled.

  • Cancelled: The job is canceled.

  • CancelFailed: The job failed to be canceled.

Running

startTime

object

No

Rentang pengatur waktu saat eksekusi pekerjaan dimulai.

startTime

integer

No

The start of the time range.

1709740800000

endTime

integer

No

The end of the time range.

1710432000000

endTime

object

No

Rentang pengatur waktu saat eksekusi pekerjaan berakhir.

startTime

integer

No

The start of the time range.

1709740800000

endTime

integer

No

The end of the time range.

1710432000000

resourceQueueId

string

No

ID antrian sumber daya tempat pekerjaan Spark berjalan.

dev_queue

jobRunDeploymentId

string

No

ID penerapan pekerjaan streaming.

jd-b6d003f1930f****

regionId

string

No

ID wilayah.

cn-hangzhou

minDuration

integer

No

pengatur waktu proses minimum eksekusi pekerjaan, dalam milidetik.

60000

isWorkflow

string

No

Apakah pekerjaan merupakan tugas alur kerja.

false

runtimeConfigs

string

No

Konfigurasi pengatur waktu proses.

[{\"key\":\"mainClass\",\"value\":\"yourClass\"}]

applicationConfigs

string

No

Konfigurasi Spark.

[{\"key\":\"spark.app.name\",\"value\":\"test\"}]

Elemen respons

Element

Type

Description

Example

object

The returned data.

jobRuns

array<object>

A list of Spark jobs.

array<object>

A Spark job object.

workspaceId

string

The workspace ID.

w-d2d82aa09155****

jobRunId

string

The job run ID.

jr-231231

name

string

The job name.

jobName

state

string

The state of the job run.

Running

stateChangeReason

object

The reason for the state change.

code

string

The error code.

0

message

string

The error message.

connection refused

submitTime

integer

The time when the job was submitted.

1684119314000

endTime

integer

The time when the job ended.

1684119314000

codeType

string

The code type of the job. Valid values:

SQL

JAR

PYTHON

SQL

webUI

string

The web UI of the job.

http://spark-ui

executionTimeoutSeconds

integer

The timeout period for the job execution, in seconds.

3600

creator

string

The UID of the user who created the job.

150978934701****

tags

array

The tags.

Tag

A job tag.

log RunLog

The path of the run log.

releaseVersion

string

The version of the Spark engine that is used to run the job.

esr-3.0.0 (Spark 3.4.3, Scala 2.12, Native Runtime)

jobDriver JobDriver

The information about the Spark driver. This parameter is not returned by the ListJobRuns operation.

configurationOverrides

object

The advanced Spark configurations. This parameter is not returned by the ListJobRuns operation.

configurations

array

A list of Spark configurations.

Configuration

A Spark configuration object.

displayReleaseVersion

string

The display version of the Spark engine that is used to run the job.

esr-3.0.0 (Spark 3.4.3, Scala 2.12)

fusion

boolean

Indicates whether the Fusion engine is enabled for acceleration.

true

vcoreSeconds

integer

The total number of vCores allocated to the job run, multiplied by the runtime in seconds.

8236

mbSeconds

integer

The total memory in MB allocated to the job run, multiplied by the runtime in seconds.

33030784

cuHours

number

The number of CUs consumed by the job run. This is an estimated value. The actual value is reflected in your bill.

2.059

resourceQueueId

string

dev_queue

priority

string

5

requestId

string

The request ID.

DD6B1B2A-5837-5237-ABE4-FF0C8944****

nextToken

string

The token that is used to retrieve the next page of results.

1

maxResults

integer

The maximum number of entries returned for the current request.

20

totalCount

integer

The total number of entries that match the filter criteria.

200

Contoh

Respons sukses

JSONformat

{
  "jobRuns": [
    {
      "workspaceId": "w-d2d82aa09155****",
      "jobRunId": "jr-231231",
      "name": "jobName",
      "state": "Running",
      "stateChangeReason": {
        "code": "0",
        "message": "connection refused\n"
      },
      "submitTime": 1684119314000,
      "endTime": 1684119314000,
      "codeType": "SQL",
      "webUI": "http://spark-ui",
      "executionTimeoutSeconds": 3600,
      "creator": "150978934701****",
      "tags": [
        {
          "key": "workflowId",
          "value": "wf-123test"
        }
      ],
      "log": {
        "driverStdOut": "oss://bucket/path/to/stdout",
        "driverStdError": "oss://bucket/path/to/stderr",
        "driverSyslog": "oss://bucket/path/to/syslog",
        "driverStartup": "oss://bucket/path/to/startup"
      },
      "releaseVersion": "esr-3.0.0 (Spark 3.4.3, Scala 2.12, Native Runtime)",
      "jobDriver": {
        "sparkSubmit": {
          "entryPoint": "oss://bucket/path/to/entrypoint.jar",
          "entryPointArguments": [
            "arg1"
          ],
          "sparkSubmitParameters": "--conf spark.app.name=test"
        }
      },
      "configurationOverrides": {
        "configurations": [
          {
            "configFileName": "common.conf",
            "configItemKey": "hive.metastore.type",
            "configItemValue": "USER_RDS"
          }
        ]
      },
      "displayReleaseVersion": "esr-3.0.0 (Spark 3.4.3, Scala 2.12)",
      "fusion": true,
      "vcoreSeconds": 8236,
      "mbSeconds": 33030784,
      "cuHours": 2.059,
      "resourceQueueId": "dev_queue"
    }
  ],
  "requestId": "DD6B1B2A-5837-5237-ABE4-FF0C8944****",
  "nextToken": "1",
  "maxResults": 20,
  "totalCount": 200
}

Kode kesalahan

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.