Modifying Component Information Based on the Component ID
Function
This API is used to modify component information based on the component ID.
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}
| 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
| 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 |
| 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 31. The value can be obtained from the response of the API for Querying a Technology Stack. |
| description | No | String | Definition Description. Range The value can contain up to 128 characters. Default Value N/A |
| source | Yes | Object | Definition Source of the code or software package. See Table 32. |
| build | No | Object | Definition Component build. See Table 33. |
| 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 29. |
| replica | Yes | Integer | Definition Number of instances. Constraints 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 13. |
| post_start | No | Object | Definition Post-start processing. See Table 14. |
| pre_stop | No | Object | Definition Pre-stop processing. See Table 14. |
| 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 15. |
| 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 16. |
| host_aliases | No | Array of objects | Definition Host alias. See Table 17. |
| dns_policy | No | String | Definition DNS policy. Range
Default Value N/A |
| dns_config | No | Object | Definition DNS configuration. See Table 18. |
| workload_kind | No | String | Definition Workload type. Range
Default Value N/A |
| security_context | No | Object | Definition Security policy. See Table 20. |
| logs | No | Array of objects | Definition Log collection. See Table 22. |
| custom_metric | No | Object | Definition Custom metrics. See Table 23. |
| affinity | No | Array of objects | Definition Affinity. See Table 24. |
| anti_affinity | No | Array of objects | Definition Anti-affinity. See Table 24. |
| liveness_probe | No | Object | Definition Component liveness probe. See Table 26. |
| readiness_probe | No | Object | Definition Component service probe. See Table 26. |
| startup_probe | No | Object | Definition Component startup probe. See Table 26. |
| refer_resources | No | Array of objects | Definition Associated resource. See Table 27. |
| external_accesses | No | Array of objects | Definition External access. See Table 35. |
| tolerations | No | Array of objects | Definition Tolerance policy. See Table 37. |
| container_name | No | String | Definition Container name. Range N/A Default Value N/A |
| update_strategy | No | Object | Definition Component upgrade strategy. See Table 38. |
| multi_containers | No | Array of objects | Definition Multi-container configuration. See Table 39. |
| 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 40. |
| config_mode | No | String | Definition Workload configuration mode. Range
Default Value N/A |
| enable_sermant_injection | No | Boolean | Definition Whether to enable Sermant. Range
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
Default Value N/A |
| enable_sermant_dubbo_register | No | Boolean | Definition Whether Dubbo microservices need to be registered with registry centers through Sermant. Range
Default Value N/A |
| enable_sermant_config | No | Boolean | Definition Whether to enable the Sermant dynamic configuration plug-in. Range
Default Value N/A |
| enable_sermant_mq_gray | No | Boolean | Definition Whether to enable Sermant dark launch. Range
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 |
| base_lane_instance_id | No | String | Definition ID of the baseline component associated with the baseline lane, which is used to identify the association between the baseline component and the dark launch component. 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 41. |
| input_values | No | Map<String, String> | Definition Template package input information. |
| auto_lts_config | No | Object | Definition Automatic LTS configuration. See Table 36. |
| task_setting | No | Object | Definition Task settings for a job workload. See Table 44. |
| vmapp_config_mode | No | String | Definition Directory type of a VM-deployed component. Range
Default Value N/A |
| vmapp_config | No | Object | Definition Directory configuration of a VM-deployed component. See Table 45. |
| 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| type | Yes | String | Definition Data storage type. Range
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. |
| 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
Default Value N/A |
| 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
Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| type | Yes | String | Definition Deployment type. Range
Default Value N/A |
| rolling_release | No | Object | Definition Rolling deployment parameter, which is mandatory when type is set to RollingRelease. For details, see Table 9. |
| gray_release | No | Object | Definition Dark launch upgrade parameter, which is mandatory when type is set to GrayRelease. For details, see Table 11. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| batches | Yes | Integer | Definition Deployment batches. Range N/A Default Value N/A |
| first_batch_selector | No | Object | Definition Priority restart policy of the instance under the workload corresponding to the container component. See Table 10. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| key | Yes | String | Definition Label key under metadata.labels in the YAML file of the container workload. Range N/A Default Value N/A |
| operator | Yes | String | Definition Operator, indicating the relationship between the key and values. Range
Default Value N/A |
| values | No | Array of strings | Definition Value of the label key under metadata.labels in the YAML file of the container workload. This parameter is mandatory when operator is set to In or NotIn. Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| type | Yes | String | Definition Dark launch policy. Range
Default Value N/A |
| first_batch_weight | Yes | Integer | Definition Proportion of first-batch dark launch traffic. This parameter is mandatory when type is set to WEIGHT. Range N/A Default Value N/A |
| first_batch_replica | Yes | Integer | Definition Number of first-batch dark launch instances. This parameter is mandatory when type is set to WEIGHT. Range N/A Default Value N/A |
| remaining_batch | Yes | Integer | Definition 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 5 instances remaining to be deployed in 3 batches, these 5 instances will be upgraded based on 2:2:1. This parameter is mandatory when type is set to WEIGHT. Range N/A Default Value N/A |
| deployment_mode | No | Integer | Definition Deployment mode. Range
Default Value N/A |
| replica_surge_mode | No | String | Definition Mode of adding a dark launch instance. This parameter is mandatory when type is set to CONTENT. Range
Default Value N/A |
| rule_match_mode | No | String | Definition Effective mode of a dark launch rule. This parameter is mandatory when type is set to CONTENT. Range
Default Value N/A |
| rules | No | Object | Definition Dark launch rule. This parameter is mandatory when type is set to CONTENT. See Table 12. |
| gray_workload_name | No | String | Definition New workload name. Range
Default Value N/A |
| 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
Default Value N/A |
| 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| type | Yes | String | Definition Processing method. Range
Default Value N/A |
| scheme | No | String | Definition HTTP request type. This parameter is valid only when type is set to http. Range
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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| port | Yes | Integer | Definition Process listening port. Range N/A Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| server_xml | Yes | String | Definition
Range N/A Default Value N/A |
| 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 |
| 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 An optional list of objects where each object may have a name property (required) and a value property (optional). This property is merged into the options generated from the specified DNS policy. Duplicate entries will be deleted. See Table 19. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | Yes | String | Definition Operation name. Range N/A Default Value N/A |
| value | No | String | Definition Operation value. Range N/A Default Value N/A |
| 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 21. |
| 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 |
| 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
Default Value N/A |
| 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| kind | No | String | Definition Object kind. Range
Default Value N/A |
| condition | No | String | Definition Policy type. Range
Default Value N/A |
| match_expressions | No | Array of objects | Definition Scheduling policy rule. See Table 25. |
| weight | No | String | Definition Weight. Range
Default Value N/A |
| topology_key | No | String | Definition Topology key. Range N/A Default Value N/A |
| 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| type | Yes | String | Definition Type. Range
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
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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| id | Yes | String | Definition Resource ID. Range N/A Default Value N/A |
| type | Yes | String | Definition Resource type. Range
Default Value N/A |
| parameters | No | Object | Definition Resource parameter, which is mandatory when type is cce. See Table 28. |
| 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
Default Value N/A |
| class | No | String | Definition Volume declaration subtype. Range
Default Value N/A |
| obs_volume_type | No | String | Definition OBS volume type. Range
Default Value STANDARD |
| access_mode | No | String | Definition Storage volume access mode. Range
Default Value N/A |
| availableZone | No | String | Definition AZ. Range N/A Default Value N/A |
| volume_type | No | String | Definition Volume type. Range
Default Value N/A |
| 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 30. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| reference_type | Yes | String | Definition Reference type. Range
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
Default Value N/A |
| 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
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
Default Value N/A |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| kind | Yes | String | Definition Component source kind. Range
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
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
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
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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| parameters | No | Object | Definition This parameter is provided only when no ID is available during build creation. See Table 34. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| build_cmd | No | String | Definition Compilation command. Range N/A Default Value
|
| 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| protocol | No | String | Definition External access type. Range
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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| key | No | String | Definition Taint key. Range N/A Default Value N/A |
| operator | No | String | Definition Operator. Range
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
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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| type | No | String | Definition Component upgrade policy. Range
Default Value RollingUpdate |
| max_unavailable | No |
| Definition Maximum number of unavailable pods. That is, the number or percentage of pods that can be deleted based on the value of replica.
Constraints This parameter can be set only when workload_kind is set to deployment. Range N/A Default Value 25% |
| max_surge | No |
| Definition Maximum surge. That is, the number or percentage of pods allowed based on the value of replica.
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 |
| 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 32. 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 29. |
| liveness_probe | No | Object | Definition Container liveness probe. See Table 26. |
| readiness_probe | No | Object | Definition Container service probe. See Table 26. |
| startup_probe | No | Object | Definition Container startup probe. See Table 26. |
| command | No | Object | Definition Startup command. See Table 13. |
| post_start | No | Object | Definition Post-start processing. See Table 14. |
| pre_stop | No | Object | Definition Pre-stop processing. See Table 14. |
| logs | No | Array of objects | Definition Log collection. See Table 22. |
| storages | No | Array of objects | Definition Storage. See Table 5. |
| security_context | No | Object | Definition Security policy. See Table 20. |
| 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| storage | Yes | String | Definition Storage mode of the component template package. Range
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 42. This parameter is valid only when the component template package storage mode is http and the security authentication mode is custom header authentication. |
| 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| key_id | Yes | String | Definition User key ID in DEW. Range N/A Default Value N/A |
| 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
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
Default Value false (The task is executed immediately after being created by default.) |
| 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 46. |
| log_home | Yes | Object | Definition Log directory settings. See Table 46. |
| 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
| Parameter | Type | Description |
|---|---|---|
| job_id | String | Definition Task ID. Range N/A |
Example Request
Modify the component named mycomponent. The component source is the weather-1.0.0.jar package stored in OBS bucket0001.
{
"name": "mycomponent",
"description": "",
"labels": [
{
"key": "com-key",
"value": "com-value"
}
],
"version": "2023.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"
}
],
"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
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot