All Products
Search
Document Center

Performance Testing:SaveOpenJMeterScene

Last Updated:Aug 14, 2025

Creates or updates a JMeter scenario.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

pts:SaveOpenJMeterScene

update

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

OpenJMeterScene

object

Yes

The details of the scenario.

AgentCount

integer

Yes

The number of agents.

2

Concurrency

integer

No

The maximum number of concurrent users. The upper limit is determined by your resource plan. This parameter is required if you set Mode to CONCURRENCY.

1000

ConstantThroughputTimerType

string

No

The type of the Constant Throughput Timer in JMeter.

GLOBAL

DnsCacheConfig

object

No

The DNS configuration.

ClearCacheEachIteration

boolean

No

Specifies whether to clear the cache in each loop.

true

DnsServers

array

No

The DNS servers.

string

No

The details of the DNS server.

[8.8.8.8]

HostTable

object

No

The host bindings.

string

No

The details of the host binding.

Duration

integer

Yes

The duration of the stress test, in seconds. The maximum duration is 24 hours. Valid values: 60 to 86400.

600

EnvironmentId

string

No

The ID of the associated environment.

I8PZIH

FileList

array

Yes

The list of files.

object

No

The details of the file.

FileId

integer

No

The file ID.

61232

FileName

string

Yes

The file name.

baidu.jmx

FileOssAddress

string

Yes

The public URL of the file in Object Storage Service (OSS).

Note

Currently, only the China (Shanghai) region is supported.

https://test.cn-shanghai.aliyuncs.com/baidu.jmx

FileSize

integer

No

The file size in bytes. The total size of all files cannot exceed 500 MB.

28880

Md5

string

No

The MD5 hash of the file.

DA70F97A74D76B6A3BEF9CC8AE0D89EB

SplitCsv

boolean

No

Specifies whether to split the file. This parameter is valid only for CSV files.

false

Tags

string

No

The file tags.

IsVpcTest

boolean

No

Specifies whether to run the stress test in a VPC. The default value is false, which indicates an Internet-based stress test. The VPC-related parameters take effect only if this parameter is set to true.

true

JMeterProperties

array

No

The JMeter properties.

object

No

The details of the property.

Name

string

No

The name of the property.

https.sessioncontext.shared

Value

string

No

The value of the property.

false

JmeterPluginLabel

string

No

The label of the JMeter plugin.

test

MaxRps

integer

No

The maximum number of records per second (RPS). This parameter is valid only in RPS mode.

100

Mode

string

Yes

The stress testing mode.

CONCURRENCY

RampUp

integer

No

The ramp-up period, in seconds.

600

RegionId

string

No

The region ID. Configure this parameter for a VPC stress test.

cn-beijing

RegionalCondition

array

No

The custom region configuration for agents.

object

No

The number of agents in a single region.

Amount

integer

No

The number of agents. The sum of agents across all regions must equal the value of AgentCount for the scenario.

1

Region

string

No

The region ID.

cn-hangzhou

SceneId

string

No

The scenario ID. If you do not specify this parameter, a new scenario is created. If you specify this parameter, the specified scenario is updated.

DYYPZIH

SceneName

string

Yes

The name of the scenario.

test

SecurityGroupId

string

No

The security group ID. Configure this parameter for a VPC stress test.

sg-2zeid0dd7bhahsgdahspaly

StartConcurrency

integer

No

The initial number of concurrent users. This parameter is required if you set Mode to CONCURRENCY.

10

StartRps

integer

No

The initial RPS. This parameter is valid only in RPS mode.

10

Steps

integer

No

The number of ramp-up steps.

3

SyncTimerType

string

No

The type of the Synchronizing Timer in JMeter.

GLOBAL

TestFile

string

Yes

The test file.

baidu.jmx

VSwitchId

string

No

The vSwitch ID. Configure this parameter for a VPC stress test.

vsw-2zehsgdhsahw1r

VpcId

string

No

The VPC ID. Configure this parameter for a VPC stress test.

vpc-2ze2sahjdgahsebjkqhf4pyj

Response parameters

Parameter

Type

Description

Example

object

The returned data.

Code

string

The error code. This parameter is returned only if the request fails.

200

HttpStatusCode

integer

The HTTP status code. This parameter is returned only if the request fails.

200

Message

string

The error message. This parameter is returned only if the request fails.

RequestId

string

The request ID.

A8E16480-15C1-555A-922F-B736A005E52D

SceneId

string

The ID of the created or updated scenario.

DYYPZIH

Success

boolean

Indicates whether the request was successful.

  • true: The request was successful.

  • false: The request failed.

true

Examples

Success response

JSON format

{
  "Code": "200",
  "HttpStatusCode": 200,
  "Message": "空",
  "RequestId": "A8E16480-15C1-555A-922F-B736A005E52D",
  "SceneId": "DYYPZIH",
  "Success": true
}

Error codes

HTTP status code

Error code

Error message

Description

403 SaveOpenJMeterSceneFail The scene cannot be empty.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.