Help Center/ ServiceStage/ API Reference/ Application Management V3 APIs/ Technology Stack/ Modifying a Technology Stack Based on the Technology Stack ID
Updated on 2024-12-16 GMT+08:00

Modifying a Technology Stack Based on the Technology Stack ID

Function

This API is used to modify a technology stack based on the technology stack ID.

URI

PUT /v3/{project_id}/cas/runtimestacks/{runtimestack_id}

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

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

runtimestack_id

Yes

String

Technology stack ID. See Querying a Runtime System Stack.

Request

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format). Default value: application/json;charset=utf8.

X-Auth-Token

Yes

String

API calling can be authenticated using a token or AK/SK. If you use a token, this parameter is mandatory and must be set to the token. For details about how to obtain the token, see Authentication.

Table 3 Request body parameter

Parameter

Mandatory

Type

Description

name

Yes

String

Technology stack name.

deploy_mode

Yes

String

Deployment mode.

Value: virtualmachine

type

Yes

String

Technology stack type.

Currently, only Java and Tomcat are supported.

version

Yes

String

Version number.

spec

No

Object

Technology stack parameters. See Table 4.

description

No

String

Technology stack description.

Table 4 spec

Parameter

Mandatory

Type

Description

sdk

No

String

Tool package of the technology stack.

os

No

String

OS of the technology stack.

parameters

No

Map<String, String>

Parameters of the image related to the technology stack.

Response

Table 5 Response parameters

Parameter

Type

Description

id

String

Technology stack ID.

name

String

Runtime system name.

project_id

String

Tenant's project ID.

deploy_mode

String

Deployment mode.

  • container
  • virtualmachine

version

String

Version number.

type

String

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

version

String

Technology stack version.

spec

Object

Technology stack parameters. See Table 6.

system

Integer

Whether the stack is a system technology stack.

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

status

String

Technology stack status.

  • Supported
  • Deprecated
  • Disable

creator

String

Creator.

create_time

Integer

Creation time.

update_time

Integer

Update time.

component_count

Integer

Number of components associated with the technology stack.

Table 6 spec

Parameter

Type

Description

os

String

OS of the technology stack.

sdk

String

Tool package of the technology stack.

parameters

Map<String,String>

Address of the image related to the technology stack.

Example Request

{
	"name": "CustomJdk",
	"deploy_mode": "virtualmachine",
	"type": "Java",
	"version": "1.0.0",
	"description": "12345",
	"spec": {
		"parameters": {
			"jdk_url": "obs://cyf/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://cyf/bisheng-jdk-8u412-linux-aarch64.tar.gz"
        }
    },
    "system": 0,
    "status": "Disable",
    "creator": "cyf",
    "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

The error code format is SVCSTG.00100.[Error_ID], for example, SVCSTG.00100400. For details, see ServiceStage Error Codes.