Alibaba Cloud

Pulumi Official
Package maintained by Pulumi
v3.27.0 published on Monday, Aug 8, 2022 by Pulumi

getFilesets

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

NOTE: Available in v1.153.0+.

Example Usage

using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var ids = Output.Create(AliCloud.Nas.GetFilesets.InvokeAsync(new AliCloud.Nas.GetFilesetsArgs
        {
            FileSystemId = "example_value",
            Ids = 
            {
                "example_value-1",
                "example_value-2",
            },
        }));
        this.NasFilesetId1 = ids.Apply(ids => ids.Filesets?[0]?.Id);
    }

    [Output("nasFilesetId1")]
    public Output<string> NasFilesetId1 { get; set; }
}
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
	})
}
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()));
    }
}
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)
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);
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
Status string

The status of the fileset.

FileSystemId string

The ID of the file system.

Ids []string

A list of Fileset IDs.

OutputFile string
Status string

The status of the fileset.

fileSystemId String

The ID of the file system.

ids List<String>

A list of Fileset IDs.

outputFile String
status String

The status of the fileset.

fileSystemId string

The ID of the file system.

ids string[]

A list of Fileset IDs.

outputFile string
status string

The status of the fileset.

file_system_id str

The ID of the file system.

ids Sequence[str]

A list of Fileset IDs.

output_file str
status str

The status of the fileset.

fileSystemId String

The ID of the file system.

ids List<String>

A list of Fileset IDs.

outputFile String
status String

The status of the fileset.

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
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.