Updating an Application Version
Function
This API is used to update an application version.
URI
PUT /v2/{project_id}/edgemgr/apps/{app_id}/versions/{version_id}
| Parameter | Mandatory | Description |
|---|---|---|
| project_id | Yes | Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
| app_id | Yes | Application ID. |
| version_id | Yes | Version ID. |
Request
Request parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| envs | No | Array of Table 10 objects | Environment variables. |
| volumes | No | Array of Table 11 objects | Volume configuration. |
| configs | No | Table 14 object | Particular parameters of an application template. |
| resources | No | Table 12 object | Container resource configuration. |
| command | No | Array of strings | Startup commands. |
| liveness_probe | No | String | Workload liveness probe. |
| readiness_probe | No | String | Workload readiness probe. |
| args | No | Array of strings | Parameters. |
Request example:
{
"version": {
"resources": {
"limits": {
"cpu": 0.1,
"memory": 1024,
"gpu": 3.9
},
"requests": {
"cpu": 0.1,
"memory": 1024,
"gpu": 3.9
}
},
"envs": [
{
"name": "key",
"value": "name"
}
],
"volumes": [
{
"name": "test",
"type": "hostPath",
"source": "/tmp",
"destination": "/tmp0",
"read_only": true
}
],
"configs": {
"privileged": true,
"host_network": true,
"restart_policy": "Always"
}
}
} Response
Response parameters
| Parameter | Type | Description |
|---|---|---|
| version | Table 17 object | Application version details. |
Response example:
{
"envs": [
{
"name": "MQ_IP",
"value": "127.0.0.1"
}
],
"created_at": "2018-11-08T01:38:17.287510+08:00",
"updated_at": null,
"version": "1.11.08",
"image_url": "",
"volumes": [],
"readiness_probe": null,
"configs": {
"host_network": true,
"restart_policy": "Always",
"privileged": false
},
"project_id": "{project_id}",
"liveness_probe": null,
"id": "8a33dc45-d18f-49b1-8573-6e60f9daa144",
"resources": {
"requests": {
"cpu": 0.25,
"memory": 512
},
"limits": {
"cpu": 1,
"memory": 512
}
}
} Error Codes
For details, see Error Codes.
Last Article: Creating an Application Version
Next Article: Querying Details About an Application Version
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.