# Rolling Update Service Version
Interface should be called on the server side, seeHattori API。
# Interface Dxplaination
# Interface name
updateCloudbaseServiceVersion
# Functional description
Through this interface, you can update the service version on a rolling basis. If you encounter problems during use, you can use theOpen Platform Service Provider ZonePosting exchanges.
# Calling mode
# HTTPS call
POST https://api.weixin.qq.com/componenttcb/rollupdatecloudbaserunserverversion?access_token=ACCESS_TOKEN
# Request parameters
attribute | type | Default value | Required | Introductions |
---|---|---|---|---|
access_Token | string | yes | Third-party interface calls token component_access_Token | |
env_id | string | yes | Environment ID | |
version_name | string | yes | The name of the version to replace, which can be the latest | |
upload_type | string | no | Enumeration (package/repository/image) | |
repository_type | string | no | Type of repository(Coding/Gitlab/github) | |
flow_ratio | number | no | Flow ratio | |
Dockerfile_path | string | no | Dockerfile address | |
build_dir | string | no | Build Directory | |
cpu | string | no | The size of the cpu, in units: core | |
mem | string | no | Size of Mem, in G | |
min_num | string | no | Min replicas, minimum value: 0 | |
max_num | string | no | Maximum number of copies | |
policy_type | string | no | Type of policy | |
policy_threshold | string | no | Policy threshold | |
env_params | string | no | Environmental variables | |
container_port | number | no | Container port | |
server_name | string | no | Name of service | |
repository | string | no | Repository address | |
branch | string | no | Branching | |
version_remark | string | no | Version notes | |
package_name | string | no | Code Package Name | |
package_version | string | no | Code Package Version | |
image_info | CloudBaseRunImageInfo | no | Details of Image | |
code_detail | CloudBaseCodeRepoDetail | no | Details on Github etc. Pull Code | |
is_rebuild | bool | no | Whether to replay the flow | |
initial_delay_seconds | number | no | How long to delay the start of the health check (units s) | |
mount_volume_info | Array. | no | Cfs mount information | |
rollback | bool | no | Whether to rollback | |
snapshot_name | string | no | Version History Name | |
custom_logs | string | no | Custom Acquisition Path | |
enable_union | bool | no | Enable Unified Domain Name | |
server_path | string | no | Service path (only valid for the first time) | |
is_update_cls | bool | no | Whether to update Cls | |
policy_detail | Array.<HpaPolicy> | no | Automatic Capacity Expansion Policy Group |
CloudBaseRunImageInfo The structure of the
attribute | type | Default value | Required | Introductions |
---|---|---|---|---|
repository_name | string | no | Mirror Warehouse Name | |
is_public | bool | no | Whether it is publicly owned | |
tag_name | string | no | Mirror tag name | |
server_addr | string | no | Mirror server | |
image_url | string | no | Mirror pull address |
CloudBaseCodeRepoDetail The structure of the
attribute | type | Default value | Required | Introductions |
---|---|---|---|---|
name | CloudBaseCodeRepoName | no | The name of the repo | |
url | string | no | Repo's url |
CloudBaseCodeRepoName The structure of the
attribute | type | Default value | Required | Introductions |
---|---|---|---|---|
name | string | no | The name of the repo | |
full_name | string | no | The full name of the repo |
CloudBaseRunVolumeMount The structure of the
attribute | type | Default value | Required | Introductions |
---|---|---|---|---|
name | string | no | Resource name | |
mount_path | string | no | Mount path | |
read_only | bool | no | Whether it is read only | |
nfs_volumes | Array. | no | Nfs mount information |
CloudBaseRunNfsVolumeSource The structure of the
attribute | type | Default value | Required | Introductions |
---|---|---|---|---|
server | string | no | NFS Mount Server | |
path | string | no | Server路径 | |
read_only | bool | no | Whether it is read only | |
secret_name | string | no | secret name | |
enable_empty_dir_volume | bool | no | Temporary directory |
HpaPolicy The structure of the
attribute | type | Default value | Required | Introductions |
---|---|---|---|---|
policy_type | string | no | Type of policy | |
policy_threshold | number | no | Policy threshold |
# Return value
Returned JSON Data packet
attribute | type | Introductions |
---|---|---|
errcode | number | Error code |
errmsg | string | Error message |
result | string | Succ for success |
run_id | string | Operation record id |
# Call Example
Example Dxplaination: HTTPS requests
# Sample Request Data
{
"env_id": "test-6gxk23no5605e14f",
"version_name": "ss-003",
"upload_type": "image",
"flow_ratio": 100,
"dockerfile_path " : "Dockerfile",
"cpu": "0.25",
"mem": "0.5",
"min_num": "0",
"max_num": "1",
"policy_type": "cpu",
"policy_threshold": "50",
"env_params": "{}",
"container_port": 80,
"server_name": "ss",
"image_info": {
"repository_name": "tcb-100001320084-hvbz/web-container-6gnyxqnl696f40ce_pressure-python",
"is_public": true,
"tag_name": "pressure-python-006-20211219230528",
"server_addr": "ccr.ccs.tencentyun.com",
"image_url": "ccr.ccs.tencentyun.com/tcb-100001320084-hvbz/web-container-6gnyxqnl696f40ce_pressure-python:pressure-python-006-20211219230528"
},
"custom_logs": "stdout"
}
# Return Data Example
{
"errcode": 0,
"errmsg": "ok",
"result": "succ",
"run_id": "1mz9GjJgyY53bh"
}
# Error code
Error code | Error code | Solutions |
---|---|---|
0 | ok | ok |
-1 | system error | The system is busy, please wait for the developer to try again |
-1000 | system error | System error |
40014 | invalid access_Token | Illegal access_Token Please take the developer seriously. access_Token Of the validity (such as whether it is expired), or to see if you are working for the appropriate Official Account message template Call interface |
40097 | invalid args | Parameter error |
40101 | missing parameter | Missing required parameters |
41001 | access_Token missing | lack access_Token parameter |
42001 | access_Token expired | access_Token Timeout, please check access_Token Of the validity period, please refer to the Basic Support - Obtain access_Token Middle, right. access_Token Detailed mechanism explaination of the |
43002 | require POST method | Need POST request |
44002 | empty post data | POST The packet is empty. |
47001 | data format error | analysis JSON/XML Content errorpost Missing parameters in the dataCheck for corrections and try again. |
85088 | no qbase privilege | The app is not open for cloud development |