Alibaba Cloud

v3.28.0 published on Tuesday, Aug 16, 2022 by Pulumi

getNasFileSystems

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

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultSimpleOfficeSite = new AliCloud.Eds.SimpleOfficeSite("defaultSimpleOfficeSite", new AliCloud.Eds.SimpleOfficeSiteArgs
        {
            CidrBlock = "172.16.0.0/12",
            DesktopAccessType = "Internet",
            OfficeSiteName = "your_office_site_name",
            EnableInternetAccess = false,
        });
        var defaultNasFileSystem = new AliCloud.Eds.NasFileSystem("defaultNasFileSystem", new AliCloud.Eds.NasFileSystemArgs
        {
            Description = "your_description",
            OfficeSiteId = defaultSimpleOfficeSite.Id,
            NasFileSystemName = "your_nas_file_system_name",
        });
        var ids = Output.Create(AliCloud.Eds.GetNasFileSystems.InvokeAsync());
        this.EcdNasFileSystemId1 = ids.Apply(ids => ids.Systems?[0]?.Id);
        var nameRegex = defaultNasFileSystem.NasFileSystemName.Apply(nasFileSystemName => AliCloud.Eds.GetNasFileSystems.Invoke(new AliCloud.Eds.GetNasFileSystemsInvokeArgs
        {
            NameRegex = nasFileSystemName,
        }));
        this.EcdNasFileSystemId2 = nameRegex.Apply(nameRegex => nameRegex.Systems?[0]?.Id);
    }

    [Output("ecdNasFileSystemId1")]
    public Output<string> EcdNasFileSystemId1 { get; set; }
    [Output("ecdNasFileSystemId2")]
    public Output<string> EcdNasFileSystemId2 { get; set; }
}
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 {
		defaultSimpleOfficeSite, err := eds.NewSimpleOfficeSite(ctx, "defaultSimpleOfficeSite", &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, "defaultNasFileSystem", &eds.NasFileSystemArgs{
			Description:       pulumi.String("your_description"),
			OfficeSiteId:      defaultSimpleOfficeSite.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)
		ctx.Export("ecdNasFileSystemId2", nameRegex.ApplyT(func(nameRegex eds.GetNasFileSystemsResult) (string, error) {
			return nameRegex.Systems[0].Id, nil
		}).(pulumi.StringOutput))
		return nil
	})
}
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 defaultSimpleOfficeSite = new SimpleOfficeSite("defaultSimpleOfficeSite", 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(defaultSimpleOfficeSite.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())));
    }
}
import pulumi
import pulumi_alicloud as alicloud

default_simple_office_site = alicloud.eds.SimpleOfficeSite("defaultSimpleOfficeSite",
    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("defaultNasFileSystem",
    description="your_description",
    office_site_id=default_simple_office_site.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)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultSimpleOfficeSite = new alicloud.eds.SimpleOfficeSite("defaultSimpleOfficeSite", {
    cidrBlock: "172.16.0.0/12",
    desktopAccessType: "Internet",
    officeSiteName: "your_office_site_name",
    enableInternetAccess: false,
});
const defaultNasFileSystem = new alicloud.eds.NasFileSystem("defaultNasFileSystem", {
    description: "your_description",
    officeSiteId: defaultSimpleOfficeSite.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);
resources:
  defaultSimpleOfficeSite:
    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
    properties:
      description: your_description
      officeSiteId: ${defaultSimpleOfficeSite.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
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
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
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
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
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
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
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.