搜索当前账号的资源
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | SearchResources | 要执行的操作,取值:SearchResources。 |
Version | String | 是 | 2023-06-01 | API的版本,取值:2023-06-01。 |
Filter | Array of Filter | 否 | [ | 过滤条件 |
SortBy | String | 否 | CreateTime | 排序条件。取值:
|
SortOrder | String | 否 | Asc | 排序顺序。取值:Asc、Desc;默认Asc |
MaxResults | Integer | 否 | 10 | 每页最大数据条数;取值范围:1~100,默认值:10 |
NextToken | String | 否 | eyJOZXh0SW5mbyI6IntcIkluZm9zXCI6XCJbMTY5NDcxNjkwNDAwMCxcXFwidHJuOm1vY2tfcHJvdmlkZXI6Y24tYmVpamluZzoyMTAwMDAxMjU1Omluc3RhbmNlL2ktM3RkYXNmcWVydnNpOS0xXFxcIl1cIn0iLCJTaWduVGltZSI6MTcxODMzNzU5OCwiU2lnbmF0dXJlIjoiOTZhMzk2YWY1ZTg5YjMyYWUyYmY5ZGZiYzA2YTg0MGMifQ | 查询返回结果下一页的token |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
---|---|---|---|
Resources | Array of Resource | i-3tdasfqervsi9 | 资源信息 |
NextToken | String | eyJOZXh0SW5mbyI6IntcIkluZm9zXCI6XCJbMTY5NDcxNjkwNDAwMCxcXFwidHJuOm1vY2tfcHJvdmlkZXI6Y24tYmVpamluZzoyMTAwMDAxMjU1Omluc3RhbmNlL2ktM3RkYXNmcWVydnNpOS0xXFxcIl1cIn0iLCJTaWduVGltZSI6MTcxODMzNzU5OCwiU2lnbmF0dXJlIjoiOTZhMzk2YWY1ZTg5YjMyYWUyYmY5ZGZiYzA2YTg0MGMifQ | 下一页 token |
POST /?Action=SearchResources&Version=2023-06-01 HTTP/1.1 Host: https://open.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 { "Filter": [ { "Key": "Region", "Values": [ "cn-beijing" ] } ], "MaxResults": 10 }
{ "ResponseMetadata": { "RequestId": "2024061411595832A7B71006B56111CF6B", "Action": "SearchResources", "Version": "2023-06-01", "Service": "resourcecenter", "Region": "cn-beijing" }, "Result": { "Resources": [ { "Service": "ecs", "ResourceType": "instance", "Region": "cn-beijing", "ResourceID": "i-3tdasfqervsi9", "AccountID": 2123456789, "ResourceName": "i-3tdasfqervsi9", "CreateTime": "2023-09-14T18:41:44Z", "ProjectName": "default", "Tags": [] } ], "NextToken": "eyJOZXh0SW5mbyI6IntcIkluZm9zXCI6XCJbMTY5NDcxNjkwNDAwMCxcXFwidHJuOm1vY2tfcHJvdmlkZXI6Y24tYmVpamluZzoyMTAwMDAxMjU1Omluc3RhbmNlL2ktM3RkYXNmcWVydnNpOS0xXFxcIl1cIn0iLCJTaWduVGltZSI6MTcxODMzNzU5OCwiU2lnbmF0dXJlIjoiOTZhMzk2YWY1ZTg5YjMyYWUyYmY5ZGZiYzA2YTg0MGMifQ" } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 错误信息 | 说明 |
---|---|---|---|
400 | InvalidParameter | The specified parameter %s is invalid. | |
400 | ServiceNotEnabled | ResourceCenter Service is not enabled. | 资源中心服务暂未开通 |
500 | InternalError | The request has failed due to an unknown error. |