Flow Log
This resource used to create a flow log function in Cloud Enterprise Network (CEN). By using the flow log function, you can capture the traffic data of the network instances in different regions of a CEN. You can also use the data aggregated in flow logs to analyze cross-region traffic flows, minimize traffic costs, and troubleshoot network faults. For information about CEN flow log and how to use it, see Manage CEN flowlog.
NOTE: Available since v1.73.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.cen.Instance;
import com.pulumi.alicloud.log.Project;
import com.pulumi.alicloud.log.ProjectArgs;
import com.pulumi.alicloud.log.Store;
import com.pulumi.alicloud.log.StoreArgs;
import com.pulumi.alicloud.cen.FlowLog;
import com.pulumi.alicloud.cen.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) {
var defaultInstance = new Instance("defaultInstance");
var defaultProject = new Project("defaultProject", ProjectArgs.builder()
.description("create by terraform")
.build());
var defaultStore = new Store("defaultStore", StoreArgs.builder()
.project(defaultProject.name())
.retentionPeriod(3650)
.shardCount(3)
.autoSplit(true)
.maxSplitShardCount(60)
.appendMeta(true)
.build());
var defaultFlowLog = new FlowLog("defaultFlowLog", FlowLogArgs.builder()
.flowLogName("my-flowlog")
.cenId(defaultInstance.id())
.projectName(defaultProject.name())
.logStoreName(defaultStore.name())
.build());
}
}
Content copied to clipboard
Import
CEN flowlog can be imported using the id, e.g.
$ pulumi import alicloud:cen/flowLog:FlowLog default flowlog-tig1xxxxxx
Content copied to clipboard