1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. dfs
  5. getFileSystems
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.dfs.getFileSystems

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

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

NOTE: Available in v1.140.0+.

Example Usage

Basic Usage

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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
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}
Copy

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>
Copy
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]
Copy
func GetFileSystems(ctx *Context, args *GetFileSystemsArgs, opts ...InvokeOption) (*GetFileSystemsResult, error)
func GetFileSystemsOutput(ctx *Context, args *GetFileSystemsOutputArgs, opts ...InvokeOption) GetFileSystemsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetFileSystemsResult> getFileSystems(GetFileSystemsArgs args, InvokeOptions options)
public static Output<GetFileSystemsResult> getFileSystems(GetFileSystemsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:dfs/getFileSystems:getFileSystems
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Ids Changes to this property will trigger replacement. List<string>
A list of File System IDs.
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. []string
A list of File System IDs.
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>
A list of File System IDs.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string[]
A list of File System IDs.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. Sequence[str]
A list of File System IDs.
name_regex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. List<String>
A list of File System IDs.
nameRegex Changes to this property will trigger replacement. 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 This property is required. string
The creation time of the File system.
Description This property is required. string
The description of the File system.
FileSystemId This property is required. string
The ID of the File System.
FileSystemName This property is required. string
The name of the File system.
Id This property is required. string
The ID of the File System.
MountPointCount This property is required. int
The number of Mount points.
NumberOfDirectories This property is required. int
The number of directories.
NumberOfFiles This property is required. int
The number of files.
ProtocolType This property is required. string
The protocol type. Valid values: HDFS.
ProvisionedThroughputInMiBps This property is required. int
The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s.
SpaceCapacity This property is required. int
The capacity budget of the File system.
StoragePackageId This property is required. string
Storage package Id.
StorageType This property is required. string
The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.
ThroughputMode This property is required. string
The throughput mode of the File system. Valid values: Provisioned, Standard.
UsedSpaceSize This property is required. double
The used space of the File system.
ZoneId This property is required. string
The zone ID of the File system.
CreateTime This property is required. string
The creation time of the File system.
Description This property is required. string
The description of the File system.
FileSystemId This property is required. string
The ID of the File System.
FileSystemName This property is required. string
The name of the File system.
Id This property is required. string
The ID of the File System.
MountPointCount This property is required. int
The number of Mount points.
NumberOfDirectories This property is required. int
The number of directories.
NumberOfFiles This property is required. int
The number of files.
ProtocolType This property is required. string
The protocol type. Valid values: HDFS.
ProvisionedThroughputInMiBps This property is required. int
The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s.
SpaceCapacity This property is required. int
The capacity budget of the File system.
StoragePackageId This property is required. string
Storage package Id.
StorageType This property is required. string
The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.
ThroughputMode This property is required. string
The throughput mode of the File system. Valid values: Provisioned, Standard.
UsedSpaceSize This property is required. float64
The used space of the File system.
ZoneId This property is required. string
The zone ID of the File system.
createTime This property is required. String
The creation time of the File system.
description This property is required. String
The description of the File system.
fileSystemId This property is required. String
The ID of the File System.
fileSystemName This property is required. String
The name of the File system.
id This property is required. String
The ID of the File System.
mountPointCount This property is required. Integer
The number of Mount points.
numberOfDirectories This property is required. Integer
The number of directories.
numberOfFiles This property is required. Integer
The number of files.
protocolType This property is required. String
The protocol type. Valid values: HDFS.
provisionedThroughputInMiBps This property is required. Integer
The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s.
spaceCapacity This property is required. Integer
The capacity budget of the File system.
storagePackageId This property is required. String
Storage package Id.
storageType This property is required. String
The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.
throughputMode This property is required. String
The throughput mode of the File system. Valid values: Provisioned, Standard.
usedSpaceSize This property is required. Double
The used space of the File system.
zoneId This property is required. String
The zone ID of the File system.
createTime This property is required. string
The creation time of the File system.
description This property is required. string
The description of the File system.
fileSystemId This property is required. string
The ID of the File System.
fileSystemName This property is required. string
The name of the File system.
id This property is required. string
The ID of the File System.
mountPointCount This property is required. number
The number of Mount points.
numberOfDirectories This property is required. number
The number of directories.
numberOfFiles This property is required. number
The number of files.
protocolType This property is required. string
The protocol type. Valid values: HDFS.
provisionedThroughputInMiBps This property is required. number
The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s.
spaceCapacity This property is required. number
The capacity budget of the File system.
storagePackageId This property is required. string
Storage package Id.
storageType This property is required. string
The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.
throughputMode This property is required. string
The throughput mode of the File system. Valid values: Provisioned, Standard.
usedSpaceSize This property is required. number
The used space of the File system.
zoneId This property is required. string
The zone ID of the File system.
create_time This property is required. str
The creation time of the File system.
description This property is required. str
The description of the File system.
file_system_id This property is required. str
The ID of the File System.
file_system_name This property is required. str
The name of the File system.
id This property is required. str
The ID of the File System.
mount_point_count This property is required. int
The number of Mount points.
number_of_directories This property is required. int
The number of directories.
number_of_files This property is required. int
The number of files.
protocol_type This property is required. str
The protocol type. Valid values: HDFS.
provisioned_throughput_in_mi_bps This property is required. int
The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s.
space_capacity This property is required. int
The capacity budget of the File system.
storage_package_id This property is required. str
Storage package Id.
storage_type This property is required. str
The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.
throughput_mode This property is required. str
The throughput mode of the File system. Valid values: Provisioned, Standard.
used_space_size This property is required. float
The used space of the File system.
zone_id This property is required. str
The zone ID of the File system.
createTime This property is required. String
The creation time of the File system.
description This property is required. String
The description of the File system.
fileSystemId This property is required. String
The ID of the File System.
fileSystemName This property is required. String
The name of the File system.
id This property is required. String
The ID of the File System.
mountPointCount This property is required. Number
The number of Mount points.
numberOfDirectories This property is required. Number
The number of directories.
numberOfFiles This property is required. Number
The number of files.
protocolType This property is required. String
The protocol type. Valid values: HDFS.
provisionedThroughputInMiBps This property is required. Number
The preset throughput of the File system. Valid values: 1 to 1024, Unit: MB/s.
spaceCapacity This property is required. Number
The capacity budget of the File system.
storagePackageId This property is required. String
Storage package Id.
storageType This property is required. String
The storage specifications of the File system. Valid values: PERFORMANCE, STANDARD.
throughputMode This property is required. String
The throughput mode of the File system. Valid values: Provisioned, Standard.
usedSpaceSize This property is required. Number
The used space of the File system.
zoneId This property is required. 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.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi