1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. nas
  5. getFileSystems
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

alicloud.nas.getFileSystems

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 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);
    
    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)
    
    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
    	})
    }
    
    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),
        };
    });
    
    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()));
        }
    }
    
    variables:
      fs:
        fn::invoke:
          Function: alicloud:nas:getFileSystems
          Arguments:
            protocolType: NFS
            descriptionRegex: ${foo.description}
    outputs:
      alicloudNasFileSystemsId: ${fs.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(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]
    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:nas/getFileSystems:getFileSystems
      arguments:
        # arguments dictionary

    The following arguments are supported:

    DescriptionRegex string
    A regex string to filter the results by the :FileSystem description.
    Ids List<string>
    A list of FileSystemId.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ProtocolType string
    The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
    StorageType 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 string
    A regex string to filter the results by the :FileSystem description.
    Ids []string
    A list of FileSystemId.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ProtocolType string
    The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
    StorageType 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 String
    A regex string to filter the results by the :FileSystem description.
    ids List<String>
    A list of FileSystemId.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    protocolType String
    The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
    storageType 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 string
    A regex string to filter the results by the :FileSystem description.
    ids string[]
    A list of FileSystemId.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    protocolType string
    The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
    storageType 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 str
    A regex string to filter the results by the :FileSystem description.
    ids Sequence[str]
    A list of FileSystemId.
    output_file str
    File name where to save data source results (after running pulumi preview).
    protocol_type str
    The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
    storage_type 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 String
    A regex string to filter the results by the :FileSystem description.
    ids List<String>
    A list of FileSystemId.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    protocolType String
    The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
    storageType 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 int
    (Optional, Available in v1.140.0+) The capacity of the file system.
    CreateTime string
    Time of creation.
    Description string
    Description of the FileSystem.
    EncryptType int
    (Optional, Available in v1.121.2+) Whether the file system is encrypted.

    • Valid values:
    FileSystemType string
    The type of the file system. Valid values: standard (Default), extreme.
    Id string
    ID of the FileSystem.
    KmsKeyId string
    (Optional, Available in v1.140.0+) The id of the KMS key.
    MeteredSize int
    MeteredSize of the FileSystem.
    ProtocolType string
    The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
    RegionId string
    ID of the region where the FileSystem is located.
    StorageType 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 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 int
    (Optional, Available in v1.140.0+) The capacity of the file system.
    CreateTime string
    Time of creation.
    Description string
    Description of the FileSystem.
    EncryptType int
    (Optional, Available in v1.121.2+) Whether the file system is encrypted.

    • Valid values:
    FileSystemType string
    The type of the file system. Valid values: standard (Default), extreme.
    Id string
    ID of the FileSystem.
    KmsKeyId string
    (Optional, Available in v1.140.0+) The id of the KMS key.
    MeteredSize int
    MeteredSize of the FileSystem.
    ProtocolType string
    The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
    RegionId string
    ID of the region where the FileSystem is located.
    StorageType 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 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 Integer
    (Optional, Available in v1.140.0+) The capacity of the file system.
    createTime String
    Time of creation.
    description String
    Description of the FileSystem.
    encryptType Integer
    (Optional, Available in v1.121.2+) Whether the file system is encrypted.

    • Valid values:
    fileSystemType String
    The type of the file system. Valid values: standard (Default), extreme.
    id String
    ID of the FileSystem.
    kmsKeyId String
    (Optional, Available in v1.140.0+) The id of the KMS key.
    meteredSize Integer
    MeteredSize of the FileSystem.
    protocolType String
    The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
    regionId String
    ID of the region where the FileSystem is located.
    storageType 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 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 number
    (Optional, Available in v1.140.0+) The capacity of the file system.
    createTime string
    Time of creation.
    description string
    Description of the FileSystem.
    encryptType number
    (Optional, Available in v1.121.2+) Whether the file system is encrypted.

    • Valid values:
    fileSystemType string
    The type of the file system. Valid values: standard (Default), extreme.
    id string
    ID of the FileSystem.
    kmsKeyId string
    (Optional, Available in v1.140.0+) The id of the KMS key.
    meteredSize number
    MeteredSize of the FileSystem.
    protocolType string
    The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
    regionId string
    ID of the region where the FileSystem is located.
    storageType 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 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 int
    (Optional, Available in v1.140.0+) The capacity of the file system.
    create_time str
    Time of creation.
    description str
    Description of the FileSystem.
    encrypt_type int
    (Optional, Available in v1.121.2+) Whether the file system is encrypted.

    • Valid values:
    file_system_type str
    The type of the file system. Valid values: standard (Default), extreme.
    id str
    ID of the FileSystem.
    kms_key_id str
    (Optional, Available in v1.140.0+) The id of the KMS key.
    metered_size int
    MeteredSize of the FileSystem.
    protocol_type str
    The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
    region_id str
    ID of the region where the FileSystem is located.
    storage_type 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 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 Number
    (Optional, Available in v1.140.0+) The capacity of the file system.
    createTime String
    Time of creation.
    description String
    Description of the FileSystem.
    encryptType Number
    (Optional, Available in v1.121.2+) Whether the file system is encrypted.

    • Valid values:
    fileSystemType String
    The type of the file system. Valid values: standard (Default), extreme.
    id String
    ID of the FileSystem.
    kmsKeyId String
    (Optional, Available in v1.140.0+) The id of the KMS key.
    meteredSize Number
    MeteredSize of the FileSystem.
    protocolType String
    The protocol type of the file system. Valid values: NFS, SMB (Available when the file_system_type is standard).
    regionId String
    ID of the region where the FileSystem is located.
    storageType 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 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.
    alicloud logo
    Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi