调用ListFoldersForParent查询指定资源夹的子资源夹列表。
说明 只能查看指定资源夹下一级的子资源夹列表,无法查看更深层级的资源夹列表。
                     
                  调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 | 
|---|---|---|---|---|
| Action | String | 是 | ListFoldersForParent | 要执行的操作。取值:ListFoldersForParent。 | 
| ParentFolderId | String | 否 | r-b1**** | 父资源夹ID。 当该参数置空时,查询的是Root资源夹下的下一级子资源夹。 | 
| QueryKeyword | String | 否 | rdFolder | 查询关键字,例如:资源夹名称。 支持模糊查询。 | 
| PageNumber | Integer | 否 | 1 | 页码。 起始值:1。默认值:1。 | 
| PageSize | Integer | 否 | 10 | 分页时每页显示的数据行数。 取值范围:1~100。默认值:10。 | 
返回数据
| 名称 | 类型 | 示例值 | 描述 | 
|---|---|---|---|
| TotalCount | Integer | 2 | 数据总条数。 | 
| RequestId | String | 7B8A4E7D-6CFF-471D-84DF-195A7A241ECB | 请求ID。 | 
| PageSize | Integer | 5 | 分页时每页显示的数据行数。 | 
| PageNumber | Integer | 1 | 页码。 | 
| Folders | Array of Folder | 资源夹列表。 | |
| Folder | |||
| FolderId | String | rd-evic31**** | 资源夹ID。 | 
| CreateTime | String | 2015-01-23T12:33:18Z | 资源夹创建时间。 | 
| FolderName | String | project-1 | 资源夹名称。 | 
示例
请求示例
https://resourcemanager.aliyuncs.com/?Action=ListFoldersForParent
&ParentFolderId=r-b1****
&<公共请求参数>正常返回示例
XML格式
                  
HTTP/1.1 200 OK
Content-Type:application/xml
<?xml version="1.0" encoding="UTF-8" ?>
<ListFoldersForParentResponse>
        <RequestId>7B8A4E7D-6CFF-471D-84DF-195A7A241ECB</RequestId>
        <PageNumber>1</PageNumber>
        <PageSize>5</PageSize>
        <TotalCount>2</TotalCount>
        <Folders>
            <Folder>
                <FolderId>rd-evic31****</FolderId>
                <FolderName>project-1</FolderName>
                <CreateTime>2015-01-23T12:33:18Z</CreateTime>
            </Folder>
            <Folder>
                <FolderId>fd-evic31****</FolderId>
                <FolderName>project-2</FolderName>
                <CreateTime>2015-01-23T12:33:18Z</CreateTime>
            </Folder>
        </Folders>
</ListFoldersForParentResponse>JSON格式
                  
HTTP/1.1 200 OK
Content-Type:application/json
{
  "RequestId" : "7B8A4E7D-6CFF-471D-84DF-195A7A241ECB",
  "PageNumber" : 1,
  "PageSize" : 5,
  "TotalCount" : 2,
  "Folders" : {
    "Folder" : [ {
      "FolderId" : "rd-evic31****",
      "Name" : "project-1",
      "CreateDate" : "2015-01-23T12:33:18Z"
    }, {
      "FolderId" : "fd-evic31****",
      "Name" : "project-2",
      "CreateDate" : "2015-01-23T12:33:18Z"
    } ]
  }
}错误码
| HttpCode | 错误码 | 错误信息 | 描述 | 
|---|---|---|---|
| 400 | InvalidParameter.ParentFolderId | The ParentFolderId is invalid. | 父资源夹ID无效,资源夹ID应以“r-”开头+6位数字或英文字母或以“fd-”开头+10位数字或英文字母。 | 
| 404 | EntityNotExists.ResourceDirectory | The resource directory for the account is not enabled. We recommend that you first enable the resource directory for the account. | 当前账号未启用资源目录,请先启用资源目录。 | 
| 404 | EntityNotExists.Folder | The resource directory folder does not exist. | 资源夹不存在,请先创建资源夹。 | 
访问错误中心查看更多错误码。