You need to enable JavaScript to run this app.
文档中心
资源管理

资源管理

复制全文
下载 pdf
高级搜索
ExecuteMultiAccountSQLQuery - 使用SQL查询多账号资源
复制全文
下载 pdf
ExecuteMultiAccountSQLQuery - 使用SQL查询多账号资源
使用SQL查询多账号资源​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:ExecuteMultiAccountSQLQuery​
要执行的操作,取值:ExecuteMultiAccountSQLQuery。​
​
Version string 必选 示例值:2023-06-01​
API的版本,取值:2023-06-01。​
​
Scope object 可选 示例值:_​
搜索的账号范围。​
默认搜索整个组织,指定范围时 OrganizationUnitID、AccountID 二选一。​
OrganizationID string 可选 示例值:76723xxxxxx123456​
查询当前组织。​
​
OrganizationUnitID string 可选 示例值:76726xxxxxx456789​
查询指定 OU。​
​
AccountID long 可选 示例值:2100123456​
查询指定组织成员账号。​
​
​
Expression string 必选 示例值:select * from resources limit 10​
查询 SQL 语句,长度不超过 2048。​
​
MaxResults integer 可选 示例值:10​
每页的最大数据条数。​
​
NextToken string 可选 示例值:eyJOZXh0SW5mbyI6IntcIkluZm9zXCI6XCIxMFwifSIsIlNpZ25UaW1lIjoxNzY1NTI4NzQxLCJTaWduYXR1cmUiOiI2N2U0MjFkMzNmYzY0ODFhNDhiNjlhNzFjMWQzZGI2NCJ9​
查询返回结果下一页的令牌​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
NextToken string 示例值:eyJOZXh0SW5mbyI6IntcIkluZm9zXCI6XCIxMFwifSIsIlNpZ25UaW1lIjoxNzY1NTI4NzQxLCJTaWduYXR1cmUiOiI2N2U0MjFkMzNmYzY0ODFhNDhiNjlhNzFjMWQzZGI2NCJ9​
查询返回结果下一页的令牌​
​
Rows object[]​
查询结果​
​
​
​
请求示例​
​
POST /?Action=ExecuteMultiAccountSQLQuery&Version=2023-06-01 HTTP/1.1​
Host: resourcecenter.volcengineapi.com​
Content-Type: application/json; charset=UTF-8​
X-Date: 20251208T113007Z​
X-Content-Sha256: 287e874e******d653b44d21e​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251208/cn-beijing/resourcecenter/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
{​
"Scope": {​
"OrganizationID": "76726xxxxxx456789"​
},​
"Expression": "select resource_id from resources limit 10",​
"MaxResults": 100​
}​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "2025120819310304301103701537B3D8",​
"Action": "ExecuteMultiAccountSQLQuery",​
"Version": "2023-06-01",​
"Service": "resourcecenter",​
"Region": "cn-beijing"​
},​
"Result": {​
"NextToken": "",​
"Rows": [​
{​
"resource_id": "i-ye4vzh1c00p2fzklkf"​
},​
{​
"resource_id": "clb-29mhgs5cy581s32v"​
}​
]​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
ExceedLimit.ExecuteTime​
The SQL execution time has exceeded the limit.​
SQL 执行时间超过限制。​
400​
InvalidParameter​
The specified parameter %s is invalid.​
请求参数错误​
400​
InvalidParameter.Expression​
The specified parameter Expression is invalid.​
请求参数 Expression 不合法​
400​
InvalidParameter.MaxResults​
The specified parameter MaxResults is invalid.​
请求参数 MaxResults 不合法​
400​
InvalidParameter.NextToken​
The specified parameter NextToken is invalid.​
请求参数 NextToken 不合法​
400​
InvalidParameter.Scope​
The specified parameter Scope is invalid.​
请求参数 Scope 不合法​
400​
InvalidSQLExpression​
Error: %s.​
错误:%s​
400​
MultiAccountServiceNotEnabled​
MultiAccount ResourceCenter is not enabled.​
多账号资源中心服务暂未开通。​
400​
SQLExecuteError​
Failed to execute the SQL statement.​
SQL执行失败,请检查查询语句是否有误。​
403​
AccessDenied​
You have no authorized to perform this action.​
您无权执行此操作​
403​
NoPermission.AccountScope​
The operator is not permitted for this account scope.​
您无权执行此操作​
404​
OrganizationNotFound​
You are not in any organization.​
当前账号不属于任何组织。​
500​
InternalError​
The request has failed due to an unknown error.​
内部服务错误,请稍后重试​
​
​
最近更新时间:2026.09.18 16:38:35
这个页面对您有帮助吗?
有用
有用
无用
无用