alicloud logo
Alibaba Cloud v3.38.0, Jun 2 23

alicloud.dfs.getFileSystems

Explore with Pulumi AI

This data source provides the Dfs File Systems of the current Alibaba Cloud user.

NOTE: Available in v1.140.0+.

Example Usage

Basic Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var ids = AliCloud.Dfs.GetFileSystems.Invoke(new()
    {
        Ids = new[]
        {
            "example_id",
        },
    });

    var nameRegex = AliCloud.Dfs.GetFileSystems.Invoke(new()
    {
        NameRegex = "^my-FileSystem",
    });

    return new Dictionary<string, object?>
    {
        ["dfsFileSystemId1"] = ids.Apply(getFileSystemsResult => getFileSystemsResult.Systems[0]?.Id),
        ["dfsFileSystemId2"] = nameRegex.Apply(getFileSystemsResult => getFileSystemsResult.Systems[0]?.Id),
    };
});
package main

import (
	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/dfs"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		ids, err := dfs.GetFileSystems(ctx, &dfs.GetFileSystemsArgs{
			Ids: []string{
				"example_id",
			},
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("dfsFileSystemId1", ids.Systems[0].Id)
		nameRegex, err := dfs.GetFileSystems(ctx, &dfs.GetFileSystemsArgs{
			NameRegex: pulumi.StringRef("^my-FileSystem"),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("dfsFileSystemId2", nameRegex.Systems[0].Id)
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.dfs.DfsFunctions;
import com.pulumi.alicloud.dfs.inputs.GetFileSystemsArgs;
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 ids = DfsFunctions.getFileSystems(GetFileSystemsArgs.builder()
            .ids("example_id")
            .build());

        ctx.export("dfsFileSystemId1", ids.applyValue(getFileSystemsResult -> getFileSystemsResult.systems()[0].id()));
        final var nameRegex = DfsFunctions.getFileSystems(GetFileSystemsArgs.builder()
            .nameRegex("^my-FileSystem")
            .build());

        ctx.export("dfsFileSystemId2", nameRegex.applyValue(getFileSystemsResult -> getFileSystemsResult.systems()[0].id()));
    }
}
import pulumi
import pulumi_alicloud as alicloud

ids = alicloud.dfs.get_file_systems(ids=["example_id"])
pulumi.export("dfsFileSystemId1", ids.systems[0].id)
name_regex = alicloud.dfs.get_file_systems(name_regex="^my-FileSystem")
pulumi.export("dfsFileSystemId2", name_regex.systems[0].id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const ids = alicloud.dfs.getFileSystems({
    ids: ["example_id"],
});
export const dfsFileSystemId1 = ids.then(ids => ids.systems?.[0]?.id);
const nameRegex = alicloud.dfs.getFileSystems({
    nameRegex: "^my-FileSystem",
});
export const dfsFileSystemId2 = nameRegex.then(nameRegex => nameRegex.systems?.[0]?.id);
variables:
  ids:
    fn::invoke:
      Function: alicloud:dfs:getFileSystems
      Arguments:
        ids:
          - example_id
  nameRegex:
    fn::invoke:
      Function: alicloud:dfs:getFileSystems
      Arguments:
        nameRegex: ^my-FileSystem
outputs:
  dfsFileSystemId1: ${ids.systems[0].id}
  dfsFileSystemId2: ${nameRegex.systems[0].id}

Using getFileSystems

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 getFileSystems(args: GetFileSystemsArgs, opts?: InvokeOptions): Promise<GetFileSystemsResult>
function getFileSystemsOutput(args: GetFileSystemsOutputArgs, opts?: InvokeOptions): Output<GetFileSystemsResult>
def get_file_systems(ids: Optional[Sequence[str]] = None,
                     name_regex: Optional[str] = None,
                     output_file: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetFileSystemsResult
def get_file_systems_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     name_regex: Optional[pulumi.Input[str]] = None,
                     output_file: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetFileSystemsResult]
func GetFileSystems(ctx *Context, args *GetFileSystemsArgs, opts ...InvokeOption) (*GetFileSystemsResult, error)
func GetFileSystemsOutput(ctx *Context, args *GetFileSystemsOutputArgs, opts ...InvokeOption) GetFileSystemsResultOutput

> Note: This function is named GetFileSystems in the Go SDK.

public static class GetFileSystems 
{
    public static Task<GetFileSystemsResult> InvokeAsync(GetFileSystemsArgs args, InvokeOptions? opts = null)
    public static Output<GetFileSystemsResult> Invoke(GetFileSystemsInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetFileSystemsResult> getFileSystems(GetFileSystemsArgs args, InvokeOptions options)
// Output-based functions aren't available in Java yet
fn::invoke:
  function: alicloud:dfs/getFileSystems:getFileSystems
  arguments:
    # arguments dictionary

The following arguments are supported:

Ids List<string>

A list of File System IDs.

NameRegex string

A regex string to filter results by File System name.

OutputFile string

File name where to save data source results (after running pulumi preview).

Ids []string

A list of File System IDs.

NameRegex string

A regex string to filter results by File System name.

OutputFile string

File name where to save data source results (after running pulumi preview).

ids List<String>

A list of File System IDs.

nameRegex String

A regex string to filter results by File System name.

outputFile String

File name where to save data source results (after running pulumi preview).

ids string[]

A list of File System IDs.

nameRegex string

A regex string to filter results by File System name.

outputFile string

File name where to save data source results (after running pulumi preview).

ids Sequence[str]

A list of File System IDs.

name_regex str

A regex string to filter results by File System name.

output_file str

File name where to save data source results (after running pulumi preview).

ids List<String>

A list of File System IDs.

nameRegex String

A regex string to filter results by File System name.

outputFile String

File name where to save data source results (after running pulumi preview).

getFileSystems Result

The following output properties are available:

Id string

The provider-assigned unique ID for this managed resource.

Ids List<string>
Names List<string>
Systems List<Pulumi.AliCloud.Dfs.Outputs.GetFileSystemsSystem>
NameRegex string
OutputFile string
Id string

The provider-assigned unique ID for this managed resource.

Ids []string
Names []string
Systems []GetFileSystemsSystem
NameRegex string
OutputFile string
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
systems List<GetFileSystemsSystem>
nameRegex String
outputFile String
id string

The provider-assigned unique ID for this managed resource.

ids string[]
names string[]
systems GetFileSystemsSystem[]
nameRegex string
outputFile string
id str

The provider-assigned unique ID for this managed resource.

ids Sequence[str]
names Sequence[str]
systems Sequence[GetFileSystemsSystem]
name_regex str
output_file str
id String

The provider-assigned unique ID for this managed resource.

ids List<String>
names List<String>
systems List<Property Map>
nameRegex String
outputFile String

Supporting Types

GetFileSystemsSystem

CreateTime string

The creation time of the File system.

Description string

The description of the File system.

FileSystemId string

The ID of the File System.

FileSystemName string

The name of the File system.

Id string

The ID of the File System.

MountPointCount int

The number of Mount points.

NumberOfDirectories int

The number of directories.

NumberOfFiles int

The number of files.

ProtocolType string

The protocol type. Valid values: HDFS.

ProvisionedThroughputInMiBps int

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s.

SpaceCapacity int

The capacity budget of the File system.

StoragePackageId string

Storage package Id.

StorageType string

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

ThroughputMode string

The throughput mode of the File system. Valid values: Provisioned, Standard.

UsedSpaceSize double

The used space of the File system.

ZoneId string

The zone ID of the File system.

CreateTime string

The creation time of the File system.

Description string

The description of the File system.

FileSystemId string

The ID of the File System.

FileSystemName string

The name of the File system.

Id string

The ID of the File System.

MountPointCount int

The number of Mount points.

NumberOfDirectories int

The number of directories.

NumberOfFiles int

The number of files.

ProtocolType string

The protocol type. Valid values: HDFS.

ProvisionedThroughputInMiBps int

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s.

SpaceCapacity int

The capacity budget of the File system.

StoragePackageId string

Storage package Id.

StorageType string

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

ThroughputMode string

The throughput mode of the File system. Valid values: Provisioned, Standard.

UsedSpaceSize float64

The used space of the File system.

ZoneId string

The zone ID of the File system.

createTime String

The creation time of the File system.

description String

The description of the File system.

fileSystemId String

The ID of the File System.

fileSystemName String

The name of the File system.

id String

The ID of the File System.

mountPointCount Integer

The number of Mount points.

numberOfDirectories Integer

The number of directories.

numberOfFiles Integer

The number of files.

protocolType String

The protocol type. Valid values: HDFS.

provisionedThroughputInMiBps Integer

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s.

spaceCapacity Integer

The capacity budget of the File system.

storagePackageId String

Storage package Id.

storageType String

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

throughputMode String

The throughput mode of the File system. Valid values: Provisioned, Standard.

usedSpaceSize Double

The used space of the File system.

zoneId String

The zone ID of the File system.

createTime string

The creation time of the File system.

description string

The description of the File system.

fileSystemId string

The ID of the File System.

fileSystemName string

The name of the File system.

id string

The ID of the File System.

mountPointCount number

The number of Mount points.

numberOfDirectories number

The number of directories.

numberOfFiles number

The number of files.

protocolType string

The protocol type. Valid values: HDFS.

provisionedThroughputInMiBps number

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s.

spaceCapacity number

The capacity budget of the File system.

storagePackageId string

Storage package Id.

storageType string

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

throughputMode string

The throughput mode of the File system. Valid values: Provisioned, Standard.

usedSpaceSize number

The used space of the File system.

zoneId string

The zone ID of the File system.

create_time str

The creation time of the File system.

description str

The description of the File system.

file_system_id str

The ID of the File System.

file_system_name str

The name of the File system.

id str

The ID of the File System.

mount_point_count int

The number of Mount points.

number_of_directories int

The number of directories.

number_of_files int

The number of files.

protocol_type str

The protocol type. Valid values: HDFS.

provisioned_throughput_in_mi_bps int

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s.

space_capacity int

The capacity budget of the File system.

storage_package_id str

Storage package Id.

storage_type str

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

throughput_mode str

The throughput mode of the File system. Valid values: Provisioned, Standard.

used_space_size float

The used space of the File system.

zone_id str

The zone ID of the File system.

createTime String

The creation time of the File system.

description String

The description of the File system.

fileSystemId String

The ID of the File System.

fileSystemName String

The name of the File system.

id String

The ID of the File System.

mountPointCount Number

The number of Mount points.

numberOfDirectories Number

The number of directories.

numberOfFiles Number

The number of files.

protocolType String

The protocol type. Valid values: HDFS.

provisionedThroughputInMiBps Number

The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s.

spaceCapacity Number

The capacity budget of the File system.

storagePackageId String

Storage package Id.

storageType String

The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.

throughputMode String

The throughput mode of the File system. Valid values: Provisioned, Standard.

usedSpaceSize Number

The used space of the File system.

zoneId String

The zone ID of the File system.

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.