Editing a Release Task Based on the Release Task ID
Function
This API is used to edit a release task based on the release task ID.
URI
PUT /v3/{project_id}/cas/release-plans/{release_plan_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Tenant's project ID. See Obtaining a Project ID. |
release_plan_id |
Yes |
String |
Release task ID. See Obtaining the Release Task List. |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Message body type (format). Default value: application/json;charset=utf8. |
X-Auth-Token |
Yes |
String |
API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain the token, see Authentication. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
desc |
No |
String |
Description. |
components |
Yes |
Array of objects |
Component list. See Table 4. |
name |
Yes |
String |
Release task name. |
fail_strategy |
No |
String |
Failure strategy.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
seq |
Yes |
Integer |
Release batch. |
component_id |
Yes |
String |
Application component ID. |
name |
Yes |
String |
Application component name. The value contains 2 to 64 characters consisting of letters, digits, hyphens (-), and underscores (_). It starts with a letter and ends with a letter or digit. |
workload_name |
No |
String |
Workload name. |
labels |
No |
Array of objects |
Label. For container-based deployment, you can query a workload by label. For VM-based deployment, you can configure a label of the corresponding microservice name to use graceful startup and shutdown. See Table 5. |
create_mode |
No |
String |
Component creation mode. This parameter is not transferred by default, indicating to create and deploy a component. |
runtime_stack |
Yes |
Object |
Runtime. See Table 31. The value can be obtained from the response of the API for Querying a Technology Stack. |
environment_id |
Yes |
String |
Environment ID. |
description |
No |
String |
Description. The value can contain up to 128 characters. |
source |
Yes |
Object |
Source of the code or software package. See Table 32. |
build |
No |
Object |
Component building. This parameter is mandatory when the component is deployed in containers and no image is used. For details, see Table 33. |
limit_cpu |
No |
Number |
Maximum CPU limit. Unit: core. |
limit_memory |
No |
Number |
Maximum memory size. Unit: GiB. |
request_cpu |
No |
Number |
Requested CPU resources. Unit: core. |
request_memory |
No |
Number |
Requested memory. Unit: GiB. |
version |
Yes |
String |
Component version number. The value can contain up to 32 characters. It needs to meet the following rule: ^([0-9]+)(.[0-9]+){2,3}$ |
envs |
No |
Array of objects |
Environment variable list. See Table 29. |
replica |
Yes |
Integer |
Number of instances. |
storages |
No |
Array of objects |
Storage. See Table 6. |
deploy_strategy |
No |
Object |
Component deployment. See Table 9. |
command |
No |
Object |
Startup command. See Table 13. |
post_start |
No |
Object |
Post-start processing. See Table 14. |
pre_stop |
No |
Object |
Pre-stop processing. See Table 14. |
mesher |
No |
Object |
Multi-language access service mesh. This parameter is mandatory when Node.js is selected for the technology stack and the microservice engine is bound. See Table 15. |
timezone |
No |
String |
Time zone where the component runs. |
jvm_opts |
No |
String |
JVM parameter. Example: -Xms256m -Xmx1024m. If there are multiple parameters, separate them by spaces. If the parameter is left blank, the default value is used. |
tomcat_opts |
No |
Object |
Tomcat parameter. This parameter is valid when you use the Tomcat technology stack. See Table 16. |
host_aliases |
No |
Array of objects |
Host alias. See Table 17. |
dns_policy |
No |
String |
DNS policy.
|
dns_config |
No |
Object |
DNS configuration. See Table 18. |
workload_kind |
No |
String |
Workload type.
|
security_context |
No |
Object |
Security policy. See Table 20. |
logs |
No |
Array of objects |
Log collection. See Table 22. |
custom_metric |
No |
Object |
Custom metrics. See Table 23. |
affinity |
No |
Array of objects |
Affinity. See Table 24. |
anti_affinity |
No |
Array of objects |
Anti-affinity. See Table 24. |
liveness_probe |
No |
Object |
Component liveness probe. See Table 26. |
readiness_probe |
No |
Object |
Component service probe. See Table 26. |
startup_probe |
No |
Object |
Component startup probe. See Table 26. |
refer_resources |
Yes |
Array of objects |
Associated resource. See Table 27. |
external_accesses |
No |
Array of Objects |
External access. See Table 35. |
tolerations |
No |
Array of Objects |
Tolerance policy. See Table 36. |
container_name |
No |
String |
Container name. |
update_strategy |
No |
Object |
Component upgrade strategy. See Table 39. |
multi_containers |
No |
Array of Objects |
Multi-container configuration. See Table 37. |
service_name |
No |
String |
Service name configured for the inter-instance discovery of a StatefulSet. |
ports |
No |
Array of Objects |
Port configured for the inter-instance discovery of a StatefulSet. |
workload_content |
No |
String |
Workload content. |
configs |
No |
Array of Objects |
Unified component configuration. See Table 40. |
enable_sermant_injection |
No |
Boolean |
Whether to enable Sermant. |
enable_sermant_spring_register |
No |
Boolean |
Whether Spring Cloud Huawei microservices need to be registered with registry centers through Sermant. |
enable_sermant_dubbo_register |
No |
Boolean |
Whether Dubbo microservices need to be registered with registry centers through Sermant. |
enable_sermant_config |
No |
Boolean |
Whether to enable the Sermant dynamic configuration plug-in. |
cell_id |
No |
String |
Deployment cell ID. |
swimlane_id |
No |
String |
Lane ID. |
sermantAgentInjectActionFlag |
No |
Boolean |
Whether JDK 17 and JDK 21 automatically add the following JVM environment variables: JDK 17: --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/sun.net.www=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.http=ALL-UNNAMED JDK 21: --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java.math=ALL-UNNAMED --add-opens java.base/sun.net.www=ALL-UNNAMED --add-opens java.base/sun.net.www.protocol.http=ALL-UNNAMED -Dnet.bytebuddy.experimental=true |
sys_config |
No |
Map<String, String> |
Uses a compressed package to deploy component configuration items in the VM environment. |
image_pull_secrets |
No |
Array of String |
List of image pull secrets. |
auto_lts_config |
No |
Object |
Automatic LTS configuration. See Table 41. |
config_encryption |
No |
Object |
This parameter is mandatory when the encryption key is configured for a single-container component. See Table 42. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key |
Yes |
String |
Label name. |
value |
Yes |
String |
Label value. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Data storage type.
|
name |
Yes |
String |
Name of the storage disk. |
parameters |
Yes |
Object |
For details about the parameters of each data storage type, see Table 7. |
mounts |
Yes |
Array of objects |
Mount path of data storage. See Table 8. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
path |
No |
String |
Host path. This parameter is applicable to the HostPath storage type. This parameter is mandatory when type is set to HostPath. |
name |
No |
String |
Name of a configuration item, secret, or PVC, which is applicable to ConfigMap, Secret, or PersistentVolumeClaim storage, respectively. This parameter is mandatory when type is set to ConfigMap, Secret, or PersistentVolumeClaim. |
default_mode |
No |
Integer |
Mounting permission. The value is in decimal format. Example: 384. This parameter is applicable to ConfigMap and secret storage. |
medium |
No |
String |
This parameter is applicable to EmptyDir storage. If it is not specified, the default disk medium is used. If it is set to memory, memory storage is enabled. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
path |
Yes |
String |
Mount path. |
sub_path |
Yes |
String |
Subpath of the mount path. |
read_only |
Yes |
Boolean |
Read only or not. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Deployment type.
|
rolling_release |
No |
Object |
Rolling deployment parameter, which is mandatory when type is set to RollingRelease. For details, see Table 10. |
gray_release |
No |
Object |
Dark launch upgrade parameter, which is mandatory when type is set to GrayRelease. For details, see Table 11. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
batches |
Yes |
Integer |
Deployment batches. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Dark launch policy.
|
first_batch_weight |
Yes |
Integer |
Proportion of first-batch dark launch traffic. This parameter is mandatory when type is set to WEIGHT. |
first_batch_replica |
Yes |
Integer |
Number of first-batch dark launch instances. This parameter is mandatory when type is set to WEIGHT. |
remaining_batch |
Yes |
Integer |
Number of batches for remaining instance deployment. After the first batch is completed, the remaining instances will be deployed in specified batches. Example: If there are five instances remaining to be deployed in three batches, these five instances will be upgraded based on 2:2:1. This parameter is mandatory when type is set to WEIGHT. |
deployment_mode |
No |
Integer |
Deployment mode.
|
replica_surge_mode |
No |
String |
Mode of adding a dark launch instance. This parameter is mandatory when type is set to CONTENT.
|
rule_match_mode |
No |
String |
Effective mode of a dark launch rule. This parameter is mandatory when type is set to CONTENT.
|
rules |
No |
Object |
Dark launch rule. See Table 12. This parameter is mandatory when type is set to CONTENT. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Match type. Currently, only HEADER is supported. |
key |
Yes |
String |
Parameter name. |
value |
Yes |
String |
Condition value. |
condition |
Yes |
String |
Condition type.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
command |
No |
Array of String |
Command for controlling container running. |
args |
No |
Array of String |
Parameter for controlling container running. Example: -port=8080. If there are multiple parameters, separate them by line breaks. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Processing method.
|
scheme |
No |
String |
HTTP request type, which can be HTTP or HTTPS. This parameter is valid only when type is set to http. |
host |
No |
String |
Custom IP address. If this parameter is left blank, the pod IP address is used. This parameter is valid only when type is set to http. |
port |
No |
Integer |
Port number. This parameter is valid only when type is set to http. |
path |
No |
String |
Request path. This parameter is valid only when type is set to http. |
command |
No |
Array of String |
Command list. This parameter is valid only when type is set to command. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
server_xml |
Yes |
String |
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
ip |
Yes |
String |
IP address. |
hostname |
Yes |
Array of String |
Host alias. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
nameservers |
No |
Array of String |
IP address list of the DNS server of the pod. |
searches |
No |
Array of String |
(Optional) List of DNS search domains used to search for host names in the pod. |
options |
No |
Array of objects |
(Optional) List of objects. Each object may have a name (mandatory) and a value (optional). The contents of the objects here will be merged into the options generated from the specified DNS policy. Duplicate entries will be deleted. See Table 19. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Operation name. |
value |
No |
String |
Operation value. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
run_as_user |
No |
Integer |
User for running containers. Example: To run containers as user root, set the user ID to 0. |
run_as_group |
No |
Integer |
Owner group specified for running container processes. |
capabilities |
No |
Object |
Capability set. See Table 21. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
add |
No |
Array of String |
Grant the Linux permission to the running user. |
drop |
No |
Array of String |
Remove the Linux permission of the running user. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
log_path |
Yes |
String |
Container log path. |
rotate |
Yes |
String |
Interval for dumping logs. |
host_path |
Yes |
String |
Mounted host path. |
host_extend_path |
Yes |
String |
Host extension path. By extending the host path, you can distinguish mounting from different containers in the same host path.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
path |
Yes |
String |
Collection path. Example: /metrics. |
port |
Yes |
Integer |
Collection port. Example: 9090. |
dimensions |
Yes |
String |
Monitoring dimension. Example: cpu_usage,mem_usage. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
kind |
No |
String |
Object kind.
|
condition |
No |
String |
Policy type.
|
match_expressions |
No |
Array of objects |
Scheduling policy rule. See Table 25. |
weight |
No |
String |
Weight.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key |
Yes |
String |
Condition key. |
value |
Yes |
String |
Condition value. |
operation |
Yes |
String |
Operation. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Type. Value: http, tcp, or command. |
delay |
Yes |
Integer |
Interval between the startup and detection. |
timeout |
Yes |
Integer |
Detection timeout interval. |
scheme |
No |
String |
Request type. Value: HTTP or HTTPS. This parameter is valid only when type is set to http. |
host |
No |
String |
Custom IP address. If this parameter is left blank, the pod IP address is used. This parameter is valid only when type is set to http. |
port |
No |
Integer |
Port number. This parameter is valid only when type is set to http or tcp. |
path |
No |
String |
Request path. This parameter is valid only when type is set to http. |
command |
No |
Array of String |
Command list. This parameter is valid only when type is set to command. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
id |
Yes |
String |
Resource ID. |
type |
Yes |
String |
Resource type.
|
parameters |
No |
Object |
Resource parameters. See Table 28. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
namespace |
No |
String |
Namespace. |
name |
No |
String |
Resource name. |
capacity |
No |
Integer |
Storage capacity, in GiB. |
type |
No |
String |
Volume declaration type.
|
class |
No |
String |
Volume declaration subtype.
|
obs_volume_type |
No |
String |
OBS volume type. Default value: STANDARD. |
access_mode |
No |
String |
Storage volume access mode.
|
availableZone |
No |
String |
AZ. |
volume_type |
No |
String |
Volume type. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Variable name. |
value |
No |
String |
Variable value. |
value_from |
No |
Object |
Variable reference. See Table 30. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
reference_type |
Yes |
String |
Reference type.
|
name |
Yes |
String |
Name of the configuration item or secret. |
key |
No |
String |
Key of the configuration item or secret. |
optional |
No |
Boolean |
Whether the key of the configuration item or secret is mandatory. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Technology stack name. |
type |
Yes |
String |
Technology stack type. Value: Java, Tomcat, Nodejs, Php, Docker, or Python.
|
version |
Yes |
String |
Technology stack version. |
deploy_mode |
Yes |
String |
Deployment mode.
|
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
kind |
Yes |
String |
Component source kind.
|
version |
No |
String |
Version number. |
url |
No |
String |
Package address. This parameter is mandatory when kind is set to package or image. |
storage |
No |
String |
Storage mode.
This parameter is mandatory when kind is set to package or image. |
http_username |
No |
String |
Username. This parameter is mandatory when storage is set to http. Username and password authentication is supported. |
http_password |
No |
String |
Password. This parameter is mandatory when storage is set to http. Username and password authentication is supported. |
http_command |
No |
String |
Address of the custom software package. This parameter is mandatory when storage is set to http. |
http_headers |
No |
Map<String, String> |
This parameter is mandatory when storage is set to http. You can customize request headers as key-value pairs, for example, {"key":"xx","value":"xx""}. |
auth |
No |
String |
Authentication mode. Value: iam or none. Default value: iam. |
repo_auth |
No |
String |
Authorization name, which can be obtained from the authorization list. For details, see Obtaining a Git Repository Authorization List. |
repo_namespace |
No |
String |
Namespace of the code repository. |
repo_ref |
No |
String |
Code branch or tag. Default value: master. |
repo_type |
No |
String |
Code repository type. Value: GitHub, BitBucket, or GitLab. |
web_url |
No |
String |
Code redirection URL. Example: https://github.com/example/demo.git. |
repo_url |
No |
String |
Code repository URL. Example: https://github.com/example/demo.git. |
commit_id |
No |
String |
In the code repository, commit ID is the unique identifier of each commit and is used to identify and reference a commit. The value contains 8 to 40 characters and starts with a lowercase letter or digit. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
parameters |
No |
Map<String, Object> |
This parameter is provided only when no ID is available during build creation. See Table 34. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
build_cmd |
No |
String |
Compilation command. By default:
|
dockerfile_path |
No |
String |
Address of the Docker file. By default, the Docker file is in the root directory (./). |
artifact_namespace |
No |
String |
Build archive organization. Default value: cas_{project_id}. |
cluster_id |
Yes |
String |
ID of the cluster to be built. |
node_label_selector |
No |
Map<String, String> |
key: label key. value: label value. |
environment_id |
No |
String |
Environment ID. See Obtaining All Environments. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
protocol |
No |
String |
External access type. Value: http or https. |
address |
No |
String |
External access address. |
forward_port |
No |
Integer |
External access port. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
key |
No |
String |
Taint key. |
operator |
No |
String |
Operator.
|
value |
No |
String |
Taint value. This parameter is mandatory when operator is set to Equal. |
effect |
No |
String |
Taint policy.
|
toleration_seconds |
No |
Integer |
Tolerance time window. This parameter can be set only when effect is set to NoExecute. Within the tolerance time window, pods still run on the node with taints. After the time expires, the pods will be evicted. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
container_name |
Yes |
String |
Container name. |
source |
Yes |
Object |
Source of the code or software package. See Table 32. In multi-container mode, only images are supported. |
limit_cpu |
No |
Number |
Maximum CPU limit. Unit: core. |
limit_memory |
No |
Number |
Maximum memory size. Unit: GiB. |
request_cpu |
No |
Number |
Requested CPU resources. Unit: core. |
request_memory |
No |
Number |
Requested memory. Unit: GiB. |
envs |
No |
Array of objects |
Environment variable list. See Table 29. |
liveness_probe |
No |
Object |
Container liveness probe. See Table 26. |
readiness_probe |
No |
Object |
Container service probe. See Table 26. |
startup_probe |
No |
Object |
Container startup probe. See Table 26. |
command |
No |
Object |
Startup command. See Table 13. |
post_start |
No |
Object |
Post-start processing. See Table 14. |
pre_stop |
No |
Object |
Pre-stop processing. See Table 14. |
logs |
No |
Array of objects |
Log collection. See Table 22. |
storages |
No |
Array of objects |
Storage. See Table 6. |
security_context |
No |
Object |
Security policy. See Table 20. |
config_encryption |
No |
Object |
This parameter is mandatory when the encryption key is configured for a multi-container component. See Table 42. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Port name. |
port |
Yes |
String |
Access port. |
target_port |
Yes |
String |
Container port. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
No |
String |
Component upgrade policy. Options:
|
max_unavailable |
No |
|
Maximum number of unavailable pods. That is, the number or percentage of pods that can be deleted based on the value of replica. The default value is 25% This parameter can be set when workload_kind is set to deployment.
|
max_surge |
No |
|
Maximum surge. That is, the number or percentage of pods allowed based on the value of replica. The default value is 25%. This parameter can be set only when workload_kind is set to deployment.
|
termination_period_seconds |
No |
Integer |
Scale-in time window. That is, the time window for executing commands before a workload stops. The default value is 30s. |
min_ready_seconds |
No |
Integer |
Minimum ready time of a pod. That is, the minimum ready time of a new pod without any container crash. A pod is considered available only after the minimum ready time is exceeded. The default value is 0. |
progress_deadline_seconds |
No |
Integer |
Maximum upgrade duration. That is, the time (in seconds) the system waits for before reporting a component upgrade failure. If this parameter is specified, the value of this parameter must be greater than that of min_ready_seconds. |
revision_history_limit |
No |
Integer |
Maximum number of pods to retain. That is, the number of old pods to retain to allow rollback. The default value is 10. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
conifg_id |
Yes |
String |
Unified configuration ID. |
mount_path |
Yes |
String |
Mount path. |
Response
Parameter |
Type |
Description |
---|---|---|
release_plan_id |
String |
Release task ID. |
Example Request
Edit the release task whose ID is bb09c189-d17e-480a-a0e4-3a102b3795b0.
Example Response
{ "release_plan_id": "bb09c189-d17e-480a-a0e4-3a102b3795b0" }
Status Code
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
404 |
Not Found |
500 |
Internal Server Error |
Error Code
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot