All Products
Search
Document Center

PolarDB:DescribeCronJobPolicyServerless

Last Updated:Jun 10, 2026

Mengkueri kebijakan untuk tugas yang dipicu secara otomatis.

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

polardb:DescribeCronJobPolicyServerless

list

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

ID Kluster serverless.

pc-****************

RegionId

string

Yes

ID Wilayah.

cn-hangzhou

JobId

string

No

ID Tugas terjadwal.

8006e51c-dab3-4602-bc69-4f728002c6ce

PageSize

integer

No

Jumlah record yang ditampilkan pada setiap halaman. Nilai valid:

  • 30

  • 50

  • 100

Nilai default: 30.

30

PageNumber

integer

No

Nomor halaman. Nilai default: 1.

1

Elemen respons

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

9B7BFB11-C077-4FE3-B051-F69CEB******

TotalRecordCount

integer

The total number of records.

5

PageNumber

integer

The page number.

1

PageSize

integer

The number of records on each page. Valid values:

  • 30

  • 50

  • 100

Default value: 30.

30

Items

array<object>

The list of tasks.

object

The scheduled task objects.

JobId

string

The ID of the scheduled task.

12eee3eb-60bd-40ac-a403-218e02eb99c7

DBClusterId

string

The cluster ID.

pc-*****************

RegionId

string

The region ID.

cn-hangzhou

StartTime

string

The start time of the task. The time is in the yyyy-MM-ddTHH:mmZ format and in UTC.

2020-06-09T18:00:00Z

EndTime

string

The end time of the task. The time is in the yyyy-MM-ddTHH:mm:ssZ format and in UTC.

2024-12-04T02:25:00Z

Status

string

The status of the task. Valid values:

  • working: The scheduled task is running.

  • finish: The scheduled task is complete.

3

OrderId

string

The order ID.

254752088000354

CronExpression

string

The Cron expression for the scheduled task.

0 0 8 * * ?

Action

string

A system parameter. Set the value to ModifyDBClusterServerlessConf.

ModifyDBClusterServerlessConf

ScaleMin

string

The minimum capacity. The value must be from 0.25 to 32 and less than or equal to the maximum capacity. Unit: PolarDB Capacity Unit (PCU).

1

ScaleMax

string

The maximum capacity. The value must be from 1 to 32. Unit: PCU.

9

ScaleRoNumMin

string

The minimum number of read-only nodes. Valid values: 0 to 15.

2

ScaleRoNumMax

string

The maximum number of read-only nodes. The value must be greater than or equal to the minimum value. Valid values: 0 to 15.

3

AllowShutDown

string

Specifies whether to enable No-activity Suspension. Valid values:

  • true: enabled

  • false: disabled (default)

true

SecondsUntilAutoPause

string

The detection period for No-activity Suspension. The value must be a multiple of 5. Valid values: 5 to 1440. Unit: minutes.

1200

ScaleApRoNumMin

string

The minimum number of read-only IMCI nodes. Valid values: 0 to 15.

1

ScaleApRoNumMax

string

The maximum number of read-only IMCI nodes. Valid values: 1 to 15.

2

ServerlessRuleMode

string

The elasticity sensitivity. Valid values:

  • normal: standard

  • flexible: sensitive

normal

ServerlessRuleCpuEnlargeThreshold

string

The CPU utilization threshold for scaling up. Valid values: 40 to 100. Unit: %.

70

ServerlessRuleCpuShrinkThreshold

string

The CPU utilization threshold for scaling down. Valid values: 10 to 100. Unit: %. The difference between the scale-up threshold and the scale-down threshold must be 30 or greater.

40

Contoh

Respons sukses

JSONformat

{
  "RequestId": "9B7BFB11-C077-4FE3-B051-F69CEB******",
  "TotalRecordCount": 5,
  "PageNumber": 1,
  "PageSize": 30,
  "Items": [
    {
      "JobId": "12eee3eb-60bd-40ac-a403-218e02eb99c7",
      "DBClusterId": "pc-*****************",
      "RegionId": "cn-hangzhou",
      "StartTime": "2020-06-09T18:00:00Z",
      "EndTime": "2024-12-04T02:25:00Z",
      "Status": "3",
      "OrderId": "254752088000354",
      "CronExpression": "0 0 8 * * ?",
      "Action": "ModifyDBClusterServerlessConf",
      "ScaleMin": "1",
      "ScaleMax": "9",
      "ScaleRoNumMin": "2",
      "ScaleRoNumMax": "3",
      "AllowShutDown": "true",
      "SecondsUntilAutoPause": "1200",
      "ScaleApRoNumMin": "1",
      "ScaleApRoNumMax": "2",
      "ServerlessRuleMode": "normal",
      "ServerlessRuleCpuEnlargeThreshold": "70",
      "ServerlessRuleCpuShrinkThreshold": "40"
    }
  ]
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidRegionId.Malformed The specified parameter RegionId is not valid.
400 InvalidStartTime.Malformed The specified parameter StartTime is not valid.
400 InvalidEndTime.Malformed The specified parameter EndTime is not valid.
404 InvalidDBClusterId.Malformed The specified parameter DBClusterId is not valid.
404 InvalidJobId.NotFound The Specified jobId does not found.
404 InvalidCronJob.NotFound The CronJob for jobId does not found.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.