文档首页/ 数据库安全服务 DBSS/ API参考/ API/ 审计实例/ 查询ECS服务器规格信息
更新时间:2025-09-10 GMT+08:00
分享

查询ECS服务器规格信息

功能介绍

查询ECS服务器规格信息

调试

您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。

URI

GET /v1/{project_id}/audit/specification

表1 路径参数

参数

是否必选

参数类型

描述

project_id

String

参数解释

项目ID。可通过IAM服务[查询指定IAM用户的项目列表]接口获取。

约束限制

不涉及

取值范围

以IAM服务接口返回值为准,字符长度32-64。

默认取值

不涉及

表2 Query参数

参数

是否必选

参数类型

描述

image_business_type

Integer

参数解释

镜像类型。

约束限制

以取值范围为准

取值范围

  • 1:运维

  • 2:加密

  • 3:审计

默认取值

不传则默认为审计

请求参数

表3 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

参数解释

用户Token。 通过调用IAM服务查询用户Token接口获取(响应消息头中X-Subject-Token的值)。

约束限制

不涉及

取值范围

IAM服务查询用户Token接口为准

默认取值

不涉及

响应参数

状态码:200

表4 响应Body参数

参数

参数类型

描述

specification

Array of EcsSpecificationBean objects

ecs规格集合

表5 EcsSpecificationBean

参数

参数类型

描述

azs

Array of strings

ECS规格所在的可用区集合

id

String

规格ID

level

String

规格等级,支持的等级以局点配置为准。

  • entry:入门版

  • low:基础版

  • medium:专业版

  • high:高级版

name

String

规格名称

proxy

Integer

规格可添加的数据库数量

ram

Integer

内存

vcpus

Integer

CPU

az_type

String

可用区类型

  • DEDICATED

  • DEC

  • EDGE

状态码:400

表6 响应Body参数

参数

参数类型

描述

details

Array of DbssErrorDetail objects

PDP5鉴权异常信息

encoded_authorization_message

String

PDP5鉴权异常信息

error_code

String

错误码

error_msg

String

错误信息

表7 DbssErrorDetail

参数

参数类型

描述

error_code

String

错误码

error_msg

String

PDP5错误信息

状态码:403

表8 响应Body参数

参数

参数类型

描述

details

Array of DbssErrorDetail objects

PDP5鉴权异常信息

encoded_authorization_message

String

PDP5鉴权异常信息

error_code

String

错误码

error_msg

String

错误信息

表9 DbssErrorDetail

参数

参数类型

描述

error_code

String

错误码

error_msg

String

PDP5错误信息

状态码:500

表10 响应Body参数

参数

参数类型

描述

details

Array of DbssErrorDetail objects

PDP5鉴权异常信息

encoded_authorization_message

String

PDP5鉴权异常信息

error_code

String

错误码

error_msg

String

错误信息

表11 DbssErrorDetail

参数

参数类型

描述

error_code

String

错误码

error_msg

String

PDP5错误信息

请求示例

/v1/{project_id}/audit/specification

响应示例

状态码:200

成功

{
  "specification" : [ {
    "level" : "low",
    "id" : "s2.xlarge.4",
    "name" : "s2.xlarge.4",
    "vcpus" : 4,
    "ram" : 16384,
    "proxy" : 3,
    "azs" : [ "cn-cmcc1a-01" ]
  }, {
    "level" : "medium",
    "id" : "s2.2xlarge.4",
    "name" : "s2.2xlarge.4",
    "vcpus" : 8,
    "ram" : 32768,
    "proxy" : 6,
    "azs" : [ "cn-cmcc1a-01" ]
  }, {
    "level" : "high",
    "id" : "s3.4xlarge.4",
    "name" : "s3.4xlarge.4",
    "vcpus" : 16,
    "ram" : 65536,
    "proxy" : 30,
    "azs" : [ "cn-cmcc1a-01", "cn-cmcc1b-01" ]
  } ]
}

状态码

状态码

描述

200

成功

400

客户端错误

403

认证失败

500

服务端错误

错误码

请参见错误码

相关文档