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

Creating a Technology Stack

Function

This API is used to create a custom technology stack.

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::createRuntimeStack

    write

    -

    -

    servicestage:runtimestack:create

    -

URI

POST /v3/{project_id}/cas/runtimestacks

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

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 parameter

Parameter

Mandatory

Type

Description

name

Yes

String

Definition

Technology stack name.

Range

N/A

Default Value

N/A

deploy_mode

Yes

String

Definition

Deployment mode.

Range

  • container
  • virtualmachine

Default Value

N/A

type

Yes

String

Definition

Technology stack type.

Range

  • If deploy_mode is set to container, Java and Tomcat are supported.
  • If deploy_mode is set to virtualmachine, Java and Tomcat are supported.

Default Value

N/A

version

Yes

String

Definition

Version number.

Range

N/A

Default Value

N/A

spec

No

Object

Definition

Technology stack parameters. See Table 4.

description

No

String

Definition

Technology stack description.

Range

N/A

Default Value

N/A

Table 4 spec

Parameter

Mandatory

Type

Description

sdk

No

String

Definition

Tool package of the technology stack.

Range

N/A

Default Value

N/A

os

No

String

Definition

OS of the technology stack.

Range

N/A

Default Value

N/A

parameters

No

Map<String, String>

Definition

Parameters of the image related to the technology stack.

Range

Key and value description:

  • os_url: OS image path, which is used as the basic image of the technology stack of the container-based deployment type. Example value: swr.ap-southeast-1.myhuaweicloud.com/example/euleros_x86_64:2.9.5
  • os_type: OS image type of the technology stack of the container-based deployment type. The value can be system or custom.
  • jdk_url: path for storing the JDK software package. Example: obs://example/bisheng-jdk-8u412-linux-aarch64.tar.gz
  • tomcat_url: path for storing the Tomcat software package. Example value: obs://example/apache-tomcat-8.5.100.tar.gz

Default Value

N/A

Response

Table 5 Response parameters

Parameter

Type

Description

id

String

Definition

Technology stack ID.

Range

N/A

name

String

Definition

Runtime system name.

Range

N/A

project_id

String

Definition

Tenant's project ID.

Range

N/A

deploy_mode

String

Definition

Deployment mode.

Range

  • container
  • virtualmachine

version

String

Definition

Version number.

Range

N/A

type

String

Definition

Technology stack type.

Range

  • If deploy_mode is set to container, Java and Tomcat are supported.
  • If deploy_mode is set to virtualmachine, Java and Tomcat are supported.

version

String

Definition

Technology stack version.

Range

N/A

spec

Object

Definition

Technology stack parameters. See Table 6.

description

String

Definition

Technology stack description.

Range

N/A

system

Integer

Definition

Whether the stack is a system technology stack.

Range

  • 1: system technology stack.
  • 0: custom technology stack.

status

String

Definition

Technology stack status.

Range

  • Supported
  • Deprecated
  • Disable

creator

String

Definition

Creator.

Range

N/A

create_time

Integer

Definition

Creation time.

Range

N/A

update_time

Integer

Definition

Update time.

Range

N/A

component_count

Integer

Definition

Number of components associated with the technology stack.

Range

N/A

Table 6 spec

Parameter

Type

Description

os

String

Definition

OS of the technology stack.

Range

N/A

sdk

String

Definition

Tool package of the technology stack.

Range

N/A

parameters

Map<String,String>

Definition

Address of the image related to the technology stack.

Range

N/A

Example Request

Create a custom Java technology stack version of the VM-based deployment type.

{
	"name": "test",
	"deploy_mode": "virtualmachine",
	"type": "Java",
	"version": "1.0.0",
	"description": "1234",
	"spec": {
		"parameters": {
			"jdk_url": "obs://example/bisheng-jdk-8u412-linux-aarch64.tar.gz"
		}
	}
}

Example Response

{
    "id": "cf4727f0-0d6f-43d5-b1b8-f2c1f09d1611",
    "name": "test",
    "project_id": "578ac30b81034b89a7255b3af26db9c9",
    "deploy_mode": "virtualmachine",
    "type": "Java",
    "version": "1.0.0",
    "description": null,
    "spec": {
        "os": null,
        "sdk": null,
        "parameters": {
            "jdk_url": "obs://example/bisheng-jdk-8u412-linux-aarch64.tar.gz"
        }
    },
    "system": 0,
    "status": "Disable",
    "creator": "example",
    "create_time": 1722934506431,
    "update_time": 1722934506431
}

Status Code

Status Code

Description

200

OK

400

Bad Request

404

Not Found

409

Conflict

500

Internal Server Error

Error Code

See ServiceStage Error Codes.