All Products
Search
Document Center

Platform For AI:ListBenchmarkTask

Last Updated:Nov 22, 2024

Queries a list of stress testing tasks that are created by the current user.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
eas:ListBenchmarkTasklist
*BenchmarkTask
acs:eas:{#regionId}:{#accountId}:benchmarktask/*
    none
none

Request syntax

GET /api/v2/benchmark-tasks HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
FilterstringNo

The keyword used to query required stress testing tasks. If this parameter is specified, the system returns stress testing tasks based on the names of the stress testing tasks in the matched Elastic Algorithm Service (EAS).

test_bench
ServiceNamestringNo

The name of the EAS service that corresponds to the stress testing task. For more information about how to query the service name, see ListServices .

test_bench_srv
PageNumberstringNo

The page number. Pages start from page 1. Default value: 1.

1
PageSizestringNo

The number of entries per page. Default value: 100.

10

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The request ID.

40325405-579C-4D82****
Tasksarray<object>

The stress testing tasks.

Taskobject
TaskNamestring

The name of the stress testing task.

benchmark-larec-test-1076
TaskIdstring

The ID of the stress testing task.

eas-b-gv4y86uvgt****i
ServiceNamestring

The name of the service on which you want to perform a stress testing.

test_quota
Regionstring

The region ID of the stress testing task.

cn-shanghai
AvailableAgentlong

The number of instances that are available for stress testing.

2
Statusstring

The state of the stress testing task.

Valid values:

  • Creating

  • Starting

  • DeleteFailed

  • Running

  • Stopping

  • Error

  • Updating

  • Deleting

  • CreateFailed

Running
Messagestring

The returned message.

Benchmark task [benchmark-larec-test-1076] is Running
CreateTimestring

The time when the stress testing task was created.

2020-12-04T02:43:15Z
UpdateTimestring

The time when the stress testing task was updated.

2020-06-24T03:11:30Z
TotalCountinteger

The total number of entries returned.

2
PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page.

20

Examples

Sample success responses

JSONformat

{
  "RequestId": "40325405-579C-4D82****",
  "Tasks": [
    {
      "TaskName": "benchmark-larec-test-1076",
      "TaskId": "eas-b-gv4y86uvgt****i",
      "ServiceName": "test_quota",
      "Region": "cn-shanghai",
      "AvailableAgent": 2,
      "Status": "Running",
      "Message": "Benchmark task [benchmark-larec-test-1076] is Running",
      "CreateTime": "2020-12-04T02:43:15Z",
      "UpdateTime": "2020-06-24T03:11:30Z"
    }
  ],
  "TotalCount": 2,
  "PageNumber": 1,
  "PageSize": 20
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
No change history