1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cen
  5. getFlowlogs
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.cen.getFlowlogs

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    This data source provides CEN flow logs available to the user.

    NOTE: Available in 1.78.0+

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const default = alicloud.cen.getFlowlogs({
        ids: ["flowlog-tig1xxxxx"],
        nameRegex: "^foo",
    });
    export const firstCenFlowlogId = data.alicloud_cen_instances["default"].flowlogs[0].id;
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.cen.get_flowlogs(ids=["flowlog-tig1xxxxx"],
        name_regex="^foo")
    pulumi.export("firstCenFlowlogId", data["alicloud_cen_instances"]["default"]["flowlogs"][0]["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cen"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cen.GetFlowlogs(ctx, &cen.GetFlowlogsArgs{
    			Ids: []string{
    				"flowlog-tig1xxxxx",
    			},
    			NameRegex: pulumi.StringRef("^foo"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("firstCenFlowlogId", data.Alicloud_cen_instances.Default.Flowlogs[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = AliCloud.Cen.GetFlowlogs.Invoke(new()
        {
            Ids = new[]
            {
                "flowlog-tig1xxxxx",
            },
            NameRegex = "^foo",
        });
    
        return new Dictionary<string, object?>
        {
            ["firstCenFlowlogId"] = data.Alicloud_cen_instances.Default.Flowlogs[0].Id,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.cen.CenFunctions;
    import com.pulumi.alicloud.cen.inputs.GetFlowlogsArgs;
    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 default = CenFunctions.getFlowlogs(GetFlowlogsArgs.builder()
                .ids("flowlog-tig1xxxxx")
                .nameRegex("^foo")
                .build());
    
            ctx.export("firstCenFlowlogId", data.alicloud_cen_instances().default().flowlogs()[0].id());
        }
    }
    
    variables:
      default:
        fn::invoke:
          Function: alicloud:cen:getFlowlogs
          Arguments:
            ids:
              - flowlog-tig1xxxxx
            nameRegex: ^foo
    outputs:
      firstCenFlowlogId: ${data.alicloud_cen_instances.default.flowlogs[0].id}
    

    Using getFlowlogs

    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 getFlowlogs(args: GetFlowlogsArgs, opts?: InvokeOptions): Promise<GetFlowlogsResult>
    function getFlowlogsOutput(args: GetFlowlogsOutputArgs, opts?: InvokeOptions): Output<GetFlowlogsResult>
    def get_flowlogs(cen_id: Optional[str] = None,
                     description: Optional[str] = None,
                     ids: Optional[Sequence[str]] = None,
                     log_store_name: Optional[str] = None,
                     name_regex: Optional[str] = None,
                     output_file: Optional[str] = None,
                     project_name: Optional[str] = None,
                     status: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetFlowlogsResult
    def get_flowlogs_output(cen_id: Optional[pulumi.Input[str]] = None,
                     description: Optional[pulumi.Input[str]] = None,
                     ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                     log_store_name: Optional[pulumi.Input[str]] = None,
                     name_regex: Optional[pulumi.Input[str]] = None,
                     output_file: Optional[pulumi.Input[str]] = None,
                     project_name: Optional[pulumi.Input[str]] = None,
                     status: Optional[pulumi.Input[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetFlowlogsResult]
    func GetFlowlogs(ctx *Context, args *GetFlowlogsArgs, opts ...InvokeOption) (*GetFlowlogsResult, error)
    func GetFlowlogsOutput(ctx *Context, args *GetFlowlogsOutputArgs, opts ...InvokeOption) GetFlowlogsResultOutput

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

    public static class GetFlowlogs 
    {
        public static Task<GetFlowlogsResult> InvokeAsync(GetFlowlogsArgs args, InvokeOptions? opts = null)
        public static Output<GetFlowlogsResult> Invoke(GetFlowlogsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetFlowlogsResult> getFlowlogs(GetFlowlogsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:cen/getFlowlogs:getFlowlogs
      arguments:
        # arguments dictionary

    The following arguments are supported:

    CenId string
    The ID of the CEN Instance.
    Description string
    The description of flowlog.
    Ids List<string>
    A list of CEN flow log IDs.
    LogStoreName string
    The name of the log store which is in the project_name SLS project.
    NameRegex string
    A regex string to filter CEN flow logs by name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ProjectName string
    The name of the SLS project.
    Status string
    The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".
    CenId string
    The ID of the CEN Instance.
    Description string
    The description of flowlog.
    Ids []string
    A list of CEN flow log IDs.
    LogStoreName string
    The name of the log store which is in the project_name SLS project.
    NameRegex string
    A regex string to filter CEN flow logs by name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    ProjectName string
    The name of the SLS project.
    Status string
    The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".
    cenId String
    The ID of the CEN Instance.
    description String
    The description of flowlog.
    ids List<String>
    A list of CEN flow log IDs.
    logStoreName String
    The name of the log store which is in the project_name SLS project.
    nameRegex String
    A regex string to filter CEN flow logs by name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    projectName String
    The name of the SLS project.
    status String
    The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".
    cenId string
    The ID of the CEN Instance.
    description string
    The description of flowlog.
    ids string[]
    A list of CEN flow log IDs.
    logStoreName string
    The name of the log store which is in the project_name SLS project.
    nameRegex string
    A regex string to filter CEN flow logs by name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    projectName string
    The name of the SLS project.
    status string
    The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".
    cen_id str
    The ID of the CEN Instance.
    description str
    The description of flowlog.
    ids Sequence[str]
    A list of CEN flow log IDs.
    log_store_name str
    The name of the log store which is in the project_name SLS project.
    name_regex str
    A regex string to filter CEN flow logs by name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    project_name str
    The name of the SLS project.
    status str
    The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".
    cenId String
    The ID of the CEN Instance.
    description String
    The description of flowlog.
    ids List<String>
    A list of CEN flow log IDs.
    logStoreName String
    The name of the log store which is in the project_name SLS project.
    nameRegex String
    A regex string to filter CEN flow logs by name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    projectName String
    The name of the SLS project.
    status String
    The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".

    getFlowlogs Result

    The following output properties are available:

    Flowlogs List<Pulumi.AliCloud.Cen.Outputs.GetFlowlogsFlowlog>
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    A list of CEN flow log IDs.
    Names List<string>
    A list of CEN flow log names.
    CenId string
    The ID of the CEN Instance.
    Description string
    The description of flowlog.
    LogStoreName string
    The name of the log store which is in the project_name SLS project.
    NameRegex string
    OutputFile string
    ProjectName string
    The name of the SLS project.
    Status string
    The status of flowlog.
    Flowlogs []GetFlowlogsFlowlog
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    A list of CEN flow log IDs.
    Names []string
    A list of CEN flow log names.
    CenId string
    The ID of the CEN Instance.
    Description string
    The description of flowlog.
    LogStoreName string
    The name of the log store which is in the project_name SLS project.
    NameRegex string
    OutputFile string
    ProjectName string
    The name of the SLS project.
    Status string
    The status of flowlog.
    flowlogs List<GetFlowlogsFlowlog>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of CEN flow log IDs.
    names List<String>
    A list of CEN flow log names.
    cenId String
    The ID of the CEN Instance.
    description String
    The description of flowlog.
    logStoreName String
    The name of the log store which is in the project_name SLS project.
    nameRegex String
    outputFile String
    projectName String
    The name of the SLS project.
    status String
    The status of flowlog.
    flowlogs GetFlowlogsFlowlog[]
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    A list of CEN flow log IDs.
    names string[]
    A list of CEN flow log names.
    cenId string
    The ID of the CEN Instance.
    description string
    The description of flowlog.
    logStoreName string
    The name of the log store which is in the project_name SLS project.
    nameRegex string
    outputFile string
    projectName string
    The name of the SLS project.
    status string
    The status of flowlog.
    flowlogs Sequence[GetFlowlogsFlowlog]
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    A list of CEN flow log IDs.
    names Sequence[str]
    A list of CEN flow log names.
    cen_id str
    The ID of the CEN Instance.
    description str
    The description of flowlog.
    log_store_name str
    The name of the log store which is in the project_name SLS project.
    name_regex str
    output_file str
    project_name str
    The name of the SLS project.
    status str
    The status of flowlog.
    flowlogs List<Property Map>
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    A list of CEN flow log IDs.
    names List<String>
    A list of CEN flow log names.
    cenId String
    The ID of the CEN Instance.
    description String
    The description of flowlog.
    logStoreName String
    The name of the log store which is in the project_name SLS project.
    nameRegex String
    outputFile String
    projectName String
    The name of the SLS project.
    status String
    The status of flowlog.

    Supporting Types

    GetFlowlogsFlowlog

    CenId string
    The ID of the CEN Instance.
    Description string
    The description of flowlog.
    FlowLogId string
    ID of the CEN flow log.
    FlowLogName string
    The name of flowlog.
    Id string
    ID of the CEN flow log.
    LogStoreName string
    The name of the log store which is in the project_name SLS project.
    ProjectName string
    The name of the SLS project.
    Status string
    The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".
    CenId string
    The ID of the CEN Instance.
    Description string
    The description of flowlog.
    FlowLogId string
    ID of the CEN flow log.
    FlowLogName string
    The name of flowlog.
    Id string
    ID of the CEN flow log.
    LogStoreName string
    The name of the log store which is in the project_name SLS project.
    ProjectName string
    The name of the SLS project.
    Status string
    The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".
    cenId String
    The ID of the CEN Instance.
    description String
    The description of flowlog.
    flowLogId String
    ID of the CEN flow log.
    flowLogName String
    The name of flowlog.
    id String
    ID of the CEN flow log.
    logStoreName String
    The name of the log store which is in the project_name SLS project.
    projectName String
    The name of the SLS project.
    status String
    The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".
    cenId string
    The ID of the CEN Instance.
    description string
    The description of flowlog.
    flowLogId string
    ID of the CEN flow log.
    flowLogName string
    The name of flowlog.
    id string
    ID of the CEN flow log.
    logStoreName string
    The name of the log store which is in the project_name SLS project.
    projectName string
    The name of the SLS project.
    status string
    The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".
    cen_id str
    The ID of the CEN Instance.
    description str
    The description of flowlog.
    flow_log_id str
    ID of the CEN flow log.
    flow_log_name str
    The name of flowlog.
    id str
    ID of the CEN flow log.
    log_store_name str
    The name of the log store which is in the project_name SLS project.
    project_name str
    The name of the SLS project.
    status str
    The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".
    cenId String
    The ID of the CEN Instance.
    description String
    The description of flowlog.
    flowLogId String
    ID of the CEN flow log.
    flowLogName String
    The name of flowlog.
    id String
    ID of the CEN flow log.
    logStoreName String
    The name of the log store which is in the project_name SLS project.
    projectName String
    The name of the SLS project.
    status String
    The status of flowlog. Valid values: ["Active", "Inactive"]. Default to "Active".

    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.53.0 published on Wednesday, Apr 17, 2024 by Pulumi