Obtaining Supported Service Deployment Specifications

Function

This API is used to obtain supported service deployment specifications.

Debugging

You can debug this API through automatic authentication in or use the SDK sample code generated by API Explorer.

URI

GET /v1/{project_id}/services/specifications

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID. For details, see Obtaining a Project ID and Name.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

is_personal_cluster

No

Boolean

Whether to obtain the service deployment flavors supported by dedicated resource pool. The default value is false.

infer_type

No

String

Inference mode. Options:

  • real-time, which is the default value

  • batch

limit

No

String

Maximum number of records returned on each page. The default value is 1000.

offset

No

String

Start offset of the returned data. Default value: 0

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token. It can be obtained by calling the IAM API that is used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

specifications

Array of Specification objects

Supported service deployment flavors

Table 5 Specification

Parameter

Type

Description

is_open

Boolean

Whether to enable the flavor. The default value is true. If this parameter is set to false, submit a service ticket to apply for the flavor.

spec_status

String

Flavor status. Options:

  • normal: The flavor is on-sales.

  • sellout: The flavor cannot be used to deploy services because it is sold out.

specification

String

Unique flavor ID

billing_spec

String

Unique ID of the billing specifications

source_type

String

Model type, which can be empty or auto. The default value is empty, indicating that the model is generated by the user. If the value is auto, the model is trained using ExeML. The billing mode varies depending on the model type.

is_free

Boolean

Whether the flavor is free of charge. The value true indicates that the flavor is free of charge.

over_quota

Boolean

Whether the quota exceeds the upper limit. The value true indicates that the quota exceeds the upper limit.

extend_params

Integer

Billing item

display_en

String

Specifications description in English

display_cn

String

Specification description

Example Requests

GET https://{endpoint}/v1/{project_id}/services/specifications

Example Responses

Status code: 200

Service deployment flavors

{
  "specifications" : [ {
    "specification" : "modelarts.vm.cpu.2u",
    "billing_spec" : "modelarts.vm.cpu.2u",
    "is_open" : true,
    "spec_status" : "normal",
    "is_free" : false,
    "over_quota" : false,
    "extend_params" : 1
  }, {
    "specification" : "modelarts.vm.gpu.p4",
    "billing_spec" : "modelarts.vm.gpu.p4",
    "is_open" : true,
    "spec_status" : "normal",
    "is_free" : false,
    "over_quota" : false,
    "extend_params" : 1
  }, {
    "specification" : "modelarts.vm.high.p3",
    "billing_spec" : "modelarts.vm.high.p3",
    "is_open" : true,
    "source_type" : "auto",
    "spec_status" : "normal",
    "is_free" : false,
    "over_quota" : false,
    "extend_params" : 1
  }, {
    "specification" : "modelarts.vm.high.p2",
    "billing_spec" : "modelarts.vm.high.p2",
    "is_open" : true,
    "source_type" : "auto",
    "spec_status" : "normal",
    "is_free" : false,
    "over_quota" : false,
    "extend_params" : 1
  }, {
    "specification" : "modelarts.vm.ai1.a310",
    "billing_spec" : "modelarts.vm.ai1.a310",
    "is_open" : false,
    "spec_status" : "normal",
    "is_free" : false,
    "over_quota" : false,
    "extend_params" : 1
  } ]
}

Status Codes

Status Code

Description

200

Service deployment flavors

Error Codes

See Error Codes.