1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. nas
  5. getDataFlows
Alibaba Cloud v3.52.1 published on Thursday, Apr 4, 2024 by Pulumi

alicloud.nas.getDataFlows

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.52.1 published on Thursday, Apr 4, 2024 by Pulumi

    This data source provides the Nas Data Flows 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.getDataFlows({
        fileSystemId: "example_value",
        ids: [
            "example_value-1",
            "example_value-2",
        ],
    });
    export const nasDataFlowId1 = ids.then(ids => ids.flows?.[0]?.id);
    const status = alicloud.nas.getDataFlows({
        fileSystemId: "example_value",
        status: "Running",
    });
    export const nasDataFlowId2 = status.then(status => status.flows?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.nas.get_data_flows(file_system_id="example_value",
        ids=[
            "example_value-1",
            "example_value-2",
        ])
    pulumi.export("nasDataFlowId1", ids.flows[0].id)
    status = alicloud.nas.get_data_flows(file_system_id="example_value",
        status="Running")
    pulumi.export("nasDataFlowId2", status.flows[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.GetDataFlows(ctx, &nas.GetDataFlowsArgs{
    			FileSystemId: "example_value",
    			Ids: []string{
    				"example_value-1",
    				"example_value-2",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("nasDataFlowId1", ids.Flows[0].Id)
    		status, err := nas.GetDataFlows(ctx, &nas.GetDataFlowsArgs{
    			FileSystemId: "example_value",
    			Status:       pulumi.StringRef("Running"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("nasDataFlowId2", status.Flows[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.GetDataFlows.Invoke(new()
        {
            FileSystemId = "example_value",
            Ids = new[]
            {
                "example_value-1",
                "example_value-2",
            },
        });
    
        var status = AliCloud.Nas.GetDataFlows.Invoke(new()
        {
            FileSystemId = "example_value",
            Status = "Running",
        });
    
        return new Dictionary<string, object?>
        {
            ["nasDataFlowId1"] = ids.Apply(getDataFlowsResult => getDataFlowsResult.Flows[0]?.Id),
            ["nasDataFlowId2"] = status.Apply(getDataFlowsResult => getDataFlowsResult.Flows[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.GetDataFlowsArgs;
    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.getDataFlows(GetDataFlowsArgs.builder()
                .fileSystemId("example_value")
                .ids(            
                    "example_value-1",
                    "example_value-2")
                .build());
    
            ctx.export("nasDataFlowId1", ids.applyValue(getDataFlowsResult -> getDataFlowsResult.flows()[0].id()));
            final var status = NasFunctions.getDataFlows(GetDataFlowsArgs.builder()
                .fileSystemId("example_value")
                .status("Running")
                .build());
    
            ctx.export("nasDataFlowId2", status.applyValue(getDataFlowsResult -> getDataFlowsResult.flows()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:nas:getDataFlows
          Arguments:
            fileSystemId: example_value
            ids:
              - example_value-1
              - example_value-2
      status:
        fn::invoke:
          Function: alicloud:nas:getDataFlows
          Arguments:
            fileSystemId: example_value
            status: Running
    outputs:
      nasDataFlowId1: ${ids.flows[0].id}
      nasDataFlowId2: ${status.flows[0].id}
    

    Using getDataFlows

    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 getDataFlows(args: GetDataFlowsArgs, opts?: InvokeOptions): Promise<GetDataFlowsResult>
    function getDataFlowsOutput(args: GetDataFlowsOutputArgs, opts?: InvokeOptions): Output<GetDataFlowsResult>
    def get_data_flows(file_system_id: Optional[str] = None,
                       ids: Optional[Sequence[str]] = None,
                       output_file: Optional[str] = None,
                       status: Optional[str] = None,
                       opts: Optional[InvokeOptions] = None) -> GetDataFlowsResult
    def get_data_flows_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[GetDataFlowsResult]
    func GetDataFlows(ctx *Context, args *GetDataFlowsArgs, opts ...InvokeOption) (*GetDataFlowsResult, error)
    func GetDataFlowsOutput(ctx *Context, args *GetDataFlowsOutputArgs, opts ...InvokeOption) GetDataFlowsResultOutput

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

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

    The following arguments are supported:

    FileSystemId string
    The ID of the file system.
    Ids List<string>
    A list of Data Flow IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the Data flow.
    FileSystemId string
    The ID of the file system.
    Ids []string
    A list of Data Flow IDs.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    Status string
    The status of the Data flow.
    fileSystemId String
    The ID of the file system.
    ids List<String>
    A list of Data Flow IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the Data flow.
    fileSystemId string
    The ID of the file system.
    ids string[]
    A list of Data Flow IDs.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    status string
    The status of the Data flow.
    file_system_id str
    The ID of the file system.
    ids Sequence[str]
    A list of Data Flow IDs.
    output_file str
    File name where to save data source results (after running pulumi preview).
    status str
    The status of the Data flow.
    fileSystemId String
    The ID of the file system.
    ids List<String>
    A list of Data Flow IDs.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    status String
    The status of the Data flow.

    getDataFlows Result

    The following output properties are available:

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

    Supporting Types

    GetDataFlowsFlow

    CreateTime string
    The time when Fileset was created. Executing the ISO8601 standard means that the return format is: 'yyyy-MM-ddTHH:mm:ssZ'.
    DataFlowId string
    The ID of the Data Flow.
    Description string
    The Description of data flow.
    ErrorMessage string
    Error message.
    FileSystemId string
    The ID of the file system.
    FileSystemPath string
    The path of Fileset in the CPFS file system.
    FsetDescription string
    Description of automatic update.
    FsetId string
    The ID of the Fileset.
    Id string
    The resource ID of the data flow. The value formats as <file_system_id>:<data_flow_id>.
    SourceSecurityType string
    The security protection type of the source storage.
    SourceStorage string
    The access path of the source store. Format: <storage type>://<path>.
    Status string
    The status of the Data flow.
    Throughput int
    The maximum transmission bandwidth of data flow, unit: MB/s.
    CreateTime string
    The time when Fileset was created. Executing the ISO8601 standard means that the return format is: 'yyyy-MM-ddTHH:mm:ssZ'.
    DataFlowId string
    The ID of the Data Flow.
    Description string
    The Description of data flow.
    ErrorMessage string
    Error message.
    FileSystemId string
    The ID of the file system.
    FileSystemPath string
    The path of Fileset in the CPFS file system.
    FsetDescription string
    Description of automatic update.
    FsetId string
    The ID of the Fileset.
    Id string
    The resource ID of the data flow. The value formats as <file_system_id>:<data_flow_id>.
    SourceSecurityType string
    The security protection type of the source storage.
    SourceStorage string
    The access path of the source store. Format: <storage type>://<path>.
    Status string
    The status of the Data flow.
    Throughput int
    The maximum transmission bandwidth of data flow, unit: MB/s.
    createTime String
    The time when Fileset was created. Executing the ISO8601 standard means that the return format is: 'yyyy-MM-ddTHH:mm:ssZ'.
    dataFlowId String
    The ID of the Data Flow.
    description String
    The Description of data flow.
    errorMessage String
    Error message.
    fileSystemId String
    The ID of the file system.
    fileSystemPath String
    The path of Fileset in the CPFS file system.
    fsetDescription String
    Description of automatic update.
    fsetId String
    The ID of the Fileset.
    id String
    The resource ID of the data flow. The value formats as <file_system_id>:<data_flow_id>.
    sourceSecurityType String
    The security protection type of the source storage.
    sourceStorage String
    The access path of the source store. Format: <storage type>://<path>.
    status String
    The status of the Data flow.
    throughput Integer
    The maximum transmission bandwidth of data flow, unit: MB/s.
    createTime string
    The time when Fileset was created. Executing the ISO8601 standard means that the return format is: 'yyyy-MM-ddTHH:mm:ssZ'.
    dataFlowId string
    The ID of the Data Flow.
    description string
    The Description of data flow.
    errorMessage string
    Error message.
    fileSystemId string
    The ID of the file system.
    fileSystemPath string
    The path of Fileset in the CPFS file system.
    fsetDescription string
    Description of automatic update.
    fsetId string
    The ID of the Fileset.
    id string
    The resource ID of the data flow. The value formats as <file_system_id>:<data_flow_id>.
    sourceSecurityType string
    The security protection type of the source storage.
    sourceStorage string
    The access path of the source store. Format: <storage type>://<path>.
    status string
    The status of the Data flow.
    throughput number
    The maximum transmission bandwidth of data flow, unit: MB/s.
    create_time str
    The time when Fileset was created. Executing the ISO8601 standard means that the return format is: 'yyyy-MM-ddTHH:mm:ssZ'.
    data_flow_id str
    The ID of the Data Flow.
    description str
    The Description of data flow.
    error_message str
    Error message.
    file_system_id str
    The ID of the file system.
    file_system_path str
    The path of Fileset in the CPFS file system.
    fset_description str
    Description of automatic update.
    fset_id str
    The ID of the Fileset.
    id str
    The resource ID of the data flow. The value formats as <file_system_id>:<data_flow_id>.
    source_security_type str
    The security protection type of the source storage.
    source_storage str
    The access path of the source store. Format: <storage type>://<path>.
    status str
    The status of the Data flow.
    throughput int
    The maximum transmission bandwidth of data flow, unit: MB/s.
    createTime String
    The time when Fileset was created. Executing the ISO8601 standard means that the return format is: 'yyyy-MM-ddTHH:mm:ssZ'.
    dataFlowId String
    The ID of the Data Flow.
    description String
    The Description of data flow.
    errorMessage String
    Error message.
    fileSystemId String
    The ID of the file system.
    fileSystemPath String
    The path of Fileset in the CPFS file system.
    fsetDescription String
    Description of automatic update.
    fsetId String
    The ID of the Fileset.
    id String
    The resource ID of the data flow. The value formats as <file_system_id>:<data_flow_id>.
    sourceSecurityType String
    The security protection type of the source storage.
    sourceStorage String
    The access path of the source store. Format: <storage type>://<path>.
    status String
    The status of the Data flow.
    throughput Number
    The maximum transmission bandwidth of data flow, unit: MB/s.

    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.52.1 published on Thursday, Apr 4, 2024 by Pulumi