All Products
Search
Document Center

Serverless App Engine:ListJobs

Last Updated:Jun 11, 2026

Mengambil daftar templat pekerjaan.

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

sae:ListJobs

list

*全部资源

*

None None

Sintaks permintaan

GET /pop/v1/sam/job/listJobs HTTP/1.1

Parameter permintaan

Parameter

Type

Required

Description

Example

CurrentPage

integer

No

Nomor halaman. Nilai dimulai dari 1.

1

PageSize

integer

No

Jumlah entri per halaman. Nilai valid: 0 hingga 200.

20

AppName

string

No

Nama templat pekerjaan.

demo-app

NamespaceId

string

No

ID namespace.

cn-beijing:demo

Tags

string

No

Daftar tag. Ini adalah string JSON. Nilai terdiri dari bagian berikut:

  • key: Kunci tag.

  • value: Nilai tag.

[{"key":"key","value":"value"}]

OrderBy

string

No

Metode pengurutan untuk templat pekerjaan. Nilai valid:

  • running: Mengurutkan berdasarkan jumlah instans yang berjalan.

  • instances: Mengurutkan berdasarkan jumlah instans tujuan.

running

Reverse

boolean

No

Apakah akan mengurutkan hasil dalam Pesanan menaik atau menurun berdasarkan bidang yang ditentukan oleh parameter OrderBy. Nilai valid:

  • true: Pesanan menaik.

  • false: Pesanan menurun.

true

FieldType

string

No

Dimensi untuk memfilter templat pekerjaan. Nilai valid:

  • appName: Nama templat pekerjaan.

  • appIds: ID templat pekerjaan.

appName

FieldValue

string

No

Nama atau ID templat pekerjaan target. Nilai ini sesuai dengan dimensi yang ditentukan oleh FieldType.

demo-app

Workload

string

No

Beban kerja. Atur nilai menjadi job.

job

Elemen respons

Element

Type

Description

Example

object

The returned data.

Message

string

Additional information about the call.

success

RequestId

string

The request ID.

B4D805CA-926D-41B1-8E63-7AD0C1ED****

Data

object

The list of job templates.

CurrentPage

integer

The current page number.

1

TotalSize

integer

The total number of job templates.

2

PageSize

integer

The number of entries per page.

20

Applications

array<object>

The list of job templates.

array<object>

The details of the job template.

AppName

string

Job template name.

demo-app

NamespaceId

string

Namespace ID.

cn-beijing:demo

AppId

string

Job template ID.

f7730764-d88f-4b9a-8d8e-cd8efbfe****

Tags

array<object>

Job template tags.

object

Job template tag details.

Key

string

Tag key.

key

Value

string

Tag value.

value

RegionId

string

Region ID.

cn-beijing

AppDescription

string

Job template description.

description

TriggerConfig

string

The trigger configuration for the job. Configure the trigger based on the job type.

  • Scheduled task: Set the type field to time. The config field is a Cron expression, and the timezone field specifies the time zone. Example: {"type":"time","config":"0 1 */1 * ?","timezone":"GMT+8:00"}

  • One-time job: Set the type field to http. Use the config field to specify the HTTP trigger rules. For more information, see SourceHttpEventParameters. Example: {"type":"http","config":{"type":"HTTPS","method":["GET"],"ip":[],"referer":[],"securityConfig":"none"}}

{"type":"time","config":"0 1 */1 * ?","timezone":"GMT+8:00"}

Suspend

boolean

Whether to pause the job template.

false

Active

integer

Number of running instances.

0

Succeeded

integer

Number of successfully run instances.

3

Failed

integer

Number of failed instances.

0

LastStartTime

integer

Last job start time.

1657522800

CompletionTime

integer

Last job completion time.

1657522839

LastChangeorderState

string

Whether the last release order executed successfully. Values are described as follows:

  • 0: Release order execution failed.

  • 1: Release order execution succeeded.

1

LastJobState

string

Last job running status. Values are described as follows:

  • 0: Not executed.

  • 1: Execution succeeded.

  • 2: Execution failed.

  • 3: Executing.

0

Cpu

integer

CPU required for each instance, in millicores. Cannot be 0. Currently, only the following defined specifications are supported:

  • 500

  • 1000

  • 2000

  • 4000

  • 8000

  • 16000

  • 32000

500

Mem

integer

Memory required for each instance, in MB. Cannot be 0. It has a one-to-one correspondence with CPU. Currently, only the following defined specifications are supported:

  • 1024: Corresponds to 500 millicores and 1000 millicores CPU.

  • 2048: Corresponds to 500, 1000, and 2000 millicores CPU.

  • 4096: Corresponds to 1000, 2000, and 4000 millicores CPU.

  • 8192: Corresponds to 2000, 4000, and 8000 millicores CPU.

  • 12288: Corresponds to 12000 millicores CPU.

  • 16384: Corresponds to 4000, 8000, and 16000 millicores CPU.

  • 24576: Corresponds to 12000 millicores CPU.

  • 32768: Corresponds to 16000 millicores CPU.

  • 65536: Corresponds to 8000, 16000, and 32000 millicores CPU.

  • 131072: Corresponds to 32000 millicores CPU.

1024

Message

string

Additional information about the call result.

success

ImageUrl

string

ErrorCode

string

The error code.

  • If the request is successful, this parameter is not returned.

  • If the request fails, this parameter is returned. For more information, see the Error codes section of this topic.

Code

string

The status of the interface or the POP error code. Valid values:

  • 2xx: The request was successful.

  • 3xx: Redirection.

  • 4xx: A request error occurred.

  • 5xx: A server error occurred.

200

Success

boolean

Indicates whether the list of job templates was obtained. Valid values:

  • true: The list was obtained.

  • false: The list failed to be obtained.

true

CurrentPage

integer

The current page number.

1

TotalSize

integer

The total number of job templates.

2

PageSize

integer

The number of entries per page.

20

Contoh

Respons sukses

JSONformat

{
  "Message": "success",
  "RequestId": "B4D805CA-926D-41B1-8E63-7AD0C1ED****",
  "Data": {
    "CurrentPage": 1,
    "TotalSize": 2,
    "PageSize": 20,
    "Applications": [
      {
        "AppName": "demo-app",
        "NamespaceId": "cn-beijing:demo",
        "AppId": "f7730764-d88f-4b9a-8d8e-cd8efbfe****",
        "Tags": [
          {
            "Key": "key",
            "Value": "value"
          }
        ],
        "RegionId": "cn-beijing",
        "AppDescription": "description",
        "TriggerConfig": "{\"type\":\"time\",\"config\":\"0 1 */1 * ?\",\"timezone\":\"GMT+8:00\"}",
        "Suspend": false,
        "Active": 0,
        "Succeeded": 3,
        "Failed": 0,
        "LastStartTime": 1657522800,
        "CompletionTime": 1657522839,
        "LastChangeorderState": "1",
        "LastJobState": "0",
        "Cpu": 500,
        "Mem": 1024,
        "Message": "success",
        "ImageUrl": ""
      }
    ]
  },
  "ErrorCode": "",
  "Code": "200",
  "Success": true,
  "CurrentPage": 1,
  "TotalSize": 2,
  "PageSize": 20
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

404 InvalidAppId.NotFound The specified AppId does not exist.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.