// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***

using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Threading.Tasks;
using Pulumi.Serialization;

namespace Pulumi.AliCloud.Cen
{
    public static class GetFlowlogs
    {
        /// <summary>
        /// This data source provides CEN flow logs available to the user.
        /// 
        /// &gt; **NOTE:** Available in 1.78.0+
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.Cen.GetFlowlogs.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "flowlog-tig1xxxxx",
        ///         },
        ///         NameRegex = "^foo",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstCenFlowlogId"] = data.Alicloud_cen_instances.Default.Flowlogs[0].Id,
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Task<GetFlowlogsResult> InvokeAsync(GetFlowlogsArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.InvokeAsync<GetFlowlogsResult>("alicloud:cen/getFlowlogs:getFlowlogs", args ?? new GetFlowlogsArgs(), options.WithDefaults());

        /// <summary>
        /// This data source provides CEN flow logs available to the user.
        /// 
        /// &gt; **NOTE:** Available in 1.78.0+
        /// 
        /// {{% examples %}}
        /// ## Example Usage
        /// {{% example %}}
        /// 
        /// Basic Usage
        /// 
        /// ```csharp
        /// using System.Collections.Generic;
        /// using Pulumi;
        /// using AliCloud = Pulumi.AliCloud;
        /// 
        /// return await Deployment.RunAsync(() =&gt; 
        /// {
        ///     var @default = AliCloud.Cen.GetFlowlogs.Invoke(new()
        ///     {
        ///         Ids = new[]
        ///         {
        ///             "flowlog-tig1xxxxx",
        ///         },
        ///         NameRegex = "^foo",
        ///     });
        /// 
        ///     return new Dictionary&lt;string, object?&gt;
        ///     {
        ///         ["firstCenFlowlogId"] = data.Alicloud_cen_instances.Default.Flowlogs[0].Id,
        ///     };
        /// });
        /// ```
        /// {{% /example %}}
        /// {{% /examples %}}
        /// </summary>
        public static Output<GetFlowlogsResult> Invoke(GetFlowlogsInvokeArgs? args = null, InvokeOptions? options = null)
            => Pulumi.Deployment.Instance.Invoke<GetFlowlogsResult>("alicloud:cen/getFlowlogs:getFlowlogs", args ?? new GetFlowlogsInvokeArgs(), options.WithDefaults());
    }


    public sealed class GetFlowlogsArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the CEN Instance.
        /// </summary>
        [Input("cenId")]
        public string? CenId { get; set; }

        /// <summary>
        /// The description of flowlog.
        /// </summary>
        [Input("description")]
        public string? Description { get; set; }

        [Input("ids")]
        private List<string>? _ids;

        /// <summary>
        /// A list of CEN flow log IDs.
        /// </summary>
        public List<string> Ids
        {
            get => _ids ?? (_ids = new List<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The name of the log store which is in the  `project_name` SLS project.
        /// </summary>
        [Input("logStoreName")]
        public string? LogStoreName { get; set; }

        /// <summary>
        /// A regex string to filter CEN flow logs by name.
        /// </summary>
        [Input("nameRegex")]
        public string? NameRegex { get; set; }

        [Input("outputFile")]
        public string? OutputFile { get; set; }

        /// <summary>
        /// The name of the SLS project.
        /// </summary>
        [Input("projectName")]
        public string? ProjectName { get; set; }

        /// <summary>
        /// The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".
        /// </summary>
        [Input("status")]
        public string? Status { get; set; }

        public GetFlowlogsArgs()
        {
        }
        public static new GetFlowlogsArgs Empty => new GetFlowlogsArgs();
    }

    public sealed class GetFlowlogsInvokeArgs : global::Pulumi.InvokeArgs
    {
        /// <summary>
        /// The ID of the CEN Instance.
        /// </summary>
        [Input("cenId")]
        public Input<string>? CenId { get; set; }

        /// <summary>
        /// The description of flowlog.
        /// </summary>
        [Input("description")]
        public Input<string>? Description { get; set; }

        [Input("ids")]
        private InputList<string>? _ids;

        /// <summary>
        /// A list of CEN flow log IDs.
        /// </summary>
        public InputList<string> Ids
        {
            get => _ids ?? (_ids = new InputList<string>());
            set => _ids = value;
        }

        /// <summary>
        /// The name of the log store which is in the  `project_name` SLS project.
        /// </summary>
        [Input("logStoreName")]
        public Input<string>? LogStoreName { get; set; }

        /// <summary>
        /// A regex string to filter CEN flow logs by name.
        /// </summary>
        [Input("nameRegex")]
        public Input<string>? NameRegex { get; set; }

        [Input("outputFile")]
        public Input<string>? OutputFile { get; set; }

        /// <summary>
        /// The name of the SLS project.
        /// </summary>
        [Input("projectName")]
        public Input<string>? ProjectName { get; set; }

        /// <summary>
        /// The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".
        /// </summary>
        [Input("status")]
        public Input<string>? Status { get; set; }

        public GetFlowlogsInvokeArgs()
        {
        }
        public static new GetFlowlogsInvokeArgs Empty => new GetFlowlogsInvokeArgs();
    }


    [OutputType]
    public sealed class GetFlowlogsResult
    {
        /// <summary>
        /// The ID of the CEN Instance.
        /// </summary>
        public readonly string? CenId;
        /// <summary>
        /// The description of flowlog.
        /// </summary>
        public readonly string? Description;
        public readonly ImmutableArray<Outputs.GetFlowlogsFlowlogResult> Flowlogs;
        /// <summary>
        /// The provider-assigned unique ID for this managed resource.
        /// </summary>
        public readonly string Id;
        /// <summary>
        /// A list of CEN flow log IDs.
        /// </summary>
        public readonly ImmutableArray<string> Ids;
        /// <summary>
        /// The name of the log store which is in the  `project_name` SLS project.
        /// </summary>
        public readonly string? LogStoreName;
        public readonly string? NameRegex;
        /// <summary>
        /// A list of CEN flow log names.
        /// </summary>
        public readonly ImmutableArray<string> Names;
        public readonly string? OutputFile;
        /// <summary>
        /// The name of the SLS project.
        /// </summary>
        public readonly string? ProjectName;
        /// <summary>
        /// The status of flowlog.
        /// </summary>
        public readonly string? Status;

        [OutputConstructor]
        private GetFlowlogsResult(
            string? cenId,

            string? description,

            ImmutableArray<Outputs.GetFlowlogsFlowlogResult> flowlogs,

            string id,

            ImmutableArray<string> ids,

            string? logStoreName,

            string? nameRegex,

            ImmutableArray<string> names,

            string? outputFile,

            string? projectName,

            string? status)
        {
            CenId = cenId;
            Description = description;
            Flowlogs = flowlogs;
            Id = id;
            Ids = ids;
            LogStoreName = logStoreName;
            NameRegex = nameRegex;
            Names = names;
            OutputFile = outputFile;
            ProjectName = projectName;
            Status = status;
        }
    }
}
