文档首页/ 代码检查 CodeArts Check/ API参考/ API/ 任务管理/ 查询租户套餐开通状态(含新旧版本)
更新时间:2025-09-04 GMT+08:00
分享

查询租户套餐开通状态(含新旧版本)

功能介绍

查询租户套餐开通状态(含新旧版本)。

调用方法

请参见如何调用API

URI

GET /v4/tenant/tenant-package-status

表1 Query参数

参数

是否必选

参数类型

描述

project_id

String

参数解释:

项目的32位uuid,项目唯一标识,通过查询项目列表接口查询项目列表获取。

约束条件:

不涉及。

取值范围:

字符串长度32。

默认取值:

不涉及。

请求参数

表2 请求Header参数

参数

是否必选

参数类型

描述

X-Auth-Token

String

参数解释:

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

约束限制:

不涉及。

取值范围:

字符串长度不少于1,不超过10万。

默认取值:

不涉及。

响应参数

状态码:200

表3 响应Body参数

参数

参数类型

描述

result

TenantPackageStatus object

参数解释:

租户套餐开通状态(含新旧版本)请求响应。

取值范围:

不涉及。

表4 TenantPackageStatus

参数

参数类型

描述

duration

Integer

参数解释:

当前的套餐的检查时长。

取值范围:

免费版套餐查询当月执行时长,其他套餐返回-1。

charge_type

String

参数解释:

收费类型。

取值范围:

不涉及。

supportedLanguage

Array of strings

参数解释:

支持的语言种类。

取值范围:

编程语言。

securityPackageOpenStatus

Boolean

参数解释:

判断安全增强包套餐是否开启。

取值范围:

true: 开启,false: 关闭。

tenantId

String

参数解释:

租户id。

取值范围:

字符串长度32。

main_resource_list

Array of Main_resource objects

参数解释:

主资源列表。

取值范围:

不涉及。

type

String

参数解释:

套餐类型。

取值范围:

charge_type:查询租户类型(新版本包周期使用)。

popup:查询是否弹窗(新包周期套餐已废弃)。

concurrencyPackageOpenStatus

Boolean

参数解释:

并发包开启情况。

取值范围:

true:开启。

false:未开启。

other_resource_list

Array of Other_resource objects

参数解释:

其他资源列表。

取值范围:

不涉及。

tips

Tips object

参数解释:

当前租户的主资源套餐的剩余倒计时信息。

取值范围:

不涉及。

表5 Main_resource

参数

参数类型

描述

chargeType

Integer

参数解释:

付费类型。

取值范围:

0:按需套餐 1:包周期套餐。

resourceSpecCode

String

参数解释:

资源代码。

取值范围:

不涉及。

resourceType

String

参数解释:

资源类型。

取值范围:

不涉及。

serviceType

String

参数解释:

服务类型。

取值范围:

不涉及。

status

String

参数解释:

资源状态。

取值范围:

normal:正常

freeze:冻结

close:失效

表6 Other_resource

参数

参数类型

描述

id

String

参数解释:

资源id。

取值范围:

不涉及。

tenantId

String

参数解释:

租户id。

取值范围:

字符串长度32。

region

String

参数解释:

逻辑区域。

取值范围:

不涉及。

createTime

String

参数解释:

创建时间。

取值范围:

不涉及。

updateTime

String

参数解释:

更新时间。

取值范围:

不涉及。

specCode

String

参数解释:

资源代码。

取值范围:

不涉及。

resourceType

String

参数解释:

资源类型。

取值范围:

不涉及。

serviceType

String

参数解释:

服务类型。

取值范围:

不涉及。

resourceId

String

参数解释:

资源id。

取值范围:

不涉及。

resourceStatus

String

参数解释:

资源状态。

取值范围:

normal:正常

freeze:冻结

close:失效

amount

String

参数解释:

数量。

取值范围:

不涉及。

表7 Tips

参数

参数类型

描述

next_action_url

String

参数解释:

下一步操作的链接。

取值范围:

不涉及。

next_action

Integer

参数解释:

下一步操作的处理策略。

取值范围:

0:到期进入宽限期(应用于‘生效中’状态)

1:到期转按需

2:到期后自动删除(应用于‘生效中’状态)

4:冻结(应用于‘宽限期中’状态)

5:删除(应用于‘保留期中’)

next_action_remain_day

Integer

参数解释:

当前状态到下一步操作执行,剩余时间(天)。

取值范围:

不涉及。

status

Integer

参数解释:

资源的当前的状态。

取值范围:

1:未生效(开通中)

2:生效中

3:已删除

4:保留期中

5:宽限期中

99:已冻结(违规)

状态码:400

表8 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

状态码:401

表9 响应Body参数

参数

参数类型

描述

error_code

String

错误码

error_msg

String

错误描述

请求示例

查询租户套餐开通状态(含新旧版本)

GET https://{endpoint}/v4/tenant/tenant-package-status&project_id=&

响应示例

状态码:200

Request succeeded!

{
  "result" : {
    "duration" : -1,
    "charge_type" : "effective_business_service",
    "supportedLanguages" : [ "C#", "CSS", "C++", "PYTHON", "CANGJIE", "SCALA", "GO", "KOTLIN", "JAVASCRIPT", "SQL", "ARKTS", "RUST", "JAVA", "SHELL", "FORTRAN", "PHP", "LUA", "JSON", "HTML", "TYPESCRIPT" ],
    "securityPackageOpenStatus" : true,
    "tenantId" : "389efb76b1354e4482eabeedxxxxxxxx",
    "main_resource_list" : [ {
      "chargeType" : 1,
      "resourceSpecCode" : "codearts.china.enterprise",
      "resourceType" : "hws.resource.type.codearts.combo",
      "serviceType" : "hws.service.type.devcloud",
      "status" : "normal"
    } ],
    "type" : "charge_type",
    "other_resource_list" : [ {
      "id" : null,
      "tenantId" : "389efb76b1354e4482eabeedxxxxxxxx",
      "region" : "{region}-7",
      "createTime" : "2025-04-11T06:24:47Z",
      "updateTime" : "2025-07-08T14:36:32Z",
      "serviceType" : "hws.service.type.devcloud",
      "resourceType" : "hws.resource.type.codecheck.security",
      "specCode" : "devcloud.codecheck.sec.professional",
      "resourceId" : "19aa597004e84a16bc108f33xxxxxxxx",
      "resourceStatus" : "normal",
      "amount" : "1"
    }, {
      "id" : null,
      "tenantId" : "389efb76b1354e4482eabeedxxxxxxxx",
      "region" : "{region}-7",
      "createTime" : "2024-07-26T08:31:53Z",
      "updateTime" : "2025-07-08T14:36:32Z",
      "serviceType" : "hws.service.type.devcloud",
      "resourceType" : "hws.resource.type.codearts.combo",
      "specCode" : "codearts.china.enterprise",
      "resourceId" : "5988b33d03f44c8f91141512xxxxxxxx",
      "resourceStatus" : "normal",
      "amount" : "20"
    }, {
      "id" : null,
      "tenantId" : "389efb76b1354e4482eabeedxxxxxxxx",
      "region" : "{region}-7",
      "createTime" : "2025-06-30T08:20:05Z",
      "updateTime" : "2025-07-08T14:36:32Z",
      "serviceType" : "hws.service.type.devcloud",
      "resourceType" : "hws.resource.type.codearts.extension.concurrency",
      "specCode" : "codearts.extension.concurrency.check",
      "resourceId" : "e5470ceb4d0440f198b56974xxxxxxxx",
      "resourceStatus" : "normal",
      "amount" : "2"
    } ],
    "concurrencyPackageOpenStatus" : true,
    "tips" : {
      "next_action_url" : "https://account.huawei.com/usercenter/?region={region}-7&locale=zh-cn#/renewal?subscriptionId=&orderId=&isFrom=expense",
      "next_action" : 0,
      "next_action_remain_day" : 32,
      "status" : 2
    }
  }
}

状态码:400

Bad Request

{
  "error_code" : "CC.00000000",
  "error_msg" : "网络繁忙,请稍后再试"
}

状态码:401

Unauthorized

{
  "error_code" : "CC.00000003",
  "error_msg" : "认证信息过期"
}

状态码

状态码

描述

200

Request succeeded!

400

Bad Request

401

Unauthorized

错误码

请参见错误码

相关文档