All Products
Search
Document Center

Cloud Monitor:BatchExport

Last Updated:Jun 11, 2026

Memanggil operasi BatchExport untuk mengekspor data pemantauan yang ditentukan dalam operasi Cursor.

Deskripsi operasi

Prerequisites

Make sure that you have called the Cursor operation to obtain the initial Cursor.

Usage notes

This topic provides an example to show how to export the monitoring data of an initial Cursor of the metric cpu_idle of the cloud service acs_ecs_dashboard. A maximum of 1,000 data entries are returned per call.

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

cms:BatchExport

list

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

Namespace

string

Yes

Namespace data layanan cloud.

Untuk informasi tentang cara mendapatkan namespace data layanan cloud, lihat Appendix 1: Metrics.

Catatan

Parameter ini harus sama dengan parameter permintaan Namespace dalam operasi Cursor.

acs_ecs_dashboard

Metric

string

Yes

Nama metrik layanan cloud.

Untuk informasi tentang cara mendapatkan nama metrik layanan cloud, lihat Appendix 1: Metrics.

Catatan

Parameter ini harus sama dengan parameter permintaan Metric dalam operasi Cursor.

cpu_idle

Cursor

string

Yes

Saat Anda memanggil operasi ini secara berulang untuk mengekspor data, Anda harus menentukan nilai Cursor. Anda dapat memperoleh nilai Cursor dengan menggunakan metode berikut:

  • Saat Anda memanggil operasi ini untuk pertama kalinya, Anda harus terlebih dahulu memanggil operasi Cursor untuk memperoleh nilai Cursor. Untuk informasi selengkapnya, lihat Cursor.

  • Saat Anda memanggil operasi ini lagi, Anda dapat memperoleh nilai Cursor dari tanggapan panggilan terakhir.

eyJidWNrZXRzIjo0LCJjdXJzb3IiOiIxNjQxNDU0MzIwMDAwMWUxY2YxNWY0NTU0MTliZjllYTY4OWQ2ODI1OTU1Yzc1NmZjMDQ2OTMxMzczMzM2MzUzMTMxMzEzMzM0MzMzODM5MzEzMTMwMjQyYzY5MmQ3NTY2MzYzMjY3NmI2ZjM5MzU2YjY4MzAzMTYyNzg3MTcwNjkzMTM3MjQyYyIsImN1cnNvclZlcnNpb24iOiJxdWVyeSIsImVuZFRpbWUiOjE2NDE0NTQ3OTU4MjMsImV4cG9ydEVuZFRpbWUiOjE2NDE0NTQ3OTU4MjMsImV4cG9ydFN0YXJ0VGltZSI6MTY0MTQ1NDE5NTgyMywiZXhwcmVzc1JhbmdlIjpmYWxzZSwiaGFzTmV4dCI6dHJ1ZSwiaW5wdXRNZXRyaWMiOiJDUFVVdGlsaXphdGlvbiIsImlucHV0TmFtZXNwYWNlIjoiYWNzX2Vjc19kYXNoYm9hcmQiLCJsaW1pdCI6MTAwMCwibG9nVGltZU1vZGUiOnRydWUsIm1hdGNoZXJzIjp7ImNoYWluIjpbeyJsYWJlbCI6InVzZXJJZCIsIm9wZXJhdG9yIjoiRVFVQUxTIiwidmFsdWUiOiIxNzM2NTExMTM0Mzg5MTEwIn1dfSwibWV0cmljIjoiQ1BVVXRpbGl6YXRpb24iLCJtZXRyaWNUeXBlIjoiTUVUUklDIiwibmFtZXNwYWNlIjoiYWNzX2Vjc19kYXNoYm9hcmQiLCJuZXh0UGtBZGFwdGVyIjp7fSwib2Zmc2V0IjowLCJwYXJlbnRVaWQiOjEyNzA2NzY2Nzk1NDY3MDQsInN0YXJ0VGltZSI6MTY0MTQ1NDE5NTgyMywic3RlcCI6LTEsInRpbWVvdXQiOjEyMCwid2luZG93Ijo2****

Length

integer

Yes

Jumlah maksimum entri data yang dikembalikan setiap kali.

Nilai valid: 1 hingga 10000.

1000

Measurements

array

No

Pengukuran yang digunakan untuk menyesuaikan data yang dikembalikan. Secara default, semua pengukuran dikembalikan.

Sebagai contoh, metrik cpu_idle layanan cloud acs_ecs_dashboard memiliki tiga kolom pengukuran: Average, Maximum, dan Minimum. Jika Anda hanya perlu mengembalikan kolom Average dan Maximum, tetapkan parameter ini ke array ["Average", "Maximum"].

Untuk informasi tentang cara mendapatkan pengukuran metrik layanan cloud, lihat kolom statistics pada Appendix 1: Metrics.

string

No

The column name of the measurement.

Maximum

Untuk informasi selengkapnya tentang parameter permintaan umum, lihat Common parameters.

Elemen respons

Element

Type

Description

Example

object

None.

Message

string

The returned message.

success

Code

integer

The status code.

Catatan

The value 200 indicates success.

200

Success

boolean

Indicates whether the operation was successful. Valid values:

  • true: successful

  • false: failed

true

RequestId

string

The request ID.

251402CD-305C-1617-808E-D8C11FC8138D

Cursor

string

The cursor that is used to call this operation again.

Catatan

If the returned result is null, the monitoring data has been exported.

v2.5eyJidWNrZXRzIjo0LCJjdXJzb3IiOiIxNjQxNDU0ODAwMDAwMWUxY2YxNWY0NTU0MTliZjllYTY4OWQ2ODI1OTU1Yzc1NmZjMDQ2OTMxMzczMzM2MzUzMTMxMzEzMzM0MzMzODM5MzEzMTMwMjQyYzY5MmQzMjdhNjU2MjY3N2E2NjZhNzczOTY2NmM3Mjc0NjM3MzY5Njg3NDcyMjQyYyIsImN1cnNvclZlcnNpb24iOiJxdWVyeSIsImVuZFRpbWUiOjE2NDE0NTUyMzYxMTIsImV4cG9ydEVuZFRpbWUiOjE2NDE0NTUyMzYxMTIsImV4cG9ydFN0YXJ0VGltZSI6MTY0MTQ1NDYzNjExMiwiZXhwcmVzc1JhbmdlIjpmYWxzZSwiaGFzTmV4dCI6dHJ1ZSwiaW5wdXRNZXRyaWMiOiJDUFVVdGlsaXphdGlvbiIsImlucHV0TmFtZXNwYWNlIjoiYWNzX2Vjc19kYXNoYm9hcmQiLCJsaW1pdCI6MTAwMCwibG9nVGltZU1vZGUiOnRydWUsIm1hdGNoZXJzIjp7ImNoYWluIjpbeyJsYWJlbCI6InVzZXJJZCIsIm9wZXJhdG9yIjoiRVFVQUxTIiwidmFsdWUiOiIxNzM2NTExMTM0Mzg5MTEwIn1dfSwibWV0cmljIjoiQ1BVVXRpbGl6YXRpb24iLCJtZXRyaWNUeXBlIjoiTUVUUklDIiwibmFtZXNwYWNlIjoiYWNzX2Vjc19kYXNoYm9hcmQiLCJuZXh0UGtBZGFwdGVyIjp7fSwib2Zmc2V0IjowLCJwYXJlbnRVaWQiOjEyNzA2NzY2Nzk1NDY3MDQsInN0YXJ0VGltZSI6MTY0MTQ1NDYzNjExMiwic3RlcCI6LTEsInRpbWVvdXQiOjEyMCwid2luZG93Ijo2MH0***

Length

integer

The number of data entries returned for this call.

1000

Anchor

integer

The timestamp when the backend requested the data. A larger timestamp indicates that the exported data is closer to the current time.

1678781819000

HasNext

boolean

Indicates whether the data has been exported. Valid values:

  • true: Some data has not been exported.

  • false: All data has been exported.

true

DataResults

array

The data returned by this call.

MetricStat

The exported data. The details are as follows:

  • Namespace: the data namespace of the cloud service. Example: acs_ecs_dashboard.

  • Metric: the name of the metric of the cloud service. Example: cpu_idle.

  • Timestamp: the timestamp of the monitoring data. Unit: milliseconds. Example: 1641454680000.

  • Period: the statistical period of the monitoring data. Unit: seconds. Example: 60.

  • Dimensions: the Dimension information that is used to identify the monitored object (instance). Example: [{"Label":"userId", "Value":""20654616023382****"}, {"Label":"InstanceId", "Value":""i-2ze2d6j5uhg20x4****"}].

  • Associated: the additional information about the monitored object (instance), such as tag information. The value is a collection of key:value pairs. Example: {"group":"test****", "name":"Alice"}.

  • Measurements: the measurements of the metric (multi-value mode by default). Example: {"Average":60,"Maximum":85}.

  • LogTime: the record time of the monitoring data. Unit: milliseconds. For non-raw data (aggregated data), LogTime is empty (NULL).

Contoh

Respons sukses

JSONformat

{
  "Message": "success",
  "Code": 200,
  "Success": true,
  "RequestId": "251402CD-305C-1617-808E-D8C11FC8138D",
  "Cursor": "v2.5eyJidWNrZXRzIjo0LCJjdXJzb3IiOiIxNjQxNDU0ODAwMDAwMWUxY2YxNWY0NTU0MTliZjllYTY4OWQ2ODI1OTU1Yzc1NmZjMDQ2OTMxMzczMzM2MzUzMTMxMzEzMzM0MzMzODM5MzEzMTMwMjQyYzY5MmQzMjdhNjU2MjY3N2E2NjZhNzczOTY2NmM3Mjc0NjM3MzY5Njg3NDcyMjQyYyIsImN1cnNvclZlcnNpb24iOiJxdWVyeSIsImVuZFRpbWUiOjE2NDE0NTUyMzYxMTIsImV4cG9ydEVuZFRpbWUiOjE2NDE0NTUyMzYxMTIsImV4cG9ydFN0YXJ0VGltZSI6MTY0MTQ1NDYzNjExMiwiZXhwcmVzc1JhbmdlIjpmYWxzZSwiaGFzTmV4dCI6dHJ1ZSwiaW5wdXRNZXRyaWMiOiJDUFVVdGlsaXphdGlvbiIsImlucHV0TmFtZXNwYWNlIjoiYWNzX2Vjc19kYXNoYm9hcmQiLCJsaW1pdCI6MTAwMCwibG9nVGltZU1vZGUiOnRydWUsIm1hdGNoZXJzIjp7ImNoYWluIjpbeyJsYWJlbCI6InVzZXJJZCIsIm9wZXJhdG9yIjoiRVFVQUxTIiwidmFsdWUiOiIxNzM2NTExMTM0Mzg5MTEwIn1dfSwibWV0cmljIjoiQ1BVVXRpbGl6YXRpb24iLCJtZXRyaWNUeXBlIjoiTUVUUklDIiwibmFtZXNwYWNlIjoiYWNzX2Vjc19kYXNoYm9hcmQiLCJuZXh0UGtBZGFwdGVyIjp7fSwib2Zmc2V0IjowLCJwYXJlbnRVaWQiOjEyNzA2NzY2Nzk1NDY3MDQsInN0YXJ0VGltZSI6MTY0MTQ1NDYzNjExMiwic3RlcCI6LTEsInRpbWVvdXQiOjEyMCwid2luZG93Ijo2MH0***",
  "Length": 1000,
  "Anchor": 1678781819000,
  "HasNext": true,
  "DataResults": [
    {
      "Namespace": "acs_ecs_dashboard",
      "Metric": "cpu_idle",
      "Period": 60,
      "Timestamp": 1641454680000,
      "Dimensions": [
        {
          "Label": "instanceId",
          "Value": "i-dferwret*****"
        }
      ],
      "Associated": {
        "key": "{\"group\":\"test****\", \"name\":\"Alice\"}"
      },
      "Measurements": {
        "key": "{\"Average\":60,\"Maximum\":85}"
      },
      "LogTime": 1683686550073
    }
  ]
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 %s %s
500 InternalError The request processing has failed due to some unknown error.
500 %s %s
403 %s %s
404 %s %s
503 %s %s

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.