All Products
Search
Document Center

Database Autonomy Service:DescribeCloudbenchTask

Last Updated:Jun 10, 2026

Mengkueri tugas uji stres tertentu.

Deskripsi operasi

Call this API to get a specific stress testing task by the task status, type, and timestamp. This helps you check whether your instance needs to be scaled up to effectively handle traffic spikes. For more information, see Intelligent stress testing.

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

hdm:DescribeCloudbenchTask

get

*全部资源

*

None None

Parameter permintaan

Parameter

Type

Required

Description

Example

TaskId

string

Yes

ID tugas unik. Anda dapat memanggil API DescribeCloudBenchTasks untuk mendapatkan ID tugas.

e5cec704-0518-430f-8263-76f4dcds****

Elemen respons

Element

Type

Description

Example

object

The response parameters.

Code

string

The returned status code.

200

Message

string

The returned message.

Catatan
  • When the request is successful, this parameter returns Successful.

  • When the request fails, this parameter returns exception information such as error codes.

Successful

RequestId

string

The request ID.

B6D17591-B48B-4D31-9CD6-9B9796B2****

Success

string

Indicates whether the request was successful:

  • true: The request was successful.

  • false: The request failed.

true

Data

object

The list of detailed information, including the total number of information items and error codes.

DtsJobName

string

The DTS task name.

RDS间迁移

ErrorMessage

string

The error message for a failed task.

DTS-070211: Connect Source DB failed. cause by [com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:Could not create connection to database server. Attempted reconnect 3 times. Giving up.][com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure\n\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.][java.net.ConnectException:Connection timed out (Connection timed out)] About more information in [https://yq.aliyun.com/articles/499178].

External

string

Additional information.

Null

BackupType

string

The backup type. Valid values:

  • TIMESTAMP: By backup time.

  • BACKUPID: By backup set ID.

TIMESTAMP

UserId

string

The Alibaba Cloud account ID.

109141182625****

DstType

string

The type of the destination instance. Valid values:

  • Instance (default): instance ID.

  • ConnectionString: connection address of the instance.

Instance

EcsInstanceId

string

The ECS instance ID.

i-bp1ecr5go2go1****

DstInstanceUuid

string

The unique identifier of the destination instance.

hdm_d887b5ccf99fa0dc9a1e5aaac368****

TaskType

string

The stress testing task type. Valid values:

  • pressure test (default): Intelligent stress testing. The traffic captured from the source instance is replayed on the destination instance at the maximum speed supported by the destination instance type.

  • smart pressure test: Generated stress testing. By analyzing and learning the traffic captured from the source instance in a short period of time, traffic with business models and traffic distribution similar to the original traffic is generated for continuous stress testing. This reduces the time required to collect data from the source instance and lowers storage costs and performance overhead.

pressure test

BenchStep

string

The substep of stress testing. Valid values:

  • NEW: task initialization.

  • WAIT_BUY_ECS: purchase a new ECS instance.

  • WAIT_START_ECS: start the ECS instance.

  • WAIT_INSTALL_JDK: install JDK.

  • WAIT_INSTALL_DBGATEWAY: install Database Gateway.

  • ADD_SECURITY_IPS_STEP: configure security group whitelist.

  • ARCHIVE: full SQL archiving.

  • DOWNLOAD: download the full SQL file.

  • PROCEED: pre-process the full SQL file.

  • PRE_LOAD: preload the full SQL file.

  • VALIDATE: feature validation.

  • PRESSURE: performance stress testing.

PROCEED

Version

string

The stress testing task version. Valid values:

  • V2.0

  • V3.0

V3.0

EndState

string

The status after the stress testing task ends. Valid values:

  • WAIT_TARGET: prepare the destination instance for stress testing.

  • WAIT_DBGATEWAY: prepare for stress testing deployment.

  • WAIT_SQL: prepare the full SQL.

  • WAIT_LOGIC: prepare to start replaying traffic.

Catatan

When the stress testing task completes the status set in EndState, the task will directly reach the completed status.

WAIT_LOGIC

SrcInstanceUuid

string

The unique identifier of the source instance.

a364e414-e68b-4e5c-9166-65b3a153****

ClientType

string

The stress testing machine type. Valid values:

  • ECS: You need to prepare your own Database Gateway.

  • DAS_ECS: ECS automatically purchased and deployed by DAS.

ECS

State

string

The current status of the stress testing task. Valid values:

  • WAIT_TARGET: prepare the destination instance for stress testing.

  • WAIT_DBGATEWAY: prepare for stress testing deployment.

  • WAIT_SQL: prepare the full SQL.

  • WAIT_LOGIC: prepare to start replaying traffic.

WAIT_TARGET

DstIp

string

Reserved parameter.

None

SrcPublicIp

string

Reserved parameter.

None

BackupId

string

The backup set ID. You can obtain it by calling the DescribeBackups operation to query the backup list.

229132

SqlCompleteReuse

string

The reuse information of the full SQL.

{"sqlUuid":"task_a37d2f07-45cb-****-a2a6-c66c62****","metaUuid":"task_211e2561-5c0c-486b-864c-56b511****","sqlFile":"cl-1620057600000-1800626.sc","metaFile":"cl-1620057600000-180****.meta"}

SmartPressureTime

integer

The generated stress testing time in milliseconds.

86400000

ArchiveState

integer

The SQL archiving status. Valid values:

  • 0: Not started.

  • 1: Completed.

  • 2: Error.

  • 3: Running.

  • 4: No download required.

1

Status

string

The running status of the stress testing task. Valid values:

  • SUCCESS: successful.

  • IGNORED: ignored.

  • RUNNING: running.

  • EXCEPTION: abnormal.

RUNNING

WorkDir

string

The temporary directory generated for stress testing.

/tmp/bench/

ArchiveOssTableName

string

The OSS table name for archiving.

custins15546355_161604665****

DtsJobId

string

The DTS migration task ID.

i03e3zty16i****

DtsJobState

integer

The DTS task status. Valid values:

  • NOT_STARTED: not started.

  • PRE_CHECKING: precheck in progress.

  • PRE_CHECK_FAILED: precheck failed.

  • CHECKING: check in progress.

  • MIGRATING: migration in progress.

  • CATCHED: caught up.

  • SUSPENDING: pausing.

  • MIGRATION_FAILED: migration failed.

  • FINISHED: completed.

  • INITIALIZING: initial synchronization.

  • INITIALIZE_FAILED: initial synchronization failed.

  • SYNCHRONIZING: synchronization in progress.

  • MODIFYING: synchronization object change in progress.

  • SWITCHING: switching in progress.

  • FAILED: failed.

CHECKING

DstPort

integer

The port of the destination instance.

3306

DtsJobClass

string

The DTS task specification.

medium

ClientGatewayId

string

The database gateway ID of the stress testing machine.

58598b2af48a0193dfc16fc6964ef****

Description

string

The description of the stress testing task.

test-das-bench-0501

ErrorCode

string

The error code returned by the internal stress testing task.

10910

TableSchema

string

The table names involved in stress testing.

[{"TABLE_NAME":"customer1","TABLE_SCHEMA":"tpcc"}]

DtsJobStatus

string

The DTS task status. Valid values:

  • NOT_STARTED: not started.

  • PRE_CHECKING: lrecheck in progress.

  • PRE_CHECK_FAILED: precheck failed.

  • CHECKING: check in progress.

  • MIGRATING: migration in progress.

  • CATCHED: caught up.

  • SUSPENDING: pausing.

  • MIGRATION_FAILED: migration failed.

  • FINISHED: completed.

  • INITIALIZING: initial synchronization.

  • INITIALIZE_FAILED: initial synchronization failed.

  • SYNCHRONIZING: synchronization in progress.

  • MODIFYING: synchronization object change in progress.

  • SWITCHING: switching in progress.

  • FAILED: failed.

PRE_CHECKING

SrcInstanceArea

string

The database type of the source instance.

RDS

BenchStepStatus

string

The status of the stress testing child step. Valid values:

  • NEW: task initialization.

  • RUNNING: executing.

  • FAILED: failed.

  • FINISHED: completed.

  • Terminated: terminated.

  • Deleted: deleted.

FINISHED

Source

string

The task source. Valid values:

  • DAS.

  • OPEN_API.

DAS

ArchiveJobId

string

The archiving task ID.

'202105211430070112231480820340758****

Topic

string

The Kafka consumption topic.

das

RequestDuration

integer

The duration of the stress testing task.

864000

TaskId

string

The task ID.

e5cec704-0518-430f-8263-76f4dcds****

Rate

integer

The stress testing multiplier. The replay multiplier must be a positive integer ranging from 0 to 30. The default value is 1.

1

Contoh

Respons sukses

JSONformat

{
  "Code": "200",
  "Message": "Successful",
  "RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
  "Success": "true",
  "Data": {
    "DtsJobName": "RDS间迁移",
    "ErrorMessage": "DTS-070211: Connect Source DB failed. cause by [com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException:Could not create connection to database server. Attempted reconnect 3 times. Giving up.][com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failure\\n\\nThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.][java.net.ConnectException:Connection timed out (Connection timed out)] About more information in [https://yq.aliyun.com/articles/499178].",
    "External": "Null",
    "BackupType": "TIMESTAMP",
    "UserId": "109141182625****",
    "DstType": "Instance",
    "EcsInstanceId": "i-bp1ecr5go2go1****",
    "DstInstanceUuid": "hdm_d887b5ccf99fa0dc9a1e5aaac368****",
    "TaskType": "pressure test",
    "BenchStep": "PROCEED",
    "Version": "V3.0",
    "EndState": "WAIT_LOGIC",
    "SrcInstanceUuid": "a364e414-e68b-4e5c-9166-65b3a153****",
    "ClientType": "ECS",
    "State": "WAIT_TARGET",
    "DstIp": "None",
    "SrcPublicIp": "None",
    "BackupId": "229132",
    "SqlCompleteReuse": "{\"sqlUuid\":\"task_a37d2f07-45cb-****-a2a6-c66c62****\",\"metaUuid\":\"task_211e2561-5c0c-486b-864c-56b511****\",\"sqlFile\":\"cl-1620057600000-1800626.sc\",\"metaFile\":\"cl-1620057600000-180****.meta\"}",
    "SmartPressureTime": 86400000,
    "ArchiveState": 1,
    "Status": "RUNNING",
    "WorkDir": "/tmp/bench/",
    "ArchiveOssTableName": "custins15546355_161604665****",
    "DtsJobId": "i03e3zty16i****",
    "DtsJobState": 0,
    "DstPort": 3306,
    "DtsJobClass": "medium",
    "ClientGatewayId": "58598b2af48a0193dfc16fc6964ef****",
    "Description": "test-das-bench-0501",
    "ErrorCode": "10910",
    "TableSchema": "[{\"TABLE_NAME\":\"customer1\",\"TABLE_SCHEMA\":\"tpcc\"}]",
    "DtsJobStatus": "PRE_CHECKING",
    "SrcInstanceArea": "RDS",
    "BenchStepStatus": "FINISHED",
    "Source": "DAS",
    "ArchiveJobId": "'202105211430070112231480820340758****",
    "Topic": "das",
    "RequestDuration": 864000,
    "TaskId": "e5cec704-0518-430f-8263-76f4dcds****",
    "Rate": 1
  }
}

Kode kesalahan

HTTP status code

Error code

Error message

Description

400 InvalidParams The request parameters are invalid.
403 NoPermission You are not authorized to do this action.

Lihat Error Codes untuk daftar lengkap.

Catatan rilis

Lihat Release Notes untuk daftar lengkap.