You need to enable JavaScript to run this app.
资源管理

资源管理

Copy page
Download PDF
多账号资源搜索
SearchMultiAccountResources - 搜索跨账号资源
Copy page
Download PDF
SearchMultiAccountResources - 搜索跨账号资源

搜索跨账号资源

调试

请求参数

下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。

参数
类型
是否必填
示例值
描述
Action
String
是

SearchMultiAccountResources

要执行的操作,取值:SearchMultiAccountResources。

Version
String
是

2023-06-01

API的版本,取值:2023-06-01。

Scope
Object
是

_

搜索的组织或账号范围,OrganizationID、OrganizationUnits、Accounts 至少一项非空,可组合指定。

Filter
Array of Object
否

_

过滤参数,支持 ResourceType(Equals)、TypeName(Equals)、Region(Equals)、ResourceID(Equals、Contains)、ResourceName(Equals、Contains)、ProjectName(Equals、NotExists)、Tags(Contains、NotExists)、PrivateIpAddress(Equals、Contains)、PublicIpAddress(Equals、Contains)。

SortBy
String
否

CreateTime

排序条件。取值:

  • CreateTime,表示按资源创建时间排序
SortOrder
String
否

Asc

排序顺序。取值:Asc、Desc;默认Asc

MaxResults
Integer
否

10

每页最大数据条数;取值范围:1~100,默认值:10

NextToken
String
否

eyJOZXh0SW5mbUyYmY5ZGZiYzA2YTg0MGMifQ

查询返回结果下一页的token

返回参数

下表仅列出本接口特有的返回参数。更多信息请参见返回结构。

参数
类型
示例值
描述
Resources
Array of Object

_

资源信息

NextToken
String

eyJOZXh0SW5mbUyYmY5ZGZiYzA2YTg0MGMifQ

下一页 token

请求示例

POST /?Action=SearchMultiAccountResources&Version=2023-06-01 HTTP/1.1
Host: resourcecenter.volcengineapi.com
Content-Type: application/json; charset=UTF-8
X-Date: 20240614T035813Z
X-Content-Sha256: 287e874e******d653b44d21e
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20240614/cn-beijing/resourcecenter/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f

{
  "Scope": {
    "Accounts": [
      2100000000
    ]
  },
  "Filter": [
    {
      "Key": "Region",
      "Values": [
        "cn-beijing"
      ]
    }
  ],
  "MaxResults": 10
}

返回示例

{
  "ResponseMetadata": {
    "RequestId": "2024061411595832A7B71006B56111CF6B",
    "Action": "SearchMultiAccountResources",
    "Version": "2023-06-01",
    "Service": "resourcecenter",
    "Region": "cn-beijing"
  },
  "Result": {
    "Resources": [
      {
        "Service": "ecs",
        "ResourceType": "instance",
        "TypeName": "Volcengine::ECS::Instance",
        "Region": "cn-beijing",
        "ResourceID": "i-3tdasfqervsi9",
        "AccountID": 2100000000,
        "Identifier": "i-3tdasfqervsi9",
        "ResourceName": "name-3tdasfqervsi9",
        "CreateTime": "2023-09-14T18:41:44Z",
        "ProjectName": "default",
        "Tags": []
      }
    ],
    "NextToken": "eyJOZXh0SW5mbyI6IntcIkluZm9zXCI6XCJbMTY5NDcxNjkwNDAwMCxcXFwidHJuOm1vY2tfcHJvdmlkZXI6Y24tYmVpamluZzoyMTAwMDAxMjU1Omluc3RhbmNlL2ktM3RkYXNmcWVydnNpOS0xXFxcIl1cIn0iLCJTaWduVGltZSI6MTcxODMzNzU5OCwiU2lnbmF0dXJlIjoiOTZhMzk2YWY1ZTg5YjMyYWUyYmY5ZGZiYzA2YTg0MGMifQ"
  }
}

错误码

下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。

状态码
错误码
错误信息
说明
400
InvalidParameter

The specified parameter %s is invalid.

请求参数错误

400
InvalidParameter.FilterValue

The specified parameter FilterValue is invalid.

请求参数 FilterValue 不合法

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
InvalidParameter.Scope.Accounts

The specified parameter Scope.Accounts is invalid.

请求参数 Scope.Accounts 不合法

400
InvalidParameter.Scope.OrganizationUnits

The specified parameter Scope.OrganizationUnits is invalid.

请求参数 Scope.OrganizationUnits 不合法

400
InvalidParameter.SortBy

The specified parameter SortBy is invalid.

请求参数 SortBy 不合法

400
InvalidParameter.SortOrder

The specified parameter SortOrder is invalid.

请求参数 SortOrder 不合法

400
MultiAccountServiceNotEnabled

MultiAccount ResourceCenter is not enabled.

多账号资源中心服务暂未开通

400
ResourceTypeNotEnabled

The resource type is not enabled.

该资源类型暂不支持。

400
ServiceNotEnabled

ResourceCenter Service is not enabled.

资源中心服务暂未开通

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.

内部服务错误,请稍后重试

Last updated: 2026.09.23 11:19:06