Alibaba Cloud v3.76.0 published on Tuesday, Apr 8, 2025 by Pulumi
alicloud.sag.getSmartagFlowLogs
Explore with Pulumi AI
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)
public static Output<GetSmartagFlowLogsResult> getSmartagFlowLogs(GetSmartagFlowLogsArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:sag/getSmartagFlowLogs:getSmartagFlowLogs
arguments:
# arguments dictionary
The following arguments are supported:
- Description
Changes to this property will trigger replacement.
- The description of the flow log.
- Ids
Changes to this property will trigger replacement.
- A list of Flow Log IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Flow Log name.
- Output
File string - 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.
- 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.
- The description of the flow log.
- Ids
Changes to this property will trigger replacement.
- A list of Flow Log IDs.
- Name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Flow Log name.
- Output
File string - 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.
- 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.
- The description of the flow log.
- ids
Changes to this property will trigger replacement.
- A list of Flow Log IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Flow Log name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Integer - page
Size Integer - status
Changes to this property will trigger replacement.
- 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.
- The description of the flow log.
- ids
Changes to this property will trigger replacement.
- A list of Flow Log IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Flow Log name.
- output
File string - File name where to save data source results (after running
pulumi preview
). - page
Number number - page
Size number - status
Changes to this property will trigger replacement.
- 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.
- The description of the flow log.
- ids
Changes to this property will trigger replacement.
- A list of Flow Log IDs.
- name_
regex Changes to this property will trigger replacement.
- 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.
- 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.
- The description of the flow log.
- ids
Changes to this property will trigger replacement.
- A list of Flow Log IDs.
- name
Regex Changes to this property will trigger replacement.
- A regex string to filter results by Flow Log name.
- output
File String - File name where to save data source results (after running
pulumi preview
). - page
Number Number - page
Size Number - status
Changes to this property will trigger replacement.
- 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.
Ali Cloud. Sag. Outputs. Get Smartag Flow Logs Log> - Names List<string>
- Description string
- Name
Regex string - Output
File string - Page
Number int - Page
Size int - Status string
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- Logs
[]Get
Smartag Flow Logs Log - Names []string
- Description string
- Name
Regex string - Output
File string - Page
Number int - Page
Size int - Status string
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- logs
List<Get
Smartag Flow Logs Log> - names List<String>
- description String
- name
Regex String - output
File String - page
Number Integer - page
Size Integer - status String
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- logs
Get
Smartag Flow Logs Log[] - names string[]
- description string
- name
Regex string - output
File string - page
Number number - page
Size number - status string
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- logs
Sequence[Get
Smartag Flow Logs Log] - 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
- name
Regex String - output
File String - page
Number Number - page
Size Number - status String
Supporting Types
GetSmartagFlowLogsLog
- 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. string - The description of the flow log.
- Flow
Log Id This property is required. string - The ID of the flow log.
- Flow
Log Name This property is required. string - The name of the flow log.
- Id
This property is required. string - 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. string - The name of the Log Service Logstore.
- Netflow
Server Ip This property is required. string - 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. string - The NetFlow version. Default value: V9.
- Output
Type 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.
- Project
Name This property is required. string - The name of the Log Service project.
- Resource
Group Id This property is required. string - The ID of the resource group.
- Sls
Region Id 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. - Total
Sag Num This property is required. int - 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. string - The description of the flow log.
- Flow
Log Id This property is required. string - The ID of the flow log.
- Flow
Log Name This property is required. string - The name of the flow log.
- Id
This property is required. string - 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. string - The name of the Log Service Logstore.
- Netflow
Server Ip This property is required. string - 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. string - The NetFlow version. Default value: V9.
- Output
Type 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.
- Project
Name This property is required. string - The name of the Log Service project.
- Resource
Group Id This property is required. string - The ID of the resource group.
- Sls
Region Id 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. - Total
Sag Num This property is required. int - The number of Smart Access gateway (SAG) instances with which the flow log is associated.
- active
Aging 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.
- flow
Log Id This property is required. String - The ID of the flow log.
- flow
Log Name This property is required. String - The name of the flow log.
- id
This property is required. String - The ID of the Flow Log.
- inactive
Aging 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.
- logstore
Name This property is required. String - The name of the Log Service Logstore.
- netflow
Server Ip This property is required. String - The IP address of the NetFlow collector where the flow log is stored.
- netflow
Server Port This property is required. Integer - The port of the NetFlow collector. Default value: 9995.
- netflow
Version This property is required. String - The NetFlow version. Default value: V9.
- output
Type 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.
- project
Name This property is required. String - The name of the Log Service project.
- resource
Group Id This property is required. String - The ID of the resource group.
- sls
Region Id 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. - total
Sag Num This property is required. Integer - The number of Smart Access gateway (SAG) instances with which the flow log is associated.
- active
Aging 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.
- flow
Log Id This property is required. string - The ID of the flow log.
- flow
Log Name This property is required. string - The name of the flow log.
- id
This property is required. string - The ID of the Flow Log.
- inactive
Aging 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.
- logstore
Name This property is required. string - The name of the Log Service Logstore.
- netflow
Server Ip This property is required. string - The IP address of the NetFlow collector where the flow log is stored.
- netflow
Server Port This property is required. number - The port of the NetFlow collector. Default value: 9995.
- netflow
Version This property is required. string - The NetFlow version. Default value: V9.
- output
Type 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.
- project
Name This property is required. string - The name of the Log Service project.
- resource
Group Id This property is required. string - The ID of the resource group.
- sls
Region Id 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. - total
Sag Num 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.
- active
Aging 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.
- flow
Log Id This property is required. String - The ID of the flow log.
- flow
Log Name This property is required. String - The name of the flow log.
- id
This property is required. String - The ID of the Flow Log.
- inactive
Aging 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.
- logstore
Name This property is required. String - The name of the Log Service Logstore.
- netflow
Server Ip This property is required. String - The IP address of the NetFlow collector where the flow log is stored.
- netflow
Server Port This property is required. Number - The port of the NetFlow collector. Default value: 9995.
- netflow
Version This property is required. String - The NetFlow version. Default value: V9.
- output
Type 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.
- project
Name This property is required. String - The name of the Log Service project.
- resource
Group Id This property is required. String - The ID of the resource group.
- sls
Region Id 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. - total
Sag Num 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.