Help Center/ ServiceStage/ API Reference (Kuala Lumpur Region)/ Application Management APIs/ Meta/ Obtaining All Supported Flavors of Application Resources
Updated on 2022-08-15 GMT+08:00

Obtaining All Supported Flavors of Application Resources

Function

This API is used to obtain all supported flavors of application resources.

URI

GET /v2/{project_id}/cas/metadata/flavors

Table 1 Path parameters

Parameter

Type

Mandatory

Description

project_id

String

Yes

Tenant's ID.

Request

None

Response

Table 2 Response parameters

Parameter

Type

Description

flavors

Array of objects

Flavor parameters. See Table 3.

Table 3 flavors parameters

Parameter

Type

Description

flavor_id

String

Flavor ID.

storage_size

String

Storage size.

num_cpu

String

CPU limit.

num_cpu_init

String

Initial CPU value.

memory_size

String

Memory limit.

memory_size_init

String

Initial memory value.

label

String

Label.

custom

boolean

Whether resource specifications are customized.

Example

Example request

None

Example response

{
    "flavors": [
        {
            "flavor_id": "MICRO-5G:0.5C:1G", 
            "storage_size": "5G", 
            "num_cpu": "500m", 
            "num_cpu_init": "200m", 
            "memory_size": "1Gi", 
            "memory_size_init": "200Mi", 
            "label": "Micro: 5G Storage, 0.5 CPU, 1G Memory",
            "custom": false
        }
    ]
}

Status Code

Table 4 Status codes

Status Code

Description

200

OK

400

Bad Request

404

Not Found

500

Internal Server Error

Error Code

Error code must be in the format of SVCSTG.00100.[Error_ID]. Example: SVCSTG.00100400. See Error Codes of Application Management APIs.