根据标签查询代码解释器数量 - ShowCoreCodeInterpreterNumsByTags
功能介绍
该API用于根据标签查询代码解释器数量。
调用方法
请参见如何调用API。
授权信息
账号根用户具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备如下身份策略权限,更多的权限说明请参见权限和授权项。
| 授权项 | 访问级别 | 资源类型(*为必须) | 条件键 | 别名 | 依赖的授权项 |
|---|---|---|---|---|---|
| agentarts::listResourcesByTag | List | - | g:TagKeys | - | - |
URI
POST /v1/code-interpreters/resource-instances/count
请求参数
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| without_any_tag | 否 | Boolean | 参数解释: 是否查询所有不带标签的资源。 约束限制: 不涉及。 取值范围: 默认取值: false。 |
| tags | 否 | Array of CoreToolsTagValuesForTMS objects | 参数解释: 包含标签,结果返回包含所有标签的资源列表。 约束限制: 最多包含20个key,每个key下面的value最多20个。Key不能重复,同一个key中values不能重复。每个key对应的value可以为空数组但结构体不能缺失。 取值范围: 数组长度0-20。 默认取值: 不涉及,无tag过滤条件时返回全量数据。 |
| matches | 否 | Array of CoreToolsTagForTMS objects | 参数解释: 标签键值匹配规则,key之间是与的关系,key-value结构中value是或的关系。无matches过滤条件时返回全量数据,当matches和tags同时存在时表示获取同时满足matches和tags的资源。 约束限制: Key不能重复,同一个key中values不能重复,每个key对应的value可以为空数组但结构体不能缺失。 取值范围: 数组长度最大为1。 默认取值: 不涉及。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| key | 是 | String | 参数解释: 标签键。 约束限制: 不能为空或空字符串,不能为空格,校验和使用之前先trim前后的半角空格,且不能以_sys_开头。 取值范围: 最大长度128个unicode字符,可用 UTF-8 格式表示的字母、数字和空格,以及以下字符:_ . : / = + - @。 默认取值: 不涉及。 |
| values | 是 | Array of strings | 参数解释: 标签值列表,value之间为或的关系。 约束限制: value可为空数组但不可缺省,如果values为空列表则表示any_value(查询任意value)。校验和使用之前先trim前后的半角空格。 取值范围: 最小数量0,最大数量20,每个值最大长度255个unicode字符,可用 UTF-8 格式表示的字母、数字和空格,以及以下字符:_ . : / = + - @。 默认取值: 不涉及。 |
| 参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
| key | 是 | String | 参数解释: 搜索字段名称,当前仅支持resource_name,后续可扩展。 约束限制: key为固定字典值,不能包含重复的key或不支持的key。 取值范围: resource_name。 默认取值: 不涉及。 |
| value | 是 | String | 参数解释: 搜索字段的值。 约束限制: 支持前缀搜索,如果value为空字符串则精确匹配。 取值范围: 最大长度255个unicode字符,可用 UTF-8 格式表示的字母、数字和空格,以及以下字符:_ . : / = + - @。 默认取值: 不涉及。 |
响应参数
状态码:200
| 参数 | 参数类型 | 描述 |
|---|---|---|
| total_count | Integer | 参数解释: 总记录数。 取值范围: 非负整数。 |
状态码:400
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。 取值范围: 满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。 |
| error_msg | String | 参数解释: 错误信息。 取值范围: 不涉及。 |
状态码:401
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。 取值范围: 满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。 |
| error_msg | String | 参数解释: 错误信息。 取值范围: 不涉及。 |
状态码:403
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。 取值范围: 满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。 |
| error_msg | String | 参数解释: 错误信息。 取值范围: 不涉及。 |
| encoded_authorization_message | String | 参数解释: 编码后的授权失败信息,可找IAM服务oncall提供解码方式获取详细授权失败原因。 取值范围: 不涉及。 |
| details | Array of CoreToolsCommonError objects | 参数解释: 依赖的下游服务错误信息列表。 取值范围: 不涉及。 |
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。 取值范围: 满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。 |
| error_msg | String | 参数解释: 错误信息。 取值范围: 不涉及。 |
状态码:404
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。 取值范围: 满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。 |
| error_msg | String | 参数解释: 错误信息。 取值范围: 不涉及。 |
状态码:429
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。 取值范围: 满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。 |
| error_msg | String | 参数解释: 错误信息。 取值范围: 不涉及。 |
状态码:500
| 参数 | 参数类型 | 描述 |
|---|---|---|
| error_code | String | 参数解释: 错误码。 取值范围: 满足正则^AgentArts.0400\d{4}$,例如AgentArts.04000404。 |
| error_msg | String | 参数解释: 错误信息。 取值范围: 不涉及。 |
请求示例
/v1/code-interpreters/resource-instances/count
{
"without_any_tag" : false,
"tags" : [ {
"key" : "key1",
"values" : [ "value1" ]
} ]
} 响应示例
状态码:400
请求参数错误。
{
"error_code" : "AgentArts.04000001",
"error_msg" : "Invalid parameter."
} 状态码:401
认证失败。
{
"error_code" : "AgentArts.04000002",
"error_msg" : "Authentication failed: invalid token"
} 状态码:403
权限不足。
{
"error_code" : "AgentArts.04000003",
"error_msg" : "Authentication failed: you have no permission of VCPEP.",
"encoded_authorization_message" : "eyJlcnJvciI6ICJVbmF1dGhvcml6ZWQifQ==",
"details" : [ {
"error_code" : "AgentArts.04000403",
"error_msg" : "Authentication information is incorrect or you have no permissions."
} ]
} 状态码:404
资源不存在。
{
"error_code" : "AgentArts.04000004",
"error_msg" : "Resource not found"
} 状态码:429
请求频率超限。
{
"error_code" : "AgentArts.04000006",
"error_msg" : "Too many requests: please retry later"
} 状态码:500
内部系统错误。
{
"error_code" : "AgentArts.04000000",
"error_msg" : "System error. Please retry."
} 状态码
| 状态码 | 描述 |
|---|---|
| 200 | 根据标签查询代码解释器数量成功。 |
| 400 | 请求参数错误。 |
| 401 | 认证失败。 |
| 403 | 权限不足。 |
| 404 | 资源不存在。 |
| 429 | 请求频率超限。 |
| 500 | 内部系统错误。 |
错误码
请参见错误码。