1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. nas
  5. getFileSystems
Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

alicloud.nas.getFileSystems

Explore with Pulumi AI

Alibaba Cloud v3.75.0 published on Friday, Mar 7, 2025 by Pulumi

This data source provides FileSystems available to the user.

NOTE: Available in 1.35.0+

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const fs = alicloud.nas.getFileSystems({
    protocolType: "NFS",
    descriptionRegex: foo.description,
});
export const alicloudNasFileSystemsId = fs.then(fs => fs.systems?.[0]?.id);
Copy
import pulumi
import pulumi_alicloud as alicloud

fs = alicloud.nas.get_file_systems(protocol_type="NFS",
    description_regex=foo["description"])
pulumi.export("alicloudNasFileSystemsId", fs.systems[0].id)
Copy
package main

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

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fs, err := nas.GetFileSystems(ctx, &nas.GetFileSystemsArgs{
			ProtocolType:     pulumi.StringRef("NFS"),
			DescriptionRegex: pulumi.StringRef(foo.Description),
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("alicloudNasFileSystemsId", fs.Systems[0].Id)
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var fs = AliCloud.Nas.GetFileSystems.Invoke(new()
    {
        ProtocolType = "NFS",
        DescriptionRegex = foo.Description,
    });

    return new Dictionary<string, object?>
    {
        ["alicloudNasFileSystemsId"] = fs.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.nas.NasFunctions;
import com.pulumi.alicloud.nas.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 fs = NasFunctions.getFileSystems(GetFileSystemsArgs.builder()
            .protocolType("NFS")
            .descriptionRegex(foo.description())
            .build());

        ctx.export("alicloudNasFileSystemsId", fs.applyValue(getFileSystemsResult -> getFileSystemsResult.systems()[0].id()));
    }
}
Copy
variables:
  fs:
    fn::invoke:
      function: alicloud:nas:getFileSystems
      arguments:
        protocolType: NFS
        descriptionRegex: ${foo.description}
outputs:
  alicloudNasFileSystemsId: ${fs.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(description_regex: Optional[str] = None,
                     ids: Optional[Sequence[str]] = None,
                     output_file: Optional[str] = None,
                     protocol_type: Optional[str] = None,
                     storage_type: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetFileSystemsResult
def get_file_systems_output(description_regex: Optional[pulumi.Input[str]] = None,
                     ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     output_file: Optional[pulumi.Input[str]] = None,
                     protocol_type: Optional[pulumi.Input[str]] = None,
                     storage_type: 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:nas/getFileSystems:getFileSystems
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

DescriptionRegex Changes to this property will trigger replacement. string
A regex string to filter the results by the :FileSystem description.
Ids Changes to this property will trigger replacement. List<string>
A list of FileSystemId.
OutputFile string
File name where to save data source results (after running pulumi preview).
ProtocolType Changes to this property will trigger replacement. string
The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
StorageType Changes to this property will trigger replacement. string
The storage type of the file system.

  • Valid values:
  • Performance (Available when the file_system_type is standard)
  • Capacity (Available when the file_system_type is standard)
DescriptionRegex Changes to this property will trigger replacement. string
A regex string to filter the results by the :FileSystem description.
Ids Changes to this property will trigger replacement. []string
A list of FileSystemId.
OutputFile string
File name where to save data source results (after running pulumi preview).
ProtocolType Changes to this property will trigger replacement. string
The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
StorageType Changes to this property will trigger replacement. string
The storage type of the file system.

  • Valid values:
  • Performance (Available when the file_system_type is standard)
  • Capacity (Available when the file_system_type is standard)
descriptionRegex Changes to this property will trigger replacement. String
A regex string to filter the results by the :FileSystem description.
ids Changes to this property will trigger replacement. List<String>
A list of FileSystemId.
outputFile String
File name where to save data source results (after running pulumi preview).
protocolType Changes to this property will trigger replacement. String
The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
storageType Changes to this property will trigger replacement. String
The storage type of the file system.

  • Valid values:
  • Performance (Available when the file_system_type is standard)
  • Capacity (Available when the file_system_type is standard)
descriptionRegex Changes to this property will trigger replacement. string
A regex string to filter the results by the :FileSystem description.
ids Changes to this property will trigger replacement. string[]
A list of FileSystemId.
outputFile string
File name where to save data source results (after running pulumi preview).
protocolType Changes to this property will trigger replacement. string
The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
storageType Changes to this property will trigger replacement. string
The storage type of the file system.

  • Valid values:
  • Performance (Available when the file_system_type is standard)
  • Capacity (Available when the file_system_type is standard)
description_regex Changes to this property will trigger replacement. str
A regex string to filter the results by the :FileSystem description.
ids Changes to this property will trigger replacement. Sequence[str]
A list of FileSystemId.
output_file str
File name where to save data source results (after running pulumi preview).
protocol_type Changes to this property will trigger replacement. str
The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
storage_type Changes to this property will trigger replacement. str
The storage type of the file system.

  • Valid values:
  • Performance (Available when the file_system_type is standard)
  • Capacity (Available when the file_system_type is standard)
descriptionRegex Changes to this property will trigger replacement. String
A regex string to filter the results by the :FileSystem description.
ids Changes to this property will trigger replacement. List<String>
A list of FileSystemId.
outputFile String
File name where to save data source results (after running pulumi preview).
protocolType Changes to this property will trigger replacement. String
The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
storageType Changes to this property will trigger replacement. String
The storage type of the file system.

  • Valid values:
  • Performance (Available when the file_system_type is standard)
  • Capacity (Available when the file_system_type is standard)

getFileSystems Result

The following output properties are available:

Descriptions List<string>
A list of FileSystem descriptions.
Id string
The provider-assigned unique ID for this managed resource.
Ids List<string>
A list of FileSystem Id.
Systems List<Pulumi.AliCloud.Nas.Outputs.GetFileSystemsSystem>
A list of VPCs. Each element contains the following attributes:
DescriptionRegex string
OutputFile string
ProtocolType string
ProtocolType block of the FileSystem
StorageType string
StorageType block of the FileSystem.
Descriptions []string
A list of FileSystem descriptions.
Id string
The provider-assigned unique ID for this managed resource.
Ids []string
A list of FileSystem Id.
Systems []GetFileSystemsSystem
A list of VPCs. Each element contains the following attributes:
DescriptionRegex string
OutputFile string
ProtocolType string
ProtocolType block of the FileSystem
StorageType string
StorageType block of the FileSystem.
descriptions List<String>
A list of FileSystem descriptions.
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of FileSystem Id.
systems List<GetFileSystemsSystem>
A list of VPCs. Each element contains the following attributes:
descriptionRegex String
outputFile String
protocolType String
ProtocolType block of the FileSystem
storageType String
StorageType block of the FileSystem.
descriptions string[]
A list of FileSystem descriptions.
id string
The provider-assigned unique ID for this managed resource.
ids string[]
A list of FileSystem Id.
systems GetFileSystemsSystem[]
A list of VPCs. Each element contains the following attributes:
descriptionRegex string
outputFile string
protocolType string
ProtocolType block of the FileSystem
storageType string
StorageType block of the FileSystem.
descriptions Sequence[str]
A list of FileSystem descriptions.
id str
The provider-assigned unique ID for this managed resource.
ids Sequence[str]
A list of FileSystem Id.
systems Sequence[GetFileSystemsSystem]
A list of VPCs. Each element contains the following attributes:
description_regex str
output_file str
protocol_type str
ProtocolType block of the FileSystem
storage_type str
StorageType block of the FileSystem.
descriptions List<String>
A list of FileSystem descriptions.
id String
The provider-assigned unique ID for this managed resource.
ids List<String>
A list of FileSystem Id.
systems List<Property Map>
A list of VPCs. Each element contains the following attributes:
descriptionRegex String
outputFile String
protocolType String
ProtocolType block of the FileSystem
storageType String
StorageType block of the FileSystem.

Supporting Types

GetFileSystemsSystem

Capacity This property is required. int
(Optional, Available in v1.140.0+) The capacity of the file system.
CreateTime This property is required. string
Time of creation.
Description This property is required. string
Description of the FileSystem.
EncryptType This property is required. int
(Optional, Available in v1.121.2+) Whether the file system is encrypted.

  • Valid values:
FileSystemType This property is required. string
The type of the file system. Valid values: standard (Default), extreme.
Id This property is required. string
ID of the FileSystem.
KmsKeyId This property is required. string
(Optional, Available in v1.140.0+) The id of the KMS key.
MeteredSize This property is required. int
MeteredSize of the FileSystem.
ProtocolType This property is required. string
The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
RegionId This property is required. string
ID of the region where the FileSystem is located.
StorageType This property is required. string
The storage type of the file system.

  • Valid values:
  • Performance (Available when the file_system_type is standard)
  • Capacity (Available when the file_system_type is standard)
ZoneId This property is required. string
(Optional, Available in v1.140.0+) The id of the zone. Each region consists of multiple isolated locations known as zones. Each zone has an independent power supply and network.
Capacity This property is required. int
(Optional, Available in v1.140.0+) The capacity of the file system.
CreateTime This property is required. string
Time of creation.
Description This property is required. string
Description of the FileSystem.
EncryptType This property is required. int
(Optional, Available in v1.121.2+) Whether the file system is encrypted.

  • Valid values:
FileSystemType This property is required. string
The type of the file system. Valid values: standard (Default), extreme.
Id This property is required. string
ID of the FileSystem.
KmsKeyId This property is required. string
(Optional, Available in v1.140.0+) The id of the KMS key.
MeteredSize This property is required. int
MeteredSize of the FileSystem.
ProtocolType This property is required. string
The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
RegionId This property is required. string
ID of the region where the FileSystem is located.
StorageType This property is required. string
The storage type of the file system.

  • Valid values:
  • Performance (Available when the file_system_type is standard)
  • Capacity (Available when the file_system_type is standard)
ZoneId This property is required. string
(Optional, Available in v1.140.0+) The id of the zone. Each region consists of multiple isolated locations known as zones. Each zone has an independent power supply and network.
capacity This property is required. Integer
(Optional, Available in v1.140.0+) The capacity of the file system.
createTime This property is required. String
Time of creation.
description This property is required. String
Description of the FileSystem.
encryptType This property is required. Integer
(Optional, Available in v1.121.2+) Whether the file system is encrypted.

  • Valid values:
fileSystemType This property is required. String
The type of the file system. Valid values: standard (Default), extreme.
id This property is required. String
ID of the FileSystem.
kmsKeyId This property is required. String
(Optional, Available in v1.140.0+) The id of the KMS key.
meteredSize This property is required. Integer
MeteredSize of the FileSystem.
protocolType This property is required. String
The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
regionId This property is required. String
ID of the region where the FileSystem is located.
storageType This property is required. String
The storage type of the file system.

  • Valid values:
  • Performance (Available when the file_system_type is standard)
  • Capacity (Available when the file_system_type is standard)
zoneId This property is required. String
(Optional, Available in v1.140.0+) The id of the zone. Each region consists of multiple isolated locations known as zones. Each zone has an independent power supply and network.
capacity This property is required. number
(Optional, Available in v1.140.0+) The capacity of the file system.
createTime This property is required. string
Time of creation.
description This property is required. string
Description of the FileSystem.
encryptType This property is required. number
(Optional, Available in v1.121.2+) Whether the file system is encrypted.

  • Valid values:
fileSystemType This property is required. string
The type of the file system. Valid values: standard (Default), extreme.
id This property is required. string
ID of the FileSystem.
kmsKeyId This property is required. string
(Optional, Available in v1.140.0+) The id of the KMS key.
meteredSize This property is required. number
MeteredSize of the FileSystem.
protocolType This property is required. string
The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
regionId This property is required. string
ID of the region where the FileSystem is located.
storageType This property is required. string
The storage type of the file system.

  • Valid values:
  • Performance (Available when the file_system_type is standard)
  • Capacity (Available when the file_system_type is standard)
zoneId This property is required. string
(Optional, Available in v1.140.0+) The id of the zone. Each region consists of multiple isolated locations known as zones. Each zone has an independent power supply and network.
capacity This property is required. int
(Optional, Available in v1.140.0+) The capacity of the file system.
create_time This property is required. str
Time of creation.
description This property is required. str
Description of the FileSystem.
encrypt_type This property is required. int
(Optional, Available in v1.121.2+) Whether the file system is encrypted.

  • Valid values:
file_system_type This property is required. str
The type of the file system. Valid values: standard (Default), extreme.
id This property is required. str
ID of the FileSystem.
kms_key_id This property is required. str
(Optional, Available in v1.140.0+) The id of the KMS key.
metered_size This property is required. int
MeteredSize of the FileSystem.
protocol_type This property is required. str
The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
region_id This property is required. str
ID of the region where the FileSystem is located.
storage_type This property is required. str
The storage type of the file system.

  • Valid values:
  • Performance (Available when the file_system_type is standard)
  • Capacity (Available when the file_system_type is standard)
zone_id This property is required. str
(Optional, Available in v1.140.0+) The id of the zone. Each region consists of multiple isolated locations known as zones. Each zone has an independent power supply and network.
capacity This property is required. Number
(Optional, Available in v1.140.0+) The capacity of the file system.
createTime This property is required. String
Time of creation.
description This property is required. String
Description of the FileSystem.
encryptType This property is required. Number
(Optional, Available in v1.121.2+) Whether the file system is encrypted.

  • Valid values:
fileSystemType This property is required. String
The type of the file system. Valid values: standard (Default), extreme.
id This property is required. String
ID of the FileSystem.
kmsKeyId This property is required. String
(Optional, Available in v1.140.0+) The id of the KMS key.
meteredSize This property is required. Number
MeteredSize of the FileSystem.
protocolType This property is required. String
The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
regionId This property is required. String
ID of the region where the FileSystem is located.
storageType This property is required. String
The storage type of the file system.

  • Valid values:
  • Performance (Available when the file_system_type is standard)
  • Capacity (Available when the file_system_type is standard)
zoneId This property is required. String
(Optional, Available in v1.140.0+) The id of the zone. Each region consists of multiple isolated locations known as zones. Each zone has an independent power supply and network.

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.75.0 published on Friday, Mar 7, 2025 by Pulumi