Yandex v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi
yandex.getResourcemanagerFolder
Explore with Pulumi AI
Use this data source to get information about a Yandex Resource Manager Folder. For more information, see the official documentation.
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";
const myFolder1 = pulumi.output(yandex.getResourcemanagerFolder({
    folderId: "folder_id_number_1",
}));
const myFolder2 = pulumi.output(yandex.getResourcemanagerFolder({
    cloudId: "some_cloud_id",
    name: "folder_name",
}));
export const myFolder1Name = myFolder1.name!;
export const myFolder2CloudId = myFolder2.cloudId!;
import pulumi
import pulumi_yandex as yandex
my_folder1 = yandex.get_resourcemanager_folder(folder_id="folder_id_number_1")
my_folder2 = yandex.get_resourcemanager_folder(cloud_id="some_cloud_id",
    name="folder_name")
pulumi.export("myFolder1Name", my_folder1.name)
pulumi.export("myFolder2CloudId", my_folder2.cloud_id)
using Pulumi;
using Yandex = Pulumi.Yandex;
class MyStack : Stack
{
    public MyStack()
    {
        var myFolder1 = Output.Create(Yandex.GetResourcemanagerFolder.InvokeAsync(new Yandex.GetResourcemanagerFolderArgs
        {
            FolderId = "folder_id_number_1",
        }));
        var myFolder2 = Output.Create(Yandex.GetResourcemanagerFolder.InvokeAsync(new Yandex.GetResourcemanagerFolderArgs
        {
            CloudId = "some_cloud_id",
            Name = "folder_name",
        }));
        this.MyFolder1Name = myFolder1.Apply(myFolder1 => myFolder1.Name);
        this.MyFolder2CloudId = myFolder2.Apply(myFolder2 => myFolder2.CloudId);
    }
    [Output("myFolder1Name")]
    public Output<string> MyFolder1Name { get; set; }
    [Output("myFolder2CloudId")]
    public Output<string> MyFolder2CloudId { get; set; }
}
package main
import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		opt0 := "folder_id_number_1"
		myFolder1, err := yandex.LookupResourcemanagerFolder(ctx, &GetResourcemanagerFolderArgs{
			FolderId: &opt0,
		}, nil)
		if err != nil {
			return err
		}
		opt1 := "some_cloud_id"
		opt2 := "folder_name"
		myFolder2, err := yandex.LookupResourcemanagerFolder(ctx, &GetResourcemanagerFolderArgs{
			CloudId: &opt1,
			Name:    &opt2,
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("myFolder1Name", myFolder1.Name)
		ctx.Export("myFolder2CloudId", myFolder2.CloudId)
		return nil
	})
}
Using getResourcemanagerFolder
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getResourcemanagerFolder(args: GetResourcemanagerFolderArgs, opts?: InvokeOptions): Promise<GetResourcemanagerFolderResult>
function getResourcemanagerFolderOutput(args: GetResourcemanagerFolderOutputArgs, opts?: InvokeOptions): Output<GetResourcemanagerFolderResult>def get_resourcemanager_folder(cloud_id: Optional[str] = None,
                               folder_id: Optional[str] = None,
                               labels: Optional[Mapping[str, str]] = None,
                               name: Optional[str] = None,
                               opts: Optional[InvokeOptions] = None) -> GetResourcemanagerFolderResult
def get_resourcemanager_folder_output(cloud_id: Optional[pulumi.Input[str]] = None,
                               folder_id: Optional[pulumi.Input[str]] = None,
                               labels: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
                               name: Optional[pulumi.Input[str]] = None,
                               opts: Optional[InvokeOptions] = None) -> Output[GetResourcemanagerFolderResult]func LookupResourcemanagerFolder(ctx *Context, args *LookupResourcemanagerFolderArgs, opts ...InvokeOption) (*LookupResourcemanagerFolderResult, error)
func LookupResourcemanagerFolderOutput(ctx *Context, args *LookupResourcemanagerFolderOutputArgs, opts ...InvokeOption) LookupResourcemanagerFolderResultOutput> Note: This function is named LookupResourcemanagerFolder in the Go SDK.
public static class GetResourcemanagerFolder 
{
    public static Task<GetResourcemanagerFolderResult> InvokeAsync(GetResourcemanagerFolderArgs args, InvokeOptions? opts = null)
    public static Output<GetResourcemanagerFolderResult> Invoke(GetResourcemanagerFolderInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetResourcemanagerFolderResult> getResourcemanagerFolder(GetResourcemanagerFolderArgs args, InvokeOptions options)
public static Output<GetResourcemanagerFolderResult> getResourcemanagerFolder(GetResourcemanagerFolderArgs args, InvokeOptions options)
fn::invoke:
  function: yandex:index/getResourcemanagerFolder:getResourcemanagerFolder
  arguments:
    # arguments dictionaryThe following arguments are supported:
getResourcemanagerFolder Result
The following output properties are available:
- CloudId string
- ID of the cloud that contains the folder.
- CreatedAt string
- Folder creation timestamp.
- Description string
- Description of the folder.
- FolderId string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Status string
- Current status of the folder.
- Labels Dictionary<string, string>
- A map of labels applied to this folder.
- CloudId string
- ID of the cloud that contains the folder.
- CreatedAt string
- Folder creation timestamp.
- Description string
- Description of the folder.
- FolderId string
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Status string
- Current status of the folder.
- Labels map[string]string
- A map of labels applied to this folder.
- cloudId String
- ID of the cloud that contains the folder.
- createdAt String
- Folder creation timestamp.
- description String
- Description of the folder.
- folderId String
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- status String
- Current status of the folder.
- labels Map<String,String>
- A map of labels applied to this folder.
- cloudId string
- ID of the cloud that contains the folder.
- createdAt string
- Folder creation timestamp.
- description string
- Description of the folder.
- folderId string
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- status string
- Current status of the folder.
- labels {[key: string]: string}
- A map of labels applied to this folder.
- cloud_id str
- ID of the cloud that contains the folder.
- created_at str
- Folder creation timestamp.
- description str
- Description of the folder.
- folder_id str
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- status str
- Current status of the folder.
- labels Mapping[str, str]
- A map of labels applied to this folder.
- cloudId String
- ID of the cloud that contains the folder.
- createdAt String
- Folder creation timestamp.
- description String
- Description of the folder.
- folderId String
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- status String
- Current status of the folder.
- labels Map<String>
- A map of labels applied to this folder.
Package Details
- Repository
- Yandex pulumi/pulumi-yandex
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the yandexTerraform Provider.