1. Registry
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. nas
  6. getLogAnalyses
Viewing docs for Alibaba Cloud v3.106.0
published on Monday, Aug 24, 2026 by Pulumi
alicloud logo alicloud logo
Viewing docs for Alibaba Cloud v3.106.0
published on Monday, Aug 24, 2026 by Pulumi

    This data source provides File Storage (NAS) Log Analysis available to the user.

    NOTE: Available since v1.286.0.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const defaultFileSystem = new alicloud.nas.FileSystem("default", {
        protocolType: "NFS",
        storageType: "Capacity",
    });
    const defaultLogAnalysis = new alicloud.nas.LogAnalysis("default", {fileSystemId: defaultFileSystem.id});
    const _default = alicloud.nas.getLogAnalysesOutput({
        ids: [defaultLogAnalysis.id],
    });
    export const alicloudNasLogAnalysisExampleId = _default.apply(_default => _default.analyses?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default_file_system = alicloud.nas.FileSystem("default",
        protocol_type="NFS",
        storage_type="Capacity")
    default_log_analysis = alicloud.nas.LogAnalysis("default", file_system_id=default_file_system.id)
    default = alicloud.nas.get_log_analyses_output(ids=[default_log_analysis.id])
    pulumi.export("alicloudNasLogAnalysisExampleId", default.analyses[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 {
    		defaultFileSystem, err := nas.NewFileSystem(ctx, "default", &nas.FileSystemArgs{
    			ProtocolType: pulumi.String("NFS"),
    			StorageType:  pulumi.String("Capacity"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultLogAnalysis, err := nas.NewLogAnalysis(ctx, "default", &nas.LogAnalysisArgs{
    			FileSystemId: defaultFileSystem.ID().ToIDOutput().ToStringOutput(),
    		})
    		if err != nil {
    			return err
    		}
    		_default := nas.GetLogAnalysesOutput(ctx, nas.GetLogAnalysesOutputArgs{
    			Ids: pulumi.StringArray{
    				defaultLogAnalysis.ID().ToIDOutput().ToStringOutput(),
    			},
    		}, nil)
    		ctx.Export("alicloudNasLogAnalysisExampleId", _default.ApplyT(func(_default nas.GetLogAnalysesResult) (*string, error) {
    			return _default.Analyses[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 defaultFileSystem = new AliCloud.Nas.FileSystem("default", new()
        {
            ProtocolType = "NFS",
            StorageType = "Capacity",
        });
    
        var defaultLogAnalysis = new AliCloud.Nas.LogAnalysis("default", new()
        {
            FileSystemId = defaultFileSystem.Id,
        });
    
        var @default = AliCloud.Nas.GetLogAnalyses.Invoke(new()
        {
            Ids = new[]
            {
                defaultLogAnalysis.Id,
            },
        });
    
        return new Dictionary<string, object?>
        {
            ["alicloudNasLogAnalysisExampleId"] = @default.Apply(@default => @default.Apply(getLogAnalysesResult => getLogAnalysesResult.Analyses[0]?.Id)),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.nas.FileSystem;
    import com.pulumi.alicloud.nas.FileSystemArgs;
    import com.pulumi.alicloud.nas.LogAnalysis;
    import com.pulumi.alicloud.nas.LogAnalysisArgs;
    import com.pulumi.alicloud.nas.NasFunctions;
    import com.pulumi.alicloud.nas.inputs.GetLogAnalysesArgs;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 defaultFileSystem = new FileSystem("defaultFileSystem", FileSystemArgs.builder()
                .protocolType("NFS")
                .storageType("Capacity")
                .build());
    
            var defaultLogAnalysis = new LogAnalysis("defaultLogAnalysis", LogAnalysisArgs.builder()
                .fileSystemId(defaultFileSystem.id())
                .build());
    
            final var default = NasFunctions.getLogAnalyses(GetLogAnalysesArgs.builder()
                .ids(defaultLogAnalysis.id())
                .build());
    
            ctx.export("alicloudNasLogAnalysisExampleId", default_.applyValue(_default_ -> _default_.analyses()[0].id()));
        }
    }
    
    resources:
      defaultFileSystem:
        type: alicloud:nas:FileSystem
        name: default
        properties:
          protocolType: NFS
          storageType: Capacity
      defaultLogAnalysis:
        type: alicloud:nas:LogAnalysis
        name: default
        properties:
          fileSystemId: ${defaultFileSystem.id}
    variables:
      default:
        fn::invoke:
          function: alicloud:nas:getLogAnalyses
          arguments:
            ids:
              - ${defaultLogAnalysis.id}
    outputs:
      alicloudNasLogAnalysisExampleId: ${default.analyses[0].id}
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
      }
    }
    
    data "alicloud_nas_getloganalyses" "default" {
      ids = [alicloud_nas_loganalysis.default.id]
    }
    
    resource "alicloud_nas_filesystem" "default" {
      protocol_type = "NFS"
      storage_type  = "Capacity"
    }
    resource "alicloud_nas_loganalysis" "default" {
      file_system_id = alicloud_nas_filesystem.default.id
    }
    output "alicloudNasLogAnalysisExampleId" {
      value = data.alicloud_nas_getloganalyses.default.analyses[0].id
    }
    

    Using getLogAnalyses

    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 getLogAnalyses(args: GetLogAnalysesArgs, opts?: InvokeOptions): Promise<GetLogAnalysesResult>
    function getLogAnalysesOutput(args: GetLogAnalysesOutputArgs, opts?: InvokeOutputOptions): Output<GetLogAnalysesResult>
    def get_log_analyses(file_system_type: Optional[str] = None,
                         ids: Optional[Sequence[str]] = None,
                         output_file: Optional[str] = None,
                         opts: Optional[InvokeOptions] = None) -> GetLogAnalysesResult
    def get_log_analyses_output(file_system_type: pulumi.Input[Optional[str]] = None,
                         ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
                         output_file: pulumi.Input[Optional[str]] = None,
                         opts: Optional[InvokeOutputOptions] = None) -> Output[GetLogAnalysesResult]
    func GetLogAnalyses(ctx *Context, args *GetLogAnalysesArgs, opts ...InvokeOption) (*GetLogAnalysesResult, error)
    func GetLogAnalysesOutput(ctx *Context, args *GetLogAnalysesOutputArgs, opts ...InvokeOption) GetLogAnalysesResultOutput

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

    public static class GetLogAnalyses 
    {
        public static Task<GetLogAnalysesResult> InvokeAsync(GetLogAnalysesArgs args, InvokeOptions? opts = null)
        public static Output<GetLogAnalysesResult> Invoke(GetLogAnalysesInvokeArgs args, InvokeOptions? opts = null)
        public static Output<GetLogAnalysesResult> Invoke(GetLogAnalysesInvokeArgs args, InvokeOutputOptions opts)
    }
    public static CompletableFuture<GetLogAnalysesResult> getLogAnalyses(GetLogAnalysesArgs args, InvokeOptions options)
    public static Output<GetLogAnalysesResult> getLogAnalyses(GetLogAnalysesArgs args, InvokeOptions options)
    public static Output<GetLogAnalysesResult> getLogAnalyses(GetLogAnalysesArgs args, InvokeOutputOptions options)
    
    fn::invoke:
      function: alicloud:nas/getLogAnalyses:getLogAnalyses
      arguments:
        # arguments dictionary
    data "alicloud_nas_get_log_analyses" "name" {
        # arguments
    }

    The following arguments are supported:

    FileSystemType string
    The type of the file system. Valid values: standard, extreme, all.
    Ids List<string>
    A list of Log Analysis IDs. Each element is the ID of the file system for which log delivery is enabled.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    FileSystemType string
    The type of the file system. Valid values: standard, extreme, all.
    Ids []string
    A list of Log Analysis IDs. Each element is the ID of the file system for which log delivery is enabled.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    file_system_type string
    The type of the file system. Valid values: standard, extreme, all.
    ids list(string)
    A list of Log Analysis IDs. Each element is the ID of the file system for which log delivery is enabled.
    output_file string
    File name where to save data source results (after running pulumi preview).
    fileSystemType String
    The type of the file system. Valid values: standard, extreme, all.
    ids List<String>
    A list of Log Analysis IDs. Each element is the ID of the file system for which log delivery is enabled.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    fileSystemType string
    The type of the file system. Valid values: standard, extreme, all.
    ids string[]
    A list of Log Analysis IDs. Each element is the ID of the file system for which log delivery is enabled.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    file_system_type str
    The type of the file system. Valid values: standard, extreme, all.
    ids Sequence[str]
    A list of Log Analysis IDs. Each element is the ID of the file system for which log delivery is enabled.
    output_file str
    File name where to save data source results (after running pulumi preview).
    fileSystemType String
    The type of the file system. Valid values: standard, extreme, all.
    ids List<String>
    A list of Log Analysis IDs. Each element is the ID of the file system for which log delivery is enabled.
    outputFile String
    File name where to save data source results (after running pulumi preview).

    getLogAnalyses Result

    The following output properties are available:

    Analyses List<Pulumi.AliCloud.Nas.Outputs.GetLogAnalysesAnalysis>
    A list of Log Analysis. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    FileSystemType string
    OutputFile string
    Analyses []GetLogAnalysesAnalysis
    A list of Log Analysis. Each element contains the following attributes:
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    FileSystemType string
    OutputFile string
    analyses list(object)
    A list of Log Analysis. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids list(string)
    file_system_type string
    output_file string
    analyses List<GetLogAnalysesAnalysis>
    A list of Log Analysis. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    fileSystemType String
    outputFile String
    analyses GetLogAnalysesAnalysis[]
    A list of Log Analysis. Each element contains the following attributes:
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    fileSystemType string
    outputFile string
    analyses Sequence[GetLogAnalysesAnalysis]
    A list of Log Analysis. Each element contains the following attributes:
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    file_system_type str
    output_file str
    analyses List<Property Map>
    A list of Log Analysis. Each element contains the following attributes:
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    fileSystemType String
    outputFile String

    Supporting Types

    GetLogAnalysesAnalysis

    FileSystemId string
    The ID of the file system for which log delivery is enabled.
    Id string
    The ID of the Log Analysis. It is the same as the file system ID.
    Logstore string
    The name of the Logstore that receives NAS logs.
    Project string
    The name of the project that receives NAS logs.
    Region string
    The Simple Log Service region of the log project.
    RoleArn string
    The ARN of the service role used by NAS to deliver logs to Simple Log Service.
    FileSystemId string
    The ID of the file system for which log delivery is enabled.
    Id string
    The ID of the Log Analysis. It is the same as the file system ID.
    Logstore string
    The name of the Logstore that receives NAS logs.
    Project string
    The name of the project that receives NAS logs.
    Region string
    The Simple Log Service region of the log project.
    RoleArn string
    The ARN of the service role used by NAS to deliver logs to Simple Log Service.
    file_system_id string
    The ID of the file system for which log delivery is enabled.
    id string
    The ID of the Log Analysis. It is the same as the file system ID.
    logstore string
    The name of the Logstore that receives NAS logs.
    project string
    The name of the project that receives NAS logs.
    region string
    The Simple Log Service region of the log project.
    role_arn string
    The ARN of the service role used by NAS to deliver logs to Simple Log Service.
    fileSystemId String
    The ID of the file system for which log delivery is enabled.
    id String
    The ID of the Log Analysis. It is the same as the file system ID.
    logstore String
    The name of the Logstore that receives NAS logs.
    project String
    The name of the project that receives NAS logs.
    region String
    The Simple Log Service region of the log project.
    roleArn String
    The ARN of the service role used by NAS to deliver logs to Simple Log Service.
    fileSystemId string
    The ID of the file system for which log delivery is enabled.
    id string
    The ID of the Log Analysis. It is the same as the file system ID.
    logstore string
    The name of the Logstore that receives NAS logs.
    project string
    The name of the project that receives NAS logs.
    region string
    The Simple Log Service region of the log project.
    roleArn string
    The ARN of the service role used by NAS to deliver logs to Simple Log Service.
    file_system_id str
    The ID of the file system for which log delivery is enabled.
    id str
    The ID of the Log Analysis. It is the same as the file system ID.
    logstore str
    The name of the Logstore that receives NAS logs.
    project str
    The name of the project that receives NAS logs.
    region str
    The Simple Log Service region of the log project.
    role_arn str
    The ARN of the service role used by NAS to deliver logs to Simple Log Service.
    fileSystemId String
    The ID of the file system for which log delivery is enabled.
    id String
    The ID of the Log Analysis. It is the same as the file system ID.
    logstore String
    The name of the Logstore that receives NAS logs.
    project String
    The name of the project that receives NAS logs.
    region String
    The Simple Log Service region of the log project.
    roleArn String
    The ARN of the service role used by NAS to deliver logs to Simple Log Service.

    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 alicloud logo
    Viewing docs for Alibaba Cloud v3.106.0
    published on Monday, Aug 24, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial