1. Packages
  2. Alicloud Provider
  3. API Docs
  4. nas
  5. getFilesets
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

alicloud.nas.getFilesets

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.62.1 published on Monday, Sep 16, 2024 by Pulumi

    This data source provides the Nas Filesets of the current Alibaba Cloud user.

    NOTE: Available in v1.153.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.nas.getFilesets({
        fileSystemId: "example_value",
        ids: [
            "example_value-1",
            "example_value-2",
        ],
    });
    export const nasFilesetId1 = ids.then(ids => ids.filesets?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.nas.get_filesets(file_system_id="example_value",
        ids=[
            "example_value-1",
            "example_value-2",
        ])
    pulumi.export("nasFilesetId1", ids.filesets[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 {
    		ids, err := nas.GetFilesets(ctx, &nas.GetFilesetsArgs{
    			FileSystemId: "example_value",
    			Ids: []string{
    				"example_value-1",
    				"example_value-2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("nasFilesetId1", ids.Filesets[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Nas.GetFilesets.Invoke(new()
        {
            FileSystemId = "example_value",
            Ids = new[]
            {
                "example_value-1",
                "example_value-2",
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["nasFilesetId1"] = ids.Apply(getFilesetsResult => getFilesetsResult.Filesets[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.GetFilesetsArgs;
    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 = NasFunctions.getFilesets(GetFilesetsArgs.builder()
                .fileSystemId("example_value")
                .ids(            
                    "example_value-1",
                    "example_value-2")
                .build());
    
            ctx.export("nasFilesetId1", ids.applyValue(getFilesetsResult -> getFilesetsResult.filesets()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:nas:getFilesets
          Arguments:
            fileSystemId: example_value
            ids:
              - example_value-1
              - example_value-2
    outputs:
      nasFilesetId1: ${ids.filesets[0].id}
    

    Using getFilesets

    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 getFilesets(args: GetFilesetsArgs, opts?: InvokeOptions): Promise<GetFilesetsResult>
    function getFilesetsOutput(args: GetFilesetsOutputArgs, opts?: InvokeOptions): Output<GetFilesetsResult>
    def get_filesets(file_system_id: Optional[str] = None,
                     ids: Optional[Sequence[str]] = None,
                     output_file: Optional[str] = None,
                     status: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetFilesetsResult
    def get_filesets_output(file_system_id: Optional[pulumi.Input[str]] = None,
                     ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     output_file: Optional[pulumi.Input[str]] = None,
                     status: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetFilesetsResult]
    func GetFilesets(ctx *Context, args *GetFilesetsArgs, opts ...InvokeOption) (*GetFilesetsResult, error)
    func GetFilesetsOutput(ctx *Context, args *GetFilesetsOutputArgs, opts ...InvokeOption) GetFilesetsResultOutput

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

    public static class GetFilesets 
    {
        public static Task<GetFilesetsResult> InvokeAsync(GetFilesetsArgs args, InvokeOptions? opts = null)
        public static Output<GetFilesetsResult> Invoke(GetFilesetsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFilesetsResult> getFilesets(GetFilesetsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:nas/getFilesets:getFilesets
      arguments:
        # arguments dictionary

    The following arguments are supported:

    FileSystemId string
    The ID of the file system.
    Ids List<string>
    A list of Fileset IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the fileset. Valid values: CREATED, CREATING, RELEASED, RELEASING.
    FileSystemId string
    The ID of the file system.
    Ids []string
    A list of Fileset IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the fileset. Valid values: CREATED, CREATING, RELEASED, RELEASING.
    fileSystemId String
    The ID of the file system.
    ids List<String>
    A list of Fileset IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the fileset. Valid values: CREATED, CREATING, RELEASED, RELEASING.
    fileSystemId string
    The ID of the file system.
    ids string[]
    A list of Fileset IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of the fileset. Valid values: CREATED, CREATING, RELEASED, RELEASING.
    file_system_id str
    The ID of the file system.
    ids Sequence[str]
    A list of Fileset IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of the fileset. Valid values: CREATED, CREATING, RELEASED, RELEASING.
    fileSystemId String
    The ID of the file system.
    ids List<String>
    A list of Fileset IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the fileset. Valid values: CREATED, CREATING, RELEASED, RELEASING.

    getFilesets Result

    The following output properties are available:

    FileSystemId string
    Filesets List<Pulumi.AliCloud.Nas.Outputs.GetFilesetsFileset>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    OutputFile string
    Status string
    FileSystemId string
    Filesets []GetFilesetsFileset
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    OutputFile string
    Status string
    fileSystemId String
    filesets List<GetFilesetsFileset>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    outputFile String
    status String
    fileSystemId string
    filesets GetFilesetsFileset[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    outputFile string
    status string
    file_system_id str
    filesets Sequence[GetFilesetsFileset]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    output_file str
    status str
    fileSystemId String
    filesets List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    outputFile String
    status String

    Supporting Types

    GetFilesetsFileset

    CreateTime string
    The time when Fileset was created.
    Description string
    Description of Fileset.
    FileSystemId string
    The ID of the file system.
    FileSystemPath string
    The path of Fileset.
    FilesetId string
    The first ID of the resource.
    Id string
    The ID of the Fileset.
    Status string
    The status of the fileset.
    UpdateTime string
    The latest update time of Fileset.
    CreateTime string
    The time when Fileset was created.
    Description string
    Description of Fileset.
    FileSystemId string
    The ID of the file system.
    FileSystemPath string
    The path of Fileset.
    FilesetId string
    The first ID of the resource.
    Id string
    The ID of the Fileset.
    Status string
    The status of the fileset.
    UpdateTime string
    The latest update time of Fileset.
    createTime String
    The time when Fileset was created.
    description String
    Description of Fileset.
    fileSystemId String
    The ID of the file system.
    fileSystemPath String
    The path of Fileset.
    filesetId String
    The first ID of the resource.
    id String
    The ID of the Fileset.
    status String
    The status of the fileset.
    updateTime String
    The latest update time of Fileset.
    createTime string
    The time when Fileset was created.
    description string
    Description of Fileset.
    fileSystemId string
    The ID of the file system.
    fileSystemPath string
    The path of Fileset.
    filesetId string
    The first ID of the resource.
    id string
    The ID of the Fileset.
    status string
    The status of the fileset.
    updateTime string
    The latest update time of Fileset.
    create_time str
    The time when Fileset was created.
    description str
    Description of Fileset.
    file_system_id str
    The ID of the file system.
    file_system_path str
    The path of Fileset.
    fileset_id str
    The first ID of the resource.
    id str
    The ID of the Fileset.
    status str
    The status of the fileset.
    update_time str
    The latest update time of Fileset.
    createTime String
    The time when Fileset was created.
    description String
    Description of Fileset.
    fileSystemId String
    The ID of the file system.
    fileSystemPath String
    The path of Fileset.
    filesetId String
    The first ID of the resource.
    id String
    The ID of the Fileset.
    status String
    The status of the fileset.
    updateTime String
    The latest update time of Fileset.

    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.62.1 published on Monday, Sep 16, 2024 by Pulumi