获取项目资源列表
下表仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。
参数 | 类型 | 是否必填 | 示例值 | 描述 |
|---|---|---|---|---|
Action | String | 是 | ListProjectResources | 要执行的操作,取值:ListProjectResources。 |
Version | String | 是 | 2021-08-01 | API的版本,取值:2021-08-01。 |
WithSubProjectResource | Integer | 否 | 0 | 是否包含子项目。可传值:0(不包含)、1(包含),传入其他值会抛出异常 |
Sort | Integer | 否 | 0 | 是否排序。可传值:0(不排序)、1(排序),传入其他值会抛出一起异常 |
Limit | Integer | 否 | 10 | 分页大小。传入的值必须在(0,1000]区间 |
Offset | Integer | 否 | 0 | 页码偏移量 |
Query | String | 否 | Vm6759003988064440589 | 资源ID查询条件。支持模糊查询 |
ResourceType | String | 否 | instance | 资源类型 |
ServiceName | String | 否 | ecs | 资源所属服务 |
ResourceRegion | String | 否 | cn-north-1 | 资源所属区域 |
OrderBy | String | 否 | CreatedTime | 排序维度。支持CreatedTime,UpdatedTime排序,不传默认使用CreatedTime排序 |
ProjectName | String | 是 | project | 项目名称 |
下表仅列出本接口特有的返回参数。更多信息请参见返回结构。
参数 | 类型 | 示例值 | 描述 |
|---|---|---|---|
Limit | Integer | 10 | 分页大小 |
Offset | Integer | 0 | 页码偏移量 |
Total | Integer | 100 | 总数量 |
ProjectResources | Array of Object | [ | 项目资源信息列表 |
GET /?Action=ListProjectResources&Version=2021-08-01&WithSubProjectResource=0&Sort=0&Limit=10&Offset=0&Query=Vm6759003988064440589&ResourceType=instance&ServiceName=ecs&ResourceRegion=cn-north-1&OrderBy=CreatedTime&ProjectName=project HTTP/1.1 Host: http://iam.volcengineapi.com/?Action=DetachPolicyInProject&Version=2021-08-01 X-Date: 20250618T114005Z Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20250618/cn-beijing/iam/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f
{ "ResponseMetadata": { "RequestId": "2025061819401208121821703638D2B8", "Action": "ListProjectResources", "Version": "2021-08-01", "Service": "iam", "Region": "cn-beijing" }, "Result": { "Limit": 10, "Offset": 0, "Total": 100, "ProjectResources": [ { "ProjectName": "xzjvu4", "ResourceTrn": "9g", "ResourceType": "lzl5Fs", "ResourceID": "3xZaD1URt", "ResourceRegion": "ZMKuxzOJ", "ServiceName": "RtF", "CreateDate": "TYH0pDouc", "UpdateDate": "aG7O", "AccountID": 256 } ] } }
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。
状态码 | 错误码 | 说明 |
|---|---|---|
404 | EntityNotFound | 找不到对应的实体。请确认传入的实体参数是否真实存在 |
500 | InternalError | 服务内部系统错误。往往是由服务内部组件异常、网络异常或服务自身bug导致,请及时联系相关管理员进行排查确认 |