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.

NameRegex string

A regex string to filter results by folder name.

OutputFile string
ParentFolderId string

The ID of the parent folder.

Ids []string

A list of resource manager folders IDs.

NameRegex string

A regex string to filter results by folder name.

OutputFile string
ParentFolderId string

The ID of the parent folder.

ids string[]

A list of resource manager folders IDs.

nameRegex string

A regex string to filter results by folder name.

outputFile string
parentFolderId string

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_id str

The ID of the parent folder.

GetFolders Result

The following output properties are available:

Folders List<Pulumi.AliCloud.ResourceManager.Outputs.GetFoldersFolder>

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.

NameRegex string
OutputFile string
ParentFolderId string
Folders []GetFoldersFolder

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.

NameRegex string
OutputFile string
ParentFolderId string
folders GetFoldersFolder[]

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.

nameRegex string
outputFile string
parentFolderId string
folders List[GetFoldersFolder]

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_id str

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.

FolderId string
FolderName string
Id string

The ID of the folder. * folder_id- The ID of the folder. * folder_name- The name of the folder.

FolderId string
FolderName string
Id string

The ID of the folder. * folder_id- The ID of the folder. * folder_name- The name of the folder.

folderId string
folderName string
id string

The ID of the folder. * folder_id- The ID of the folder. * folder_name- The name of the folder.

folder_id str
folder_name str
id str

The ID of the folder. * folder_id- The ID of the folder. * folder_name- The name of the folder.

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes
This Pulumi package is based on the alicloud Terraform Provider.