Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi
alicloud.resourcemanager.getResourceDirectories
Explore with Pulumi AI
This data source provides the Resource Manager Resource Directories of the current Alibaba Cloud user.
NOTE: Available in 1.86.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const default = alicloud.resourcemanager.getResourceDirectories({});
export const resourceDirectoryId = _default.then(_default => _default.directories?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
default = alicloud.resourcemanager.get_resource_directories()
pulumi.export("resourceDirectoryId", default.directories[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := resourcemanager.GetResourceDirectories(ctx, nil, nil)
if err != nil {
return err
}
ctx.Export("resourceDirectoryId", _default.Directories[0].Id)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var @default = AliCloud.ResourceManager.GetResourceDirectories.Invoke();
return new Dictionary<string, object?>
{
["resourceDirectoryId"] = @default.Apply(@default => @default.Apply(getResourceDirectoriesResult => getResourceDirectoriesResult.Directories[0]?.Id)),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourcemanagerFunctions;
import com.pulumi.alicloud.resourcemanager.inputs.GetResourceDirectoriesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var default = ResourcemanagerFunctions.getResourceDirectories();
ctx.export("resourceDirectoryId", default_.directories()[0].id());
}
}
variables:
default:
fn::invoke:
Function: alicloud:resourcemanager:getResourceDirectories
Arguments: {}
outputs:
resourceDirectoryId: ${default.directories[0].id}
Using getResourceDirectories
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 getResourceDirectories(args: GetResourceDirectoriesArgs, opts?: InvokeOptions): Promise<GetResourceDirectoriesResult>
function getResourceDirectoriesOutput(args: GetResourceDirectoriesOutputArgs, opts?: InvokeOptions): Output<GetResourceDirectoriesResult>
def get_resource_directories(output_file: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetResourceDirectoriesResult
def get_resource_directories_output(output_file: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetResourceDirectoriesResult]
func GetResourceDirectories(ctx *Context, args *GetResourceDirectoriesArgs, opts ...InvokeOption) (*GetResourceDirectoriesResult, error)
func GetResourceDirectoriesOutput(ctx *Context, args *GetResourceDirectoriesOutputArgs, opts ...InvokeOption) GetResourceDirectoriesResultOutput
> Note: This function is named GetResourceDirectories
in the Go SDK.
public static class GetResourceDirectories
{
public static Task<GetResourceDirectoriesResult> InvokeAsync(GetResourceDirectoriesArgs args, InvokeOptions? opts = null)
public static Output<GetResourceDirectoriesResult> Invoke(GetResourceDirectoriesInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetResourceDirectoriesResult> getResourceDirectories(GetResourceDirectoriesArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
function: alicloud:resourcemanager/getResourceDirectories:getResourceDirectories
arguments:
# arguments dictionary
The following arguments are supported:
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- output
File String - File name where to save data source results (after running
pulumi preview
).
- output
File string - File name where to save data source results (after running
pulumi preview
).
- output_
file str - File name where to save data source results (after running
pulumi preview
).
- output
File String - File name where to save data source results (after running
pulumi preview
).
getResourceDirectories Result
The following output properties are available:
- Directories
List<Pulumi.
Ali Cloud. Resource Manager. Outputs. Get Resource Directories Directory> - A list of resource directories. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Output
File string
- Directories
[]Get
Resource Directories Directory - A list of resource directories. Each element contains the following attributes:
- Id string
- The provider-assigned unique ID for this managed resource.
- Output
File string
- directories
List<Get
Resource Directories Directory> - A list of resource directories. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- output
File String
- directories
Get
Resource Directories Directory[] - A list of resource directories. Each element contains the following attributes:
- id string
- The provider-assigned unique ID for this managed resource.
- output
File string
- directories
Sequence[Get
Resource Directories Directory] - A list of resource directories. Each element contains the following attributes:
- id str
- The provider-assigned unique ID for this managed resource.
- output_
file str
- directories List<Property Map>
- A list of resource directories. Each element contains the following attributes:
- id String
- The provider-assigned unique ID for this managed resource.
- output
File String
Supporting Types
GetResourceDirectoriesDirectory
- Id string
- The ID of resource directory.
- Master
Account stringId - The ID of the master account.
- Master
Account stringName - The name of the master account.
- Resource
Directory stringId - The ID of the resource directory.
- Root
Folder stringId - The ID of the root folder.
- Status string
- (Available in 1.120.0+.) The status of the control policy.
- Id string
- The ID of resource directory.
- Master
Account stringId - The ID of the master account.
- Master
Account stringName - The name of the master account.
- Resource
Directory stringId - The ID of the resource directory.
- Root
Folder stringId - The ID of the root folder.
- Status string
- (Available in 1.120.0+.) The status of the control policy.
- id String
- The ID of resource directory.
- master
Account StringId - The ID of the master account.
- master
Account StringName - The name of the master account.
- resource
Directory StringId - The ID of the resource directory.
- root
Folder StringId - The ID of the root folder.
- status String
- (Available in 1.120.0+.) The status of the control policy.
- id string
- The ID of resource directory.
- master
Account stringId - The ID of the master account.
- master
Account stringName - The name of the master account.
- resource
Directory stringId - The ID of the resource directory.
- root
Folder stringId - The ID of the root folder.
- status string
- (Available in 1.120.0+.) The status of the control policy.
- id str
- The ID of resource directory.
- master_
account_ strid - The ID of the master account.
- master_
account_ strname - The name of the master account.
- resource_
directory_ strid - The ID of the resource directory.
- root_
folder_ strid - The ID of the root folder.
- status str
- (Available in 1.120.0+.) The status of the control policy.
- id String
- The ID of resource directory.
- master
Account StringId - The ID of the master account.
- master
Account StringName - The name of the master account.
- resource
Directory StringId - The ID of the resource directory.
- root
Folder StringId - The ID of the root folder.
- status String
- (Available in 1.120.0+.) The status of the control policy.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.