You can call this operation to set the Java virtual machine (JVM) parameters for an application or an instance group.
Debugging
Request headers
This operation only uses common request headers. For more information, see the Common request parameters topic.
Request syntax
POST /pop/v5/app/app_jvm_config HTTPS|HTTP
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| AppId | String | Yes | c627c157-560d-************* |
The ID of the application for which you want to set the JVM parameters. |
| GroupId | String | No | "" |
The ID of the instance group for which you want to set the JVM parameters. If you set this parameter to a specific ID, the JVM parameters are set for the specified instance group. If you set this parameter to "", the JVM parameters are set for the application. |
| Options | String | No | "" |
Custom JVM parameters that you want to set. Note: 1. If this parameter is not specified in the group configuration, the value specified in the application configuration is applied. 2. If this parameter is not specified in the application configuration, the default value is applied. |
| MinHeapSize | Integer | No | 500 |
The initial size of the heap that you want to set. Unit: MB. Note: 1. If this parameter is not specified in the group configuration, the value specified in the application configuration is applied. 2. If this parameter is not specified in the application configuration, the default value is applied. |
| MaxPermSize | Integer | No | 1000 |
The maximum size of the permanent generation heap that you want to set. Unit: MB. Note: 1. If this parameter is not specified in the group configuration, the value specified in the application configuration is applied. 2. If this parameter is not specified in the application configuration, the default value is applied. |
| MaxHeapSize | Integer | No | 500 |
The maximum size of the heap that you want to set. Unit: MB. Note: 1. If this parameter is not specified in the group configuration, the value specified in the application configuration is applied. 2. If this parameter is not specified in the application configuration, the default value is applied. |
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| Code | Integer | 200 |
The returned code. |
| Message | String | success |
The returned message. |
| RequestId | String | D16979DC-4D42-******************** | |
| JvmConfiguration | Struct |
The JVM parameters returned. |
|
| Options | String | "" |
Custom JVM parameters that was set. |
| MinHeapSize | Integer | 500 |
The initial size of the heap that was set. Unit: MB |
| MaxPermSize | Integer | 1000 |
The maximum size of the permanent generation heap that was set. Unit: MB |
| MaxHeapSize | Integer | 500 |
The maximum size of the heap that was set. Unit: MB |
Examples
Sample requests
POST /pop/v5/app/app_jvm_config HTTP/1.1
Common request headers
{
"AppId": ""
}
Sample success responses
JSON format
{
"Message": "success",
"JvmConfiguration": {
"MaxPermSize": 1000,
"MaxHeapSize": 500,
"MinHeapSize": 500,
"Options": ""
},
"Code": 200
}
XML format
<Message>success</Message>
<JvmConfiguration>
<MaxPermSize>1000</MaxPermSize>
<MaxHeapSize>500</MaxHeapSize>
<MinHeapSize>500</MinHeapSize>
<Options/>
</JvmConfiguration>
<Code>200</Code>
Error codes
For a list of error codes, visit the API Error Center.