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

Redeploying a Job Component

Function

This API is used to redeploy a job component that has been executed or failed.

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:app:modifyComponent

    write

    app *

    servicestage:app:modify

    • aom:discoveryRule:list
    • aom:discoveryRule:set
    • as:scalingConfig:create
    • as:scalingConfig:delete
    • as:scalingConfig:get
    • as:scalingConfig:list
    • as:scalingPolicy:get
    • as:scalingPolicy:list
    • as:scalingPolicy:update
    • cce:cluster:get
    • dcs:instance:get
    • dns:recordset:create
    • dns:recordset:delete
    • dns:recordset:get
    • ecs:cloudServers:get
    • elb:l7policies:get
    • elb:l7policies:list
    • elb:l7policies:update
    • elb:listeners:get
    • elb:listeners:list
    • elb:listeners:update
    • elb:members:get
    • elb:members:list
    • elb:members:update
    • rds:instance:get
    • vpc:addressGroups:get
    • vpc:networks:get
    • vpc:routeTables:get
    • vpc:securityGroupRules:get
    • vpc:securityGroups:get
    • vpc:subnets:get
    • vpc:subnets:get
    • vpc:vpcs:get

URI

PUT /v3/{project_id}/cas/applications/{application_id}/components/{component_id}/redeployment

Table 1 Path parameters

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

application_id

Yes

String

Definition

Application ID. See Obtaining All Applications.

Constraints

N/A

Range

N/A

Default Value

N/A

component_id

Yes

String

Definition

Component ID. See Obtaining All Components of an Application.

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

Definition

Application component name.

Constraints

This value cannot be modified.

Range

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.

Default Value

N/A

labels

No

Array of objects

Definition

Label. For container-deployed components, you can query a workload by label. For VM-deployed components, you can configure a label of the corresponding microservice name to use graceful startup and shutdown. See Table 4.

runtime_stack

Yes

Object

Definition

Runtime. This value cannot be modified. See Table 27. The value can be obtained from the response of the API for Querying a Technology Stack.

description

No

String

Definition

Description.

Range

Enter up to 128 characters.

source

Yes

Object

Definition

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

build

No

Object

Definition

Component build. See Table 29.

limit_cpu

No

Number

Definition

Maximum CPU limit. Unit: core.

Range

N/A

Default Value

N/A

limit_memory

No

Number

Definition

Maximum memory size. Unit: GiB.

Range

N/A

Default Value

N/A

request_cpu

No

Number

Definition

Requested CPU resources. Unit: core.

Range

N/A

Default Value

N/A

request_memory

No

Number

Definition

Requested memory. Unit: GiB.

Range

N/A

Default Value

N/A

version

Yes

String

Definition

Component version.

Range

The value can contain up to 32 characters. It needs to meet the following rule:

^([0-9]+)(\.[0-9]+){2,3}$

Default Value

N/A

envs

No

Array of objects

Definition

Environment variable list. See Table 25.

replica

Yes

Integer

Definition

Number of instances. This parameter can be modified only when the scaling function is used.

Range

N/A

Default Value

N/A

storages

No

Array of objects

Definition

Storage. See Table 5.

deploy_strategy

No

Object

Definition

Component deployment. See Table 8.

command

No

Object

Definition

Startup command. See Table 9.

post_start

No

Object

Definition

Post-start processing. See Table 10.

pre_stop

No

Object

Definition

Pre-stop processing. See Table 10.

mesher

No

Object

Definition

Multi-language access service mesh. This parameter is mandatory when Node.js is selected for the technology stack and the CSE engine is bound. See Table 11.

timezone

No

String

Definition

Time zone where the component runs. Example: Asia/Shanghai.

Range

N/A

Default Value

N/A

jvm_opts

No

String

Definition

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.

Range

N/A

Default Value

N/A

tomcat_opts

No

Object

Definition

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

host_aliases

No

Array of objects

Definition

Host alias. See Table 13.

dns_policy

No

String

Definition

DNS policy.

Range

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

Default Value

N/A

dns_config

No

Object

Definition

DNS configuration. See Table 14.

workload_kind

No

String

Definition

Workload type. The value is fixed at job.

Range

N/A

Default Value

N/A

security_context

No

Object

Definition

Security policy. See Table 16.

logs

No

Array of objects

Definition

Log collection. See Table 18.

custom_metric

No

Object

Definition

Custom metrics. See Table 19.

affinity

No

Array of objects

Definition

Affinity. See Table 20.

anti_affinity

No

Array of objects

Definition

Anti-affinity. See Table 20.

liveness_probe

No

Object

Definition

Component liveness probe. See Table 22.

readiness_probe

No

Object

Definition

Component service probe. See Table 22.

startup_probe

No

Object

Definition

Component startup probe. See Table 22.

refer_resources

No

Array of objects

Definition

Associated resource. See Table 23.

external_accesses

No

Array of objects

Definition

External access. See Table 31.

container_name

No

String

Definition

Container name.

Range

N/A

Default Value

N/A

multi_containers

No

Array of objects

Definition

Multi-container configuration. See Table 33.

workload_content

No

String

Definition

Workload content.

Range

N/A

Default Value

N/A

configs

No

Array of objects

Definition

Unified component configuration. See Table 34.

config_mode

No

String

Definition

Workload configuration mode.

Range

The value is fixed at ui, indicating that the deployment is configured based on the UI.

Default Value

N/A

enable_sermant_injection

No

Boolean

Definition

Whether to enable Sermant.

Range

  • true: enabled
  • false: disabled

Default Value

N/A

enable_sermant_spring_register

No

Boolean

Definition

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

Range

  • true: yes
  • false: no

Default Value

N/A

enable_sermant_dubbo_register

No

Boolean

Definition

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

Range

  • true: yes
  • false: no

Default Value

N/A

enable_sermant_config

No

Boolean

Definition

Whether to enable the Sermant dynamic configuration plug-in.

Range

  • true: enabled
  • false: disabled

Default Value

N/A

cell_id

No

String

Definition

Deployment cell ID.

Range

N/A

Default Value

N/A

swimlane_id

No

String

Definition

Lane ID.

Range

N/A

Default Value

N/A

sermantAgentInjectActionFlag

No

Boolean

Definition

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

Range

N/A

Default Value

N/A

sys_config

No

Map<String, String>

Definition

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

image_pull_secrets

No

Array of strings

Definition

List of image pull secrets.

Range

N/A

Default Value

N/A

template_source

No

Object

Definition

Source of the component template package. See Table 35.

input_values

No

Map<String, String>

Definition

Template package input information.

auto_lts_config

No

Object

Definition

Automatic LTS configuration. See Table 32.

task_setting

No

Object

Definition

Task settings for a job workload. See Table 38.

vmapp_config_mode

No

String

Definition

Directory type of a VM-deployed component.

Range

  • system: built-in system configuration
  • custom_system: custom system configuration

Default Value

N/A

vmapp_config

No

Object

Definition

Directory configuration of a VM-deployed component. See Table 39.

Table 4 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 5 storages

Parameter

Mandatory

Type

Description

type

Yes

String

Definition

Data storage type.

Range

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

Default Value

N/A

name

Yes

String

Definition

Name of the storage disk.

Range

N/A

Default Value

N/A

parameters

Yes

Object

Definition

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

mounts

Yes

Array of objects

Definition

Mount path of data storage. See Table 7.

Table 6 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 7 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 8 deploy_strategy

Parameter

Mandatory

Type

Description

type

Yes

String

Definition

Deployment type.

Range

OneBatchRelease

Default Value

N/A

Table 9 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 10 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 11 mesher

Parameter

Mandatory

Type

Description

port

Yes

Integer

Definition

Process listening port.

Range

N/A

Default Value

N/A

Table 12 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 13 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 14 dns_config

Parameter

Mandatory

Type

Description

nameservers

No

Array of strings

Definition

IP address list of the DNS server of the pod.

Range

N/A

Default Value

N/A

searches

No

Array of strings

Definition

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

Range

N/A

Default Value

N/A

options

No

Array of objects

Definition

(Optional) List of objects. Each object may have a name (mandatory) and a value (optional). This property is merged into the options generated from the specified DNS policy. Duplicate entries will be deleted. See Table 15.

Table 15 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 16 security_context

Parameter

Mandatory

Type

Description

run_as_user

No

Integer

Definition

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

Range

N/A

Default Value

N/A

run_as_group

No

Integer

Definition

Owner group specified for running container processes.

Range

N/A

Default Value

N/A

capabilities

No

Object

Definition

Capability set. See Table 17.

Table 17 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 18 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 19 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 20 component_affinity

Parameter

Mandatory

Type

Description

kind

No

String

Definition

Object kind.

Range

  • node
  • pod

Default Value

N/A

condition

No

String

Definition

Policy type.

Range

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

Default Value

N/A

match_expressions

No

Array of objects

Definition

Scheduling policy rule. See Table 21.

weight

No

String

Definition

Weight.

Range

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

Default Value

N/A

topology_key

No

String

Definition

Topology key.

Range

N/A

Default Value

N/A

Table 21 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 22 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 23 refer_resources

Parameter

Mandatory

Type

Description

id

Yes

String

Definition

Resource ID.

Range

N/A

Default Value

N/A

type

Yes

String

Definition

Resource type.

Range

  • 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

Default Value

N/A

parameters

No

Object

Definition

Resource parameter, which is mandatory when type is cce. See Table 24.

Table 24 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 25 envs

Parameter

Mandatory

Type

Description

name

Yes

String

Definition

Variable name.

Range

N/A

Default Value

N/A

value

No

String

Definition

Variable value.

Range

N/A

Default Value

N/A

value_from

No

Object

Definition

Variable reference. See Table 26.

Table 26 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 27 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 28 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 29 build

Parameter

Mandatory

Type

Description

parameters

No

Object

Definition

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

Table 30 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 31 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 32 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 33 multi_containers

Parameter

Mandatory

Type

Description

container_name

Yes

String

Definition

Container name.

Range

N/A

Default Value

N/A

source

Yes

Object

Definition

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

limit_cpu

No

Number

Definition

Maximum CPU limit. Unit: core.

Range

N/A

Default Value

N/A

limit_memory

No

Number

Definition

Maximum memory size. Unit: GiB.

Range

N/A

Default Value

N/A

request_cpu

No

Number

Definition

Requested CPU resources. Unit: core.

Range

N/A

Default Value

N/A

request_memory

No

Number

Definition

Requested memory. Unit: GiB.

Range

N/A

Default Value

N/A

envs

No

Array of objects

Definition

Environment variable list. See Table 25.

liveness_probe

No

Object

Definition

Container liveness probe. See Table 22.

readiness_probe

No

Object

Definition

Container service probe. See Table 22.

startup_probe

No

Object

Definition

Container startup probe. See Table 22.

command

No

Object

Definition

Startup command. See Table 9.

post_start

No

Object

Definition

Post-start processing. See Table 10.

pre_stop

No

Object

Definition

Pre-stop processing. See Table 10.

logs

No

Array of objects

Definition

Log collection. See Table 18.

storages

No

Array of objects

Definition

Storage. See Table 5.

security_context

No

Object

Definition

Security policy. See Table 16.

Table 34 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 35 template_source

Parameter

Mandatory

Type

Description

storage

Yes

String

Definition

Storage mode of the component template package.

Range

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

Default Value

N/A

url

Yes

String

Definition

Address of the component template package.

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

Range

N/A

Default Value

N/A

http_username

No

String

Definition

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.

Range

N/A

Default Value

N/A

http_password

No

String

Definition

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.

Range

N/A

Default Value

N/A

http_headers

No

Array of objects

Definition

Request header. See Table 36.

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

Table 36 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 37 config_encryption

Parameter

Mandatory

Type

Description

key_id

Yes

String

Definition

User key ID in DEW.

Range

N/A

Default Value

N/A

Table 38 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.)

Table 39 vmapp_config

Parameter

Mandatory

Type

Description

run_as_user

Yes

String

Definition

Running user.

Range

N/A

Default Value

N/A

app_home

Yes

Object

Definition

Deployment directory settings. See Table 40.

log_home

Yes

Object

Definition

Log directory settings. See Table 40.

Table 40 log_config

Parameter

Mandatory

Type

Description

path

Yes

String

Definition

Directory setting path.

Range

N/A

Default Value

N/A

user

Yes

String

Definition

User to which the directory setting path belongs.

Range

N/A

Default Value

N/A

group

Yes

String

Definition

User group to which the directory setting path belongs.

Range

N/A

Default Value

N/A

mode

Yes

String

Definition

Permission on the directory setting path.

Range

N/A

Default Value

N/A

Response

Table 41 Response parameter

Parameter

Type

Description

job_id

String

Definition

Task ID.

Range

N/A

Example Request

Redeploy a job component named mycomponent and modify its job settings.

{
    "name": "mycomponent",
    "description": "",
    "labels": [
        {
            "key": "com-key",
            "value": "com-value"
        }
    ],
    "version": "2025.0323.15181",
    "runtime_stack": {
        "name": "OpenJDK8",
        "version": "1.1.1",
        "type": "Java",
        "deploy_mode": "virtualmachine"
    },
    "source": {
        "kind": "package",
        "url": "obs://bucket0001/weather-1.0.0.jar",
        "version": "",
        "storage": "obs"
    },
    "tomcat_opts": {
        "server_xml": ""
    },
    "refer_resources": [
        {
            "id": "67835bb3-1235-4cc9-be71-becbb2b4ca0d",
            "type": "ecs"
        }
    ],
    "task_setting": {
        "parallelism": 1,
        "active_deadline_seconds": null,
        "completion_mode": "Indexed",
        "suspend": false
    },
    "replica": 1,
    "external_accesses": []
}

Example Response

{
    "job_id": "JOB1c8e20ec-1b30-4ee4-9a36-35a18b5e8b7e"
}

Status Code

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Code

See ServiceStage Error Codes.