GetFolders
This data source provides the resource manager folders of the current Alibaba Cloud user.
NOTE: Available in 1.84.0+.
NOTE: You can view only the information of the first-level child folders of the specified folder.
Example Usage
using Pulumi;
using AliCloud = Pulumi.AliCloud;
class MyStack : Stack
{
public MyStack()
{
var example = Output.Create(AliCloud.ResourceManager.GetFolders.InvokeAsync(new AliCloud.ResourceManager.GetFoldersArgs
{
NameRegex = "tftest",
}));
this.FirstFolderId = example.Apply(example => example.Folders[0].Id);
}
[Output("firstFolderId")]
public Output<string> FirstFolderId { get; set; }
}
Coming soon!
import pulumi
import pulumi_alicloud as alicloud
example = alicloud.resourcemanager.get_folders(name_regex="tftest")
pulumi.export("firstFolderId", example.folders[0]["id"])import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const example = pulumi.output(alicloud.resourcemanager.getFolders({
nameRegex: "tftest",
}, { async: true }));
export const firstFolderId = example.folders[0].id;Using GetFolders
function getFolders(args: GetFoldersArgs, opts?: InvokeOptions): Promise<GetFoldersResult>function get_folders(ids=None, name_regex=None, output_file=None, parent_folder_id=None, opts=None)func GetFolders(ctx *Context, args *GetFoldersArgs, opts ...InvokeOption) (*GetFoldersResult, error)public static class GetFolders {
public static Task<GetFoldersResult> InvokeAsync(GetFoldersArgs args, InvokeOptions? opts = null)
}The following arguments are supported:
- Ids List<string>
A list of resource manager folders IDs.
- Name
Regex string A regex string to filter results by folder name.
- Output
File string - Parent
Folder stringId The ID of the parent folder.
- Ids []string
A list of resource manager folders IDs.
- Name
Regex string A regex string to filter results by folder name.
- Output
File string - Parent
Folder stringId The ID of the parent folder.
- ids string[]
A list of resource manager folders IDs.
- name
Regex string A regex string to filter results by folder name.
- output
File string - parent
Folder stringId The ID of the parent folder.
- ids List[str]
A list of resource manager folders IDs.
- name_
regex str A regex string to filter results by folder name.
- output_
file str - parent_
folder_ strid The ID of the parent folder.
GetFolders Result
The following output properties are available:
- Folders
List<Pulumi.
Ali Cloud. Resource Manager. Outputs. Get Folders Folder> A list of folders. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids List<string>
A list of folder IDs.
- Names List<string>
A list of folder names.
- Name
Regex string - Output
File string - Parent
Folder stringId
- Folders
[]Get
Folders Folder A list of folders. Each element contains the following attributes:
- Id string
The provider-assigned unique ID for this managed resource.
- Ids []string
A list of folder IDs.
- Names []string
A list of folder names.
- Name
Regex string - Output
File string - Parent
Folder stringId
- folders
Get
Folders Folder[] A list of folders. Each element contains the following attributes:
- id string
The provider-assigned unique ID for this managed resource.
- ids string[]
A list of folder IDs.
- names string[]
A list of folder names.
- name
Regex string - output
File string - parent
Folder stringId
- folders
List[Get
Folders Folder] A list of folders. Each element contains the following attributes:
- id str
The provider-assigned unique ID for this managed resource.
- ids List[str]
A list of folder IDs.
- names List[str]
A list of folder names.
- name_
regex str - output_
file str - parent_
folder_ strid
Supporting Types
GetFoldersFolder
See the output API doc for this type.
See the output API doc for this type.
See the output API doc for this type.
Package Details
- Repository
- https://github.com/pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.