Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
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
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);
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)
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
})
}
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 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()));
}
}
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)
public static Output<GetFileSystemsResult> getFileSystems(GetFileSystemsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:dfs/getFileSystems:getFileSystems
arguments:
# arguments dictionary
The following arguments are supported:
- Ids
Changes to this property will trigger replacement.
- A list of File System IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by File System name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- Ids
Changes to this property will trigger replacement.
- A list of File System IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by File System name.
- Output
File string - File name where to save data source results (after running
pulumi preview
).
- ids
Changes to this property will trigger replacement.
- A list of File System IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by File System name.
- output
File String - File name where to save data source results (after running
pulumi preview
).
- ids
Changes to this property will trigger replacement.
- A list of File System IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by File System name.
- output
File string - File name where to save data source results (after running
pulumi preview
).
- ids
Changes to this property will trigger replacement.
- A list of File System IDs.
- name_
regex Changes to this property will trigger replacement.
- 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.
- A list of File System IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by File System name.
- output
File 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.
Ali Cloud. Dfs. Outputs. Get File Systems System> - Name
Regex string - Output
File string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Names []string
- Systems
[]Get
File Systems System - Name
Regex string - Output
File string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- names List<String>
- systems
List<Get
File Systems System> - name
Regex String - output
File String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- names string[]
- systems
Get
File Systems System[] - name
Regex string - output
File string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- names Sequence[str]
- systems
Sequence[Get
File Systems System] - 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>
- name
Regex String - output
File String
Supporting Types
GetFileSystemsSystem
- Create
Time This property is required. string - The creation time of the File system.
- Description
This property is required. string - The description of the File system.
- File
System Id This property is required. string - The ID of the File System.
- File
System Name This property is required. string - The name of the File system.
- Id
This property is required. string - 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. string - 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
to1024
, Unit: MB/s. - Space
Capacity This property is required. int - The capacity budget of the File system.
- Storage
Package Id This property is required. string - Storage package Id.
- Storage
Type This property is required. string - The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
. - Throughput
Mode This property is required. string - The throughput mode of the File system. Valid values:
Provisioned
,Standard
. - Used
Space Size This property is required. double - The used space of the File system.
- Zone
Id This property is required. string - The zone ID of the File system.
- Create
Time This property is required. string - The creation time of the File system.
- Description
This property is required. string - The description of the File system.
- File
System Id This property is required. string - The ID of the File System.
- File
System Name This property is required. string - The name of the File system.
- Id
This property is required. string - 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. string - 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
to1024
, Unit: MB/s. - Space
Capacity This property is required. int - The capacity budget of the File system.
- Storage
Package Id This property is required. string - Storage package Id.
- Storage
Type This property is required. string - The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
. - Throughput
Mode This property is required. string - The throughput mode of the File system. Valid values:
Provisioned
,Standard
. - Used
Space Size This property is required. float64 - The used space of the File system.
- Zone
Id This property is required. string - The zone ID of the File system.
- create
Time This property is required. String - The creation time of the File system.
- description
This property is required. String - The description of the File system.
- file
System Id This property is required. String - The ID of the File System.
- file
System Name This property is required. String - The name of the File system.
- id
This property is required. String - The ID of the File System.
- mount
Point Count This property is required. Integer - The number of Mount points.
- number
Of Directories This property is required. Integer - The number of directories.
- number
Of Files This property is required. Integer - The number of files.
- protocol
Type This property is required. String - The protocol type. Valid values:
HDFS
. - provisioned
Throughput In Mi Bps This property is required. Integer - The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. - space
Capacity This property is required. Integer - The capacity budget of the File system.
- storage
Package Id This property is required. String - Storage package Id.
- storage
Type This property is required. String - The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
. - throughput
Mode This property is required. String - The throughput mode of the File system. Valid values:
Provisioned
,Standard
. - used
Space Size This property is required. Double - The used space of the File system.
- zone
Id This property is required. String - The zone ID of the File system.
- create
Time This property is required. string - The creation time of the File system.
- description
This property is required. string - The description of the File system.
- file
System Id This property is required. string - The ID of the File System.
- file
System Name This property is required. string - The name of the File system.
- id
This property is required. string - The ID of the File System.
- mount
Point Count This property is required. number - The number of Mount points.
- number
Of Directories This property is required. number - The number of directories.
- number
Of Files This property is required. number - The number of files.
- protocol
Type This property is required. string - The protocol type. Valid values:
HDFS
. - provisioned
Throughput In Mi Bps This property is required. number - The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. - space
Capacity This property is required. number - The capacity budget of the File system.
- storage
Package Id This property is required. string - Storage package Id.
- storage
Type This property is required. string - The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
. - throughput
Mode This property is required. string - The throughput mode of the File system. Valid values:
Provisioned
,Standard
. - used
Space Size This property is required. number - The used space of the File system.
- zone
Id 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
to1024
, 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.
- create
Time This property is required. String - The creation time of the File system.
- description
This property is required. String - The description of the File system.
- file
System Id This property is required. String - The ID of the File System.
- file
System Name This property is required. String - The name of the File system.
- id
This property is required. String - The ID of the File System.
- mount
Point Count This property is required. Number - The number of Mount points.
- number
Of Directories This property is required. Number - The number of directories.
- number
Of Files This property is required. Number - The number of files.
- protocol
Type This property is required. String - The protocol type. Valid values:
HDFS
. - provisioned
Throughput In Mi Bps This property is required. Number - The preset throughput of the File system. Valid values:
1
to1024
, Unit: MB/s. - space
Capacity This property is required. Number - The capacity budget of the File system.
- storage
Package Id This property is required. String - Storage package Id.
- storage
Type This property is required. String - The storage specifications of the File system. Valid values:
PERFORMANCE
,STANDARD
. - throughput
Mode This property is required. String - The throughput mode of the File system. Valid values:
Provisioned
,Standard
. - used
Space Size This property is required. Number - The used space of the File system.
- zone
Id 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.