FlowLogArgs

data class FlowLogArgs(val aggregationInterval: Output<String>? = null, val description: Output<String>? = null, val flowLogName: Output<String>? = null, val logStoreName: Output<String>? = null, val projectName: Output<String>? = null, val resourceGroupId: Output<String>? = null, val resourceId: Output<String>? = null, val resourceType: Output<String>? = null, val status: Output<String>? = null, val tags: Output<Map<String, Any>>? = null, val trafficPaths: Output<List<String>>? = null, val trafficType: Output<String>? = null) : ConvertibleToJava<FlowLogArgs>

Provides a Vpc Flow Log resource. While it uses alicloud.vpc.FlowLog to build a vpc flow log resource, it will be active by default. For information about Vpc Flow Log and how to use it, see What is Flow Log.

NOTE: Available in v1.117.0+.

Example Usage

Basic Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.resourcemanager.ResourceGroup;
import com.pulumi.alicloud.resourcemanager.ResourceGroupArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.alicloud.vpc.FlowLog;
import com.pulumi.alicloud.vpc.FlowLogArgs;
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 config = ctx.config();
final var name = config.get("name").orElse("tf-testacc-example");
var defaultRg = new ResourceGroup("defaultRg", ResourceGroupArgs.builder()
.resourceGroupName(name)
.displayName("tf-testAcc-rg78")
.build());
var defaultVpc = new Network("defaultVpc", NetworkArgs.builder()
.vpcName(String.format("%s1", name))
.cidrBlock("10.0.0.0/8")
.build());
var modifyRG = new ResourceGroup("modifyRG", ResourceGroupArgs.builder()
.displayName("tf-testAcc-rg405")
.resourceGroupName(String.format("%s2", name))
.build());
var defaultProject = new Project("defaultProject");
var defaultStore = new Store("defaultStore", StoreArgs.builder()
.project(defaultProject.name())
.build());
var defaultFlowLog = new FlowLog("defaultFlowLog", FlowLogArgs.builder()
.flowLogName(name)
.logStoreName(defaultStore.name())
.description("tf-testAcc-flowlog")
.trafficPaths("all")
.projectName(defaultProject.name())
.resourceType("VPC")
.resourceGroupId(defaultRg.id())
.resourceId(defaultVpc.id())
.aggregationInterval("1")
.trafficType("All")
.build());
}
}

Import

Vpc Flow Log can be imported using the id, e.g.

$ pulumi import alicloud:vpc/flowLog:FlowLog example <id>

Constructors

Link copied to clipboard
fun FlowLogArgs(aggregationInterval: Output<String>? = null, description: Output<String>? = null, flowLogName: Output<String>? = null, logStoreName: Output<String>? = null, projectName: Output<String>? = null, resourceGroupId: Output<String>? = null, resourceId: Output<String>? = null, resourceType: Output<String>? = null, status: Output<String>? = null, tags: Output<Map<String, Any>>? = null, trafficPaths: Output<List<String>>? = null, trafficType: Output<String>? = null)

Functions

Link copied to clipboard
open override fun toJava(): FlowLogArgs

Properties

Link copied to clipboard
val aggregationInterval: Output<String>? = null

Data aggregation interval.

Link copied to clipboard
val description: Output<String>? = null

The Description of the VPC Flow Log.

Link copied to clipboard
val flowLogName: Output<String>? = null

The Name of the VPC Flow Log.

Link copied to clipboard
val logStoreName: Output<String>? = null

The name of the logstore.

Link copied to clipboard
val projectName: Output<String>? = null

The name of the project.

Link copied to clipboard
val resourceGroupId: Output<String>? = null

The ID of the resource group.

Link copied to clipboard
val resourceId: Output<String>? = null

The ID of the resource.

Link copied to clipboard
val resourceType: Output<String>? = null

The resource type of the traffic captured by the flow log:-NetworkInterface: ENI.-VSwitch: All ENIs in the VSwitch.-VPC: All ENIs in the VPC.

Link copied to clipboard
val status: Output<String>? = null

The status of the VPC Flow Log. Valid values: Active and Inactive.

Link copied to clipboard
val tags: Output<Map<String, Any>>? = null

The tag of the current instance resource.

Link copied to clipboard
val trafficPaths: Output<List<String>>? = null

The collected flow path. Value:all: indicates full acquisition.internetGateway: indicates public network traffic collection.

Link copied to clipboard
val trafficType: Output<String>? = null

The type of traffic collected. Valid values:All: All traffic.Allow: Access control allowedtraffic.Drop: Access control denied traffic.