1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. eds
  5. getNasFileSystems
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

alicloud.eds.getNasFileSystems

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi

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

    NOTE: Available in v1.141.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = new alicloud.eds.SimpleOfficeSite("default", {
        cidrBlock: "172.16.0.0/12",
        desktopAccessType: "Internet",
        officeSiteName: "your_office_site_name",
        enableInternetAccess: false,
    });
    const defaultNasFileSystem = new alicloud.eds.NasFileSystem("default", {
        description: "your_description",
        officeSiteId: _default.id,
        nasFileSystemName: "your_nas_file_system_name",
    });
    const ids = alicloud.eds.getNasFileSystems({});
    export const ecdNasFileSystemId1 = ids.then(ids => ids.systems?.[0]?.id);
    const nameRegex = defaultNasFileSystem.nasFileSystemName.apply(nasFileSystemName => alicloud.eds.getNasFileSystemsOutput({
        nameRegex: nasFileSystemName,
    }));
    export const ecdNasFileSystemId2 = nameRegex.apply(nameRegex => nameRegex.systems?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.eds.SimpleOfficeSite("default",
        cidr_block="172.16.0.0/12",
        desktop_access_type="Internet",
        office_site_name="your_office_site_name",
        enable_internet_access=False)
    default_nas_file_system = alicloud.eds.NasFileSystem("default",
        description="your_description",
        office_site_id=default.id,
        nas_file_system_name="your_nas_file_system_name")
    ids = alicloud.eds.get_nas_file_systems()
    pulumi.export("ecdNasFileSystemId1", ids.systems[0].id)
    name_regex = default_nas_file_system.nas_file_system_name.apply(lambda nas_file_system_name: alicloud.eds.get_nas_file_systems_output(name_regex=nas_file_system_name))
    pulumi.export("ecdNasFileSystemId2", name_regex.systems[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/eds"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := eds.NewSimpleOfficeSite(ctx, "default", &eds.SimpleOfficeSiteArgs{
    			CidrBlock:            pulumi.String("172.16.0.0/12"),
    			DesktopAccessType:    pulumi.String("Internet"),
    			OfficeSiteName:       pulumi.String("your_office_site_name"),
    			EnableInternetAccess: pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		defaultNasFileSystem, err := eds.NewNasFileSystem(ctx, "default", &eds.NasFileSystemArgs{
    			Description:       pulumi.String("your_description"),
    			OfficeSiteId:      _default.ID(),
    			NasFileSystemName: pulumi.String("your_nas_file_system_name"),
    		})
    		if err != nil {
    			return err
    		}
    		ids, err := eds.GetNasFileSystems(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("ecdNasFileSystemId1", ids.Systems[0].Id)
    		nameRegex := defaultNasFileSystem.NasFileSystemName.ApplyT(func(nasFileSystemName *string) (eds.GetNasFileSystemsResult, error) {
    			return eds.GetNasFileSystemsOutput(ctx, eds.GetNasFileSystemsOutputArgs{
    				NameRegex: nasFileSystemName,
    			}, nil), nil
    		}).(eds.GetNasFileSystemsResultOutput)
    		ctx.Export("ecdNasFileSystemId2", nameRegex.ApplyT(func(nameRegex eds.GetNasFileSystemsResult) (*string, error) {
    			return &nameRegex.Systems[0].Id, nil
    		}).(pulumi.StringPtrOutput))
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new AliCloud.Eds.SimpleOfficeSite("default", new()
        {
            CidrBlock = "172.16.0.0/12",
            DesktopAccessType = "Internet",
            OfficeSiteName = "your_office_site_name",
            EnableInternetAccess = false,
        });
    
        var defaultNasFileSystem = new AliCloud.Eds.NasFileSystem("default", new()
        {
            Description = "your_description",
            OfficeSiteId = @default.Id,
            NasFileSystemName = "your_nas_file_system_name",
        });
    
        var ids = AliCloud.Eds.GetNasFileSystems.Invoke();
    
        var nameRegex = AliCloud.Eds.GetNasFileSystems.Invoke(new()
        {
            NameRegex = defaultNasFileSystem.NasFileSystemName,
        });
    
        return new Dictionary<string, object?>
        {
            ["ecdNasFileSystemId1"] = ids.Apply(getNasFileSystemsResult => getNasFileSystemsResult.Systems[0]?.Id),
            ["ecdNasFileSystemId2"] = nameRegex.Apply(getNasFileSystemsResult => getNasFileSystemsResult.Systems[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.eds.SimpleOfficeSite;
    import com.pulumi.alicloud.eds.SimpleOfficeSiteArgs;
    import com.pulumi.alicloud.eds.NasFileSystem;
    import com.pulumi.alicloud.eds.NasFileSystemArgs;
    import com.pulumi.alicloud.eds.EdsFunctions;
    import com.pulumi.alicloud.eds.inputs.GetNasFileSystemsArgs;
    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) {
            var default_ = new SimpleOfficeSite("default", SimpleOfficeSiteArgs.builder()
                .cidrBlock("172.16.0.0/12")
                .desktopAccessType("Internet")
                .officeSiteName("your_office_site_name")
                .enableInternetAccess(false)
                .build());
    
            var defaultNasFileSystem = new NasFileSystem("defaultNasFileSystem", NasFileSystemArgs.builder()
                .description("your_description")
                .officeSiteId(default_.id())
                .nasFileSystemName("your_nas_file_system_name")
                .build());
    
            final var ids = EdsFunctions.getNasFileSystems();
    
            ctx.export("ecdNasFileSystemId1", ids.applyValue(getNasFileSystemsResult -> getNasFileSystemsResult.systems()[0].id()));
            final var nameRegex = EdsFunctions.getNasFileSystems(GetNasFileSystemsArgs.builder()
                .nameRegex(defaultNasFileSystem.nasFileSystemName())
                .build());
    
            ctx.export("ecdNasFileSystemId2", nameRegex.applyValue(getNasFileSystemsResult -> getNasFileSystemsResult).applyValue(nameRegex -> nameRegex.applyValue(getNasFileSystemsResult -> getNasFileSystemsResult.systems()[0].id())));
        }
    }
    
    resources:
      default:
        type: alicloud:eds:SimpleOfficeSite
        properties:
          cidrBlock: 172.16.0.0/12
          desktopAccessType: Internet
          officeSiteName: your_office_site_name
          enableInternetAccess: false
      defaultNasFileSystem:
        type: alicloud:eds:NasFileSystem
        name: default
        properties:
          description: your_description
          officeSiteId: ${default.id}
          nasFileSystemName: your_nas_file_system_name
    variables:
      ids:
        fn::invoke:
          Function: alicloud:eds:getNasFileSystems
          Arguments: {}
      nameRegex:
        fn::invoke:
          Function: alicloud:eds:getNasFileSystems
          Arguments:
            nameRegex: ${defaultNasFileSystem.nasFileSystemName}
    outputs:
      ecdNasFileSystemId1: ${ids.systems[0].id}
      ecdNasFileSystemId2: ${nameRegex.systems[0].id}
    

    Using getNasFileSystems

    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 getNasFileSystems(args: GetNasFileSystemsArgs, opts?: InvokeOptions): Promise<GetNasFileSystemsResult>
    function getNasFileSystemsOutput(args: GetNasFileSystemsOutputArgs, opts?: InvokeOptions): Output<GetNasFileSystemsResult>
    def get_nas_file_systems(ids: Optional[Sequence[str]] = None,
                             name_regex: Optional[str] = None,
                             office_site_id: Optional[str] = None,
                             output_file: Optional[str] = None,
                             status: Optional[str] = None,
                             opts: Optional[InvokeOptions] = None) -> GetNasFileSystemsResult
    def get_nas_file_systems_output(ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                             name_regex: Optional[pulumi.Input[str]] = None,
                             office_site_id: Optional[pulumi.Input[str]] = None,
                             output_file: Optional[pulumi.Input[str]] = None,
                             status: Optional[pulumi.Input[str]] = None,
                             opts: Optional[InvokeOptions] = None) -> Output[GetNasFileSystemsResult]
    func GetNasFileSystems(ctx *Context, args *GetNasFileSystemsArgs, opts ...InvokeOption) (*GetNasFileSystemsResult, error)
    func GetNasFileSystemsOutput(ctx *Context, args *GetNasFileSystemsOutputArgs, opts ...InvokeOption) GetNasFileSystemsResultOutput

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

    public static class GetNasFileSystems 
    {
        public static Task<GetNasFileSystemsResult> InvokeAsync(GetNasFileSystemsArgs args, InvokeOptions? opts = null)
        public static Output<GetNasFileSystemsResult> Invoke(GetNasFileSystemsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetNasFileSystemsResult> getNasFileSystems(GetNasFileSystemsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:eds/getNasFileSystems:getNasFileSystems
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Ids List<string>
    A list of Nas File System IDs.
    NameRegex string
    A regex string to filter results by Nas File System name.
    OfficeSiteId string
    The ID of office site.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of nas file system. Valid values: Pending, Running, Stopped,Deleting, Deleted, Invalid.
    Ids []string
    A list of Nas File System IDs.
    NameRegex string
    A regex string to filter results by Nas File System name.
    OfficeSiteId string
    The ID of office site.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of nas file system. Valid values: Pending, Running, Stopped,Deleting, Deleted, Invalid.
    ids List<String>
    A list of Nas File System IDs.
    nameRegex String
    A regex string to filter results by Nas File System name.
    officeSiteId String
    The ID of office site.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of nas file system. Valid values: Pending, Running, Stopped,Deleting, Deleted, Invalid.
    ids string[]
    A list of Nas File System IDs.
    nameRegex string
    A regex string to filter results by Nas File System name.
    officeSiteId string
    The ID of office site.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of nas file system. Valid values: Pending, Running, Stopped,Deleting, Deleted, Invalid.
    ids Sequence[str]
    A list of Nas File System IDs.
    name_regex str
    A regex string to filter results by Nas File System name.
    office_site_id str
    The ID of office site.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of nas file system. Valid values: Pending, Running, Stopped,Deleting, Deleted, Invalid.
    ids List<String>
    A list of Nas File System IDs.
    nameRegex String
    A regex string to filter results by Nas File System name.
    officeSiteId String
    The ID of office site.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of nas file system. Valid values: Pending, Running, Stopped,Deleting, Deleted, Invalid.

    getNasFileSystems 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.Eds.Outputs.GetNasFileSystemsSystem>
    NameRegex string
    OfficeSiteId string
    OutputFile string
    Status string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Names []string
    Systems []GetNasFileSystemsSystem
    NameRegex string
    OfficeSiteId string
    OutputFile string
    Status string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    systems List<GetNasFileSystemsSystem>
    nameRegex String
    officeSiteId String
    outputFile String
    status String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    names string[]
    systems GetNasFileSystemsSystem[]
    nameRegex string
    officeSiteId string
    outputFile string
    status string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    names Sequence[str]
    systems Sequence[GetNasFileSystemsSystem]
    name_regex str
    office_site_id str
    output_file str
    status str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    names List<String>
    systems List<Property Map>
    nameRegex String
    officeSiteId String
    outputFile String
    status String

    Supporting Types

    GetNasFileSystemsSystem

    Capacity string
    The capacity of nas file system.
    CreateTime string
    The create time of nas file system.
    Description string
    The description of nas file system.
    FileSystemId string
    The filesystem id of nas file system.
    FileSystemType string
    The type of nas file system.
    Id string
    The ID of the Nas File System.
    MeteredSize string
    The size of metered.
    MountTargetDomain string
    The domain of mount target.
    MountTargetStatus string
    The status of mount target. Valid values: Pending, Active, Inactive,Deleting,Invalid.
    NasFileSystemName string
    The name of nas file system.
    OfficeSiteId string
    The ID of office site.
    OfficeSiteName string
    The name of office site.
    Status string
    The status of nas file system. Valid values: Pending, Running, Stopped,Deleting, Deleted, Invalid.
    StorageType string
    The storage type of nas file system.
    SupportAcl bool
    Whether to support Acl.
    ZoneId string
    The zone id of nas file system.
    Capacity string
    The capacity of nas file system.
    CreateTime string
    The create time of nas file system.
    Description string
    The description of nas file system.
    FileSystemId string
    The filesystem id of nas file system.
    FileSystemType string
    The type of nas file system.
    Id string
    The ID of the Nas File System.
    MeteredSize string
    The size of metered.
    MountTargetDomain string
    The domain of mount target.
    MountTargetStatus string
    The status of mount target. Valid values: Pending, Active, Inactive,Deleting,Invalid.
    NasFileSystemName string
    The name of nas file system.
    OfficeSiteId string
    The ID of office site.
    OfficeSiteName string
    The name of office site.
    Status string
    The status of nas file system. Valid values: Pending, Running, Stopped,Deleting, Deleted, Invalid.
    StorageType string
    The storage type of nas file system.
    SupportAcl bool
    Whether to support Acl.
    ZoneId string
    The zone id of nas file system.
    capacity String
    The capacity of nas file system.
    createTime String
    The create time of nas file system.
    description String
    The description of nas file system.
    fileSystemId String
    The filesystem id of nas file system.
    fileSystemType String
    The type of nas file system.
    id String
    The ID of the Nas File System.
    meteredSize String
    The size of metered.
    mountTargetDomain String
    The domain of mount target.
    mountTargetStatus String
    The status of mount target. Valid values: Pending, Active, Inactive,Deleting,Invalid.
    nasFileSystemName String
    The name of nas file system.
    officeSiteId String
    The ID of office site.
    officeSiteName String
    The name of office site.
    status String
    The status of nas file system. Valid values: Pending, Running, Stopped,Deleting, Deleted, Invalid.
    storageType String
    The storage type of nas file system.
    supportAcl Boolean
    Whether to support Acl.
    zoneId String
    The zone id of nas file system.
    capacity string
    The capacity of nas file system.
    createTime string
    The create time of nas file system.
    description string
    The description of nas file system.
    fileSystemId string
    The filesystem id of nas file system.
    fileSystemType string
    The type of nas file system.
    id string
    The ID of the Nas File System.
    meteredSize string
    The size of metered.
    mountTargetDomain string
    The domain of mount target.
    mountTargetStatus string
    The status of mount target. Valid values: Pending, Active, Inactive,Deleting,Invalid.
    nasFileSystemName string
    The name of nas file system.
    officeSiteId string
    The ID of office site.
    officeSiteName string
    The name of office site.
    status string
    The status of nas file system. Valid values: Pending, Running, Stopped,Deleting, Deleted, Invalid.
    storageType string
    The storage type of nas file system.
    supportAcl boolean
    Whether to support Acl.
    zoneId string
    The zone id of nas file system.
    capacity str
    The capacity of nas file system.
    create_time str
    The create time of nas file system.
    description str
    The description of nas file system.
    file_system_id str
    The filesystem id of nas file system.
    file_system_type str
    The type of nas file system.
    id str
    The ID of the Nas File System.
    metered_size str
    The size of metered.
    mount_target_domain str
    The domain of mount target.
    mount_target_status str
    The status of mount target. Valid values: Pending, Active, Inactive,Deleting,Invalid.
    nas_file_system_name str
    The name of nas file system.
    office_site_id str
    The ID of office site.
    office_site_name str
    The name of office site.
    status str
    The status of nas file system. Valid values: Pending, Running, Stopped,Deleting, Deleted, Invalid.
    storage_type str
    The storage type of nas file system.
    support_acl bool
    Whether to support Acl.
    zone_id str
    The zone id of nas file system.
    capacity String
    The capacity of nas file system.
    createTime String
    The create time of nas file system.
    description String
    The description of nas file system.
    fileSystemId String
    The filesystem id of nas file system.
    fileSystemType String
    The type of nas file system.
    id String
    The ID of the Nas File System.
    meteredSize String
    The size of metered.
    mountTargetDomain String
    The domain of mount target.
    mountTargetStatus String
    The status of mount target. Valid values: Pending, Active, Inactive,Deleting,Invalid.
    nasFileSystemName String
    The name of nas file system.
    officeSiteId String
    The ID of office site.
    officeSiteName String
    The name of office site.
    status String
    The status of nas file system. Valid values: Pending, Running, Stopped,Deleting, Deleted, Invalid.
    storageType String
    The storage type of nas file system.
    supportAcl Boolean
    Whether to support Acl.
    zoneId String
    The zone id of nas 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.
    alicloud logo
    Alibaba Cloud v3.57.1 published on Wednesday, Jun 26, 2024 by Pulumi