You need to enable JavaScript to run this app.
导航
ListProjectResources - 获取项目资源列表
最近更新时间:2023.11.03 11:34:29首次发布时间:2023.08.24 21:41:32

获取项目资源列表

请求参数

名称
类型
是否必填
示例值
描述
Action
String

ListProjectResources

要执行的操作,取值:ListProjectResources

Version
String

2021-08-01

API的版本,取值:2021-08-01

WithSubProjectResource
Integer

0

是否包含子项目

Sort
Integer

0

是否排序

Limit
Integer

10

分页大小

Offset
Integer

0

页码偏移

Query
String

Vm6759003988064440589

可对资源Id进行模糊查询

ResourceType
String

instance

资源类型

ServiceName
String

ecs

资源所属服务

ResourceRegion
String

cn-north-1

资源区域

OrderBy
String

CreatedTime

支持CreatedTime,UpdatedTime排序,不传使用默认排序

ProjectName
String

project

项目名称

响应数据

名称
类型
示例值
描述
Limit
Integer

10

分页大小

Offset
Integer

0

页码偏移

Total
Integer

100

总数量

ProjectResources
Array of ProjectResources

{
"ProjectName": "project",
"AccountID": 2000000000,
"ResourceTrn": "trn:ecs:cn-north-1:2000000000:instance/Vm6759003988064440589",
"ResourceType": "instance",
"ResourceID": "Vm6759003988064440589",
"ResourceRegion": "cn-north-1",
"ServiceName": "ecs",
"CreateDate": "20191114T034731Z",
"UpdateDate": "20230801T023702Z"
}

项目资源信息

示例

请求

http://iam.volcengineapi.com/?Action=ListProjectResources
&Version=2021-08-01
&ProjectName=project-name
&ResourceType=instance
&Sort=1
&WithSubProjectResource=1
&OrderBy=CreatedTime
&Limit=3
&Offset=0
&ServiceName=ecs
&ResourceRegion=cn-beijing

响应

{
   "ResponseMetadata": {
        "RequestId": "20230131185811018CE1F42DA931F2A405",
        "Action": "ListProjectResources",
        "Version": "2021-08-01",
        "Service": "iam",
        "Region": "cn-north-1"
    },
    "Result": {
        "ProjectResources": [
            {
                "ProjectName": "project-name",
                "AccountID": 2100245449,
                "ResourceTrn": "trn:mock_provider:cn-beijing:2100245449:instance/instance-1",
                "ResourceType": "instance",
                "ResourceID": "instance-1",
                "ResourceRegion": "cn-beijing",
                "ServiceName": "ecs",
                "CreateDate": "20230111T081709Z",
                "UpdateDate": "20230111T081804Z"
            }
        ],
        "Limit": 3,
        "Offset": 0,
        "Total": 1
    }
}

错误码

您可访问公共错误码,获取详细信息。