Updated on 2026-04-10 GMT+08:00

Editing a Release Task

Function

This API is used to edit a release task.

Authorization Information

Each account has all of the permissions required to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the permission listed below is required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    servicestage:pipeline:modify

    write

    pipeline *

    -

    servicestage:pipeline:execute

    -

URI

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

Table 1 Path parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

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

Constraints

N/A

Range

N/A

Default Value

N/A

pipeline_id

Yes

String

Definition

Release task ID. See Obtaining the Release Task List.

Constraints

N/A

Range

N/A

Default Value

N/A

Request

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Definition

Message body type (or format).

Constraints

N/A

Range

application/json;charset=utf8

Default Value

N/A

X-Auth-Token

Yes

String

Definition

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.

Constraints

N/A

Range

N/A

Default Value

N/A

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

Array of objects

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.

stages

No

Array of objects

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

Definition

Request key.

Range

N/A

Default Value

N/A

value

Yes

String

Definition

Request value.

Range

N/A

Default Value

N/A

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 strings

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

tasks

Yes

Array of objects

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 job name.

id

Yes

String

Build job ID.

enterprise_project_id

No

String

Enterprise project ID of a build job.

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

Array of objects

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.

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
  • job

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. For details, see Table 48.

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 strings

List of image pull secrets.

auto_lts_config

No

Object

Automatic LTS configuration. See Table 103.

config_encryption

No

Object

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

task_setting

No

Object

Task settings for a job workload. See Table 53.

Table 15 labels

Parameter

Mandatory

Type

Description

key

Yes

String

Definition

Label name.

Range

The value contains 1 to 36 characters, including digits, letters, underscores (_), or hyphens (-).

NOTE:

The value of Key cannot be the built-in app, casid, or version of the system. Otherwise, an error will be reported during component creation and deployment.

Default Value

N/A

value

Yes

String

Definition

Label value.

Range

The value contains 0 to 43 characters, including digits, letters, underscores (_), periods (.), or hyphens (-).

Default Value

N/A

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

Definition

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

Range

N/A

Default Value

N/A

name

No

String

Definition

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.

Range

N/A

Default Value

N/A

default_mode

No

Integer

Definition

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

Range

N/A

Default Value

N/A

medium

No

String

Definition

This parameter is applicable to EmptyDir storage.

Range

  • If it is not specified, the default disk medium is used.
  • If it is set to memory, memory storage is enabled.

Default Value

N/A

Table 18 mounts

Parameter

Mandatory

Type

Description

path

Yes

String

Definition

Application path to which the data storage is mounted. Example: /tmp.

Range

N/A

Default Value

N/A

sub_path

Yes

String

Definition

Subpath of the mount path.

Range

N/A

Default Value

N/A

read_only

Yes

Boolean

Definition

Read-only or not.

Range

  • true: read-only.
  • false: read and write. You can modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.

Default Value

N/A

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

Definition

Deployment batches.

Range

N/A

Default Value

N/A

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

Definition

Match type.

Range

HEADER: request header

Default Value

N/A

key

Yes

String

Definition

Parameter name.

Range

N/A

Default Value

N/A

value

Yes

String

Definition

Condition value.

Range

N/A

Default Value

N/A

condition

Yes

String

Definition

Condition type.

Range

  • EQUAL
  • MATCH
  • IN: enumeration

Default Value

N/A

Table 23 command

Parameter

Mandatory

Type

Description

command

No

Array of strings

Definition

Command for controlling container running.

Range

N/A

Default Value

N/A

args

No

Array of strings

Definition

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

Range

N/A

Default Value

N/A

Table 24 component_lifecycle

Parameter

Mandatory

Type

Description

type

Yes

String

Definition

Processing method.

Range

  • http
  • command

Default Value

N/A

scheme

No

String

Definition

HTTP request type.

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

Range

  • HTTP
  • HTTPS

Default Value

N/A

host

No

String

Definition

User-defined IP address.

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

Range

N/A

Default Value

Pod IP address.

port

No

Integer

Definition

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

Range

N/A

Default Value

N/A

path

No

String

Definition

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

Range

N/A

Default Value

N/A

command

No

Array of strings

Definition

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

Range

N/A

Default Value

N/A

Table 25 mesher

Parameter

Mandatory

Type

Description

port

Yes

Integer

Definition

Process listening port.

Range

N/A

Default Value

N/A

Table 26 tomcat_opt

Parameter

Mandatory

Type

Description

server_xml

Yes

String

Definition

  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.

Range

N/A

Default Value

N/A

Table 27 host_aliases

Parameter

Mandatory

Type

Description

ip

Yes

String

Definition

IP address.

Range

N/A

Default Value

N/A

hostnames

Yes

Array of strings

Definition

Host alias.

Range

N/A

Default Value

N/A

Table 28 dns_config

Parameter

Mandatory

Type

Description

nameservers

No

Array of strings

IP address list of the DNS server of the pod.

searches

No

Array of strings

(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

Definition

Operation name.

Range

N/A

Default Value

N/A

value

No

String

Definition

Operation value.

Range

N/A

Default Value

N/A

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 strings

Definition

Grant the Linux permission to the running user.

Range

N/A

Default Value

N/A

drop

No

Array of strings

Definition

Remove the Linux permission of the running user.

Range

N/A

Default Value

N/A

Table 32 logs

Parameter

Mandatory

Type

Description

log_path

Yes

String

Definition

Container log path.

Range

N/A

Default Value

N/A

rotate

Yes

String

Definition

Interval for dumping logs.

Range

N/A

Default Value

N/A

host_path

Yes

String

Definition

Mounted host path.

Range

N/A

Default Value

N/A

host_extend_path

Yes

String

Definition

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

Range

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

Default Value

N/A

Table 33 custom_metric

Parameter

Mandatory

Type

Description

path

Yes

String

Definition

Collection path. Example: /metrics.

Range

N/A

Default Value

N/A

port

Yes

Integer

Definition

Collection port. Example: 9090.

Range

N/A

Default Value

N/A

dimensions

Yes

String

Definition

Monitoring dimension. Example: cpu_usage,mem_usage.

Range

N/A

Default Value

N/A

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

Definition

Key of the match tag.

Range

N/A

Default Value

N/A

operation

Yes

String

Definition

Match condition.

Range

N/A

Default Value

N/A

value

Yes

String

Definition

Value of the match tag.

Range

N/A

Default Value

N/A

Table 36 component_probe

Parameter

Mandatory

Type

Description

type

Yes

String

Definition

Type.

Range

  • HTTP
  • tcp
  • command

Default Value

N/A

delay

Yes

Integer

Definition

Interval between the startup and detection.

Range

N/A

Default Value

N/A

timeout

Yes

Integer

Definition

Detection timeout interval.

Range

N/A

Default Value

N/A

scheme

No

String

Definition

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

Range

  • HTTP
  • HTTPS

Default Value

N/A

host

No

String

Definition

User-defined IP address. This parameter is valid only when type is set to http.

Range

N/A

Default Value

Pod IP address.

port

No

Integer

Definition

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

Range

N/A

Default Value

N/A

path

No

String

Definition

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

Range

N/A

Default Value

N/A

command

No

Array of strings

Definition

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

Range

N/A

Default Value

N/A

Table 37 refer_resources

Parameter

Mandatory

Type

Description

id

Yes

String

Resource ID.

type

Yes

String

Resource type.

  • elb
  • cce
  • ecs
  • as
  • cse: ServiceComb engine
  • nacos: registry/configuration center
  • dcs
  • rds
  • gaussdb
  • dms_rocketmq
  • customServer
  • pvc
  • css_es: Elasticsearch
  • custom_k8s: custom Kubernetes cluster

parameters

No

Object

Resource parameters. See Table 38.

Table 38 refer_resource_parameter

Parameter

Mandatory

Type

Description

namespace

No

String

Definition

Namespace.

Range

N/A

Default Value

N/A

name

No

String

Definition

Resource name.

Range

N/A

Default Value

N/A

capacity

No

Integer

Definition

Storage capacity, in GiB.

Range

N/A

Default Value

N/A

type

No

String

Definition

Volume declaration type.

Range

  • efs
  • obs
  • sfs
  • evs

Default Value

N/A

class

No

String

Definition

Volume declaration subtype.

Range

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

Default Value

N/A

obs_volume_type

No

String

Definition

OBS volume type.

Range

  • STANDARD: Standard storage class. It features low access latency and high throughput and is applicable to storing frequently-accessed (multiple times per month) or small objects (< 1 MB) requiring fast response.
  • WARM: used for storing data that is semi-frequently accessed (fewer than 12 times a year) but becomes instantly available when needed.
  • COLD: used for storing rarely accessed (once a year) data.

Default Value

STANDARD

access_mode

No

String

Definition

Storage volume access mode.

Range

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

Default Value

N/A

availableZone

No

String

Definition

AZ.

Range

N/A

Default Value

N/A

volume_type

No

String

Definition

Volume type.

Range

  • SATA: common I/O disk
  • SAS: high I/O disk
  • SSD: ultra-high I/O disk

Default Value

N/A

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

Definition

Reference type.

Range

  • configMapKey
  • secretKey

Default Value

N/A

name

Yes

String

Definition

Name of the configuration item or secret.

Range

N/A

Default Value

N/A

key

No

String

Definition

Key of the configuration item or secret.

Range

N/A

Default Value

N/A

optional

No

Boolean

Definition

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

Range

  • true: yes
  • false: no

Default Value

N/A

Table 41 runtime_stack

Parameter

Mandatory

Type

Description

name

Yes

String

Definition

Technology stack name.

Range

N/A

Default Value

N/A

type

Yes

String

Definition

Technology stack type.

Range

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

Default Value

N/A

version

Yes

String

Definition

Technology stack version.

Range

N/A

Default Value

N/A

deploy_mode

Yes

String

Definition

Deployment mode.

Range

  • container
  • virtualmachine

Default Value

N/A

Table 42 source

Parameter

Mandatory

Type

Description

kind

Yes

String

Definition

Component source kind.

Range

  • code
  • package
  • image

Default Value

N/A

version

No

String

Definition

Version number.

Range

N/A

Default Value

N/A

url

No

String

Definition

Package address. This parameter is mandatory when kind is set to package or image.

Range

N/A

Default Value

N/A

storage

No

String

Definition

Storage mode. This parameter is mandatory when kind is set to package or image.

Range

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

Default Value

N/A

http_username

No

String

Definition

Username. This parameter is mandatory when storage is set to http. Username and password authentication is supported.

Range

N/A

Default Value

N/A

http_password

No

String

Definition

Password. This parameter is mandatory when storage is set to http. Username and password authentication is supported.

Range

N/A

Default Value

N/A

http_command

No

String

Definition

Address of the custom software package. This parameter is mandatory when storage is set to http.

Range

N/A

Default Value

N/A

http_headers

No

Map<String, String>

Definition

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

Definition

Authentication mode.

Range

  • iam
  • none

Default Value

iam

repo_auth

No

String

Definition

Authorization name, which can be obtained from the authorization list. For details, see Obtaining a Git Repository Authorization List.

Range

N/A

Default Value

N/A

repo_namespace

No

String

Definition

Namespace of the code repository.

Range

N/A

Default Value

N/A

repo_ref

No

String

Definition

Code branch or tag

Range

N/A

Default Value

master

repo_type

No

String

Definition

Code repository.

Range

  • GitHub: open-source code repository
  • GitLab: open-source code repository
  • Bitbucket: source code hosting website

Default Value

N/A

web_url

No

String

Definition

Code redirection URL. Example: https://github.com/example/demo.git.

Range

N/A

Default Value

N/A

repo_url

No

String

Definition

Code repository URL. Example: https://github.com/example/demo.git.

Range

N/A

Default Value

N/A

commit_id

No

String

Definition

In the code repository, commit ID is the unique identifier of each commit and is used to identify and reference a commit.

Range

The value contains 8 to 40 characters and starts with a lowercase letter or digit.

Default Value

N/A

Table 43 build

Parameter

Mandatory

Type

Description

parameters

No

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

Definition

Compilation command.

Range

N/A

Default Value

  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
    • Node.js: npm build

dockerfile_path

No

String

Definition

Address of the Docker file.

Range

N/A

Default Value

root directory (./)

artifact_namespace

No

String

Definition

Build archive organization.

Range

N/A

Default Value

cas_{project_id}

cluster_id

Yes

String

Definition

ID of the cluster to be built.

Range

N/A

Default Value

N/A

node_label_selector

No

Map<String, String>

Definition

key: label key. value: label value.

environment_id

No

String

Definition

Environment ID. See Obtaining All Environments.

Range

N/A

Default Value

N/A

Table 45 external_accesses

Parameter

Mandatory

Type

Description

protocol

No

String

Definition

External access type.

Range

  • http
  • https

Default Value

N/A

address

No

String

Definition

External access address.

Range

N/A

Default Value

N/A

forward_port

No

Integer

Definition

External access port.

Range

N/A

Default Value

N/A

Table 46 tolerations

Parameter

Mandatory

Type

Description

key

No

String

Definition

Taint key.

Range

N/A

Default Value

N/A

operator

No

String

Definition

Operator.

Range

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

Default Value

N/A

value

No

String

Definition

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

Range

N/A

Default Value

N/A

effect

No

String

Definition

Taint policy.

Range

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

Default Value

N/A

toleration_seconds

No

Integer

Definition

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.

Range

N/A

Default Value

N/A

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

Definition

Port name.

Range

N/A

Default Value

N/A

port

Yes

String

Definition

Access port.

Range

N/A

Default Value

N/A

target_port

Yes

String

Definition

Container port.

Range

N/A

Default Value

N/A

Table 49 update_strategy

Parameter

Mandatory

Type

Description

type

No

String

Definition

Component upgrade policy.

Range

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

Default Value

RollingUpdate

max_unavailable

No

  • String
  • Integer

Definition

Maximum number of unavailable pods. That is, the number or percentage of pods that can be deleted based on the value of replica.

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

Constraints

This parameter can be set only when workload_kind is set to deployment.

Range

N/A

Default Value

25%

max_surge

No

  • String
  • Integer

Definition

Maximum surge. That is, the number or percentage of pods allowed based on the value of replica.

  • String (%)
  • Integer

Constraints

This parameter can be set only when workload_kind is set to deployment.

Range

N/A

Default Value

25%

termination_period_seconds

No

Integer

Definition

Scale-in time window. That is, the time window for executing commands before a workload stops.

Range

N/A

Default Value

30

min_ready_seconds

No

Integer

Definition

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.

Range

N/A

Default Value

0

progress_deadline_seconds

No

Integer

Definition

Maximum upgrade duration. That is, the time (in seconds) the system waits for before reporting a component upgrade failure.

Constraints

If this parameter is specified, the value of this parameter must be greater than that of min_ready_seconds.

Range

N/A

Default Value

N/A

revision_history_limit

No

Integer

Definition

Maximum number of pods to retain. That is, the number of old pods to retain to allow rollback.

Range

N/A

Default Value

10

Table 50 configs

Parameter

Mandatory

Type

Description

config_id

Yes

String

Definition

Unified configuration ID.

Range

N/A

Default Value

N/A

mount_path

Yes

String

Definition

Mount path.

Range

N/A

Default Value

N/A

Table 51 auto_lts_config

Parameter

Mandatory

Type

Description

enable

Yes

Boolean

Definition

Whether to enable automatic LTS configuration.

Range

  • true: enabled
  • false: disabled

Default Value

N/A

lts_log_path

No

Array of strings

Definition

Access configuration log path.

Range

N/A

Default Value

N/A

Table 52 config_encryption

Parameter

Mandatory

Type

Description

key_id

Yes

String

Definition

User key ID in DEW.

Range

N/A

Default Value

N/A

Table 53 task_setting

Parameter

Mandatory

Type

Description

parallelism

Yes

Integer

Definition

Number of parallel jobs.

Range

N/A

Default Value

N/A

active_deadline_seconds

No

Integer

Definition

Timeout interval, in seconds.

Range

N/A

Default Value

N/A

completion_mode

Yes

String

Definition

Completion mode.

Range

  • NonIndexed
  • Indexed

Default Value

N/A

suspend

Yes

Boolean

Definition

Whether to suspend a job.

The job's execution will be suspended if you enable this option, and resumed after you disable it.

Range

  • true: yes
  • false: no

Default Value

false (The task is executed immediately after being created by default.)

Response

Table 54 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

Array of objects

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

Table 55 pipeline_declaration

Parameter

Type

Description

sources

Array of objects

Template package list. See Table 56.

stages

Array of objects

Stage parameters. See Table 59.

Table 56 template_sources

Parameter

Type

Description

template_source

Object

Template package information. See Table 57.

input_values

Map<String, String>

Template package input information.

Table 57 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 58.

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

Table 58 http_headers

Parameter

Type

Description

key

String

Definition

Request key.

Range

N/A

value

String

Definition

Request value.

Range

N/A

Table 59 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 strings

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

tasks

Array of objects

Task parameters. See Table 60.

Table 60 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 59.

task_type_id

Object

Task execution parameters. See Table 61.

input

Object

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

Table 61 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 62 build

Parameter

Type

Description

name

String

Build job name.

id

String

Build job ID.

enterprise_project_id

String

Enterprise project ID of a build job.

Table 63 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

Array of objects

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

Table 64 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 65 application

Parameter

Type

Description

name

String

Application name.

description

String

Application description.

enterprise_project_id

String

Enterprise project ID.

Table 66 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 67.

runtime_stack

Object

Runtime. See Table 93. 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 94.

build

Object

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

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

replica

Integer

Number of instances.

storages

Array of objects

Storage. See Table 68.

deploy_strategy

Object

Component deployment. See Table 71.

command

Object

Startup command. See Table 75.

post_start

Object

Post-start processing. See Table 76.

pre_stop

Object

Pre-stop processing. See Table 76.

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

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

host_aliases

Array of objects

Host alias. See Table 79.

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

workload_kind

String

Workload type.

  • deployment
  • statefulset
  • daemonset
  • job

security_context

Object

Security policy. See Table 82.

logs

Array of objects

Log collection. See Table 84.

custom_metric

Object

Custom metrics. See Table 85.

affinity

Array of objects

Affinity. See Table 86.

anti_affinity

Array of objects

Anti-affinity. See Table 86.

liveness_probe

Object

Component liveness probe. See Table 88.

readiness_probe

Object

Component service probe. See Table 88.

startup_probe

Object

Component startup probe. See Table 88.

refer_resources

Array of objects

Associated resource. See Table 89.

external_accesses

Array of objects

External access. See Table 97.

tolerations

Array of objects

Tolerance policy. See Table 98.

container_name

String

Container name.

update_strategy

Object

Component upgrade strategy. See Table 101.

multi_containers

Array of objects

Multi-container configuration. See Table 99.

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. For details, see Table 100.

workload_content

String

Workload content.

configs

Array of objects

Unified component configuration. See Table 102.

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 strings

List of image pull secrets.

auto_lts_config

Object

Automatic LTS configuration. See Table 103.

config_encryption

Object

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

task_setting

Object

Task settings for a job workload. See Table 105.

Table 67 labels

Parameter

Type

Description

key

String

Definition

Label name.

Range

N/A

value

String

Definition

Label value.

Range

N/A

Table 68 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 69.

mounts

Array of objects

Mount path of data storage. See Table 70.

Table 69 component_storage_parameters

Parameter

Type

Description

path

String

Definition

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

Range

N/A

name

String

Definition

Name of a configuration item, secret, or PVC, which is applicable to ConfigMap, Secret, or PersistentVolumeClaim storage, respectively.

Range

N/A

default_mode

Integer

Definition

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

Range

N/A

medium

String

Definition

This parameter is applicable to the EmptyDir storage type. Example: memory.

Range

N/A

Table 70 mounts

Parameter

Type

Description

path

String

Definition

Mount path.

Range

N/A

sub_path

String

Definition

Subpath of the mount path.

Range

N/A

read_only

Boolean

Definition

Read-only or not.

Range

  • true: read-only.
  • false: read and write. You can modify data volumes in the application path. To prevent data loss, newly written data will not be migrated during application migration.
Table 71 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 72.

gray_release

Object

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

Table 72 rolling_release

Parameter

Type

Description

batches

Integer

Deployment batches.

Table 73 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 74. This parameter is mandatory when type is set to CONTENT.

Table 74 gray_rules

Parameter

Type

Description

type

String

Definition

Match type.

Range

HEADER: request header

key

String

Definition

Parameter name.

Range

N/A

value

String

Definition

Condition value.

Range

N/A

condition

String

Definition

Condition type.

Range

  • EQUAL
  • MATCH
  • IN: enumeration
Table 75 command

Parameter

Type

Description

command

Array of strings

Definition

Command for controlling container running.

Range

N/A

args

Array of strings

Definition

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

Range

N/A

Table 76 component_lifecycle

Parameter

Type

Description

type

String

Definition

Processing method.

Range

  • http
  • command

scheme

String

Definition

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

Range

  • HTTP
  • HTTPS

host

String

Definition

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.

Range

N/A

port

Integer

Definition

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

Range

N/A

path

String

Definition

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

Range

N/A

command

Array of strings

Definition

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

Range

N/A

Table 77 mesher

Parameter

Type

Description

port

Integer

Definition

Process listening port.

Range

N/A

Table 78 tomcat_opt

Parameter

Type

Description

server_xml

String

Definition

  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.

Range

N/A

Table 79 host_aliases

Parameter

Type

Description

ip

String

Definition

IP address.

Range

N/A

hostname

Array of strings

Definition

Host alias.

Range

N/A

Table 80 dns_config

Parameter

Type

Description

nameservers

Array of strings

IP address list of the DNS server of the pod.

searches

Array of strings

(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 81.

Table 81 options

Parameter

Type

Description

name

String

Definition

Operation name.

Range

N/A

value

String

Definition

Operation value.

Range

N/A

Table 82 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 83.

Table 83 capabilities

Parameter

Type

Description

add

Array of strings

Definition

Grant the Linux permission to the running user.

Range

N/A

drop

Array of strings

Definition

Remove the Linux permission of the running user.

Range

N/A

Table 84 logs

Parameter

Type

Description

log_path

String

Definition

Container log path.

Range

N/A

rotate

String

Definition

Interval for dumping logs.

Range

N/A

host_path

String

Definition

Mounted host path.

Range

N/A

host_extend_path

String

Definition

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

Range

  • 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 85 custom_metric

Parameter

Type

Description

path

String

Definition

Collection path. Example: /metrics.

Range

N/A

port

Integer

Definition

Collection port. Example: 9090.

Range

N/A

dimensions

String

Definition

Monitoring dimension. Example: cpu_usage,mem_usage.

Range

N/A

Table 86 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 87.

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 87 match_expressions

Parameter

Type

Description

key

String

Definition

Key of the match tag.

Range

N/A

operation

String

Definition

Match condition.

Range

N/A

value

String

Definition

Value of the match tag.

Range

N/A

Table 88 component_probe

Parameter

Type

Description

type

String

Definition

Type.

Range

  • http
  • tcp
  • command

delay

Integer

Definition

Interval between the startup and detection.

Range

N/A

timeout

Integer

Definition

Detection timeout interval.

Range

N/A

scheme

String

Definition

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

Range

  • HTTP
  • HTTPS

host

String

Definition

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.

Range

N/A

port

Integer

Definition

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

Range

N/A

path

String

Definition

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

Range

N/A

command

Array of strings

Definition

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

Range

N/A

Table 89 refer_resources

Parameter

Type

Description

id

String

Resource ID.

type

String

Resource type.

  • elb
  • cce
  • ecs
  • as
  • cse: ServiceComb engine
  • nacos: registry/configuration center
  • dcs
  • rds
  • gaussdb
  • dms_rocketmq
  • customServer
  • pvc
  • css_es: Elasticsearch
  • custom_k8s: custom Kubernetes cluster

parameters

Object

Resource parameters. See Table 90.

Table 90 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.

  • STANDARD: Standard storage class. It features low access latency and high throughput and is applicable to storing frequently-accessed (multiple times per month) or small objects (< 1 MB) requiring fast response.
  • WARM: used for storing data that is semi-frequently accessed (fewer than 12 times a year) but becomes instantly available when needed.
  • COLD: used for storing rarely accessed (once a year) data.

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.

  • SATA: common I/O disk
  • SAS: high I/O disk
  • SSD: ultra-high I/O disk
Table 91 envs

Parameter

Type

Description

name

String

Variable name.

value

String

Variable value.

value_from

Object

Variable reference. See Table 92.

Table 92 value_from

Parameter

Type

Description

reference_type

String

Definition

Reference type.

Range

  • configMapKey
  • secretKey

name

String

Definition

Name of the configuration item or secret.

Range

N/A

key

String

Definition

Key of the configuration item or secret.

Range

N/A

optional

Boolean

Definition

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

Range

  • true: yes
  • false: no
Table 93 runtime_stack

Parameter

Type

Description

name

String

Definition

Technology stack name. Example: OpenJDK8.

Range

N/A

type

String

Definition

Technology stack type.

Range

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

version

String

Definition

Technology stack version. Example: 1.1.4.

Range

N/A

deploy_mode

String

Definition

Deployment mode.

Range

  • container
  • virtualmachine
Table 94 source

Parameter

Type

Description

kind

String

Definition

Component source kind.

Range

  • code
  • package
  • image

version

String

Definition

Version number.

Range

N/A

url

String

Definition

Package address. This parameter is mandatory when kind is set to package or image.

Range

N/A

storage

String

Definition

Storage mode.

Range

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

This parameter is mandatory when kind is set to package or image.

auth

String

Definition

Authentication mode.

Range

  • iam
  • none

repo_auth

String

Definition

Authorization name, which can be obtained from the authorization list. For details, see Obtaining a Git Repository Authorization List.

Range

N/A

repo_namespace

String

Definition

Namespace of the code repository.

Range

N/A

repo_ref

String

Definition

Code branch or tag. Default value: master.

Range

N/A

repo_type

String

Definition

Code repository.

Range

  • GitHub: open-source code repository
  • GitLab: open-source code repository
  • Bitbucket: source code hosting website

web_url

String

Definition

Code redirection URL. Example: https://github.com/example/demo.git.

Range

N/A

repo_url

String

Definition

Code repository URL. Example: https://github.com/example/demo.git.

Range

N/A

commit_id

String

Definition

In the code repository, commit ID is the unique identifier of each commit and is used to identify and reference a commit.

Range

The value contains 8 to 40 characters and starts with a lowercase letter or digit.

http_username

String

Definition

Username. This parameter is mandatory when storage is set to http. Username and password authentication is supported.

Range

N/A

http_password

String

Definition

Password. This parameter is mandatory when storage is set to http. Username and password authentication is supported.

Range

N/A

http_command

String

Definition

Address of the custom software package. This parameter is mandatory when storage is set to http.

Range

N/A

http_headers

Map<String, String>

Definition

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""}.

Range

N/A

Table 95 build

Parameter

Type

Description

parameters

Object

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

Table 96 parameters

Parameter

Type

Description

build_cmd

String

Definition

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

Range

N/A

dockerfile_path

String

Definition

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

Range

N/A

artifact_namespace

String

Definition

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

Range

N/A

cluster_id

String

Definition

ID of the cluster to be built.

Range

N/A

node_label_selector

Map<String, String>

Definition

key: label key. value: label value.

Range

N/A

environment_id

String

Definition

Environment ID.

Range

N/A

Table 97 external_accesses

Parameter

Type

Description

protocol

String

Definition

External access type.

Range

  • http
  • https

address

String

Definition

External access address.

Range

N/A

forward_port

Integer

Definition

External access port.

Range

N/A

Table 98 tolerations

Parameter

Type

Description

key

String

Definition

Taint key.

Range

N/A

operator

String

Definition

Operator.

Range

  • 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

Definition

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

Range

N/A

effect

String

Definition

Taint policy.

Range

  • 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

Definition

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.

Range

N/A

Table 99 multi_containers

Parameter

Type

Description

container_name

String

Container name.

source

Object

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

liveness_probe

Object

Container liveness probe. See Table 88.

readiness_probe

Object

Container service probe. See Table 88.

startup_probe

Object

Container startup probe. See Table 88.

command

Object

Startup command. See Table 75.

post_start

Object

Post-start processing. See Table 76.

pre_stop

Object

Pre-stop processing. See Table 76.

logs

Array of objects

Log collection. See Table 84.

storages

Array of objects

Storage. See Table 68.

security_context

Object

Security policy. See Table 82.

config_encryption

Object

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

Table 100 ports

Parameter

Type

Description

name

String

Definition

Port name.

Range

N/A

port

String

Definition

Access port.

Range

N/A

target_port

String

Definition

Container port.

Range

N/A

Table 101 update_strategy

Parameter

Type

Description

type

String

Definition

Component upgrade policy. Options:

Range

  • 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

Definition

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.

Range

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

max_surge

  • String
  • Integer

Definition

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.

Range

  • String (%)
  • Integer

termination_period_seconds

Integer

Definition

Scale-in time window. That is, the time window for executing commands before a workload stops. The default value is 30s.

Range

N/A

min_ready_seconds

Integer

Definition

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.

Range

N/A

progress_deadline_seconds

Integer

Definition

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.

Range

N/A

revision_history_limit

Integer

Definition

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

Range

N/A

Table 102 configs

Parameter

Type

Description

config_id

String

Definition

Unified configuration ID.

Range

N/A

mount_path

String

Definition

Mount path.

Range

N/A

Table 103 auto_lts_config

Parameter

Type

Description

enable

Boolean

Definition

Whether to enable automatic LTS configuration.

Range

  • true: enabled
  • false: disabled

lts_log_path

Array of strings

Definition

Access configuration log path.

Range

N/A

Table 104 config_encryption

Parameter

Type

Description

key_id

String

Definition

User key ID in DEW.

Range

N/A

Table 105 task_setting

Parameter

Type

Description

parallelism

Integer

Definition

Number of parallel jobs.

Range

N/A

active_deadline_seconds

Integer

Definition

Timeout interval, in seconds.

Range

N/A

completion_mode

String

Definition

Completion mode.

Range

  • NonIndexed
  • Indexed

suspend

Boolean

Definition

Whether to suspend a job.

By default, a job is executed immediately after being created.

The job's execution will be suspended if you enable this option, and resumed after you disable it.

Range

  • true: yes
  • false: no

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": ""
            },
            "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",
    "model_version": 2,
    "fail_mode": "stop",
    "description": "test",
    "pipeline_declaration": {  
        "stages": [
            {
                "name": "75foki",
                "display_name": "stage",
                "task_group": [
                    "0"
                ],
                "tasks": [
                    {
                        "name": "bkdi55",
                        "display_name": "create-application-187",
                        "task_type_id": {
                            "category": "Application",
                            "type": "upsert"
                        },
                        "input": {
                            "displayName": "create-application-187",
                            "originalName": "bkdi55",
                            "name": "xxz",
                            "description": "",
                            "enterprise_project_id": "0",
                            "checked": true
                        },
                        "order_index": 0,
                        "group_index": "0"
                    }
                ]
            }
        ]
    }
}

Status Code

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Code

See ServiceStage Error Codes.