1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. sag
  5. getSmartagFlowLogs
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

alicloud.sag.getSmartagFlowLogs

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.54.0 published on Wednesday, Apr 24, 2024 by Pulumi

    This data source provides the Smartag Flow Logs of the current Alibaba Cloud user.

    NOTE: Available in v1.168.0+.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const ids = alicloud.sag.getSmartagFlowLogs({
        ids: ["example_id"],
    });
    export const smartagFlowLogId1 = ids.then(ids => ids.logs?.[0]?.id);
    const nameRegex = alicloud.sag.getSmartagFlowLogs({
        nameRegex: "^my-FlowLog",
    });
    export const smartagFlowLogId2 = nameRegex.then(nameRegex => nameRegex.logs?.[0]?.id);
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    ids = alicloud.sag.get_smartag_flow_logs(ids=["example_id"])
    pulumi.export("smartagFlowLogId1", ids.logs[0].id)
    name_regex = alicloud.sag.get_smartag_flow_logs(name_regex="^my-FlowLog")
    pulumi.export("smartagFlowLogId2", name_regex.logs[0].id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/sag"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		ids, err := sag.GetSmartagFlowLogs(ctx, &sag.GetSmartagFlowLogsArgs{
    			Ids: []string{
    				"example_id",
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("smartagFlowLogId1", ids.Logs[0].Id)
    		nameRegex, err := sag.GetSmartagFlowLogs(ctx, &sag.GetSmartagFlowLogsArgs{
    			NameRegex: pulumi.StringRef("^my-FlowLog"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		ctx.Export("smartagFlowLogId2", nameRegex.Logs[0].Id)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var ids = AliCloud.Sag.GetSmartagFlowLogs.Invoke(new()
        {
            Ids = new[]
            {
                "example_id",
            },
        });
    
        var nameRegex = AliCloud.Sag.GetSmartagFlowLogs.Invoke(new()
        {
            NameRegex = "^my-FlowLog",
        });
    
        return new Dictionary<string, object?>
        {
            ["smartagFlowLogId1"] = ids.Apply(getSmartagFlowLogsResult => getSmartagFlowLogsResult.Logs[0]?.Id),
            ["smartagFlowLogId2"] = nameRegex.Apply(getSmartagFlowLogsResult => getSmartagFlowLogsResult.Logs[0]?.Id),
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.sag.SagFunctions;
    import com.pulumi.alicloud.sag.inputs.GetSmartagFlowLogsArgs;
    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 = SagFunctions.getSmartagFlowLogs(GetSmartagFlowLogsArgs.builder()
                .ids("example_id")
                .build());
    
            ctx.export("smartagFlowLogId1", ids.applyValue(getSmartagFlowLogsResult -> getSmartagFlowLogsResult.logs()[0].id()));
            final var nameRegex = SagFunctions.getSmartagFlowLogs(GetSmartagFlowLogsArgs.builder()
                .nameRegex("^my-FlowLog")
                .build());
    
            ctx.export("smartagFlowLogId2", nameRegex.applyValue(getSmartagFlowLogsResult -> getSmartagFlowLogsResult.logs()[0].id()));
        }
    }
    
    variables:
      ids:
        fn::invoke:
          Function: alicloud:sag:getSmartagFlowLogs
          Arguments:
            ids:
              - example_id
      nameRegex:
        fn::invoke:
          Function: alicloud:sag:getSmartagFlowLogs
          Arguments:
            nameRegex: ^my-FlowLog
    outputs:
      smartagFlowLogId1: ${ids.logs[0].id}
      smartagFlowLogId2: ${nameRegex.logs[0].id}
    

    Using getSmartagFlowLogs

    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 getSmartagFlowLogs(args: GetSmartagFlowLogsArgs, opts?: InvokeOptions): Promise<GetSmartagFlowLogsResult>
    function getSmartagFlowLogsOutput(args: GetSmartagFlowLogsOutputArgs, opts?: InvokeOptions): Output<GetSmartagFlowLogsResult>
    def get_smartag_flow_logs(description: Optional[str] = None,
                              ids: Optional[Sequence[str]] = None,
                              name_regex: Optional[str] = None,
                              output_file: Optional[str] = None,
                              page_number: Optional[int] = None,
                              page_size: Optional[int] = None,
                              status: Optional[str] = None,
                              opts: Optional[InvokeOptions] = None) -> GetSmartagFlowLogsResult
    def get_smartag_flow_logs_output(description: Optional[pulumi.Input[str]] = None,
                              ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                              name_regex: Optional[pulumi.Input[str]] = None,
                              output_file: Optional[pulumi.Input[str]] = None,
                              page_number: Optional[pulumi.Input[int]] = None,
                              page_size: Optional[pulumi.Input[int]] = None,
                              status: Optional[pulumi.Input[str]] = None,
                              opts: Optional[InvokeOptions] = None) -> Output[GetSmartagFlowLogsResult]
    func GetSmartagFlowLogs(ctx *Context, args *GetSmartagFlowLogsArgs, opts ...InvokeOption) (*GetSmartagFlowLogsResult, error)
    func GetSmartagFlowLogsOutput(ctx *Context, args *GetSmartagFlowLogsOutputArgs, opts ...InvokeOption) GetSmartagFlowLogsResultOutput

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

    public static class GetSmartagFlowLogs 
    {
        public static Task<GetSmartagFlowLogsResult> InvokeAsync(GetSmartagFlowLogsArgs args, InvokeOptions? opts = null)
        public static Output<GetSmartagFlowLogsResult> Invoke(GetSmartagFlowLogsInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetSmartagFlowLogsResult> getSmartagFlowLogs(GetSmartagFlowLogsArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: alicloud:sag/getSmartagFlowLogs:getSmartagFlowLogs
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Description string
    The description of the flow log.
    Ids List<string>
    A list of Flow Log IDs.
    NameRegex string
    A regex string to filter results by Flow Log name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    Status string
    The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
    Description string
    The description of the flow log.
    Ids []string
    A list of Flow Log IDs.
    NameRegex string
    A regex string to filter results by Flow Log name.
    OutputFile string
    File name where to save data source results (after running pulumi preview).
    PageNumber int
    PageSize int
    Status string
    The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
    description String
    The description of the flow log.
    ids List<String>
    A list of Flow Log IDs.
    nameRegex String
    A regex string to filter results by Flow Log name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Integer
    pageSize Integer
    status String
    The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
    description string
    The description of the flow log.
    ids string[]
    A list of Flow Log IDs.
    nameRegex string
    A regex string to filter results by Flow Log name.
    outputFile string
    File name where to save data source results (after running pulumi preview).
    pageNumber number
    pageSize number
    status string
    The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
    description str
    The description of the flow log.
    ids Sequence[str]
    A list of Flow Log IDs.
    name_regex str
    A regex string to filter results by Flow Log name.
    output_file str
    File name where to save data source results (after running pulumi preview).
    page_number int
    page_size int
    status str
    The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
    description String
    The description of the flow log.
    ids List<String>
    A list of Flow Log IDs.
    nameRegex String
    A regex string to filter results by Flow Log name.
    outputFile String
    File name where to save data source results (after running pulumi preview).
    pageNumber Number
    pageSize Number
    status String
    The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.

    getSmartagFlowLogs Result

    The following output properties are available:

    Id string
    The provider-assigned unique ID for this managed resource.
    Ids List<string>
    Logs List<Pulumi.AliCloud.Sag.Outputs.GetSmartagFlowLogsLog>
    Names List<string>
    Description string
    NameRegex string
    OutputFile string
    PageNumber int
    PageSize int
    Status string
    Id string
    The provider-assigned unique ID for this managed resource.
    Ids []string
    Logs []GetSmartagFlowLogsLog
    Names []string
    Description string
    NameRegex string
    OutputFile string
    PageNumber int
    PageSize int
    Status string
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    logs List<GetSmartagFlowLogsLog>
    names List<String>
    description String
    nameRegex String
    outputFile String
    pageNumber Integer
    pageSize Integer
    status String
    id string
    The provider-assigned unique ID for this managed resource.
    ids string[]
    logs GetSmartagFlowLogsLog[]
    names string[]
    description string
    nameRegex string
    outputFile string
    pageNumber number
    pageSize number
    status string
    id str
    The provider-assigned unique ID for this managed resource.
    ids Sequence[str]
    logs Sequence[GetSmartagFlowLogsLog]
    names Sequence[str]
    description str
    name_regex str
    output_file str
    page_number int
    page_size int
    status str
    id String
    The provider-assigned unique ID for this managed resource.
    ids List<String>
    logs List<Property Map>
    names List<String>
    description String
    nameRegex String
    outputFile String
    pageNumber Number
    pageSize Number
    status String

    Supporting Types

    GetSmartagFlowLogsLog

    ActiveAging int
    The time interval at which log data of active connections is collected. Valid values: 60 to 6000. Default value: 300. Unit: second.
    Description string
    The description of the flow log.
    FlowLogId string
    The ID of the flow log.
    FlowLogName string
    The name of the flow log.
    Id string
    The ID of the Flow Log.
    InactiveAging int
    The time interval at which log data of inactive connections is connected. Valid values: 10 to 600. Default value: 15. Unit: second.
    LogstoreName string
    The name of the Log Service Logstore.
    NetflowServerIp string
    The IP address of the NetFlow collector where the flow log is stored.
    NetflowServerPort int
    The port of the NetFlow collector. Default value: 9995.
    NetflowVersion string
    The NetFlow version. Default value: V9.
    OutputType string
    The location where the flow log is stored. Valid values: sls: The flow log is stored in Log Service. netflow: The flow log is stored on a NetFlow collector. all: The flow log is stored both in Log Service and on a NetFlow collector.
    ProjectName string
    The name of the Log Service project.
    ResourceGroupId string
    The ID of the resource group.
    SlsRegionId string
    The ID of the region where Log Service is deployed.
    Status string
    The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
    TotalSagNum int
    The number of Smart Access gateway (SAG) instances with which the flow log is associated.
    ActiveAging int
    The time interval at which log data of active connections is collected. Valid values: 60 to 6000. Default value: 300. Unit: second.
    Description string
    The description of the flow log.
    FlowLogId string
    The ID of the flow log.
    FlowLogName string
    The name of the flow log.
    Id string
    The ID of the Flow Log.
    InactiveAging int
    The time interval at which log data of inactive connections is connected. Valid values: 10 to 600. Default value: 15. Unit: second.
    LogstoreName string
    The name of the Log Service Logstore.
    NetflowServerIp string
    The IP address of the NetFlow collector where the flow log is stored.
    NetflowServerPort int
    The port of the NetFlow collector. Default value: 9995.
    NetflowVersion string
    The NetFlow version. Default value: V9.
    OutputType string
    The location where the flow log is stored. Valid values: sls: The flow log is stored in Log Service. netflow: The flow log is stored on a NetFlow collector. all: The flow log is stored both in Log Service and on a NetFlow collector.
    ProjectName string
    The name of the Log Service project.
    ResourceGroupId string
    The ID of the resource group.
    SlsRegionId string
    The ID of the region where Log Service is deployed.
    Status string
    The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
    TotalSagNum int
    The number of Smart Access gateway (SAG) instances with which the flow log is associated.
    activeAging Integer
    The time interval at which log data of active connections is collected. Valid values: 60 to 6000. Default value: 300. Unit: second.
    description String
    The description of the flow log.
    flowLogId String
    The ID of the flow log.
    flowLogName String
    The name of the flow log.
    id String
    The ID of the Flow Log.
    inactiveAging Integer
    The time interval at which log data of inactive connections is connected. Valid values: 10 to 600. Default value: 15. Unit: second.
    logstoreName String
    The name of the Log Service Logstore.
    netflowServerIp String
    The IP address of the NetFlow collector where the flow log is stored.
    netflowServerPort Integer
    The port of the NetFlow collector. Default value: 9995.
    netflowVersion String
    The NetFlow version. Default value: V9.
    outputType String
    The location where the flow log is stored. Valid values: sls: The flow log is stored in Log Service. netflow: The flow log is stored on a NetFlow collector. all: The flow log is stored both in Log Service and on a NetFlow collector.
    projectName String
    The name of the Log Service project.
    resourceGroupId String
    The ID of the resource group.
    slsRegionId String
    The ID of the region where Log Service is deployed.
    status String
    The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
    totalSagNum Integer
    The number of Smart Access gateway (SAG) instances with which the flow log is associated.
    activeAging number
    The time interval at which log data of active connections is collected. Valid values: 60 to 6000. Default value: 300. Unit: second.
    description string
    The description of the flow log.
    flowLogId string
    The ID of the flow log.
    flowLogName string
    The name of the flow log.
    id string
    The ID of the Flow Log.
    inactiveAging number
    The time interval at which log data of inactive connections is connected. Valid values: 10 to 600. Default value: 15. Unit: second.
    logstoreName string
    The name of the Log Service Logstore.
    netflowServerIp string
    The IP address of the NetFlow collector where the flow log is stored.
    netflowServerPort number
    The port of the NetFlow collector. Default value: 9995.
    netflowVersion string
    The NetFlow version. Default value: V9.
    outputType string
    The location where the flow log is stored. Valid values: sls: The flow log is stored in Log Service. netflow: The flow log is stored on a NetFlow collector. all: The flow log is stored both in Log Service and on a NetFlow collector.
    projectName string
    The name of the Log Service project.
    resourceGroupId string
    The ID of the resource group.
    slsRegionId string
    The ID of the region where Log Service is deployed.
    status string
    The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
    totalSagNum number
    The number of Smart Access gateway (SAG) instances with which the flow log is associated.
    active_aging int
    The time interval at which log data of active connections is collected. Valid values: 60 to 6000. Default value: 300. Unit: second.
    description str
    The description of the flow log.
    flow_log_id str
    The ID of the flow log.
    flow_log_name str
    The name of the flow log.
    id str
    The ID of the Flow Log.
    inactive_aging int
    The time interval at which log data of inactive connections is connected. Valid values: 10 to 600. Default value: 15. Unit: second.
    logstore_name str
    The name of the Log Service Logstore.
    netflow_server_ip str
    The IP address of the NetFlow collector where the flow log is stored.
    netflow_server_port int
    The port of the NetFlow collector. Default value: 9995.
    netflow_version str
    The NetFlow version. Default value: V9.
    output_type str
    The location where the flow log is stored. Valid values: sls: The flow log is stored in Log Service. netflow: The flow log is stored on a NetFlow collector. all: The flow log is stored both in Log Service and on a NetFlow collector.
    project_name str
    The name of the Log Service project.
    resource_group_id str
    The ID of the resource group.
    sls_region_id str
    The ID of the region where Log Service is deployed.
    status str
    The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
    total_sag_num int
    The number of Smart Access gateway (SAG) instances with which the flow log is associated.
    activeAging Number
    The time interval at which log data of active connections is collected. Valid values: 60 to 6000. Default value: 300. Unit: second.
    description String
    The description of the flow log.
    flowLogId String
    The ID of the flow log.
    flowLogName String
    The name of the flow log.
    id String
    The ID of the Flow Log.
    inactiveAging Number
    The time interval at which log data of inactive connections is connected. Valid values: 10 to 600. Default value: 15. Unit: second.
    logstoreName String
    The name of the Log Service Logstore.
    netflowServerIp String
    The IP address of the NetFlow collector where the flow log is stored.
    netflowServerPort Number
    The port of the NetFlow collector. Default value: 9995.
    netflowVersion String
    The NetFlow version. Default value: V9.
    outputType String
    The location where the flow log is stored. Valid values: sls: The flow log is stored in Log Service. netflow: The flow log is stored on a NetFlow collector. all: The flow log is stored both in Log Service and on a NetFlow collector.
    projectName String
    The name of the Log Service project.
    resourceGroupId String
    The ID of the resource group.
    slsRegionId String
    The ID of the region where Log Service is deployed.
    status String
    The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
    totalSagNum Number
    The number of Smart Access gateway (SAG) instances with which the flow log is associated.

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