1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. sag
  5. getSmartagFlowLogs
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi

alicloud.sag.getSmartagFlowLogs

Explore with Pulumi AI

Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 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);
Copy
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)
Copy
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
	})
}
Copy
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),
    };
});
Copy
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()));
    }
}
Copy
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}
Copy

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>
Copy
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]
Copy
func GetSmartagFlowLogs(ctx *Context, args *GetSmartagFlowLogsArgs, opts ...InvokeOption) (*GetSmartagFlowLogsResult, error)
func GetSmartagFlowLogsOutput(ctx *Context, args *GetSmartagFlowLogsOutputArgs, opts ...InvokeOption) GetSmartagFlowLogsResultOutput
Copy

> 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)
}
Copy
public static CompletableFuture<GetSmartagFlowLogsResult> getSmartagFlowLogs(GetSmartagFlowLogsArgs args, InvokeOptions options)
public static Output<GetSmartagFlowLogsResult> getSmartagFlowLogs(GetSmartagFlowLogsArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: alicloud:sag/getSmartagFlowLogs:getSmartagFlowLogs
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

Description Changes to this property will trigger replacement. string
The description of the flow log.
Ids Changes to this property will trigger replacement. List<string>
A list of Flow Log IDs.
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
Description Changes to this property will trigger replacement. string
The description of the flow log.
Ids Changes to this property will trigger replacement. []string
A list of Flow Log IDs.
NameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
description Changes to this property will trigger replacement. String
The description of the flow log.
ids Changes to this property will trigger replacement. List<String>
A list of Flow Log IDs.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
description Changes to this property will trigger replacement. string
The description of the flow log.
ids Changes to this property will trigger replacement. string[]
A list of Flow Log IDs.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
description Changes to this property will trigger replacement. str
The description of the flow log.
ids Changes to this property will trigger replacement. Sequence[str]
A list of Flow Log IDs.
name_regex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
description Changes to this property will trigger replacement. String
The description of the flow log.
ids Changes to this property will trigger replacement. List<String>
A list of Flow Log IDs.
nameRegex Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 This property is required. int
The time interval at which log data of active connections is collected. Valid values: 60 to 6000. Default value: 300. Unit: second.
Description This property is required. string
The description of the flow log.
FlowLogId This property is required. string
The ID of the flow log.
FlowLogName This property is required. string
The name of the flow log.
Id This property is required. string
The ID of the Flow Log.
InactiveAging This property is required. int
The time interval at which log data of inactive connections is connected. Valid values: 10 to 600. Default value: 15. Unit: second.
LogstoreName This property is required. string
The name of the Log Service Logstore.
NetflowServerIp This property is required. string
The IP address of the NetFlow collector where the flow log is stored.
NetflowServerPort This property is required. int
The port of the NetFlow collector. Default value: 9995.
NetflowVersion This property is required. string
The NetFlow version. Default value: V9.
OutputType This property is required. 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 This property is required. string
The name of the Log Service project.
ResourceGroupId This property is required. string
The ID of the resource group.
SlsRegionId This property is required. string
The ID of the region where Log Service is deployed.
Status This property is required. string
The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
TotalSagNum This property is required. int
The number of Smart Access gateway (SAG) instances with which the flow log is associated.
ActiveAging This property is required. int
The time interval at which log data of active connections is collected. Valid values: 60 to 6000. Default value: 300. Unit: second.
Description This property is required. string
The description of the flow log.
FlowLogId This property is required. string
The ID of the flow log.
FlowLogName This property is required. string
The name of the flow log.
Id This property is required. string
The ID of the Flow Log.
InactiveAging This property is required. int
The time interval at which log data of inactive connections is connected. Valid values: 10 to 600. Default value: 15. Unit: second.
LogstoreName This property is required. string
The name of the Log Service Logstore.
NetflowServerIp This property is required. string
The IP address of the NetFlow collector where the flow log is stored.
NetflowServerPort This property is required. int
The port of the NetFlow collector. Default value: 9995.
NetflowVersion This property is required. string
The NetFlow version. Default value: V9.
OutputType This property is required. 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 This property is required. string
The name of the Log Service project.
ResourceGroupId This property is required. string
The ID of the resource group.
SlsRegionId This property is required. string
The ID of the region where Log Service is deployed.
Status This property is required. string
The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
TotalSagNum This property is required. int
The number of Smart Access gateway (SAG) instances with which the flow log is associated.
activeAging This property is required. Integer
The time interval at which log data of active connections is collected. Valid values: 60 to 6000. Default value: 300. Unit: second.
description This property is required. String
The description of the flow log.
flowLogId This property is required. String
The ID of the flow log.
flowLogName This property is required. String
The name of the flow log.
id This property is required. String
The ID of the Flow Log.
inactiveAging This property is required. Integer
The time interval at which log data of inactive connections is connected. Valid values: 10 to 600. Default value: 15. Unit: second.
logstoreName This property is required. String
The name of the Log Service Logstore.
netflowServerIp This property is required. String
The IP address of the NetFlow collector where the flow log is stored.
netflowServerPort This property is required. Integer
The port of the NetFlow collector. Default value: 9995.
netflowVersion This property is required. String
The NetFlow version. Default value: V9.
outputType This property is required. 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 This property is required. String
The name of the Log Service project.
resourceGroupId This property is required. String
The ID of the resource group.
slsRegionId This property is required. String
The ID of the region where Log Service is deployed.
status This property is required. String
The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
totalSagNum This property is required. Integer
The number of Smart Access gateway (SAG) instances with which the flow log is associated.
activeAging This property is required. number
The time interval at which log data of active connections is collected. Valid values: 60 to 6000. Default value: 300. Unit: second.
description This property is required. string
The description of the flow log.
flowLogId This property is required. string
The ID of the flow log.
flowLogName This property is required. string
The name of the flow log.
id This property is required. string
The ID of the Flow Log.
inactiveAging This property is required. number
The time interval at which log data of inactive connections is connected. Valid values: 10 to 600. Default value: 15. Unit: second.
logstoreName This property is required. string
The name of the Log Service Logstore.
netflowServerIp This property is required. string
The IP address of the NetFlow collector where the flow log is stored.
netflowServerPort This property is required. number
The port of the NetFlow collector. Default value: 9995.
netflowVersion This property is required. string
The NetFlow version. Default value: V9.
outputType This property is required. 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 This property is required. string
The name of the Log Service project.
resourceGroupId This property is required. string
The ID of the resource group.
slsRegionId This property is required. string
The ID of the region where Log Service is deployed.
status This property is required. string
The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
totalSagNum This property is required. number
The number of Smart Access gateway (SAG) instances with which the flow log is associated.
active_aging This property is required. int
The time interval at which log data of active connections is collected. Valid values: 60 to 6000. Default value: 300. Unit: second.
description This property is required. str
The description of the flow log.
flow_log_id This property is required. str
The ID of the flow log.
flow_log_name This property is required. str
The name of the flow log.
id This property is required. str
The ID of the Flow Log.
inactive_aging This property is required. 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 This property is required. str
The name of the Log Service Logstore.
netflow_server_ip This property is required. str
The IP address of the NetFlow collector where the flow log is stored.
netflow_server_port This property is required. int
The port of the NetFlow collector. Default value: 9995.
netflow_version This property is required. str
The NetFlow version. Default value: V9.
output_type This property is required. 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 This property is required. str
The name of the Log Service project.
resource_group_id This property is required. str
The ID of the resource group.
sls_region_id This property is required. str
The ID of the region where Log Service is deployed.
status This property is required. str
The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
total_sag_num This property is required. int
The number of Smart Access gateway (SAG) instances with which the flow log is associated.
activeAging This property is required. Number
The time interval at which log data of active connections is collected. Valid values: 60 to 6000. Default value: 300. Unit: second.
description This property is required. String
The description of the flow log.
flowLogId This property is required. String
The ID of the flow log.
flowLogName This property is required. String
The name of the flow log.
id This property is required. String
The ID of the Flow Log.
inactiveAging This property is required. Number
The time interval at which log data of inactive connections is connected. Valid values: 10 to 600. Default value: 15. Unit: second.
logstoreName This property is required. String
The name of the Log Service Logstore.
netflowServerIp This property is required. String
The IP address of the NetFlow collector where the flow log is stored.
netflowServerPort This property is required. Number
The port of the NetFlow collector. Default value: 9995.
netflowVersion This property is required. String
The NetFlow version. Default value: V9.
outputType This property is required. 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 This property is required. String
The name of the Log Service project.
resourceGroupId This property is required. String
The ID of the resource group.
slsRegionId This property is required. String
The ID of the region where Log Service is deployed.
status This property is required. String
The status of the flow log. Valid values: Active: The flow log is enabled. Inactive: The flow log is disabled.
totalSagNum This property is required. 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.
Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi