FlowLog

class FlowLog : KotlinCustomResource

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>

Properties

Link copied to clipboard

Data aggregation interval.

Link copied to clipboard
val businessStatus: Output<String>

Business status.

Link copied to clipboard
val createTime: Output<String>

Creation time.

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

The Description of the VPC Flow Log.

Link copied to clipboard
val flowLogId: Output<String>

The flow log ID.

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

The Name of the VPC Flow Log.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard
val logStoreName: Output<String>

The name of the logstore.

Link copied to clipboard
val projectName: Output<String>

The name of the project.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val resourceGroupId: Output<String>

The ID of the resource group.

Link copied to clipboard
val resourceId: Output<String>

The ID of the resource.

Link copied to clipboard
val resourceType: Output<String>

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>

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

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

The tag of the current instance resource.

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

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

Link copied to clipboard
val trafficType: Output<String>

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

Link copied to clipboard
val urn: Output<String>