Updated on 2025-07-10 GMT+08:00

Editing a Release Task

Function

This API is used to edit a release task.

URI

PUT /v3/{project_id}/pipeline/pipelines/{pipeline_id}

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Tenant's project ID. See Obtaining a Project ID.

pipeline_id

Yes

String

Release task ID. See Obtaining the Release Task List.

Request

Table 2 Request header parameters

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.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

name

Yes

String

Pipeline name.

description

No

String

Release task description.

model_version

Yes

Integer

Release task model.

Only 2 is supported, indicating the new model.

config_mode

Yes

String

Release task deployment mode.

  • ui
  • template

sources

No

List of Object

Template package list. This parameter is mandatory when config_mode is set to template. See Table 4.

enterprise_project_id

No

String

Enterprise project ID.

If this parameter is not set, the default enterprise project is default and the ID is 0.

stages

No

List of Object

Stage parameters. This parameter is mandatory when config_mode is ui. See Table 7.

Table 4 template_sources

Parameter

Mandatory

Type

Description

template_source

Yes

Object

Template package information. See Table 5.

input_values

No

Map<String, String>

Template package input information.

Table 5 template_source

Parameter

Mandatory

Type

Description

storage

Yes

String

Storage mode of the component template package.

  • devcloud: CodeArts release repository
  • obs
  • http: custom file address

url

Yes

String

Address of the component template package.

This parameter is valid only when the component template package storage mode is http.

http_username

No

String

Username.

This parameter is valid only when the component template package storage mode is http and the security authentication mode is username and password authentication.

http_password

No

String

Password.

This parameter is valid only when the component template package storage mode is http and the security authentication mode is username and password authentication.

http_headers

No

Array of objects

Request header. See Table 6.

This parameter is valid only when the component template package storage mode is http and the security authentication mode is custom header authentication.

Table 6 http_headers

Parameter

Mandatory

Type

Description

key

Yes

String

Request key.

value

Yes

String

Request value.

Table 7 stages

Parameter

Mandatory

Type

Description

name

Yes

String

Stage name, which is unique in a release task.

display_name

No

String

Display name of a stage. If this parameter is left blank, the value is the same as the stage name.

task_group

Yes

Array of String

Task group. The parameters in the task group must correspond to the group_index field in Table 8.

tasks

Yes

Array of object

Task parameters. See Table 8.

Table 8 tasks

Parameter

Mandatory

Type

Description

name

Yes

String

Task name, which is unique in a single stage.

display_name

No

String

Display name of a task. If this parameter is left blank, the value is the same as the task name.

order_index

Yes

Integer

Task execution sequence. Tasks with the same group_index value belong to the same task group. The execution sequence is unique in a task group.

group_index

Yes

String

Task group. If the task groups are the same, the tasks are in the same group. The value is the same as that of task_group in Table 7.

task_type_id

Yes

Object

Task execution parameters. See Table 9.

input

No

Object

Task execution parameter, which is determined based on the task type.

Table 9 task_type_id

Parameter

Mandatory

Type

Description

category

Yes

String

Task type.

  • Build
  • CheckPoint
  • Environment
  • Component
  • Application

type

Yes

String

Task execution type.

  • create
  • update
  • upsert: create or modify.
  • approval
Table 10 build

Parameter

Mandatory

Type

Description

name

Yes

String

Build task name.

id

Yes

String

Build task ID.

enterprise_project_id

No

String

Enterprise project ID of a build task.

If this parameter is not set, the default enterprise project is default and the ID is 0.

Table 11 checkpoint

Parameter

Mandatory

Type

Description

mode

No

String

If this field is left blank, no person needs to be specified for approval.

  • all: If all approvers approve the application, the application is approved.
  • any: If any approver approves the application, the application is approved.

users

No

List of Object

Approver. If this parameter is left blank, no approver is required. See Table 12.

Table 12 users

Parameter

Mandatory

Type

Description

id

Yes

String

User ID.

label

No

String

User label, which is displayed on the frontend.

name

No

String

User name, which is displayed on the frontend.

Table 13 application

Parameter

Mandatory

Type

Description

name

Yes

String

Application name.

description

Yes

String

Application description.

enterprise_project_id

No

String

Enterprise project ID.

If this parameter is not set, the default enterprise project is default and the ID is 0.

Table 14 component

Parameter

Mandatory

Type

Description

id

No

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 15.

runtime_stack

Yes

Object

Runtime. See Table 41. 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 42.

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 43.

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 39.

replica

Yes

Integer

Number of instances.

storages

No

Array of objects

Storage. See Table 16.

deploy_strategy

No

Object

Component deployment. See Table 19.

command

No

Object

Startup command. See Table 23.

post_start

No

Object

Post-start processing. See Table 24.

pre_stop

No

Object

Pre-stop processing. See Table 24.

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 25.

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 26.

host_aliases

No

Array of objects

Host alias. See Table 27.

dns_policy

No

String

DNS policy.

  • Default: inherits the domain name resolution configuration of the node where the pod is located.
  • ClusterFirst: adds the domain name resolution configuration.
  • ClusterFirstWithHostNet: takes effect only for pods running in hostNetWork mode.
  • None: replaces the domain name resolution policy.

dns_config

No

Object

DNS configuration. See Table 28.

workload_kind

No

String

Workload type.

  • deployment
  • statefulset
  • daemonset

security_context

No

Object

Security policy. See Table 30.

logs

No

Array of objects

Log collection. See Table 32.

custom_metric

No

Object

Custom metrics. See Table 33.

affinity

No

Array of objects

Affinity. See Table 34.

anti_affinity

No

Array of objects

Anti-affinity. See Table 34.

liveness_probe

No

Object

Component liveness probe. See Table 36.

readiness_probe

No

Object

Component service probe. See Table 36.

startup_probe

No

Object

Component startup probe. See Table 36.

refer_resources

Yes

Array of objects

Associated resource. See Table 37.

external_accesses

No

Array of Objects

External access. See Table 45.

tolerations

No

Array of Objects

Tolerance policy. See Table 46.

container_name

No

String

Container name.

update_strategy

No

Object

Component upgrade strategy. See Table 49.

multi_containers

No

Array of Objects

Multi-container configuration. See Table 47.

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 50.

config_mode

No

String

Workload configuration mode.

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 51.

config_encryption

No

Object

This parameter is mandatory when the encryption key is configured for a single-container component. See Table 52.

Table 15 labels

Parameter

Mandatory

Type

Description

key

Yes

String

Label name.

value

Yes

String

Label value.

Table 16 storages

Parameter

Mandatory

Type

Description

type

Yes

String

Data storage type.

  • HostPath: host path for local disk mounting.
  • EmptyDir: temporary directory for local disk mounting.
  • ConfigMap: configuration item for local disk mounting.
  • Secret: secret for local disk mounting.
  • PersistentVolumeClaim: cloud storage mounting.

name

Yes

String

Name of the storage disk.

parameters

Yes

Object

For details about the parameters of each data storage type, see Table 17.

mounts

Yes

array of objects

Mount path of data storage. See Table 18.

Table 17 component_storage_parameters

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.

Table 18 mounts

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.

Table 19 deploy_strategy

Parameter

Mandatory

Type

Description

type

Yes

String

Deployment type.

  • OneBatchRelease
  • RollingRelease
  • GrayRelease

rolling_release

No

Object

Rolling deployment parameter, which is mandatory when type is set to RollingRelease. For details, see Table 20.

gray_release

No

Object

Dark launch upgrade parameter, which is mandatory when type is set to GrayRelease. For details, see Table 21.

Table 20 rolling_release

Parameter

Mandatory

Type

Description

batches

Yes

Integer

Deployment batches.

Table 21 gray_release

Parameter

Mandatory

Type

Description

type

Yes

String

Dark launch policy.

  • WEIGHT: dark launch by traffic.
  • CONTENT: dark launch by content.

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.

  • 1: The upstream is a microservice gateway.
  • 3: The upstream is a microservice.
  • 4: The upstream is a load balancer.

replica_surge_mode

No

String

Mode of adding a dark launch instance. This parameter is mandatory when type is set to CONTENT.

  • MIRROR: blue-green.
  • EXTRA: canary (increase, then decrease)
  • NOSURGE: canary (decrease, then increase)

rule_match_mode

No

String

Effective mode of a dark launch rule. This parameter is mandatory when type is set to CONTENT.

  • ALL: All conditions are met.
  • ANY: Any condition is met.

rules

No

Object

Dark launch rule. See Table 22. This parameter is mandatory when type is set to CONTENT.

Table 22 gray_rules

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.

  • EQUAL
  • MATCH
  • IN: enumeration
Table 23 command

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.

Table 24 component_lifecycle

Parameter

Mandatory

Type

Description

type

Yes

String

Processing method.

  • http
  • command

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.

Table 25 mesher

Parameter

Mandatory

Type

Description

port

Yes

Integer

Process listening port.

Table 26 tomcat_opt

Parameter

Mandatory

Type

Description

server_xml

Yes

String

  1. Listening port in the server.xml file will take effect even if it has been configured in public network access.
  2. The custom Tomcat configuration may conflict with the existing port. Check whether the custom port is occupied.
Table 27 host_aliases

Parameter

Mandatory

Type

Description

ip

Yes

String

IP address.

hostname

Yes

Array of String

Host alias.

Table 28 dns_config

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 29.

Table 29 options

Parameter

Mandatory

Type

Description

name

Yes

String

Operation name.

value

No

String

Operation value.

Table 30 security_context

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 31.

Table 31 capabilities

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.

Table 32 logs

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.

  • None: The extended path is not used.
  • PodUID: extend the host path based on the pod ID.
  • PodName: extend the host path based on the pod name.
  • PodUID/ContainerName: extend the host path based on the pod ID and container name.
  • PodName/ContainerName: extend the host path based on the pod name and container name.
Table 33 custom_metric

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.

Table 34 component_affinity

Parameter

Mandatory

Type

Description

kind

No

String

Object kind.

  • node
  • pod

condition

No

String

Policy type.

  • required: The requirement must be met.
  • preferred: The requirement is met as much as possible.

match_expressions

No

Array of objects

Scheduling policy rule. See Table 35.

weight

No

String

Weight.

  • The value is 100 when condition is set to required.
  • Enter an integer ranging from 1 to 100 when condition is set to preferred.
Table 35 match_expressions

Parameter

Mandatory

Type

Description

key

Yes

String

Condition key.

value

Yes

String

Condition value.

operation

Yes

String

Operation.

Table 36 component_probe

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.

Table 37 refer_resources

Parameter

Mandatory

Type

Description

id

Yes

String

Resource ID.

type

Yes

String

Resource type.

  • vpc
  • eip
  • elb
  • cce
  • ecs
  • dcs
  • rds
  • cse: ServiceComb engine.
  • nacos: registry/configuration center.
  • customServer
  • pvc
  • gaussdb
  • dms_rocketmq
  • css_es: Elasticsearch

parameters

No

Object

Resource parameters. See Table 38.

Table 38 refer_resource_parameter

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.

  • efs
  • obs
  • sfs
  • evs

class

No

String

Volume declaration subtype.

  • csi-sfsturbo: fixed when type is set to efs.
  • csi-obs: fixed when type is set to obs.
  • csi-nas: fixed when type is set to sfs.
  • csi-disk: fixed when type is set to evs.

obs_volume_type

No

String

OBS volume type. Default value: STANDARD.

access_mode

No

String

Storage volume access mode.

  • ReadWriteOnce: A volume can be mounted as read-write by a single node.
  • ReadWriteMany: A volume can be mounted as read-write by many nodes.

availableZone

No

String

AZ.

volume_type

No

String

Volume type.

Table 39 envs

Parameter

Mandatory

Type

Description

name

Yes

String

Variable name.

value

No

String

Variable value.

value_from

No

Object

Variable reference. See Table 40.

Table 40 value_from

Parameter

Mandatory

Type

Description

reference_type

Yes

String

Reference type.

  • configMapKey
  • secretKey

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.

Table 41 runtime_stack

Parameter

Mandatory

Type

Description

name

Yes

String

Technology stack name.

type

Yes

String

Technology stack type. Value: Java, Tomcat, Nodejs, Php, Docker, or Python.

  • For VM-based deployment, Java, Tomcat, and Nodejs are supported.
  • For container-based deployment, Java, Tomcat, Nodejs, Php, and Docker are supported.

version

Yes

String

Technology stack version.

deploy_mode

Yes

String

Deployment mode.

  • container
  • virtualmachine
Table 42 source

Parameter

Mandatory

Type

Description

kind

Yes

String

Component source kind.

  • code
  • package
  • image

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.

  • devcloud: CodeArts release repository
  • obs
  • http: custom file address
  • swr

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.

Table 43 build

Parameter

Mandatory

Type

Description

parameters

No

Map<String, Object>

This parameter is provided only when no ID is available during build creation. See Table 44.

Table 44 parameters

Parameter

Mandatory

Type

Description

build_cmd

No

String

Compilation command. By default:

  1. When build.sh exists in the root directory, the command is ./build.sh.
  2. When build.sh does not exist in the root directory, the command varies depending on the OS. Example:
    • Java and Tomcat: mvn clean package
    • Nodejs: npm build

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.

Table 45 external_accesses

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.

Table 46 tolerations

Parameter

Mandatory

Type

Description

key

No

String

Taint key.

operator

No

String

Operator.

  • Equal: matches the nodes with the specified taint key (mandatory) and value. If the taint value is left blank, all taints with the same key will be matched.
  • Exists: matches nodes with the specified taint key. In this case, the taint value cannot be specified. Not specifying any taint key means all taints are tolerated.

value

No

String

Taint value. This parameter is mandatory when operator is set to Equal.

effect

No

String

Taint policy.

  • NoScheduler: Only the NoSchedule taint is matched.
  • PreferNoSchedule: Only the PreferNoSchedule taint is matched.
  • NoExecute: Only the NoExecute taint is matched.
  • If this parameter is not set, all taint effects are matched.

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.

Table 47 multi_containers

Parameter

Mandatory

Type

Description

container_name

Yes

String

Container name.

source

Yes

Object

Source of the code or software package. See Table 42. 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 39.

liveness_probe

No

Object

Container liveness probe. See Table 36.

readiness_probe

No

Object

Container service probe. See Table 36.

startup_probe

No

Object

Container startup probe. See Table 36.

command

No

Object

Startup command. See Table 23.

post_start

No

Object

Post-start processing. See Table 24.

pre_stop

No

Object

Pre-stop processing. See Table 24.

logs

No

Array of objects

Log collection. See Table 32.

storages

No

Array of objects

Storage. See Table 16.

security_context

No

Object

Security policy. See Table 30.

config_encryption

No

Object

This parameter is mandatory when the encryption key is configured for a multi-container component. See Table 52.

Table 48 ports

Parameter

Mandatory

Type

Description

name

Yes

String

Port name.

port

Yes

String

Access port.

target_port

Yes

String

Container port.

Table 49 update_strategy

Parameter

Mandatory

Type

Description

type

No

String

Component upgrade policy. Options:

  • RollingUpdate (default): New pods are created gradually, and then old pods are deleted.
  • Recreate: Old pods are deleted, and then new pods are created.

max_unavailable

No

  • String
  • Integer

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.

  • String (%): the maximum percentage of unavailable pods to the total number of pods.
  • Integer: the maximum number of unavailable pods.

max_surge

No

  • String
  • Integer

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.

  • String (%)
  • Integer

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.

Table 50 configs

Parameter

Mandatory

Type

Description

conifg_id

Yes

String

Unified configuration ID.

mount_path

Yes

String

Mount path.

Table 51 auto_lts_config

Parameter

Mandatory

Type

Description

enable

Yes

Boolean

Whether to enable automatic LTS configuration.

lts_log_path

No

Array of String

Access configuration log path.

Table 52 config_encryption

Parameter

Mandatory

Type

Description

key_id

Yes

String

User key ID in DEW.

Response

Parameter

Type

Description

name

String

Release task name.

description

String

Release task description.

model_version

Integer

Release task model.

Only 2 is supported, indicating the new model.

config_mode

String

Release task deployment mode.

  • ui
  • template

id

String

Release task ID.

fail_mode

String

Best effort policy.

  • stop
  • continue

enterprise_project_id

String

Enterprise project ID.

pipeline_declaration

List of Object

Stage parameters. This parameter is mandatory when config_mode is ui. See Table 53.

Table 53 pipeline_declaration

Parameter

Type

Description

sources

List of Object

Template package list. See Table 54.

stages

List of Object

Stage parameters. See Table 57.

Table 54 template_sources

Parameter

Type

Description

template_source

Object

Template package information. See Table 55.

input_values

Map<String, String>

Template package input information.

Table 55 template_source

Parameter

Type

Description

storage

String

Storage mode of the component template package.

  • devcloud: CodeArts release repository
  • obs
  • http: custom file address

url

String

Address of the component template package.

This parameter is valid only when the component template package storage mode is http.

http_username

String

Username.

This parameter is valid only when the component template package storage mode is http and the security authentication mode is username and password authentication.

http_password

String

Password.

This parameter is valid only when the component template package storage mode is http and the security authentication mode is username and password authentication.

http_headers

Array of objects

Request header. See Table 56.

This parameter is valid only when the component template package storage mode is http and the security authentication mode is custom header authentication.

Table 56 http_headers

Parameter

Type

Description

key

String

Request key.

value

String

Request value.

Table 57 stages

Parameter

Type

Description

name

String

Stage name, which is unique in a release task.

display_name

String

Display name of a stage. If this parameter is left blank, the value is the same as the stage name.

task_group

Array of String

Task group. The parameters in the task group must correspond to the group_index field in Table 58.

tasks

Array of objects

Task parameters. See Table 58.

Table 58 tasks

Parameter

Type

Description

name

String

Task name, which is unique in a single stage.

display_name

String

Display name of a task. If this parameter is left blank, the value is the same as the task name.

order_index

Integer

Task execution sequence. Tasks with the same group_index value belong to the same task group. The execution sequence is unique in a task group.

group_index

String

Task group. If the task groups are the same, the tasks are in the same group. The value is the same as that of task_group in Table 57.

task_type_id

Object

Task execution parameters. See Table 59.

input

Object

Task execution parameter, which is determined based on the task type.

Table 59 task_type_id

Parameter

Type

Description

category

String

Task type.

  • Build
  • CheckPoint
  • Environment
  • Component
  • Application

type

String

Task execution type.

  • create
  • update
  • upsert: create or modify.
  • approval
Table 60 build

Parameter

Type

Description

name

String

Build task name.

id

String

Build task ID.

enterprise_project_id

String

Enterprise project ID of a build task.

Table 61 checkpoint

Parameter

Type

Description

mode

String

If this field is left blank, no person needs to be specified for approval.

  • all: If all approvers approve the application, the application is approved.
  • any: If any approver approves the application, the application is approved.

users

List of Object

Approver. If this parameter is left blank, no approver is required. See Table 62.

Table 62 users

Parameter

Type

Description

id

String

User ID.

label

String

User label, which is displayed on the frontend.

name

String

User name, which is displayed on the frontend.

Table 63 application

Parameter

Type

Description

name

String

Application name.

description

String

Application description.

enterprise_project_id

String

Enterprise project ID.

Table 64 component

Parameter

Type

Description

id

String

Application component ID.

name

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

String

Workload name.

labels

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 65.

runtime_stack

Object

Runtime. See Table 91. The value can be obtained from the response of the API for Querying a Technology Stack.

environment_id

String

Environment ID.

description

String

Description.

The value can contain up to 128 characters.

source

Object

Source of the code or software package. See Table 92.

build

Object

Component building. This parameter is mandatory when the component is deployed in containers and no image is used. For details, see Table 93.

limit_cpu

Number

Maximum CPU limit. Unit: core.

limit_memory

Number

Maximum memory size. Unit: GiB.

request_cpu

Number

Requested CPU resources. Unit: core.

request_memory

Number

Requested memory. Unit: GiB.

version

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

Array of objects

Environment variable list. See Table 89.

replica

Integer

Number of instances.

storages

Array of objects

Storage. See Table 66.

deploy_strategy

Object

Component deployment. See Table 69.

command

Object

Startup command. See Table 73.

post_start

Object

Post-start processing. See Table 74.

pre_stop

Object

Pre-stop processing. See Table 74.

mesher

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 75.

timezone

String

Time zone where the component runs.

jvm_opts

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

Object

Tomcat parameter. This parameter is valid when you use the Tomcat technology stack. See Table 76.

host_aliases

Array of objects

Host alias. See Table 77.

dns_policy

String

DNS policy.

  • Default: inherits the domain name resolution configuration of the node where the pod is located.
  • ClusterFirst: adds the domain name resolution configuration.
  • ClusterFirstWithHostNet: takes effect only for pods running in hostNetWork mode.
  • None: replaces the domain name resolution policy.

dns_config

Object

DNS configuration. See Table 78.

workload_kind

String

Workload type.

  • deployment
  • statefulset
  • daemonset

security_context

Object

Security policy. See Table 80.

logs

Array of objects

Log collection. See Table 82.

custom_metric

Object

Custom metrics. See Table 83.

affinity

Array of objects

Affinity. See Table 84.

anti_affinity

Array of objects

Anti-affinity. See Table 84.

liveness_probe

Object

Component liveness probe. See Table 86.

readiness_probe

Object

Component service probe. See Table 86.

startup_probe

Object

Component startup probe. See Table 86.

refer_resources

Array of objects

Associated resource. See Table 87.

external_accesses

Array of Objects

External access. See Table 95.

tolerations

Array of Objects

Tolerance policy. See Table 96.

container_name

String

Container name.

update_strategy

Object

Component upgrade strategy. See Table 99.

multi_containers

Array of Objects

Multi-container configuration. See Table 97.

service_name

String

Service name configured for the inter-instance discovery of a StatefulSet.

ports

Array of Objects

Port configured for the inter-instance discovery of a StatefulSet.

workload_content

String

Workload content.

configs

Array of Objects

Unified component configuration. See Table 50.

config_mode

String

Workload configuration mode.

enable_sermant_injection

Boolean

Whether to enable Sermant.

enable_sermant_spring_register

Boolean

Whether Spring Cloud Huawei microservices need to be registered with registry centers through Sermant.

enable_sermant_dubbo_register

Boolean

Whether Dubbo microservices need to be registered with registry centers through Sermant.

enable_sermant_config

Boolean

Whether to enable the Sermant dynamic configuration plug-in.

cell_id

String

Deployment cell ID.

swimlane_id

String

Lane ID.

sermantAgentInjectActionFlag

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

Map<String, String>

Uses a compressed package to deploy component configuration items in the VM environment.

image_pull_secrets

Array of String

List of image pull secrets.

auto_lts_config

Object

Automatic LTS configuration. See Table 51.

config_encryption

Object

This parameter is mandatory when the encryption key is configured for a single-container component. See Table 52.

Table 65 labels

Parameter

Type

Description

key

String

Label name.

value

String

Label value.

Table 66 storages

Parameter

Type

Description

type

String

Data storage type.

  • HostPath: host path for local disk mounting.
  • EmptyDir: temporary directory for local disk mounting.
  • ConfigMap: configuration item for local disk mounting.
  • Secret: secret for local disk mounting.
  • PersistentVolumeClaim: cloud storage mounting.

name

String

Name of the storage disk.

parameters

Object

For details about the parameters of each data storage type, see Table 67.

mounts

Array of objects

Mount path of data storage. See Table 68.

Table 67 component_storage_parameters

Parameter

Type

Description

path

String

Host path. This parameter is applicable to the HostPath storage type. This parameter is mandatory when type is set to HostPath.

name

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

Integer

Mounting permission. The value is in decimal format. Example: 384. This parameter is applicable to ConfigMap and secret storage.

medium

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.

Table 68 mounts

Parameter

Type

Description

path

String

Mount path.

sub_path

String

Subpath of the mount path.

read_only

Boolean

Read-only or not.

Table 69 deploy_strategy

Parameter

Type

Description

type

String

Deployment type.

  • OneBatchRelease
  • RollingRelease
  • GrayRelease

rolling_release

Object

Rolling deployment parameter, which is mandatory when type is set to RollingRelease. For details, see Table 70.

gray_release

Object

Dark launch upgrade parameter, which is mandatory when type is set to GrayRelease. For details, see Table 71.

Table 70 rolling_release

Parameter

Type

Description

batches

Integer

Deployment batches.

Table 71 gray_release

Parameter

Type

Description

type

String

Dark launch policy.

  • WEIGHT: dark launch by traffic.
  • CONTENT: dark launch by content.

first_batch_weight

Integer

Proportion of first-batch dark launch traffic. This parameter is mandatory when type is set to WEIGHT.

first_batch_replica

Integer

Number of first-batch dark launch instances. This parameter is mandatory when type is set to WEIGHT.

remaining_batch

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

Integer

Deployment mode.

  • 1: The upstream is a microservice gateway.
  • 3: The upstream is a microservice.
  • 4: The upstream is a load balancer.

replica_surge_mode

String

Mode of adding a dark launch instance. This parameter is mandatory when type is set to CONTENT.

  • MIRROR: blue-green.
  • EXTRA: canary (increase, then decrease)
  • NOSURGE: canary (decrease, then increase)

rule_match_mode

String

Effective mode of a dark launch rule. This parameter is mandatory when type is set to CONTENT.

  • ALL: All conditions are met.
  • ANY: Any condition is met.

rules

Object

Dark launch rule. See Table 72. This parameter is mandatory when type is set to CONTENT.

Table 72 gray_rules

Parameter

Type

Description

type

String

Match type. Currently, only HEADER is supported.

key

String

Parameter name.

value

String

Condition value.

condition

String

Condition type.

  • EQUAL
  • MATCH
  • IN: enumeration
Table 73 command

Parameter

Type

Description

command

Array of String

Command for controlling container running.

args

Array of String

Parameter for controlling container running. Example: -port=8080. If there are multiple parameters, separate them by line breaks.

Table 74 component_lifecycle

Parameter

Type

Description

type

String

Processing method.

  • http
  • command

scheme

String

HTTP request type, which can be HTTP or HTTPS.

This parameter is valid only when type is set to http.

host

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

Integer

Port number. This parameter is valid only when type is set to http.

path

String

Request path. This parameter is valid only when type is set to http.

command

Array of String

Command list. This parameter is valid only when type is set to command.

Table 75 mesher

Parameter

Type

Description

port

Integer

Process listening port.

Table 76 tomcat_opt

Parameter

Type

Description

server_xml

String

  1. Listening port in the server.xml file will take effect even if it has been configured in public network access.
  2. The custom Tomcat configuration may conflict with the existing port. Check whether the custom port is occupied.
Table 77 host_aliases

Parameter

Type

Description

ip

String

IP address.

hostname

Array of String

Host alias.

Table 78 dns_config

Parameter

Type

Description

nameservers

Array of String

IP address list of the DNS server of the pod.

searches

Array of String

(Optional) List of DNS search domains used to search for host names in the pod.

options

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 79.

Table 79 options

Parameter

Type

Description

name

String

Operation name.

value

String

Operation value.

Table 80 security_context

Parameter

Type

Description

run_as_user

Integer

User for running containers. Example: To run containers as user root, set the user ID to 0.

run_as_group

Integer

Owner group specified for running container processes.

capabilities

Object

Capability set. See Table 81.

Table 81 capabilities

Parameter

Type

Description

add

Array of String

Grant the Linux permission to the running user.

drop

Array of String

Remove the Linux permission of the running user.

Table 82 logs

Parameter

Type

Description

log_path

String

Container log path.

rotate

String

Interval for dumping logs.

host_path

String

Mounted host path.

host_extend_path

String

Host extension path. By extending the host path, you can distinguish mounting from different containers in the same host path.

  • None: The extended path is not used.
  • PodUID: extend the host path based on the pod ID.
  • PodName: extend the host path based on the pod name.
  • PodUID/ContainerName: extend the host path based on the pod ID and container name.
  • PodName/ContainerName: extend the host path based on the pod name and container name.
Table 83 custom_metric

Parameter

Type

Description

path

String

Collection path. Example: /metrics.

port

Integer

Collection port. Example: 9090.

dimensions

String

Monitoring dimension. Example: cpu_usage,mem_usage.

Table 84 component_affinity

Parameter

Type

Description

kind

String

Object kind.

  • node
  • pod

condition

String

Policy type.

  • required: The requirement must be met.
  • preferred: The requirement is met as much as possible.

match_expressions

Array of objects

Scheduling policy rule. See Table 85.

weight

String

Weight.

  • The value is 100 when condition is set to required.
  • Enter an integer ranging from 1 to 100 when condition is set to preferred.
Table 85 match_expressions

Parameter

Type

Description

key

String

Condition key.

value

String

Condition value.

operation

String

Operation.

Table 86 component_probe

Parameter

Type

Description

type

String

Type. Value: http, tcp, or command.

delay

Integer

Interval between the startup and detection.

timeout

Integer

Detection timeout interval.

scheme

String

Request type. Value: HTTP or HTTPS. This parameter is valid only when type is set to http.

host

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

Integer

Port number. This parameter is valid only when type is set to http or tcp.

path

String

Request path. This parameter is valid only when type is set to http.

command

Array of String

Command list. This parameter is valid only when type is set to command.

Table 87 refer_resources

Parameter

Type

Description

id

String

Resource ID.

type

String

Resource type.

  • vpc
  • eip
  • elb
  • cce
  • ecs
  • dcs
  • rds
  • cse: ServiceComb engine.
  • nacos: registry/configuration center.
  • customServer
  • pvc
  • gaussdb
  • dms_rocketmq
  • css_es: Elasticsearch

parameters

Object

Resource parameters. See Table 88.

Table 88 refer_resource_parameter

Parameter

Type

Description

namespace

String

Namespace.

name

String

Resource name.

capacity

Integer

Storage capacity, in GiB.

type

String

Volume declaration type.

  • efs
  • obs
  • sfs
  • evs

class

String

Volume declaration subtype.

  • csi-sfsturbo: fixed when type is set to efs.
  • csi-obs: fixed when type is set to obs.
  • csi-nas: fixed when type is set to sfs.
  • csi-disk: fixed when type is set to evs.

obs_volume_type

String

OBS volume type. Default value: STANDARD.

access_mode

String

Storage volume access mode.

  • ReadWriteOnce: A volume can be mounted as read-write by a single node.
  • ReadWriteMany: A volume can be mounted as read-write by many nodes.

availableZone

String

AZ.

volume_type

String

Volume type.

Table 89 envs

Parameter

Type

Description

name

String

Variable name.

value

String

Variable value.

value_from

Object

Variable reference. See Table 90.

Table 90 value_from

Parameter

Type

Description

reference_type

String

Reference type.

  • configMapKey
  • secretKey

name

String

Name of the configuration item or secret.

key

String

Key of the configuration item or secret.

optional

Boolean

Whether the key of the configuration item or secret is mandatory.

Table 91 runtime_stack

Parameter

Type

Description

name

String

Technology stack name.

type

String

Technology stack type. Value: Java, Tomcat, Nodejs, Php, Docker, or Python.

  • For VM-based deployment, Java, Tomcat, and Nodejs are supported.
  • For container-based deployment, Java, Tomcat, Nodejs, Php, and Docker are supported.

version

String

Technology stack version.

deploy_mode

String

Deployment mode.

  • container
  • virtualmachine
Table 92 source

Parameter

Mandatory

Type

Description

kind

Yes

String

Component source kind.

  • code
  • package
  • image

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.

  • devcloud: CodeArts release repository
  • obs
  • http: custom file address
  • swr

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.

Table 93 build

Parameter

Type

Description

parameters

Map<String, Object>

This parameter is provided only when no ID is available during build creation. See Table 94.

Table 94 parameters

Parameter

Type

Description

build_cmd

String

Compilation command. By default:

  1. When build.sh exists in the root directory, the command is ./build.sh.
  2. When build.sh does not exist in the root directory, the command varies depending on the OS. Example:
    • Java and Tomcat: mvn clean package
    • Nodejs: npm build

dockerfile_path

String

Address of the Docker file. By default, the Docker file is in the root directory (./).

artifact_namespace

String

Build archive organization. Default value: cas_{project_id}.

cluster_id

String

ID of the cluster to be built.

node_label_selector

Map<String, String>

key: label key. value: label value.

environment_id

String

Environment ID.

Table 95 external_accesses

Parameter

Type

Description

protocol

String

External access type. Value: http or https.

address

String

External access address.

forward_port

Integer

External access port.

Table 96 tolerations

Parameter

Type

Description

key

String

Taint key.

operator

String

Operator.

  • Equal: matches the nodes with the specified taint key (mandatory) and value. If the taint value is left blank, all taints with the same key will be matched.
  • Exists: matches nodes with the specified taint key. In this case, the taint value cannot be specified. Not specifying any taint key means all taints are tolerated.

value

String

Taint value. This parameter is mandatory when operator is set to Equal.

effect

String

Taint policy.

  • NoScheduler: Only the NoSchedule taint is matched.
  • PreferNoSchedule: Only the PreferNoSchedule taint is matched.
  • NoExecute: Only the NoExecute taint is matched.
  • If this parameter is not set, all taint effects are matched.

toleration_seconds

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.

Table 97 multi_containers

Parameter

Type

Description

container_name

String

Container name.

source

Object

Source of the code or software package. See Table 92. In multi-container mode, only images are supported.

limit_cpu

Number

Maximum CPU limit. Unit: core.

limit_memory

Number

Maximum memory size. Unit: GiB.

request_cpu

Number

Requested CPU resources. Unit: core.

request_memory

Number

Requested memory. Unit: GiB.

envs

Array of objects

Environment variable list. See Table 89.

liveness_probe

Object

Container liveness probe. See Table 86.

readiness_probe

Object

Container service probe. See Table 86.

startup_probe

Object

Container startup probe. See Table 86.

command

Object

Startup command. See Table 73.

post_start

Object

Post-start processing. See Table 74.

pre_stop

Object

Pre-stop processing. See Table 74.

logs

Array of objects

Log collection. See Table 82.

storages

Array of objects

Storage. See Table 66.

security_context

Object

Security policy. See Table 80.

config_encryption

Object

This parameter is mandatory when the encryption key is configured for a multi-container component. See Table 52.

Table 98 ports

Parameter

Type

Description

name

String

Port name.

port

String

Access port.

target_port

String

Container port.

Table 99 update_strategy

Parameter

Type

Description

type

String

Component upgrade policy. Options:

  • RollingUpdate (default): New pods are created gradually, and then old pods are deleted.
  • Recreate: Old pods are deleted, and then new pods are created.

max_unavailable

  • String
  • Integer

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.

  • String (%): the maximum percentage of unavailable pods to the total number of pods.
  • Integer: the maximum number of unavailable pods.

max_surge

  • String
  • Integer

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.

  • String (%)
  • Integer

termination_period_seconds

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

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

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

Integer

Maximum number of pods to retain. That is, the number of old pods to retain to allow rollback. The default value is 10.

Table 100 configs

Parameter

Type

Description

conifg_id

String

Unified configuration ID.

mount_path

String

Mount path.

Table 101 auto_lts_config

Parameter

Type

Description

enable

Boolean

Whether to enable automatic LTS configuration.

lts_log_path

Array of String

Access configuration log path.

Table 102 config_encryption

Parameter

Type

Description

key_id

String

User key ID in DEW.

Example Request

Modify release task release-template.

{
    "model_version": 2,
    "name": "release-template",
    "config_mode": "template",
    "description": "",
    "enterprise_project_id": "0",
    "sources": [
        {
            "template_source": {
                "storage": "obs",
                "url": "obs://obs-zyh/create-component.zip",
                "http_username": "",
                "http_password": "",
                "http_headers": []
            },
            "input_values": {
                "env_name": "demo",
                "image1": "swr.ap-southeast-1.myhuaweicloud.com/cse/java-cce:v3",
                "application_id": "demo",
                "component_name1": "demo",
                "cce_id": "demo"
            }
        }
    ]
}

Example Response

{
    "id": "4105b37a-947e-4aca-90d8-cec7c04c6f38",
    "enterprise_project_id": "0",
    "name": "release-gn7mre11",
    "enterprise_project": "default",
    "model_version": 2,
    "creator": "zhangyuhao-3",
    "status": null,
    "revisor": "zhangyuhao-3",
    "create_at": 1739865312582,
    "update_at": 1739865967776,
    "fail_mode": "stop",
    "strategy_type": 0,
     "description: "test",
    "pipeline_declaration": {  
        "stages": [
            {
                "id": 15,
                "name": "75foki",
                "approval_type": 0,
                "display_name": "Stage"
                "type": null,
                "pipeline_id": null,
                "order_index": 0,
                "status": null,
                "task_group": [
                    "0"
                ],
                "tasks": [
                    {
                        "id": 17,
                        "name": "bkdi55",
                        "display_name": "Create application-187",
                        "task_type_id": {
                            "category": "Application",
                            "owner": null,
                            "provider": null,
                            "type": "upsert"
                        },
                        "input": {
                            "displayName": "Create application-187",
                            "originalName": "bkdi55",
                            "name": "xxz",
                            "description": "",
                            "enterprise_project_id": "0",
                            "checked": true
                        },
                        "output": {},
                        "status": null,
                        "order_index": 0,
                        "skipped": false,
                        "group_index": "0",
                        "delay_time": 0,
                        "error_details": null,
                        "stage_name": "75foki"
                    }
                ]
            }
        ],
        "config_mode": "ui"
    }
}

Status Code

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Code

See ServiceStage Error Codes.